You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2013/09/25 19:01:59 UTC
git commit: AMBARI-3327. NameNode HA wizard (rollback): Add page
refresh after rollback is done. (alexantonenko)
Updated Branches:
refs/heads/branch-1.4.1 b8fba21c9 -> f1280471f
AMBARI-3327. NameNode HA wizard (rollback): Add page refresh after rollback is done. (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/f1280471
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/f1280471
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/f1280471
Branch: refs/heads/branch-1.4.1
Commit: f1280471f269d085e03397e5bc658088661a71f5
Parents: b8fba21
Author: Alex Antonenko <hi...@gmail.com>
Authored: Wed Sep 25 19:57:36 2013 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Wed Sep 25 19:57:36 2013 +0300
----------------------------------------------------------------------
.../highAvailability/rollback_controller.js | 5 ++---
.../admin/highAvailability/step9_controller.js | 2 +-
ambari-web/app/router.js | 6 +++++-
ambari-web/app/routes/main.js | 21 +++++++-------------
4 files changed, 15 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f1280471/ambari-web/app/controllers/main/admin/highAvailability/rollback_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/rollback_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/rollback_controller.js
index 574d15f..da7a0a5 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/rollback_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/rollback_controller.js
@@ -145,7 +145,7 @@ App.HighAvailabilityRollbackController = App.HighAvailabilityProgressPageControl
App.clusterStatus.setClusterStatus({
clusterName: this.get('content.cluster.name'),
clusterState: 'HIGH_AVAILABILITY_ROLLBACK',
- wizardControllerName: this.get('content.controllerName'),
+ wizardControllerName: 'highAvailabilityRollbackController',
localdb: App.db.data
});
},
@@ -176,8 +176,7 @@ App.HighAvailabilityRollbackController = App.HighAvailabilityProgressPageControl
done: function () {
if (!this.get('isSubmitDisabled')) {
this.removeObserver('tasks.@each.status', this, 'onTaskStatusChange');
- this.get('popup').hide();
- App.router.transitionTo('main.admin.adminHighAvailability');
+ this.popup.proceedOnClose();
}
},
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f1280471/ambari-web/app/controllers/main/admin/highAvailability/step9_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/step9_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/step9_controller.js
index 5e1fc20..680d16e 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/step9_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/step9_controller.js
@@ -26,7 +26,7 @@ App.HighAvailabilityWizardStep9Controller = App.HighAvailabilityProgressPageCont
hbaseSiteTag: "",
- clearStep: function () {
+ initializeTasks: function () {
this._super();
if (!App.Service.find().someProperty('serviceName', 'HBASE')) {
this.get('tasks').splice(this.get('tasks').findProperty('command', 'reconfigureHBase').get('id'), 1);
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f1280471/ambari-web/app/router.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/router.js b/ambari-web/app/router.js
index bba910d..7e627c0 100644
--- a/ambari-web/app/router.js
+++ b/ambari-web/app/router.js
@@ -271,7 +271,8 @@ App.Router = Em.Router.extend({
var clusterStatusOnServer = App.clusterStatus.get('value');
if (!localStorage.getObject('ambari').app.user.admin || clusterStatusOnServer && (clusterStatusOnServer.clusterState === 'CLUSTER_STARTED_5' ||
clusterStatusOnServer.clusterState === 'ADD_HOSTS_COMPLETED_5' || clusterStatusOnServer.clusterState === 'STACK_UPGRADE_COMPLETED' ||
- clusterStatusOnServer.clusterState === 'REASSIGN_MASTER_COMPLETED' || clusterStatusOnServer.clusterState === 'SECURITY_COMPLETED' || clusterStatusOnServer.clusterState === 'HIGH_AVAILABILITY_COMPLETED')) {
+ clusterStatusOnServer.clusterState === 'REASSIGN_MASTER_COMPLETED' || clusterStatusOnServer.clusterState === 'SECURITY_COMPLETED' || clusterStatusOnServer.clusterState === 'HIGH_AVAILABILITY_COMPLETED'
+ || clusterStatusOnServer.clusterState === 'HIGH_AVAILABILITY_DISABLED')) {
return 'main.index';
} else if (clusterStatusOnServer && clusterStatusOnServer.wizardControllerName === App.router.get('addHostController.name')) {
// if wizardControllerName == "addHostController", then it means someone closed the browser or the browser was crashed when we were last in Add Hosts wizard
@@ -291,6 +292,9 @@ App.Router = Em.Router.extend({
} else if (clusterStatusOnServer && clusterStatusOnServer.wizardControllerName === App.router.get('highAvailabilityWizardController.name')) {
// if wizardControllerName == "highAvailabilityWizardController", then it means someone closed the browser or the browser was crashed when we were last in NameNode High Availability wizard
return 'main.admin.enableHighAvailability';
+ }else if (clusterStatusOnServer && clusterStatusOnServer.wizardControllerName === App.router.get('highAvailabilityRollbackController.name')) {
+ // if wizardControllerName == "highAvailabilityRollbackController", then it means someone closed the browser or the browser was crashed when we were last in NameNode High Availability Rollback wizard
+ return 'main.admin.highAvailabilityRollback';
} else {
// if wizardControllerName == "installerController", then it means someone closed the browser or the browser was crashed when we were last in Installer wizard
return 'installer';
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f1280471/ambari-web/app/routes/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js
index 557055e..fff1768 100644
--- a/ambari-web/app/routes/main.js
+++ b/ambari-web/app/routes/main.js
@@ -692,25 +692,18 @@ module.exports = Em.Route.extend({
secondary: null,
showFooter: false,
- onClose: function () {
- var self = this;
- var controller = router.get('highAvailabilityRollbackController');
-// if (!controller.get('isSubmitDisabled')) {
- self.proceedOnClose();
-// }
- },
proceedOnClose: function () {
- var controller = router.get('highAvailabilityWizardController');
- controller.clearStorageData();
+ var controller = router.get('highAvailabilityWizardController');
+ controller.clearStorageData();
App.router.get('updateController').set('isWorking', true);
App.clusterStatus.setClusterStatus({
- clusterName: router.get('content.cluster.name'),
- clusterState: 'HIGH_AVAILABILITY_DISABLED',
- wizardControllerName: router.get('highAvailabilityRollbackController.name'),
- localdb: App.db.data
+ clusterName: router.get('content.cluster.name'),
+ clusterState: 'HIGH_AVAILABILITY_DISABLED',
+ wizardControllerName: router.get('highAvailabilityRollbackController.name'),
+ localdb: App.db.data
});
this.hide();
- router.transitionTo('main.admin.adminHighAvailability');
+ router.transitionTo('main.admin.index');
location.reload();
},
didInsertElement: function () {