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 356a390
Date Thu, 05 Sep 2013 22:37:54 GMT
Updated Branches:
  refs/heads/master 072013911 -> 356a39077


CLOUDSTACK-4089: zone wizard > hypervisor VMware > if zoneType is Basic, not show vSwitchType
dropdown in Edit Traffic Type for Guest.


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

Branch: refs/heads/master
Commit: 356a39077e6dcd7afc78ec19e82a1761ec153444
Parents: 0720139
Author: Jessica Wang <jessicawang@apache.org>
Authored: Thu Sep 5 15:26:33 2013 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Thu Sep 5 15:37:40 2013 -0700

----------------------------------------------------------------------
 ui/scripts/ui-custom/zoneWizard.js | 130 ++++++++++++++++----------------
 1 file changed, 66 insertions(+), 64 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/356a3907/ui/scripts/ui-custom/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/zoneWizard.js b/ui/scripts/ui-custom/zoneWizard.js
index 695534f..bb33929 100644
--- a/ui/scripts/ui-custom/zoneWizard.js
+++ b/ui/scripts/ui-custom/zoneWizard.js
@@ -294,7 +294,7 @@
             var trafficData = $trafficType.data('traffic-type-data') ?
                 $trafficType.data('traffic-type-data') : {};
             var hypervisor = getData($trafficType.closest('.zone-wizard')).zone.hypervisor;
-            
+            var zoneType = getData($trafficType.closest('.zone-wizard')).zone.networkType;
             var fields;
             
             if (hypervisor == 'VMware') {
@@ -309,69 +309,71 @@
 	                }	                
 	            };  
             	
-            	if($trafficType.hasClass('guest') || $trafficType.hasClass('public')) {    
       		
-            		if(trafficData.vSwitchType == null) {
-            			 var useDvs = false;
-                         $.ajax({
-                             url: createURL('listConfigurations'),
-                             data: {
-                                 name: 'vmware.use.dvswitch'
-                             },
-                             async: false,
-                             success: function(json) {
-                                 if (json.listconfigurationsresponse.configuration[0].value
== 'true') {
-                                     useDvs = true;
-                                 }
-                             }
-                         });    
-                         if (useDvs == true) { 
-                        	 var useNexusDvs = false;                                      
     
-                             $.ajax({
-                                 url: createURL('listConfigurations'),
-                                 data: {
-                                     name: 'vmware.use.nexus.vswitch'
-                                 },
-                                 async: false,
-                                 success: function(json) {
-                                     if (json.listconfigurationsresponse.configuration[0].value
== 'true') {
-                                         useNexusDvs = true;
-                                     }
-                                 }
-                             });
-                             if (useNexusDvs == true) {
-                            	 trafficData.vSwitchType = 'nexusdvs';
-                            	 fields.vSwitchName.defaultValue = 'epp0';
-                             } else {
-                            	 trafficData.vSwitchType = 'vmwaredvs';
-                            	 fields.vSwitchName.defaultValue = 'dvSwitch0';
-                             }   
-                         } else { //useDvs == false
-                        	 trafficData.vSwitchType = 'vmwaresvs';
-                        	 fields.vSwitchName.defaultValue = 'vSwitch0';
-                         }                         
-            		}
-            		
-            		$.extend(fields, {
-            		    vSwitchType: {
-            		        label: 'vSwitch Type',
-            		        select: function (args) {            		        	
-            		            args.response.success({
-            		                data: [{
-            		                    id: 'nexusdvs',
-            		                    description: 'Cisco Nexus 1000v Distributed Virtual Switch'
-            		                }, {
-            		                    id: 'vmwaresvs',
-            		                    description: 'VMware vNetwork Standard Virtual Switch'
-            		                }, {
-            		                    id: 'vmwaredvs',
-            		                    description: 'VMware vNetwork Distributed Virtual Switch'
-            		                }]
-            		            });
-            		        },
-    		                defaultValue: trafficData.vSwitchType
-            		    }
-            		});   
-            	}            	
+            	if(zoneType == 'Advanced') {
+	            	if($trafficType.hasClass('guest') || $trafficType.hasClass('public')) {   
        		
+	            		if(trafficData.vSwitchType == null) {
+	            			 var useDvs = false;
+	                         $.ajax({
+	                             url: createURL('listConfigurations'),
+	                             data: {
+	                                 name: 'vmware.use.dvswitch'
+	                             },
+	                             async: false,
+	                             success: function(json) {
+	                                 if (json.listconfigurationsresponse.configuration[0].value
== 'true') {
+	                                     useDvs = true;
+	                                 }
+	                             }
+	                         });    
+	                         if (useDvs == true) { 
+	                        	 var useNexusDvs = false;                                     
      
+	                             $.ajax({
+	                                 url: createURL('listConfigurations'),
+	                                 data: {
+	                                     name: 'vmware.use.nexus.vswitch'
+	                                 },
+	                                 async: false,
+	                                 success: function(json) {
+	                                     if (json.listconfigurationsresponse.configuration[0].value
== 'true') {
+	                                         useNexusDvs = true;
+	                                     }
+	                                 }
+	                             });
+	                             if (useNexusDvs == true) {
+	                            	 trafficData.vSwitchType = 'nexusdvs';
+	                            	 fields.vSwitchName.defaultValue = 'epp0';
+	                             } else {
+	                            	 trafficData.vSwitchType = 'vmwaredvs';
+	                            	 fields.vSwitchName.defaultValue = 'dvSwitch0';
+	                             }   
+	                         } else { //useDvs == false
+	                        	 trafficData.vSwitchType = 'vmwaresvs';
+	                        	 fields.vSwitchName.defaultValue = 'vSwitch0';
+	                         }                         
+	            		}
+	            		
+	            		$.extend(fields, {
+	            		    vSwitchType: {
+	            		        label: 'vSwitch Type',
+	            		        select: function (args) {            		        	
+	            		            args.response.success({
+	            		                data: [{
+	            		                    id: 'nexusdvs',
+	            		                    description: 'Cisco Nexus 1000v Distributed Virtual Switch'
+	            		                }, {
+	            		                    id: 'vmwaresvs',
+	            		                    description: 'VMware vNetwork Standard Virtual Switch'
+	            		                }, {
+	            		                    id: 'vmwaredvs',
+	            		                    description: 'VMware vNetwork Distributed Virtual Switch'
+	            		                }]
+	            		            });
+	            		        },
+	    		                defaultValue: trafficData.vSwitchType
+	            		    }
+	            		});   
+	            	}  
+            	}
             } else {    
 	            fields = {
 	                label: {


Mime
View raw message