Repository: ambari Updated Branches: refs/heads/trunk ef040d68a -> f704351be
AMBARI-9727 Move Master Wizard: Previous steps enabled. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f704351b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f704351b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f704351b Branch: refs/heads/trunk Commit: f704351befd57cfa585be214337c141b06dac4f3 Parents: ef040d6 Author: Andrii Tkach <atk...@hortonworks.com> Authored: Mon Feb 23 13:51:49 2015 +0200 Committer: Andrii Tkach <atk...@hortonworks.com> Committed: Mon Feb 23 15:17:31 2015 +0200 ---------------------------------------------------------------------- ambari-web/app/routes/reassign_master_routes.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/f704351b/ambari-web/app/routes/reassign_master_routes.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/reassign_master_routes.js b/ambari-web/app/routes/reassign_master_routes.js index 7632a4a..bb52fab 100644 --- a/ambari-web/app/routes/reassign_master_routes.js +++ b/ambari-web/app/routes/reassign_master_routes.js @@ -40,6 +40,8 @@ module.exports = App.WizardRoute.extend({ console.log('in /service/reassign:enter'); var context = this; var reassignMasterController = router.get('reassignMasterController'); + var currStep = reassignMasterController.get('currentStep'); + reassignMasterController.dataLoading().done(function () { if (App.router.get('mainHostController.hostsCountMap.TOTAL') > 1) { Em.run.next(function () { @@ -60,9 +62,6 @@ module.exports = App.WizardRoute.extend({ App.router.transitionTo('main.services.index'); }, onClose: function () { - var reassignMasterController = router.get('reassignMasterController'); - var currStep = reassignMasterController.get('currentStep'); - if (parseInt(currStep) > 3) { var self = this; @@ -97,11 +96,13 @@ module.exports = App.WizardRoute.extend({ if (currentClusterStatus) { switch (currentClusterStatus.clusterState) { case 'REASSIGN_MASTER_INSTALLING' : - reassignMasterController.setCurrentStep(currentClusterStatus.localdb.ReassignMaster.currentStep); + if (currentClusterStatus.localdb.ReassignMaster.currentStep !== currStep) { + reassignMasterController.setCurrentStep(currentClusterStatus.localdb.ReassignMaster.currentStep); + } break; } } - router.transitionTo('step' + reassignMasterController.get('currentStep')); + router.transitionTo('step' + currStep); }); } else { App.showAlertPopup(Em.I18n.t('common.error'), Em.I18n.t('services.reassign.error.fewHosts'), function () {