Don't show egress rules tab for SRX-based networks
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/cd238b4a Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/cd238b4a Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/cd238b4a Branch: refs/heads/master Commit: cd238b4aab8b48934c6876ab6d05c07670354a87 Parents: 75e51a0 Author: Brian Federle <[email protected]> Authored: Thu Dec 6 14:34:49 2012 -0800 Committer: Brian Federle <[email protected]> Committed: Thu Dec 6 14:35:30 2012 -0800 ---------------------------------------------------------------------- ui/scripts/network.js | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/cd238b4a/ui/scripts/network.js ---------------------------------------------------------------------- diff --git a/ui/scripts/network.js b/ui/scripts/network.js index 333e1fb..3150b90 100755 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -804,6 +804,7 @@ tabFilter: function(args) { var networkOfferingHavingELB = false; var hasNetworkACL = false; + var hasSRXFirewall = false; var isVPC = false; var isAdvancedSGZone = false; var hiddenTabs = []; @@ -832,6 +833,18 @@ } }); } + + if (thisService.name == 'Firewall') { + $(thisService.provider).each(function() { + if (this.name == 'JuniperSRX') { + hasSRXFirewall = true; + + return false; + } + + return true; + }); + } }); } }); @@ -854,7 +867,7 @@ hiddenTabs.push("addloadBalancer"); } - if (isVPC || isAdvancedSGZone) { + if (isVPC || isAdvancedSGZone || hasSRXFirewall) { hiddenTabs.push('egressRules'); }
