You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mu...@apache.org on 2013/05/12 13:26:22 UTC
[45/50] [abbrv] git commit: updated refs/heads/portablepublicip to
27504d9
CLOUDSTACK-1828:NAT on private gateway UI support
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7ca48833
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7ca48833
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7ca48833
Branch: refs/heads/portablepublicip
Commit: 7ca488334f4fd48c150b31b73ad5be34052a19c8
Parents: b7f10bf
Author: Pranav Saxena <pr...@citrix.com>
Authored: Sat May 11 02:50:16 2013 +0530
Committer: Pranav Saxena <pr...@citrix.com>
Committed: Sat May 11 02:50:16 2013 +0530
----------------------------------------------------------------------
ui/scripts/ui-custom/vpc.js | 1 +
ui/scripts/vpc.js | 37 +++++++++++++++++++++++++++++++++++--
2 files changed, 36 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7ca48833/ui/scripts/ui-custom/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/vpc.js b/ui/scripts/ui-custom/vpc.js
index 2bd26b1..4edccf1 100644
--- a/ui/scripts/ui-custom/vpc.js
+++ b/ui/scripts/ui-custom/vpc.js
@@ -152,6 +152,7 @@
addAction.action({
data: data,
+ $form:args.$form,
context: gateways.context,
response: {
success: function(args) {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7ca48833/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index dc26265..17cf42a 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -717,12 +717,28 @@
netmask: {
label: 'label.netmask', validation: { required: true },
docID: 'helpVPCGatewayNetmask'
+ },
+ sourceNat:{
+ label:'Source NAT',
+ isBoolean:true,
+ isChecked:false
+
}
+
+
}
},
action: function(args) {
+ var array1=[];
+ if(args.$form.find('.form-item[rel=sourceNat]').find('input[type=checkbox]').is(':Checked')== true) {
+ array1.push("&sourcenatsupported=true");
+ }
+ else
+ array1.push("&sourcenatsupported=false");
+
+
$.ajax({
- url: createURL('createPrivateGateway'),
+ url: createURL('createPrivateGateway'+ array1.join("")),
data: {
physicalnetworkid: args.data.physicalnetworkid,
vpcid: args.context.vpc[0].id,
@@ -811,15 +827,32 @@
netmask: {
label: 'label.netmask', validation: { required: true },
docID: 'helpVPCGatewayNetmask'
+ },
+
+ sourceNat:{
+ label:'Source NAT',
+ isBoolean:true,
+ isChecked:false
+
}
+
}
},
action:function(args){
+
+ var array1=[];
+ if(args.$form.find('.form-item[rel=sourceNat]').find('input[type=checkbox]').is(':Checked')== true) {
+ array1.push("&sourcenatsupported=true");
+ }
+ else
+ array1.push("&sourcenatsupported=false");
+
+
$.ajax({
- url: createURL('createPrivateGateway'),
+ url: createURL('createPrivateGateway'+ array1.join("")),
data: {
physicalnetworkid: args.data.physicalnetworkid,
vpcid: args.context.vpc[0].id,