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:41:25 UTC
git commit: Revert "cloudstack UI - Static NAT,
Port Forwarding and Firewall Implementation on JuniperSRX - IP
Address page - configuration - if Firewall is provided by JuniperSRX,
hide Firewall icon when Port forwarding is configured on IP Address."
Updated Branches:
refs/heads/master 2b36ad8f9 -> aee0bf3e7
Revert "cloudstack UI - Static NAT, Port Forwarding and Firewall Implementation on JuniperSRX - IP Address page - configuration - if Firewall is provided by JuniperSRX, hide Firewall icon when Port forwarding is configured on IP Address."
This reverts commit 714b0593d3dfaa81af3c13d19a8105d1036954f7.
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/aee0bf3e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/aee0bf3e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/aee0bf3e
Branch: refs/heads/master
Commit: aee0bf3e7b9f7610290b6bd6e50a640a21178655
Parents: 2b36ad8
Author: Jessica Wang <je...@citrix.com>
Authored: Thu Oct 25 12:40:41 2012 -0700
Committer: Jessica Wang <je...@citrix.com>
Committed: Thu Oct 25 12:40:41 2012 -0700
----------------------------------------------------------------------
ui/scripts/network.js | 44 +++++++-------------------------------------
1 files changed, 7 insertions(+), 37 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/aee0bf3e/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index 2cf5bbb..bcfd19d 100644
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -1817,10 +1817,8 @@
var havingFirewallService = false;
var havingPortForwardingService = false;
var havingLbService = false;
- var havingVpnService = false;
-
- var FirewallProviderArrayIncludesJuniperSRX = false;
-
+ var havingVpnService = false;
+
if('networks' in args.context && args.context.networks[0].vpcid == null) { //a non-VPC network from Guest Network section
$.ajax({
url: createURL('listNetworkOfferings'),
@@ -1833,25 +1831,14 @@
var networkoffering = json.listnetworkofferingsresponse.networkoffering[0];
$(networkoffering.service).each(function(){
var thisService = this;
- if(thisService.name == "Firewall") {
+ if(thisService.name == "Firewall")
havingFirewallService = true;
- var providerArray = thisService.provider;
- for(var k = 0; k < providerArray.length; k++) {
- if(providerArray[k].name == "JuniperSRX") {
- FirewallProviderArrayIncludesJuniperSRX = true;
- break;
- }
- }
- }
- if(thisService.name == "PortForwarding") {
+ if(thisService.name == "PortForwarding")
havingPortForwardingService = true;
- }
- if(thisService.name == "Lb") {
+ if(thisService.name == "Lb")
havingLbService = true;
- }
- if(thisService.name == "Vpn") {
+ if(thisService.name == "Vpn")
havingVpnService = true;
- }
});
}
});
@@ -1970,24 +1957,7 @@
});
}
}
-
- if(FirewallProviderArrayIncludesJuniperSRX == true) { //if Firewall is provided by JuniperSRX
- $.ajax({
- url: createURL('listPortForwardingRules'),
- data: {
- ipaddressid: args.context.ipAddresses[0].id,
- listAll: true
- },
- async: false,
- success: function(json) {
- var rules = json.listportforwardingrulesresponse.portforwardingrule;
- if(rules != null && rules.length > 0) {
- disallowedActions.push("firewall"); //hide Firewall icon when Port forwarding is configured on IP Address
- }
- }
- });
- }
-
+
return disallowedActions;
},