Updated Branches:
  refs/heads/master e88352644 -> 782bf8274

CLOUDSTACK-2029: UI - zone wizard - primary storage step - scope dropdown - 
show zone-wide option when hypervisor is VMware or KVM.


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

Branch: refs/heads/master
Commit: 782bf82744819157cc37bdbcc15bbc8a9e7c5af9
Parents: e883526
Author: Jessica Wang <[email protected]>
Authored: Tue Jun 4 15:38:03 2013 -0700
Committer: Jessica Wang <[email protected]>
Committed: Tue Jun 4 15:42:34 2013 -0700

----------------------------------------------------------------------
 ui/scripts/zoneWizard.js |   40 ++++++++++++++++++++--------------------
 1 files changed, 20 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/782bf827/ui/scripts/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js
index c07ef34..9354cba 100755
--- a/ui/scripts/zoneWizard.js
+++ b/ui/scripts/zoneWizard.js
@@ -1233,26 +1233,21 @@
               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});
-                    }
-
-              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});
-                    }
-
-                }
-
-              },
+                 
+              //zone-wide-primary-storage is supported only for KVM and VMWare
+              if(selectedHypervisorObj.hypervisortype == "KVM" || 
selectedHypervisorObj.hypervisortype == "VMware"){
+                var scope=[];
+                scope.push({ id: 'zone', description: _l('label.zone.wide') });
+                scope.push({ id: 'cluster', description: _l('label.cluster') 
});                      
+                args.response.success({data: scope});
+              }
+              else {     
+                var scope=[];
+                scope.push({ id: 'cluster', description: _l('label.cluster') 
});                       
+                args.response.success({data: scope});                       
+              }
+            }
+          },
 
           protocol: {
             label: 'label.protocol',
@@ -3514,6 +3509,11 @@
           array1.push("&name=" + todb(args.data.primaryStorage.name));
           array1.push("&scope=" + todb(args.data.primaryStorage.scope));
 
+          //zone-wide-primary-storage is supported only for KVM and VMWare
+          if(args.data.primaryStorage.scope == "zone") {
+            array1.push("&hypervisor=" + 
todb(args.data.returnedCluster.hypervisortype)); //hypervisor type of the hosts 
in zone that will be attached to this storage pool. KVM, VMware supported as of 
now.
+          }
+          
                                        var server = 
args.data.primaryStorage.server;
           var url = null;
           if (args.data.primaryStorage.protocol == "nfs") {

Reply via email to