Repository: ambari Updated Branches: refs/heads/trunk a965487c5 -> 739d35e38
AMBARI-5573. UI does not redirect on 'Dashboard' page after login (Denys Buzhor via alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/739d35e3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/739d35e3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/739d35e3 Branch: refs/heads/trunk Commit: 739d35e385df0e6e3d6b27e2b04cc74e0afa5e50 Parents: a965487 Author: Alex Antonenko <[email protected]> Authored: Fri Apr 25 18:46:47 2014 +0300 Committer: Alex Antonenko <[email protected]> Committed: Fri Apr 25 18:46:47 2014 +0300 ---------------------------------------------------------------------- ambari-web/app/controllers/main/host/details.js | 2 +- .../main/jobs/hive_job_details_controller.js | 2 +- ambari-web/app/router.js | 4 ++-- ambari-web/app/routes/installer.js | 4 ++-- ambari-web/app/routes/main.js | 22 +++++++++++++------- 5 files changed, 21 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/739d35e3/ambari-web/app/controllers/main/host/details.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js index 5a17dc0..4dea285 100644 --- a/ambari-web/app/controllers/main/host/details.js +++ b/ambari-web/app/controllers/main/host/details.js @@ -46,7 +46,7 @@ App.MainHostDetailsController = Em.Controller.extend({ * @method routeHome */ routeHome: function () { - App.router.transitionTo('main.dashboard'); + App.router.transitionTo('main.dashboard.index'); }, /** http://git-wip-us.apache.org/repos/asf/ambari/blob/739d35e3/ambari-web/app/controllers/main/jobs/hive_job_details_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/jobs/hive_job_details_controller.js b/ambari-web/app/controllers/main/jobs/hive_job_details_controller.js index 0100ee5..1e2df7e 100644 --- a/ambari-web/app/controllers/main/jobs/hive_job_details_controller.js +++ b/ambari-web/app/controllers/main/jobs/hive_job_details_controller.js @@ -73,7 +73,7 @@ App.MainHiveJobDetailsController = Em.Controller.extend({ * open dashboard page */ routeHome : function() { - App.router.transitionTo('main.dashboard'); + App.router.transitionTo('main.dashboard.index'); }, /** http://git-wip-us.apache.org/repos/asf/ambari/blob/739d35e3/ambari-web/app/router.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/router.js b/ambari-web/app/router.js index e0971b1..73045d3 100644 --- a/ambari-web/app/router.js +++ b/ambari-web/app/router.js @@ -275,13 +275,13 @@ App.Router = Em.Router.extend({ if (App.alwaysGoToInstaller) { return 'installer'; } else { - return 'main.dashboard'; + return 'main.dashboard.index'; } } App.clusterStatus.updateFromServer(false, false); var clusterStatusOnServer = App.clusterStatus.get('value'); if (!App.get('isAdmin') || clusterStatusOnServer && clusterStatusOnServer.clusterState === 'DEFAULT') { - return 'main.dashboard'; + return 'main.dashboard.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 return 'main.hostAdd'; http://git-wip-us.apache.org/repos/asf/ambari/blob/739d35e3/ambari-web/app/routes/installer.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/installer.js b/ambari-web/app/routes/installer.js index 3991c57..deffe56 100644 --- a/ambari-web/app/routes/installer.js +++ b/ambari-web/app/routes/installer.js @@ -70,7 +70,7 @@ module.exports = Em.Route.extend({ break; case 'DEFAULT' : default: - router.transitionTo('main.dashboard'); + router.transitionTo('main.dashboard.index'); break; } } @@ -410,7 +410,7 @@ module.exports = Em.Route.extend({ // We need to do recovery based on whether we are in Add Host or Installer wizard controller.saveClusterState('DEFAULT'); - router.transitionTo('main.dashboard'); + router.transitionTo('main.dashboard.index'); } }), http://git-wip-us.apache.org/repos/asf/ambari/blob/739d35e3/ambari-web/app/routes/main.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js index e305cab..9e00962 100644 --- a/ambari-web/app/routes/main.js +++ b/ambari-web/app/routes/main.js @@ -87,7 +87,11 @@ module.exports = Em.Route.extend({ }, index: Em.Route.extend({ route: '/', - redirectsTo: 'widgets' + enter: function(router) { + Em.run.next(function(){ + router.transitionTo('widgets'); + }); + } }), //on click nav tabs events, go to widgets view or heatmap view goToDashboardView: function (router, event) { @@ -108,7 +112,11 @@ module.exports = Em.Route.extend({ }, index: Ember.Route.extend({ route: '/', - redirectsTo: 'heatmap' + enter: function(router) { + Em.run.next(function(){ + router.transitionTo('heatmap'); + }); + } }), heatmap: Em.Route.extend({ route: '/heatmap', @@ -136,7 +144,7 @@ module.exports = Em.Route.extend({ connectOutlets: function (router) { if (App.get('isHadoop2Stack')) { Em.run.next(function () { - router.transitionTo('main.dashboard'); + router.transitionTo('main.dashboard.index'); }); } else { router.get('mainAppsController').loadRuns(); @@ -150,7 +158,7 @@ module.exports = Em.Route.extend({ enter: function (router) { if(!App.router.get('mainAdminAccessController.showJobs') && !App.get('isAdmin')){ Em.run.next(function () { - router.transitionTo('main.dashboard'); + router.transitionTo('main.dashboard.index'); }); } }, @@ -162,7 +170,7 @@ module.exports = Em.Route.extend({ connectOutlets : function(router) { if (!App.get('isHadoop2Stack')) { Em.run.next(function() { - router.transitionTo('main.dashboard'); + router.transitionTo('main.dashboard.index'); }); } else { router.get('mainJobsController').updateJobs('mainJobsController', 'refreshLoadedJobs'); @@ -329,7 +337,7 @@ module.exports = Em.Route.extend({ enter: function (router, transition) { if (!App.isAdmin) { Em.run.next(function () { - router.transitionTo('main.dashboard'); + router.transitionTo('main.dashboard.index'); }); } }, @@ -337,7 +345,7 @@ module.exports = Em.Route.extend({ routePath: function (router, event) { if (!App.isAdmin) { Em.run.next(function () { - App.router.transitionTo('main.dashboard'); + App.router.transitionTo('main.dashboard.index'); }); } else { var controller = router.get('mainAdminController');
