Updated Branches:
  refs/heads/trunk f700bf097 -> a86099d33

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


Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/a86099d3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/a86099d3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/a86099d3

Branch: refs/heads/trunk
Commit: a86099d33e7a40055f53264cafe00f4513e169a1
Parents: f700bf0
Author: Aleksandr Kovalenko <[email protected]>
Authored: Mon Oct 21 19:34:46 2013 +0300
Committer: Aleksandr Kovalenko <[email protected]>
Committed: Mon Oct 21 19:34:46 2013 +0300

----------------------------------------------------------------------
 ambari-web/app/controllers/main/service/item.js |  2 +-
 ambari-web/app/router.js                        |  2 +-
 ambari-web/app/routes/main.js                   |  5 ++---
 ambari-web/app/routes/reassign_master_routes.js | 14 +++++++++++++-
 4 files changed, 17 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a86099d3/ambari-web/app/controllers/main/service/item.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/item.js 
b/ambari-web/app/controllers/main/service/item.js
index d5dd203..6069236 100644
--- a/ambari-web/app/controllers/main/service/item.js
+++ b/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');
   },
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a86099d3/ambari-web/app/router.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/router.js b/ambari-web/app/router.js
index 10ada9e..41b0145 100644
--- a/ambari-web/app/router.js
+++ b/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';

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a86099d3/ambari-web/app/routes/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js
index 22a98bd..517c4cd 100644
--- a/ambari-web/app/routes/main.js
+++ b/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) {

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a86099d3/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 9bb96ba..a283dae 100644
--- a/ambari-web/app/routes/reassign_master_routes.js
+++ b/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;
     }
   }),
 

Reply via email to