cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessicaw...@apache.org
Subject git commit: updated refs/heads/master to 4b1d016
Date Tue, 13 Aug 2013 00:02:59 GMT
Updated Branches:
  refs/heads/master 9ce20a349 -> 4b1d016c1


CLOUDSTACK-4142: UI > IP Address page > configuration tab > filter - remove duplicate
code.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4b1d016c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4b1d016c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4b1d016c

Branch: refs/heads/master
Commit: 4b1d016c1f0e2404a9b69a4c8d55c8eacf97191b
Parents: 9ce20a3
Author: Jessica Wang <jessicawang@apache.org>
Authored: Mon Aug 12 16:59:28 2013 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Mon Aug 12 17:02:50 2013 -0700

----------------------------------------------------------------------
 ui/scripts/network.js | 63 +---------------------------------------------
 1 file changed, 1 insertion(+), 62 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4b1d016c/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index 6be772e..e65ee5c 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -148,68 +148,7 @@
                 item.issystem == true) {
                 return [];
             }
-
-            if (item.networkOfferingConserveMode == false) {
-                /*
-         (1) If IP is SourceNat, no StaticNat/VPN/PortForwarding/LoadBalancer can be enabled/added.
-         */
-                if (item.issourcenat == true) {
-                    disallowedActions.push('enableStaticNAT');
-                    disallowedActions.push('enableVPN');
-                }
-
-                /*
-         (2) If IP is non-SourceNat, show StaticNat/VPN/PortForwarding/LoadBalancer at first.
-         1. Once StaticNat is enabled, hide VPN/PortForwarding/LoadBalancer.
-         2. Once VPN is enabled, hide StaticNat/PortForwarding/LoadBalancer.
-         3. Once a PortForwarding rule is added, hide StaticNat/VPN/LoadBalancer.
-         4. Once a LoadBalancer rule is added, hide StaticNat/VPN/PortForwarding.
-         */
-                else { //item.issourcenat == false
-                    if (item.isstaticnat) { //1. Once StaticNat is enabled, hide VPN/PortForwarding/LoadBalancer.
-                        disallowedActions.push('enableVPN');
-                    }
-                    if (item.vpnenabled) { //2. Once VPN is enabled, hide StaticNat/PortForwarding/LoadBalancer.
-                        disallowedActions.push('enableStaticNAT');
-                    }
-
-                    //3. Once a PortForwarding rule is added, hide StaticNat/VPN/LoadBalancer.
-                    $.ajax({
-                        url: createURL('listPortForwardingRules'),
-                        data: {
-                            ipaddressid: item.id,
-                            listAll: true
-                        },
-                        dataType: 'json',
-                        async: false,
-                        success: function(json) {
-                            var rules = json.listportforwardingrulesresponse.portforwardingrule;
-                            if (rules != null && rules.length > 0) {
-                                disallowedActions.push('enableVPN');
-                                disallowedActions.push('enableStaticNAT');
-                            }
-                        }
-                    });
-
-                    //4. Once a LoadBalancer rule is added, hide StaticNat/VPN/PortForwarding.
-                    $.ajax({
-                        url: createURL('listLoadBalancerRules'),
-                        data: {
-                            publicipid: item.id,
-                            listAll: true
-                        },
-                        dataType: 'json',
-                        async: false,
-                        success: function(json) {
-                            var rules = json.listloadbalancerrulesresponse.loadbalancerrule;
-                            if (rules != null && rules.length > 0) {
-                                disallowedActions.push('enableVPN');
-                                disallowedActions.push('enableStaticNAT');
-                            }
-                        }
-                    });
-                }
-            }
+            
             if (item.networkOfferingConserveMode == false) {
                 /*
 				(1) If IP is SourceNat, no StaticNat/VPN/PortForwarding/LoadBalancer can be enabled/added.


Mime
View raw message