Updated Branches:
  refs/heads/master 19a1116df -> 7ee71dfd8

 CLOUDSTACK-1974: Dedicate Guest VLAN Range - UI - Infrastructure menu - 
physical network - Guest - Dedicated Guest VLAN Range tab - Dedicate VLAN Range 
dialog - change VLAN Range field from textbox to dropdown that lists all 
existing Guest VLAN Ranges under the physical network.


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

Branch: refs/heads/master
Commit: 7ee71dfd87e0405bf41adb18c20c5825dffc8f71
Parents: 19a1116
Author: Jessica Wang <[email protected]>
Authored: Tue May 28 11:50:39 2013 -0700
Committer: Jessica Wang <[email protected]>
Committed: Tue May 28 11:51:46 2013 -0700

----------------------------------------------------------------------
 ui/scripts/system.js |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7ee71dfd/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 9ac3b30..8b9a81f 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -2153,7 +2153,20 @@
                       createForm: {
                         title: 'Dedicate VLAN Range',
                         fields: {
-                          vlanrange: { label: 'VLAN Range(s)', validation: { 
required: true } },                          
+                          vlanrange: { 
+                            label: 'VLAN Range', 
+                            select: function(args) {
+                              var items = [];                             
+                              if(args.context.physicalNetworks[0].vlan != null 
&& args.context.physicalNetworks[0].vlan.length > 0) {
+                                var vlanranges = 
args.context.physicalNetworks[0].vlan.split(";");
+                                for(var i = 0; i < vlanranges.length ; i++) {  
                                
+                                  items.push({id: vlanranges[i], description: 
vlanranges[i]});
+                                }                                
+                              }
+                              args.response.success({data: items});
+                            },
+                            validation: { required: true } 
+                          },                          
                           account: { label: 'label.account', validation: { 
required: true } },
                           domainid: {
                             label: 'label.domain',     

Reply via email to