Repository: ambari Updated Branches: refs/heads/branch-2.0.0 fdd80ec81 -> b655f99be
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/b655f99b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b655f99b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b655f99b Branch: refs/heads/branch-2.0.0 Commit: b655f99be24598926951f1f45f9e3a58606c1241 Parents: fdd80ec Author: aBabiichuk <[email protected]> Authored: Fri Feb 27 12:32:17 2015 +0200 Committer: aBabiichuk <[email protected]> Committed: Fri Feb 27 12:32:59 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/b655f99b/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'); + }); + } } } });
