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. Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/0c96db58 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/0c96db58 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/0c96db58 Branch: refs/heads/marvin-parallel Commit: 0c96db58987777148ce797a167b68782a9f1edf9 Parents: aee0bf3 Author: Jessica Wang <[email protected]> Authored: Thu Oct 25 12:42:10 2012 -0700 Committer: Jessica Wang <[email protected]> Committed: Thu Oct 25 12:42:10 2012 -0700 ---------------------------------------------------------------------- ui/scripts/network.js | 58 ++++++++++++++++++++----------------------- 1 files changed, 27 insertions(+), 31 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0c96db58/ui/scripts/network.js ---------------------------------------------------------------------- diff --git a/ui/scripts/network.js b/ui/scripts/network.js index bcfd19d..4fb5ffe 100644 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -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}); } },
