mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Revert "cloudstack UI - Static NAT, Port Forwarding and Firewall Implementation on JuniperSRX - IP Address page - configuration - Firewall - call listNetworkOfferings API only when the screen is navigated from Guest Network section, but not from VPC section."
This reverts commit a8e18f05298218d858c1833e52d2d3e4dd1ab5df.
This commit is contained in:
parent
aee0bf3e7b
commit
0c96db5898
@ -2005,38 +2005,34 @@
|
||||
{ name: 'tcp', description: 'TCP' },
|
||||
{ name: 'udp', description: 'UDP' }
|
||||
];
|
||||
|
||||
//ICMP portocol is not supported in Firewall provided by JuniperSRX
|
||||
var FirewallProviderArrayIncludesJuniperSRX = false;
|
||||
if('networks' in args.context) {
|
||||
$.ajax({
|
||||
url: createURL('listNetworkOfferings'),
|
||||
data: {
|
||||
id: args.context.networks[0].networkofferingid
|
||||
},
|
||||
async: false,
|
||||
success: function(json) {
|
||||
var serviceArray = json.listnetworkofferingsresponse.networkoffering[0].service;
|
||||
|
||||
for(var i = 0; i < serviceArray.length; i++) {
|
||||
if(serviceArray[i].name == "Firewall") {
|
||||
var providerArray = serviceArray[i].provider;
|
||||
for(var k = 0; k < providerArray.length; k++) {
|
||||
if(providerArray[k].name == "JuniperSRX") {
|
||||
FirewallProviderArrayIncludesJuniperSRX = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
//ICMP portocol is not supported in Firewall provided by JuniperSRX
|
||||
$.ajax({
|
||||
url: createURL('listNetworkOfferings'),
|
||||
data: {
|
||||
id: args.context.networks[0].networkofferingid
|
||||
},
|
||||
async: false,
|
||||
success: function(json) {
|
||||
var serviceArray = json.listnetworkofferingsresponse.networkoffering[0].service;
|
||||
var FirewallProviderArrayIncludesJuniperSRX = false;
|
||||
for(var i = 0; i < serviceArray.length; i++) {
|
||||
if(serviceArray[i].name == "Firewall") {
|
||||
var providerArray = serviceArray[i].provider;
|
||||
for(var k = 0; k < providerArray.length; k++) {
|
||||
if(providerArray[k].name == "JuniperSRX") {
|
||||
FirewallProviderArrayIncludesJuniperSRX = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
if(FirewallProviderArrayIncludesJuniperSRX == false) {
|
||||
data.push({ name: 'icmp', description: 'ICMP' }); //show ICMP option only when provider is not JuniperSRX
|
||||
}
|
||||
|
||||
}
|
||||
if(FirewallProviderArrayIncludesJuniperSRX == false) {
|
||||
data.push({ name: 'icmp', description: 'ICMP' }); //show ICMP option only when provider is not JuniperSRX
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
args.response.success({data: data});
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user