Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0A836F0B0 for ; Fri, 29 Mar 2013 15:20:45 +0000 (UTC) Received: (qmail 13404 invoked by uid 500); 29 Mar 2013 15:20:44 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 13345 invoked by uid 500); 29 Mar 2013 15:20:44 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 13302 invoked by uid 99); 29 Mar 2013 15:20:43 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Mar 2013 15:20:43 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 95187833E8E; Fri, 29 Mar 2013 15:20:43 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: pranavs@apache.org To: commits@cloudstack.apache.org Date: Fri, 29 Mar 2013 15:20:43 -0000 Message-Id: <107a15f198b942269e71799ad6aeeff6@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] git commit: updated refs/heads/master to 6092721 Updated Branches: refs/heads/master ee3fd1843 -> 6092721a2 Zone wide primary storage is not supported for Xenserver as the Hypervisor but for KVM only Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5259a13e Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5259a13e Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5259a13e Branch: refs/heads/master Commit: 5259a13e4156f54ddd8c30c7d361921f33a2e589 Parents: ee3fd18 Author: Pranav Saxena Authored: Fri Mar 29 20:45:44 2013 +0530 Committer: Pranav Saxena Committed: Fri Mar 29 20:45:44 2013 +0530 ---------------------------------------------------------------------- ui/scripts/zoneWizard.js | 32 ++++++++++++++++++++++++-------- 1 files changed, 24 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5259a13e/ui/scripts/zoneWizard.js ---------------------------------------------------------------------- diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js index c09da8a..11db4db 100755 --- a/ui/scripts/zoneWizard.js +++ b/ui/scripts/zoneWizard.js @@ -1185,16 +1185,32 @@ 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; + } - var scope = [ - { id: 'zone', description: _l('label.zone.wide') }, - { id: 'cluster', description: _l('label.cluster') }, - { id: 'host', description: _l('label.host') } - ]; + // ZWPS not supported for Xenserver + if(selectedHypervisorObj.hypervisortype == "XenServer"){ + var scope=[]; + 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 - }); + 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}); + } }