Revert "cloudstack UI - Static NAT, Port Forwarding and Firewall Implementation on JuniperSRX - IP Address page - configuration - Firewall - exclude ICMP from Protocol dropdown."

This reverts commit b7ccae0dde6f6949e5314036a7aa71460d676316.
This commit is contained in:
Jessica Wang 2012-10-25 12:43:25 -07:00
parent 0c96db5898
commit e531763d87

View File

@ -2000,40 +2000,14 @@
$icmpFields.parent().find('label.error').hide();
}
});
var data = [
{ name: 'tcp', description: 'TCP' },
{ name: 'udp', description: 'UDP' }
];
//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
}
}
});
args.response.success({data: data});
args.response.success({
data: [
{ name: 'tcp', description: 'TCP' },
{ name: 'udp', description: 'UDP' },
{ name: 'icmp', description: 'ICMP' }
]
});
}
},
'startport': { edit: true, label: 'label.start.port' },