cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessicaw...@apache.org
Subject git commit: updated refs/heads/master to 3587127
Date Thu, 01 Aug 2013 22:57:37 GMT
Updated Branches:
  refs/heads/master 4f51d2190 -> 3587127df


CLOUDSTACK-3753: UI > Infrastructure > zone > physical network > Guest > Edit
action - make VLAN Range(s) editable. This is corresponding UI change to recent change of
updatePhysicalNetwork API.


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

Branch: refs/heads/master
Commit: 3587127df6eac5429dd4f10609a2d09a17e1a5fa
Parents: 4f51d21
Author: Jessica Wang <jessicawang@apache.org>
Authored: Thu Aug 1 15:55:05 2013 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Thu Aug 1 15:57:23 2013 -0700

----------------------------------------------------------------------
 ui/scripts/system.js | 42 +++++++++++++++++++-----------------------
 1 file changed, 19 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3587127d/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 6453dac..6ef832c 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -1082,22 +1082,23 @@
                         actions: {
                             edit: {
                                 label: 'label.edit',
-                                action: function(args) {
-                                    var vlan;
-                                    if (args.data.endVlan == null || args.data.endVlan.length
== 0)
-                                        vlan = args.data.startVlan;
-                                    else
-                                        vlan = args.data.startVlan + "-" + args.data.endVlan;
-
-                                    var array1 = [];
-                                    if (vlan != null && vlan.length > 0)
-                                        array1.push("&vlan=" + todb(vlan));
-                                    if (args.data.tags != null && args.data.tags.length
> 0)
-                                        array1.push("&tags=" + todb(args.data.tags));
-
+                                action: function(args) {                                
  
+                                    var data = {
+                                    	id: selectedPhysicalNetworkObj.id,
+                                    };                                 
+                                    if (args.data.vlan != null && args.data.vlan.length
> 0) {
+                                    	$.extend(data, {
+                                    		vlan: args.data.vlan
+                                    	});
+                                    }                                        
+                                    if (args.data.tags != null && args.data.tags.length
> 0) {
+                                    	$.extend(data, {
+                                    		tags: args.data.tags
+                                    	});
+                                    }    
                                     $.ajax({
-                                        url: createURL("updatePhysicalNetwork&id=" +
selectedPhysicalNetworkObj.id + array1.join("")),
-                                        dataType: "json",
+                                        url: createURL('updatePhysicalNetwork'),
+                                        data: data,
                                         success: function(json) {
                                             var jobId = json.updatephysicalnetworkresponse.jobid;
 
@@ -1208,14 +1209,9 @@
                                         label: 'label.state'
                                     },
                                     vlan: {
-                                        label: 'VLAN Range(s)'
-                                        // isEditable: true
-                                    },
-                                    /*  endVlan: {
-                      label: 'label.end.vlan',
-                      isEditable: true
-                    },*/
-
+                                        label: 'VLAN Range(s)',
+                                        isEditable: true
+                                    },   
                                     tags: {
                                         label: 'Tags',
                                         isEditable: true


Mime
View raw message