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 39ed13a
Date Wed, 14 Aug 2013 01:20:54 GMT
Updated Branches:
  refs/heads/master 086f880b3 -> 39ed13aae


CLOUDSTACK-4142: UI > Network > VPC > configure > Router > Public IP Addresses
> Configuration tab > use networkofferingconservemode to determine which action to show
only when IP is attached to a tier(network).


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

Branch: refs/heads/master
Commit: 39ed13aaefa12c970c74de9c9c1fc6108db7fbd2
Parents: 086f880
Author: Jessica Wang <jessicawang@apache.org>
Authored: Tue Aug 13 18:18:01 2013 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Tue Aug 13 18:20:45 2013 -0700

----------------------------------------------------------------------
 ui/scripts/network.js | 144 ++++++++++++++++++++++-----------------------
 1 file changed, 72 insertions(+), 72 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/39ed13aa/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index 5642995..ef891aa 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -2702,85 +2702,85 @@
                                                                 if (services[i].name == "Lb")
                                                                     havingLbService = true;
                                                         	}
-                                                        }                               
                
-                                                    }
-                                                });
-                                            }
-                                        }
-                                        
-                                        if (args.context.networks[0].networkofferingconservemode
== false) {
-                                            /*
-					                        (1) If IP is SourceNat, no StaticNat/VPN/PortForwarding/LoadBalancer
can be enabled/added.
-					                        */
-                                            if (args.context.ipAddresses[0].issourcenat)
{
-                                                if (havingFirewallService == false) { //firewall
is not supported in IP from VPC section (because ACL has already supported in tier from VPC
section)
-                                                    disallowedActions.push("firewall");
-                                                }
+                                                        }   
+                                                                                        
                       
+                                                        if (networkObj.networkofferingconservemode
== false) {
+                                                            /*
+                					                        (1) If IP is SourceNat, no StaticNat/VPN/PortForwarding/LoadBalancer
can be enabled/added.
+                					                        */
+                                                            if (args.context.ipAddresses[0].issourcenat)
{
+                                                                if (havingFirewallService
== false) { //firewall is not supported in IP from VPC section (because ACL has already supported
in tier from VPC section)
+                                                                    disallowedActions.push("firewall");
+                                                                }
 
-                                                disallowedActions.push("portForwarding");
-                                                disallowedActions.push("loadBalancing");
-                                            }
+                                                                disallowedActions.push("portForwarding");
+                                                                disallowedActions.push("loadBalancing");
+                                                            }
 
