mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CS-14901: cloudstack 3.0 UI - IP Address page - non-SourceNAT IP - when network offering's Conserve Mode is off, hide LoadBalancer when any PortForwarding rule exists, hide PortForwarding when any LoadBalancer rule exists.
This commit is contained in:
parent
e72b61eccc
commit
05964ea465
@ -70,6 +70,24 @@
|
||||
}
|
||||
|
||||
//3. Once a PortForwarding rule is added, hide StaticNat/VPN/LoadBalancer.
|
||||
$.ajax({
|
||||
url: createURL('listPortForwardingRules'),
|
||||
data: {
|
||||
ipaddressid: item.id,
|
||||
listAll: true
|
||||
},
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
success: function(json) {
|
||||
var rules = json.listportforwardingrulesresponse.portforwardingrule;
|
||||
if(rules != null && rules.length > 0) {
|
||||
disallowedActions.push('enableVPN');
|
||||
disallowedActions.push('enableStaticNAT');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//4. Once a LoadBalancer rule is added, hide StaticNat/VPN/PortForwarding.
|
||||
$.ajax({
|
||||
url: createURL('listLoadBalancerRules'),
|
||||
data: {
|
||||
@ -85,27 +103,7 @@
|
||||
disallowedActions.push('enableStaticNAT');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//4. Once a LoadBalancer rule is added, hide StaticNat/VPN/PortForwarding.
|
||||
$.ajax({
|
||||
url: createURL('listPortForwardingRules'),
|
||||
data: {
|
||||
ipaddressid: item.id,
|
||||
listAll: true
|
||||
},
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
success: function(json) {
|
||||
// Get instance
|
||||
var rules = json.listportforwardingrulesresponse.portforwardingrule;
|
||||
if(rules != null && rules.length > 0) {
|
||||
disallowedActions.push('enableVPN');
|
||||
disallowedActions.push('enableStaticNAT');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -1562,6 +1560,41 @@
|
||||
disallowedActions.push("portForwarding");
|
||||
disallowedActions.push("loadBalancing");
|
||||
}
|
||||
|
||||
//3. Once a PortForwarding rule is added, hide StaticNat/VPN/LoadBalancer.
|
||||
$.ajax({
|
||||
url: createURL('listPortForwardingRules'),
|
||||
data: {
|
||||
ipaddressid: args.context.ipAddresses[0].id,
|
||||
listAll: true
|
||||
},
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
success: function(json) {
|
||||
// Get instance
|
||||
var rules = json.listportforwardingrulesresponse.portforwardingrule;
|
||||
if(rules != null && rules.length > 0) {
|
||||
disallowedActions.push("loadBalancing");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//4. Once a LoadBalancer rule is added, hide StaticNat/VPN/PortForwarding.
|
||||
$.ajax({
|
||||
url: createURL('listLoadBalancerRules'),
|
||||
data: {
|
||||
publicipid: args.context.ipAddresses[0].id,
|
||||
listAll: true
|
||||
},
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
success: function(json) {
|
||||
var rules = json.listloadbalancerrulesresponse.loadbalancerrule;
|
||||
if(rules != null && rules.length > 0) {
|
||||
disallowedActions.push("portForwarding");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user