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,