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 A8DAC100BA for ; Fri, 30 Aug 2013 21:55:19 +0000 (UTC) Received: (qmail 89891 invoked by uid 500); 30 Aug 2013 21:55:19 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 89869 invoked by uid 500); 30 Aug 2013 21:55:19 -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 89862 invoked by uid 99); 30 Aug 2013 21:55:19 -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, 30 Aug 2013 21:55:19 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 1A86E8BA09E; Fri, 30 Aug 2013 21:55:19 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jessicawang@apache.org To: commits@cloudstack.apache.org Date: Fri, 30 Aug 2013 21:55:20 -0000 Message-Id: <54b7617196c64c38b2564ae4550c1cf7@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/2] git commit: updated refs/heads/4.2-forward to 8d60e44 UI > Infrastructure > clusters > Add cluster dialog > change variable name for Nexus DVS fields to be more intuitive. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/845e280d Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/845e280d Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/845e280d Branch: refs/heads/4.2-forward Commit: 845e280d71f041afa7c6880dd7ae2a4a6386a83b Parents: a98eb12 Author: Jessica Wang Authored: Fri Aug 30 14:50:11 2013 -0700 Committer: Jessica Wang Committed: Fri Aug 30 14:55:06 2013 -0700 ---------------------------------------------------------------------- ui/scripts/system.js | 70 +++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 36 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/845e280d/ui/scripts/system.js ---------------------------------------------------------------------- diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 78f0242..8b09260 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -10088,21 +10088,21 @@ preFilter: function(args) { var $form = args.$form; $form.click(function() { - var $vsmFields = $form.find('.form-item').filter(function() { - var vsmFields = [ + var $nexusDvsOptFields = $form.find('.form-item').filter(function() { + var nexusDvsOptFields = [ 'vsmipaddress', 'vsmusername', 'vsmpassword' ]; - return $.inArray($(this).attr('rel'), vsmFields) > -1; + return $.inArray($(this).attr('rel'), nexusDvsOptFields) > -1; }); - var $vsmReqFields = $form.find('.form-item').filter(function() { - var vsmReqFields = [ + var $nexusDvsReqFields = $form.find('.form-item').filter(function() { + var nexusDvsReqFields = [ 'vsmipaddress_req', 'vsmusername_req', 'vsmpassword_req' ]; - return $.inArray($(this).attr('rel'), vsmReqFields) > -1; + return $.inArray($(this).attr('rel'), nexusDvsReqFields) > -1; }); if ($form.find('.form-item[rel=hypervisor] select').val() == 'VMware' ) { @@ -10116,8 +10116,8 @@ var $overrideGuestTraffic = $form.find('.form-item[rel=overrideguesttraffic] input[type=checkbox]'); var $vSwitchGuestType = $form.find('.form-item[rel=vSwitchGuestType] select'); - //***** 'vmware.use.dvswitch' : whether to show override traffic checkbox (begin) ***** - var dvSwitchEnabled = false; + + var useDvs = false; $.ajax({ url: createURL('listConfigurations'), data: { @@ -10126,16 +10126,15 @@ async: false, success: function(json) { if (json.listconfigurationsresponse.configuration[0].value == 'true') { - dvSwitchEnabled = true; + useDvs = true; } } }); - if (dvSwitchEnabled == true) { + if (useDvs == true) { //If using Distributed vswitch, there is OverrideTraffic option. $form.find('.form-item[rel=overridepublictraffic]').css('display', 'inline-block'); $form.find('.form-item[rel=overrideguesttraffic]').css('display', 'inline-block'); - - //'vmware.use.nexus.vswitch': whether to show VSM fields (begin) - var vSwitchEnabled = false; + + var useNexusDvs = false; $.ajax({ url: createURL('listConfigurations'), data: { @@ -10144,27 +10143,26 @@ async: false, success: function(json) { if (json.listconfigurationsresponse.configuration[0].value == 'true') { - vSwitchEnabled = true; + useNexusDvs = true; } } }); - if (vSwitchEnabled == true) { + if (useNexusDvs == true) { //If using Nexus Distributed vswitch, show Nexus Distributed vswitch fields (either required ones or optional ones). if (($overridePublicTraffic.is(':checked') && $vSwitchPublicType.val() == 'nexusdvs') || ($overrideGuestTraffic.is(':checked') && $vSwitchGuestType.val() == 'nexusdvs' )) { - $vsmReqFields.css('display', 'inline-block'); - $vsmFields.hide(); + $nexusDvsReqFields.css('display', 'inline-block'); + $nexusDvsOptFields.hide(); } else { - $vsmFields.css('display', 'inline-block'); - $vsmReqFields.hide(); + $nexusDvsOptFields.css('display', 'inline-block'); + $nexusDvsReqFields.hide(); } - } else { //vSwitchEnabled == false - $vsmFields.hide(); - $vsmReqFields.hide(); - } - //***** 'vmware.use.dvswitch' : whether to show override traffic checkbox (end) ***** + } else { //If not using Nexus Distributed vswitch, hide Nexus Distributed vswitch fields. + $nexusDvsOptFields.hide(); + $nexusDvsReqFields.hide(); + } - } else { //dvSwitchEnabled == false + } else { //useDvs == false $form.find('.form-item[rel=overridepublictraffic]').css('display', 'none'); $form.find('.form-item[rel=vSwitchPublicType]').css('display', 'none'); $form.find('.form-item[rel=vSwitchPublicName]').css('display', 'none'); @@ -10173,10 +10171,10 @@ $form.find('.form-item[rel=vSwitchGuestType]').css('display', 'none'); $form.find('.form-item[rel=vSwitchGuestName]').css('display', 'none'); - $vsmFields.hide(); - $vsmReqFields.hide(); + $nexusDvsOptFields.hide(); + $nexusDvsReqFields.hide(); } - //***** 'vmware.use.dvswitch' (end) ***** + } else { //XenServer, KVM, etc (non-VMware) $form.find('.form-item[rel=vCenterHost]').css('display', 'none'); @@ -10187,8 +10185,8 @@ $form.find('.form-item[rel=overridepublictraffic]').css('display', 'none'); $form.find('.form-item[rel=overrideguesttraffic]').css('display', 'none'); - $vsmFields.hide(); - $vsmReqFields.hide(); + $nexusDvsOptFields.hide(); + $nexusDvsReqFields.hide(); } if ($form.find('.form-item[rel=overridepublictraffic]').css('display') != 'none' && $overridePublicTraffic.is(':checked')) { @@ -10396,7 +10394,7 @@ vSwitchPublicType: { label: 'Public Traffic vSwitch Type', select: function(args) { - var vSwitchEnabled = false; + var useNexusDvs = false; var items = [] $.ajax({ url: createURL('listConfigurations'), @@ -10406,12 +10404,12 @@ async: false, success: function(json) { if (json.listconfigurationsresponse.configuration[0].value == 'true') { - vSwitchEnabled = true; + useNexusDvs = true; } } }); - if (vSwitchEnabled) { + if (useNexusDvs) { items.push({ id: "nexusdvs", description: "Cisco Nexus 1000v Distributed Virtual Switch" @@ -10465,7 +10463,7 @@ select: function(args) { var items = [] - var vSwitchEnabled = false; + var useNexusDvs = false; $.ajax({ url: createURL('listConfigurations'), data: { @@ -10474,13 +10472,13 @@ async: false, success: function(json) { if (json.listconfigurationsresponse.configuration[0].value == 'true') { - vSwitchEnabled = true; + useNexusDvs = true; } } }); - if (vSwitchEnabled) { + if (useNexusDvs) { items.push({ id: "nexusdvs", description: "Cisco Nexus 1000v Distributed Virtual Switch"