cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pran...@apache.org
Subject git commit: updated refs/heads/master to 94d5d3d
Date Wed, 24 Apr 2013 07:11:20 GMT
Updated Branches:
  refs/heads/master 932946bbe -> 94d5d3de5


CLOUDSTACK-2166:UI Support for remove Vlan for the non-contiguous vlan support


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/94d5d3de
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/94d5d3de
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/94d5d3de

Branch: refs/heads/master
Commit: 94d5d3de50cd8d8e9de9703e5874d41a46466109
Parents: 932946b
Author: Pranav Saxena <pranav.saxena@citrix.com>
Authored: Wed Apr 24 12:40:38 2013 +0530
Committer: Pranav Saxena <pranav.saxena@citrix.com>
Committed: Wed Apr 24 12:40:38 2013 +0530

----------------------------------------------------------------------
 ui/css/cloudstack3.css |   11 ++++++++++
 ui/scripts/system.js   |   46 +++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 55 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/94d5d3de/ui/css/cloudstack3.css
----------------------------------------------------------------------
diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css
index 1d5d72b..1140d91 100644
--- a/ui/css/cloudstack3.css
+++ b/ui/css/cloudstack3.css
@@ -11853,6 +11853,17 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form
div.form-it
   background-position: -37px -62px;
 }
 
+.removeVlanRange .icon {
+
+  background-position: 1px -92px;
+}
+
+.removeVlanRange:hover .icon{
+
+  background-position: 1px -92px;
+}
+
+
 .resize .icon,
 .updateResourceCount .icon {
   background-position: -167px -66px;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/94d5d3de/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 2058065..4f5925c 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -1036,8 +1036,50 @@
                  notification:{poll:pollAsyncJobResult}
 
 
-               }
+               },
+
+                removeVlanRange:{
+                  label:'Remove VLAN Range',
+                   messages: {
+                        confirm: function(args) {
+                          return 'Are you sure you want to remove an existing VLAN Range
from this guest network?';
+                        },
+                        notification: function(args) {
+                          return 'VLAN Range removed';
+                        }
+                      },
 
+                   createForm:{
+                       title:'Remove VLAN Range',
+                       fields:{
+                         startvlan: {label:'Vlan Start', validation:{required:true}},
+                         endvlan:{label:'Vlan End', validation:{required:true}}
+                       }
+
+                    },
+
+                  action:function(args){
+
+                  var array1=[];
+                  if(args.data.startvlan != "" && args.data.endvlan != ""){
+                    array1.push("&removevlan=" + args.data.startvlan + "-" +  args.data.endvlan);
+                  }
+                  $.ajax({
+                    url: createURL("updatePhysicalNetwork&id=" + selectedPhysicalNetworkObj.id
+ array1.join("")),
+                    dataType: "json",
+                    success: function(json) {
+                      var jobId = json.updatephysicalnetworkresponse.jobid;
+                      var trafficType = getTrafficType(selectedPhysicalNetworkObj, 'Guest');
+                      updateTrafficLabels(trafficType, args.data, function() {
+                        args.response.success({ _custom: { jobId: jobId }});
+                      });
+                   }
+                  });
+
+                  },
+                 notification:{poll:pollAsyncJobResult}
+
+               }
  
             },
 
@@ -1120,7 +1162,7 @@
 
 											args.response.success({
 												actionFilter: function() {
-													var allowedActions = ['edit' , 'addVlanRange'];
+													var allowedActions = ['edit' , 'addVlanRange','removeVlanRange'];
 													return allowedActions;
 												},
 												data: selectedPhysicalNetworkObj


Mime
View raw message