AMBARI-3858. "Add New Hosts" wizard appears automatically after it closed and re-login to UI. (onechiporenko)
diff --git a/ambari-web/app/routes/add_host_routes.js b/ambari-web/app/routes/add_host_routes.js
index 4505624..cf0d0bc 100644
--- a/ambari-web/app/routes/add_host_routes.js
+++ b/ambari-web/app/routes/add_host_routes.js
@@ -43,6 +43,12 @@
onClose: function() {
this.hide();
App.router.get('updateController').set('isWorking', true);
+ App.clusterStatus.setClusterStatus({
+ clusterName: App.router.get('content.cluster.name'),
+ clusterState: 'DEFAULT',
+ wizardControllerName: App.router.get('addHostController.name'),
+ localdb: App.db.data
+ });
router.transitionTo('hosts.index');
},
didInsertElement: function(){
diff --git a/ambari-web/app/routes/add_service_routes.js b/ambari-web/app/routes/add_service_routes.js
index 80aa6ef..9782485 100644
--- a/ambari-web/app/routes/add_service_routes.js
+++ b/ambari-web/app/routes/add_service_routes.js
@@ -45,6 +45,12 @@
this.set('showCloseButton', false); // prevent user to click "Close" many times
App.router.get('updateController').set('isWorking', true);
var self = this;
+ App.clusterStatus.setClusterStatus({
+ clusterName: App.router.get('content.cluster.name'),
+ clusterState: 'DEFAULT',
+ wizardControllerName: App.router.get('addServiceController.name'),
+ localdb: App.db.data
+ });
App.router.get('updateController').updateServiceMetric(function(){
self.hide();
});
diff --git a/ambari-web/app/views/wizard/step7_view.js b/ambari-web/app/views/wizard/step7_view.js
index 326f441..7f88958 100644
--- a/ambari-web/app/views/wizard/step7_view.js
+++ b/ambari-web/app/views/wizard/step7_view.js
@@ -35,7 +35,7 @@
break;
}
}
- $('.nav-tabs li:eq(' + tabIndex + ') a').trigger('click');
+ self.$().find('.nav-tabs li:eq(' + tabIndex + ') a').trigger('click');
});
}