-                                            /*
-					                        (2) If IP is non-SourceNat, show StaticNat/VPN/PortForwarding/LoadBalancer
at first.
-					                        1. Once StaticNat is enabled, hide VPN/PortForwarding/LoadBalancer.
-					                        2. If VPN service is supported (i.e. IP comes from Guest Network
section, not from VPC section), 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 { //args.context.ipAddresses[0].issourcenat
== false
-                                                if (havingFirewallService == false)
-                                                    disallowedActions.push("firewall");
-                                                if (havingPortForwardingService == false)
-                                                    disallowedActions.push("portForwarding");
-                                                if (havingLbService == false)
-                                                    disallowedActions.push("loadBalancing");
-
-                                                if (args.context.ipAddresses[0].isstaticnat)
{ //1. Once StaticNat is enabled, hide VPN/PortForwarding/LoadBalancer.
-                                                    disallowedActions.push("portForwarding");
-                                                    disallowedActions.push("loadBalancing");
-                                                }
-                                                if (havingVpnService && args.context.ipAddresses[0].vpnenabled)
{ //2. If VPN service is supported (i.e. IP comes from Guest Network section, not from VPC
section), once VPN is enabled, hide StaticNat/PortForwarding/LoadBalancer.
-                                                    disallowedActions.push("portForwarding");
-                                                    disallowedActions.push("loadBalancing");
-                                                }
+                                                            /*
+                					                        (2) If IP is non-SourceNat, show StaticNat/VPN/PortForwarding/LoadBalancer
at first.
+                					                        1. Once StaticNat is enabled, hide VPN/PortForwarding/LoadBalancer.
+                					                        2. If VPN service is supported (i.e. IP comes
from Guest Network section, not from VPC section), 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 { //args.context.ipAddresses[0].issourcenat
== false
+                                                                if (havingFirewallService
== false)
+                                                                    disallowedActions.push("firewall");
+                                                                if (havingPortForwardingService
== false)
+                                                                    disallowedActions.push("portForwarding");
+                                                                if (havingLbService == false)
+                                                                    disallowedActions.push("loadBalancing");
+
+                                                                if (args.context.ipAddresses[0].isstaticnat)
{ //1. Once StaticNat is enabled, hide VPN/PortForwarding/LoadBalancer.
+                                                                    disallowedActions.push("portForwarding");
+                                                                    disallowedActions.push("loadBalancing");
+                                                                }
+                                                                if (havingVpnService &&
args.context.ipAddresses[0].vpnenabled) { //2. If VPN service is supported (i.e. IP comes
from Guest Network section, not from VPC section), once VPN is enabled, hide StaticNat/PortForwarding/LoadBalancer.
+                                                                    disallowedActions.push("portForwarding");
+                                                                    disallowedActions.push("loadBalancing");
+                                                                }
 
-                                                //3. Once a PortForwarding rule is added,
hide StaticNat/VPN/LoadBalancer.
-                                                $.ajax({
-                                                    url: createURL('listPortForwardingRules'),
-                                                    data: {
-                                                        ipaddressid: args.context.ipAddresses[0].id,
-                                                        listAll: true
-                                                    },
-                                                    dataType: 'json',
-                                                    async: false,
-                                                    success: function(json) {
-                                                        // Get instance
-                                                        var rules = json.listportforwardingrulesresponse.portforwardingrule;
-                                                        if (rules != null && rules.length
> 0) {
-                                                            disallowedActions.push("loadBalancing");
-                                                        }
-                                                    }
-                                                });
+                                                                //3. Once a PortForwarding
rule is added, hide StaticNat/VPN/LoadBalancer.
+                                                                $.ajax({
+                                                                    url: createURL('listPortForwardingRules'),
+                                                                    data: {
+                                                                        ipaddressid: args.context.ipAddresses[0].id,
+                                                                        listAll: true
+                                                                    },
+                                                                    dataType: 'json',
+                                                                    async: false,
+                                                                    success: function(json)
{
+                                                                        // Get instance
+                                                                        var rules = json.listportforwardingrulesresponse.portforwardingrule;
+                                                                        if (rules != null
&& rules.length > 0) {
+                                                                            disallowedActions.push("loadBalancing");
+                                                                        }
+                                                                    }
+                                                                });
 
-                                                //4. Once a LoadBalancer rule is added, hide
StaticNat/VPN/PortForwarding.
-                                                $.ajax({
-                                                    url: createURL('listLoadBalancerRules'),
-                                                    data: {
-                                                        publicipid: args.context.ipAddresses[0].id,
-                                                        listAll: true
-                                                    },
-                                                    dataType: 'json',
-                                                    async: false,
-                                                    success: function(json) {
-                                                        var rules = json.listloadbalancerrulesresponse.loadbalancerrule;
-                                                        if (rules != null && rules.length
> 0) {
-                                                            disallowedActions.push("portForwarding");
-                                                        }
+                                                                //4. Once a LoadBalancer
rule is added, hide StaticNat/VPN/PortForwarding.
+                                                                $.ajax({
+                                                                    url: createURL('listLoadBalancerRules'),
+                                                                    data: {
+                                                                        publicipid: args.context.ipAddresses[0].id,
+                                                                        listAll: true
+                                                                    },
+                                                                    dataType: 'json',
+                                                                    async: false,
+                                                                    success: function(json)
{
+                                                                        var rules = json.listloadbalancerrulesresponse.loadbalancerrule;
+                                                                        if (rules != null
&& rules.length > 0) {
+                                                                            disallowedActions.push("portForwarding");
+                                                                        }
+                                                                    }
+                                                                });
+                                                            }
+                                                        }                               
                       
                                                     }
                                                 });
                                             }
-                                        }
+                                        }     
 
                                         return disallowedActions;
                                     },


Mime
View raw message