浏览代码

AMBARI-3566 Reassign Master: Navigation lock down of subsequent steps via typing url. (akovalenko)

Aleksandr Kovalenko 11 年之前
父节点
当前提交
a86099d33e

+ 1 - 1
ambari-web/app/controllers/main/service/item.js

@@ -203,7 +203,7 @@ App.MainServiceItemController = Em.Controller.extend({
     var reassignMasterController = App.router.get('reassignMasterController');
     reassignMasterController.saveComponentToReassign(component);
     reassignMasterController.setCurrentStep('1');
-    App.router.transitionTo('reassignMaster');
+    App.router.transitionTo('reassign');
   },
 
   /**

+ 1 - 1
ambari-web/app/router.js

@@ -288,7 +288,7 @@ App.Router = Em.Router.extend({
       return 'main.stackUpgrade';
     } else if (clusterStatusOnServer && clusterStatusOnServer.wizardControllerName === App.router.get('reassignMasterController.name')) {
       // if wizardControllerName == "reassignMasterController", then it means someone closed the browser or the browser was crashed when we were last in Reassign Master wizard
-      return 'main.reassignMaster';
+      return 'main.services.reassign';
     } 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';

+ 2 - 3
ambari-web/app/routes/main.js

@@ -923,13 +923,12 @@ module.exports = Em.Route.extend({
       }
     }),
     showService: Em.Router.transitionTo('service'),
-    addService: Em.Router.transitionTo('serviceAdd')
+    addService: Em.Router.transitionTo('serviceAdd'),
+    reassign: require('routes/reassign_master_routes')
   }),
 
 
   serviceAdd: require('routes/add_service_routes'),
-  reassignMaster: require('routes/reassign_master_routes'),
-
 
   selectService: Em.Route.transitionTo('services.service.summary'),
   selectHost: function (router, event) {

+ 13 - 1
ambari-web/app/routes/reassign_master_routes.js

@@ -17,7 +17,7 @@
  */
 
 module.exports = Em.Route.extend({
-  route: '/services/reassign',
+  route: '/reassign',
 
   enter: function (router) {
     console.log('in /service/reassign:enter');
@@ -81,6 +81,10 @@ module.exports = Em.Route.extend({
     next: function (router) {
       App.db.setMasterComponentHosts(undefined);
       router.transitionTo('step2');
+    },
+
+    unroutePath: function () {
+      return false;
     }
   }),
 
@@ -117,6 +121,10 @@ module.exports = Em.Route.extend({
       }, this);
       controller.saveReassignHosts(reassignHosts);
       router.transitionTo('step3');
+    },
+
+    unroutePath: function () {
+      return false;
     }
   }),
 
@@ -142,6 +150,10 @@ module.exports = Em.Route.extend({
         localdb: App.db.data
       });
       router.transitionTo('step4');
+    },
+
+    unroutePath: function () {
+      return false;
     }
   }),