|
476 | 476 | title: 'Add new gateway', |
477 | 477 | desc: 'Please specify the information to add a new gateway to this VPC.', |
478 | 478 | 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 | + }, |
479 | 498 | vlan: { label: 'label.vlan', validation: { required: true }}, |
480 | 499 | ipaddress: { label: 'label.ip.address', validation: { required: true }}, |
481 | 500 | gateway: { label: 'label.gateway', validation: { required: true }}, |
|
486 | 505 | $.ajax({ |
487 | 506 | url: createURL('createPrivateGateway'), |
488 | 507 | data: { |
| 508 | + physicalnetworkid: args.data.physicalnetworkid, |
489 | 509 | vpcid: args.context.vpc[0].id, |
490 | 510 | ipaddress: args.data.ipaddress, |
491 | 511 | gateway: args.data.gateway, |
|
0 commit comments