From 7ee71dfd87e0405bf41adb18c20c5825dffc8f71 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Tue, 28 May 2013 11:50:39 -0700 Subject: [PATCH] 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. --- ui/scripts/system.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 9ac3b3083db..8b9a81fe7c7 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',