From f2b73d86c21f58fbe3ca7b0038f38f1a43a5cdb8 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Wed, 8 Aug 2012 15:48:28 -0700 Subject: [PATCH] CS-15773: cloudstack 3.0 UI - VPC - create private gateway dialog - add Physical Network dropdown. --- ui/scripts/vpc.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js index e09673a4072..4d7516d9ca5 100644 --- a/ui/scripts/vpc.js +++ b/ui/scripts/vpc.js @@ -470,6 +470,25 @@ title: 'Add new gateway', desc: 'Please specify the information to add a new gateway to this VPC.', fields: { + physicalnetworkid: { + label: 'label.physical.network', + select: function(args) { + $.ajax({ + url: createURL("listPhysicalNetworks"), + data: { + zoneid: args.context.vpc[0].zoneid + }, + success: function(json) { + var objs = json.listphysicalnetworksresponse.physicalnetwork; + var items = []; + $(objs).each(function() { + items.push({id: this.id, description: this.name}); + }); + args.response.success({data: items}); + } + }); + } + }, vlan: { label: 'label.vlan', validation: { required: true }}, ipaddress: { label: 'label.ip.address', validation: { required: true }}, gateway: { label: 'label.gateway', validation: { required: true }}, @@ -480,6 +499,7 @@ $.ajax({ url: createURL('createPrivateGateway'), data: { + physicalnetworkid: args.data.physicalnetworkid, vpcid: args.context.vpc[0].id, ipaddress: args.data.ipaddress, gateway: args.data.gateway,