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.

This commit is contained in:
Jessica Wang 2013-05-28 11:50:39 -07:00
parent 19a1116df2
commit 7ee71dfd87

View File

@ -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',