You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2012/10/25 21:42:50 UTC

git commit: 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 f

Updated Branches:
  refs/heads/master aee0bf3e7 -> 0c96db589


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/master
Commit: 0c96db58987777148ce797a167b68782a9f1edf9
Parents: aee0bf3
Author: Jessica Wang <je...@citrix.com>
Authored: Thu Oct 25 12:42:10 2012 -0700
Committer: Jessica Wang <je...@citrix.com>
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});
                         }
                       },