incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessicaw...@apache.org
Subject git commit: CLOUDSTACK-537: cloudstack UI - Advanced SG-Enabled zone - zone wizard - skip configuring public traffic type.
Date Mon, 26 Nov 2012 19:58:11 GMT
Updated Branches:
  refs/heads/master 36d175126 -> f97f9631d


CLOUDSTACK-537: cloudstack UI - Advanced SG-Enabled zone - zone wizard - skip configuring
public traffic type.


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

Branch: refs/heads/master
Commit: f97f9631d8e84415b0a8845ddbb65f12e3851689
Parents: 36d1751
Author: Jessica Wang <jessica.wang@citrix.com>
Authored: Mon Nov 26 11:57:55 2012 -0800
Committer: Jessica Wang <jessica.wang@citrix.com>
Committed: Mon Nov 26 11:57:55 2012 -0800

----------------------------------------------------------------------
 ui/scripts/zoneWizard.js |   60 ++++++++++++++++++++++++++---------------
 1 files changed, 38 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/f97f9631/ui/scripts/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js
index 5609ca7..52b4c33 100755
--- a/ui/scripts/zoneWizard.js
+++ b/ui/scripts/zoneWizard.js
@@ -60,25 +60,36 @@
   cloudStack.zoneWizard = {
     // Return required traffic types, for configure physical network screen
     requiredTrafficTypes: function(args) {
-      if (args.data.zone.networkType == 'Basic' && (selectedNetworkOfferingHavingEIP
||
-                                                    selectedNetworkOfferingHavingELB)) {
-        return [
-          'management',
-          'guest',
-          'public'
-        ];
-      } else if (args.data.zone.networkType == 'Advanced') {
-        return [
-          'management',
-          'public',
-          'guest'
-        ];
-      } else {
-        return [
-          'management',
-          'guest'
-        ];
-      }
+      if (args.data.zone.networkType == 'Basic') {
+			  if(selectedNetworkOfferingHavingEIP || selectedNetworkOfferingHavingELB) {
+					return [
+						'management',
+						'guest',
+						'public'
+					];
+				}
+				else {
+				  return [
+						'management',
+						'guest'
+					];
+				}
+      } 
+			else if (args.data.zone.networkType == 'Advanced') {
+			  if(args.data.zone.sgEnabled	!= true) {
+					return [
+						'management',
+						'public',
+						'guest'
+					];
+				}
+				else {
+				  return [
+						'management',						
+						'guest'
+					];
+				}
+      } 			
     },
 
     disabledTrafficTypes: function(args) {
@@ -2479,9 +2490,9 @@
           });
         },
 
-        configurePublicTraffic: function(args) {
-          if((args.data.zone.networkType == "Basic" && (selectedNetworkOfferingHavingSG
== true && selectedNetworkOfferingHavingEIP == true && selectedNetworkOfferingHavingELB
== true))
-           ||(args.data.zone.networkType == "Advanced")) {
+        configurePublicTraffic: function(args) {          
+					if((args.data.zone.networkType == "Basic" && (selectedNetworkOfferingHavingSG
== true && selectedNetworkOfferingHavingEIP == true && selectedNetworkOfferingHavingELB
== true))
+           ||(args.data.zone.networkType == "Advanced" && args.data.zone.sgEnabled
!= true)) {
 					 
             message(dictionary['message.configuring.public.traffic']); 
 
@@ -2557,6 +2568,11 @@
               })
             });
           }
+					else if(args.data.zone.networkType == "Advanced" && args.data.zone.sgEnabled
== true) { // Advanced SG-enabled zone doesn't have public traffic type
+					  stepFns.configureStorageTraffic({
+							data: args.data
+						});
+					}					
           else { //basic zone without public traffic type , skip to next step
             if (data.physicalNetworks && $.inArray('storage', data.physicalNetworks[0].trafficTypes)
> -1) {
               stepFns.configureStorageTraffic({


Mime
View raw message