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 9FE4C10C39 for ; Tue, 3 Sep 2013 11:09:52 +0000 (UTC) Received: (qmail 31064 invoked by uid 500); 3 Sep 2013 11:09:31 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 30592 invoked by uid 500); 3 Sep 2013 11:09:21 -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 29446 invoked by uid 99); 3 Sep 2013 11:09:09 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Sep 2013 11:09:09 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 880548BC925; Tue, 3 Sep 2013 11:09:07 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: widodh@apache.org To: commits@cloudstack.apache.org Date: Tue, 03 Sep 2013 11:09:34 -0000 Message-Id: <4d4812a7870840f1a8af687645002831@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [29/50] [abbrv] git commit: updated refs/heads/disk-cache to 72f2f12 CLOUDSTACK-4089: UI > zone wizard > VMware hypervisor > physical network > edit Public/Guest traffic type > vSwitchType dropdown > set default option upon configuration 'vmware.use.dvswtich' and 'vmware.use.nexus.vswitch'. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/94cd470a Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/94cd470a Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/94cd470a Branch: refs/heads/disk-cache Commit: 94cd470a0ae52ca79b703b251c973a465232366c Parents: d4d42bb Author: Jessica Wang Authored: Fri Aug 30 14:52:44 2013 -0700 Committer: Jessica Wang Committed: Fri Aug 30 14:56:29 2013 -0700 ---------------------------------------------------------------------- ui/scripts/ui-custom/zoneWizard.js | 40 ++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/94cd470a/ui/scripts/ui-custom/zoneWizard.js ---------------------------------------------------------------------- diff --git a/ui/scripts/ui-custom/zoneWizard.js b/ui/scripts/ui-custom/zoneWizard.js index 254ea63..a1c5803 100644 --- a/ui/scripts/ui-custom/zoneWizard.js +++ b/ui/scripts/ui-custom/zoneWizard.js @@ -309,7 +309,45 @@ } }; - if($trafficType.hasClass('guest') || $trafficType.hasClass('public')) { + 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'; + } else { + trafficData.vSwitchType = 'vmwaredvs'; + } + } else { //useDvs == false + trafficData.vSwitchType = 'vmwaresvs'; + } + } + $.extend(fields, { vSwitchType: { label: 'vSwitch Type',