You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by al...@apache.org on 2012/08/12 22:20:34 UTC

[38/50] [abbrv] git commit: CS-15773: cloudstack 3.0 UI - VPC - create private gateway dialog - add Physical Network dropdown.

CS-15773: cloudstack 3.0 UI - VPC - create private gateway dialog - add Physical Network dropdown.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/c33c19dd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/c33c19dd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/c33c19dd

Branch: refs/heads/master
Commit: c33c19dd31fe765d9268fa2e9beed380bc8e2fe7
Parents: cd5b794
Author: Jessica Wang <je...@citrix.com>
Authored: Wed Aug 8 15:48:28 2012 -0700
Committer: Jessica Wang <je...@citrix.com>
Committed: Wed Aug 8 15:53:36 2012 -0700

----------------------------------------------------------------------
 ui/scripts/vpc.js |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c33c19dd/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index 135bf96..b4d35c4 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -476,6 +476,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 }},
@@ -486,6 +505,7 @@
           $.ajax({
             url: createURL('createPrivateGateway'),
             data: {
+						  physicalnetworkid: args.data.physicalnetworkid,
               vpcid: args.context.vpc[0].id,
               ipaddress: args.data.ipaddress,
               gateway: args.data.gateway,