CLOUDSTACK-452: cloudstack UI - zone wizard - when Basic mode is selected, hide 
IPv6 DNS1, IPv6 DNS2 field.


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

Branch: refs/heads/marvin_refactor
Commit: 3e88a43d0feae46e05e685238c6ef0454be529d5
Parents: 48cd9cc
Author: Jessica Wang <[email protected]>
Authored: Tue Mar 26 16:48:50 2013 -0700
Committer: Prasanna Santhanam <[email protected]>
Committed: Sun Mar 31 22:05:41 2013 +0530

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e88a43d/ui/scripts/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js
index a64c86a..53f1684 100755
--- a/ui/scripts/zoneWizard.js
+++ b/ui/scripts/zoneWizard.js
@@ -322,7 +322,7 @@
 
           if (args.data['network-model'] == 'Basic') {
             args.$form.find('[rel=networkOfferingId]').show();
-            args.$form.find('[rel=guestcidraddress]').hide();                  
                        
+            args.$form.find('[rel=guestcidraddress]').hide();
                                                
args.$form.find('[rel=ip6dns1]').hide();
                                                
args.$form.find('[rel=ip6dns2]').hide();
           }
@@ -333,10 +333,10 @@
               args.$form.find('[rel=guestcidraddress]').show();
                                                else 
//args.data["zone-advanced-sg-enabled"] == "on
                                                  
args.$form.find('[rel=guestcidraddress]').hide();
-                                                 
+
                                                
args.$form.find('[rel=ip6dns1]').show();
                                                
args.$form.find('[rel=ip6dns2]').show();
-                                       }                                       
                                                                
+                                       }
                                                                                
           setTimeout(function() {
             if ($form.find('input[name=ispublic]').is(':checked')) {
@@ -1185,32 +1185,16 @@
            scope: {
                     label: 'label.scope',
                     select: function(args) {
-                    
-             var selectedHypervisorObj = {
-                hypervisortype: $.isArray(args.context.zones[0].hypervisor) ?
-                  // We want the cluster's hypervisor type
-                  args.context.zones[0].hypervisor[1] : 
args.context.zones[0].hypervisor
-              };
 
-              if(selectedHypervisorObj == null) {
-                return;
-              }
-
-                // ZWPS is supported only for KVM as the hypervisor
-             if(selectedHypervisorObj.hypervisortype != "KVM"){
-                       var scope=[];
-                       scope.push({ id: 'cluster', description: 
_l('label.cluster') });
-                       scope.push({ id: 'host', description: _l('label.host') 
});
-                       args.response.success({data: scope});
-                    }
+            var scope = [
+                        { id: 'zone', description: _l('label.zone.wide') },
+                        { id: 'cluster', description: _l('label.cluster') },
+                        { id: 'host', description: _l('label.host') }
+                      ];
 
-              else {
-                       var scope=[];
-                       scope.push({ id: 'zone', description: 
_l('label.zone.wide') });
-                       scope.push({ id: 'cluster', description: 
_l('label.cluster') });
-                       scope.push({ id: 'host', description: _l('label.host') 
});
-                       args.response.success({data: scope});
-                    }
+                      args.response.success({
+                        data: scope
+                      });
 
                 }
 

Reply via email to