Repository: ambari Updated Branches: refs/heads/trunk e077605cb -> e5c0bb3d7
AMBARI-9825 fast autoswitching between pages. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e5c0bb3d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e5c0bb3d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e5c0bb3d Branch: refs/heads/trunk Commit: e5c0bb3d78302067bdfe283034f407dee5469afd Parents: e077605 Author: aBabiichuk <[email protected]> Authored: Fri Feb 27 12:32:17 2015 +0200 Committer: aBabiichuk <[email protected]> Committed: Fri Feb 27 12:32:17 2015 +0200 ---------------------------------------------------------------------- ambari-web/app/routes/main.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/e5c0bb3d/ambari-web/app/routes/main.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js index d715b73..43dbf3c 100644 --- a/ambari-web/app/routes/main.js +++ b/ambari-web/app/routes/main.js @@ -48,7 +48,13 @@ module.exports = Em.Route.extend(App.RouterRedirections, { var currentClusterStatus = App.clusterStatus.get('value'); if (currentClusterStatus) { if (self.get('installerStatuses').contains(currentClusterStatus.clusterState)) { - self.redirectToInstaller(router, currentClusterStatus, false); + if (App.isAccessible('ADMIN')) { + self.redirectToInstaller(router, currentClusterStatus, false); + } else { + Em.run.next(function () { + App.router.transitionTo('main.views.index'); + }); + } } } });
