ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akovale...@apache.org
Subject ambari git commit: AMBARI-10117. Accessing view instances unavailable to admin users when no clusters are configured. (akovalenko)
Date Wed, 18 Mar 2015 12:31:51 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk e11724985 -> bef5a71de


AMBARI-10117. Accessing view instances unavailable to admin users when no clusters are configured.
(akovalenko)


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

Branch: refs/heads/trunk
Commit: bef5a71deb3690c9c8c36c8c9ee4681ea9cb1854
Parents: e117249
Author: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Authored: Wed Mar 18 14:28:19 2015 +0200
Committer: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Committed: Wed Mar 18 14:28:19 2015 +0200

----------------------------------------------------------------------
 ambari-web/app/routes/main.js | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/bef5a71d/ambari-web/app/routes/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js
index 6897d88..251b376 100644
--- a/ambari-web/app/routes/main.js
+++ b/ambari-web/app/routes/main.js
@@ -46,15 +46,14 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
                 Em.run.next(function () {
                   App.clusterStatus.updateFromServer().complete(function () {
                     var currentClusterStatus = App.clusterStatus.get('value');
-                    if (currentClusterStatus) {
-                      if (self.get('installerStatuses').contains(currentClusterStatus.clusterState))
{
-                        if (App.isAccessible('ADMIN')) {
-                          self.redirectToInstaller(router, currentClusterStatus, false);
-                        } else {
-                          Em.run.next(function () {
-                            App.router.transitionTo('main.views.index');
-                          });
-                        }
+                    if (router.get('currentState.parentState.name') !== 'views'
+                        && currentClusterStatus && self.get('installerStatuses').contains(currentClusterStatus.clusterState))
{
+                      if (App.isAccessible('ADMIN')) {
+                        self.redirectToInstaller(router, currentClusterStatus, false);
+                      } else {
+                        Em.run.next(function () {
+                          App.router.transitionTo('main.views.index');
+                        });
                       }
                     }
                   });


Mime
View raw message