Return-Path: X-Original-To: apmail-incubator-ambari-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-ambari-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 61DBD10B18 for ; Wed, 13 Nov 2013 19:55:06 +0000 (UTC) Received: (qmail 51967 invoked by uid 500); 13 Nov 2013 19:55:06 -0000 Delivered-To: apmail-incubator-ambari-commits-archive@incubator.apache.org Received: (qmail 51942 invoked by uid 500); 13 Nov 2013 19:55:06 -0000 Mailing-List: contact ambari-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@incubator.apache.org Delivered-To: mailing list ambari-commits@incubator.apache.org Received: (qmail 51935 invoked by uid 99); 13 Nov 2013 19:55:06 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Nov 2013 19:55:06 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id E31E18A85D3; Wed, 13 Nov 2013 19:55:05 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: alexantonenko@apache.org To: ambari-commits@incubator.apache.org Message-Id: <44040ca85c6b40c68ef4036d60471ce8@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: AMBARI-3759. Add host wizard: After successfully bootstrapping host, "next" button is disabled (alexantonenko) Date: Wed, 13 Nov 2013 19:55:05 +0000 (UTC) Updated Branches: refs/heads/trunk 4d910297a -> eef606b1e AMBARI-3759. Add host wizard: After successfully bootstrapping host, "next" button is disabled (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/eef606b1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/eef606b1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/eef606b1 Branch: refs/heads/trunk Commit: eef606b1ea38e58ef4287b2253bc150259fce73d Parents: 4d91029 Author: Alex Antonenko Authored: Wed Nov 13 19:54:50 2013 +0200 Committer: Alex Antonenko Committed: Wed Nov 13 20:50:24 2013 +0200 ---------------------------------------------------------------------- .../app/controllers/wizard/step3_controller.js | 37 +++++++++++--------- 1 file changed, 20 insertions(+), 17 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/eef606b1/ambari-web/app/controllers/wizard/step3_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/wizard/step3_controller.js b/ambari-web/app/controllers/wizard/step3_controller.js index 3c10bdc..0375cc0 100644 --- a/ambari-web/app/controllers/wizard/step3_controller.js +++ b/ambari-web/app/controllers/wizard/step3_controller.js @@ -589,26 +589,29 @@ App.WizardStep3Controller = Em.Controller.extend({ * Check if the customized os group contains the registered host os type. If not the repo on that host is invalid. */ checkHostOSType: function (osType, hostName) { - var selectedStack = this.get('content.stacks').findProperty('isSelected', true); - var selectedOS = []; - var isValid = false; - if (selectedStack && selectedStack.operatingSystems) { - selectedStack.get('operatingSystems').filterProperty('selected', true).forEach( function(os) { - selectedOS.pushObject(os.osType); - if ( os.osType == osType) { - isValid = true; - } - }); - } + if(this.get('content.stacks')){ + var selectedStack = this.get('content.stacks').findProperty('isSelected', true); + var selectedOS = []; + var isValid = false; + if (selectedStack && selectedStack.operatingSystems) { + selectedStack.get('operatingSystems').filterProperty('selected', true).forEach( function(os) { + selectedOS.pushObject(os.osType); + if ( os.osType == osType) { + isValid = true; + } + }); + } - if (!isValid) { - console.log('WARNING: Getting host os type does NOT match the user selected os group in step1. ' + - 'Host Name: '+ hostName + '. Host os type:' + osType + '. Selected group:' + selectedOS); - return Em.I18n.t('installer.step3.hostWarningsPopup.repositories.context').format(hostName, osType, selectedOS); - } else { + if (!isValid) { + console.log('WARNING: Getting host os type does NOT match the user selected os group in step1. ' + + 'Host Name: '+ hostName + '. Host os type:' + osType + '. Selected group:' + selectedOS); + return Em.I18n.t('installer.step3.hostWarningsPopup.repositories.context').format(hostName, osType, selectedOS); + } else { + return null; + } + }else{ return null; } - }, selectCategory: function(event, context){