Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E4341200BDB for ; Mon, 12 Dec 2016 12:09:13 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id E2C1A160B22; Mon, 12 Dec 2016 11:09:13 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3710F160B0D for ; Mon, 12 Dec 2016 12:09:13 +0100 (CET) Received: (qmail 4816 invoked by uid 500); 12 Dec 2016 11:09:12 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 4807 invoked by uid 99); 12 Dec 2016 11:09:12 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Dec 2016 11:09:12 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 1672CE9411; Mon, 12 Dec 2016 11:09:12 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: atkach@apache.org To: commits@ambari.apache.org Message-Id: <182f4027258f4268a9e66142a2c05d0e@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-19152 Perf: UI hangs after click on button, on step. (atkach) Date: Mon, 12 Dec 2016 11:09:12 +0000 (UTC) archived-at: Mon, 12 Dec 2016 11:09:14 -0000 Repository: ambari Updated Branches: refs/heads/trunk ab9acef42 -> eae049976 AMBARI-19152 Perf: UI hangs after click on button, on step. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/eae04997 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/eae04997 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/eae04997 Branch: refs/heads/trunk Commit: eae049976813c263201f042c124e004cefa80c42 Parents: ab9acef Author: Andrii Tkach Authored: Fri Dec 9 18:29:48 2016 +0200 Committer: Andrii Tkach Committed: Mon Dec 12 13:00:48 2016 +0200 ---------------------------------------------------------------------- ambari-web/app/controllers/installer.js | 6 ++++-- ambari-web/app/mixins/wizard/assign_master_components.js | 2 +- ambari-web/test/mixins/wizard/assign_master_components_test.js | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/eae04997/ambari-web/app/controllers/installer.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/installer.js b/ambari-web/app/controllers/installer.js index e2c60c4..44e7907 100644 --- a/ambari-web/app/controllers/installer.js +++ b/ambari-web/app/controllers/installer.js @@ -141,11 +141,13 @@ App.InstallerController = App.WizardController.extend({ var dfd = $.Deferred(); var self = this; var stackServices = App.StackService.find().mapProperty('serviceName'); - if (!(stackServices && !!stackServices.length && App.StackService.find().objectAt(0).get('stackVersion') == App.get('currentStackVersionNumber'))) { + if (!(stackServices.length && App.StackService.find().objectAt(0).get('stackVersion') === App.get('currentStackVersionNumber'))) { this.loadServiceComponents().complete(function () { self.set('content.services', App.StackService.find().forEach(function (item) { // user the service version from VersionDefinition - item.set('serviceVersionDisplay', App.Stack.find().findProperty('isSelected', true).get('stackServices').findProperty('name', item.get('serviceName')).get('latestVersion')); + var serviceInStack = App.Stack.find().findProperty('isSelected').get('stackServices').findProperty('name', item.get('serviceName')); + var serviceVersionDisplay = serviceInStack ? serviceInStack.get('latestVersion') : item.get('serviceVersion'); + item.set('serviceVersionDisplay', serviceVersionDisplay); })); dfd.resolve(); }); http://git-wip-us.apache.org/repos/asf/ambari/blob/eae04997/ambari-web/app/mixins/wizard/assign_master_components.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/mixins/wizard/assign_master_components.js b/ambari-web/app/mixins/wizard/assign_master_components.js index 3651462..91a740c 100644 --- a/ambari-web/app/mixins/wizard/assign_master_components.js +++ b/ambari-web/app/mixins/wizard/assign_master_components.js @@ -1148,7 +1148,7 @@ App.AssignMasterComponents = Em.Mixin.create(App.HostComponentValidationMixin, A } }, - nextButtonDisabled: Em.computed.or('App.router.btnClickInProgress', 'submitDisabled'), + nextButtonDisabled: Em.computed.or('App.router.btnClickInProgress', 'submitDisabled', 'validationInProgress'), /** * Submit button click handler http://git-wip-us.apache.org/repos/asf/ambari/blob/eae04997/ambari-web/test/mixins/wizard/assign_master_components_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/mixins/wizard/assign_master_components_test.js b/ambari-web/test/mixins/wizard/assign_master_components_test.js index eb48ad5..635143c 100644 --- a/ambari-web/test/mixins/wizard/assign_master_components_test.js +++ b/ambari-web/test/mixins/wizard/assign_master_components_test.js @@ -211,6 +211,6 @@ describe('App.AssignMasterComponents', function () { }); App.TestAliases.testAsComputedOr(baseObject.create(), - 'nextButtonDisabled', ['App.router.btnClickInProgress', 'submitDisabled']); + 'nextButtonDisabled', ['App.router.btnClickInProgress', 'submitDisabled', 'validationInProgress']); }); \ No newline at end of file