Repository: ambari Updated Branches: refs/heads/branch-2.1 9a616d881 -> ad4b77b13
AMBARI-11981. Install Wizard: step9 opens every time after page refresh after install failed (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ad4b77b1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ad4b77b1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ad4b77b1 Branch: refs/heads/branch-2.1 Commit: ad4b77b139028e2d57dc3793f577af44dd542acb Parents: 9a616d8 Author: Aleksandr Kovalenko <[email protected]> Authored: Wed Jun 17 21:03:07 2015 +0300 Committer: Aleksandr Kovalenko <[email protected]> Committed: Wed Jun 17 21:04:22 2015 +0300 ---------------------------------------------------------------------- ambari-web/app/controllers/wizard.js | 2 +- ambari-web/app/mixins/routers/redirections.js | 10 +--------- ambari-web/app/models/cluster_states.js | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/ad4b77b1/ambari-web/app/controllers/wizard.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/wizard.js b/ambari-web/app/controllers/wizard.js index 6ae7a66..457e7bf 100644 --- a/ambari-web/app/controllers/wizard.js +++ b/ambari-web/app/controllers/wizard.js @@ -207,7 +207,7 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM clusterName: this.get('clusterName'), clusterState: 'CLUSTER_NOT_CREATED_1', wizardControllerName: 'installerController', - localdb: App.db.data + localdb: {} }); } if ((this.get('currentStep') - step) > 1 && !disableNaviWarning) { http://git-wip-us.apache.org/repos/asf/ambari/blob/ad4b77b1/ambari-web/app/mixins/routers/redirections.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/mixins/routers/redirections.js b/ambari-web/app/mixins/routers/redirections.js index 574cc5c..2e605be 100644 --- a/ambari-web/app/mixins/routers/redirections.js +++ b/ambari-web/app/mixins/routers/redirections.js @@ -49,15 +49,7 @@ App.RouterRedirections = Em.Mixin.create({ var path = isOnInstaller ? '' : 'installer.'; switch (currentClusterStatus.clusterState) { case 'CLUSTER_NOT_CREATED_1' : - var localDb = currentClusterStatus.localdb; - if (localDb && localDb.Installer && localDb.Installer.currentStep) { - App.db.data = currentClusterStatus.localdb; - App.get('router').setAuthenticated(true); - var controllerName = installerController.get('name'); - var suffixLength = 10; - var currentStep = App.get('router').getWizardCurrentStep(controllerName.substr(0, controllerName.length - suffixLength)); - installerController.setCurrentStep(currentStep); - } + App.get('router').setAuthenticated(true); router.transitionTo(path + 'step' + installerController.get('currentStep')); break; case 'CLUSTER_DEPLOY_PREP_2' : http://git-wip-us.apache.org/repos/asf/ambari/blob/ad4b77b1/ambari-web/app/models/cluster_states.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/models/cluster_states.js b/ambari-web/app/models/cluster_states.js index 7866f47..9f3ccac 100644 --- a/ambari-web/app/models/cluster_states.js +++ b/ambari-web/app/models/cluster_states.js @@ -134,7 +134,7 @@ App.clusterStatus = Em.Object.create(App.UserPref, { if (response.wizardControllerName) { this.set('wizardControllerName', response.wizardControllerName); } - if (response.localdb) { + if (response.localdb && !$.isEmptyObject(response.localdb)) { this.set('localdb', response.localdb); // restore HAWizard data if process was started var isHAWizardStarted = App.isAccessible('ADMIN') && !App.isEmptyObject(response.localdb.HighAvailabilityWizard);
