Skip to content

Commit c33c19d

Browse files
author
Jessica Wang
committed
CS-15773: cloudstack 3.0 UI - VPC - create private gateway dialog - add Physical Network dropdown.
1 parent cd5b794 commit c33c19d

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

‎ui/scripts/vpc.js‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,25 @@
476476
title: 'Add new gateway',
477477
desc: 'Please specify the information to add a new gateway to this VPC.',
478478
fields: {
479+
physicalnetworkid: {
480+
label: 'label.physical.network',
481+
select: function(args) {
482+
$.ajax({
483+
url: createURL("listPhysicalNetworks"),
484+
data: {
485+
zoneid: args.context.vpc[0].zoneid
486+
},
487+
success: function(json) {
488+
var objs = json.listphysicalnetworksresponse.physicalnetwork;
489+
var items = [];
490+
$(objs).each(function() {
491+
items.push({id: this.id, description: this.name});
492+
});
493+
args.response.success({data: items});
494+
}
495+
});
496+
}
497+
},
479498
vlan: { label: 'label.vlan', validation: { required: true }},
480499
ipaddress: { label: 'label.ip.address', validation: { required: true }},
481500
gateway: { label: 'label.gateway', validation: { required: true }},
@@ -486,6 +505,7 @@
486505
$.ajax({
487506
url: createURL('createPrivateGateway'),
488507
data: {
508+
physicalnetworkid: args.data.physicalnetworkid,
489509
vpcid: args.context.vpc[0].id,
490510
ipaddress: args.data.ipaddress,
491511
gateway: args.data.gateway,

0 commit comments

Comments
 (0)