You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by at...@apache.org on 2016/12/12 11:09:12 UTC
ambari git commit: AMBARI-19152 Perf: UI hangs after click on
button, on step. (atkach)
Repository: ambari
Updated Branches:
refs/heads/trunk ab9acef42 -> eae049976
AMBARI-19152 Perf: UI hangs after click on <Next> button, on <Assign Masters> 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 <at...@apache.org>
Authored: Fri Dec 9 18:29:48 2016 +0200
Committer: Andrii Tkach <at...@apache.org>
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