mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-1828:NAT on private gateway UI support
This commit is contained in:
parent
b7f10bffae
commit
7ca488334f
@ -152,6 +152,7 @@
|
|||||||
|
|
||||||
addAction.action({
|
addAction.action({
|
||||||
data: data,
|
data: data,
|
||||||
|
$form:args.$form,
|
||||||
context: gateways.context,
|
context: gateways.context,
|
||||||
response: {
|
response: {
|
||||||
success: function(args) {
|
success: function(args) {
|
||||||
|
|||||||
@ -717,12 +717,28 @@
|
|||||||
netmask: {
|
netmask: {
|
||||||
label: 'label.netmask', validation: { required: true },
|
label: 'label.netmask', validation: { required: true },
|
||||||
docID: 'helpVPCGatewayNetmask'
|
docID: 'helpVPCGatewayNetmask'
|
||||||
|
},
|
||||||
|
sourceNat:{
|
||||||
|
label:'Source NAT',
|
||||||
|
isBoolean:true,
|
||||||
|
isChecked:false
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
action: function(args) {
|
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({
|
$.ajax({
|
||||||
url: createURL('createPrivateGateway'),
|
url: createURL('createPrivateGateway'+ array1.join("")),
|
||||||
data: {
|
data: {
|
||||||
physicalnetworkid: args.data.physicalnetworkid,
|
physicalnetworkid: args.data.physicalnetworkid,
|
||||||
vpcid: args.context.vpc[0].id,
|
vpcid: args.context.vpc[0].id,
|
||||||
@ -811,15 +827,32 @@
|
|||||||
netmask: {
|
netmask: {
|
||||||
label: 'label.netmask', validation: { required: true },
|
label: 'label.netmask', validation: { required: true },
|
||||||
docID: 'helpVPCGatewayNetmask'
|
docID: 'helpVPCGatewayNetmask'
|
||||||
|
},
|
||||||
|
|
||||||
|
sourceNat:{
|
||||||
|
label:'Source NAT',
|
||||||
|
isBoolean:true,
|
||||||
|
isChecked:false
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
action:function(args){
|
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({
|
$.ajax({
|
||||||
url: createURL('createPrivateGateway'),
|
url: createURL('createPrivateGateway'+ array1.join("")),
|
||||||
data: {
|
data: {
|
||||||
physicalnetworkid: args.data.physicalnetworkid,
|
physicalnetworkid: args.data.physicalnetworkid,
|
||||||
vpcid: args.context.vpc[0].id,
|
vpcid: args.context.vpc[0].id,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user