You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2014/08/20 17:30:05 UTC

[04/50] [abbrv] git commit: AMBARI-6895 Log in with different users cause wrong list of available views.(Buzhor Denys via atkach)

AMBARI-6895 Log in with different users cause wrong list of available views.(Buzhor Denys via atkach)


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

Branch: refs/heads/branch-alerts-dev
Commit: 620978b61182d1cbacffe11ceb79014823972aee
Parents: f0be435
Author: atkach <at...@hortonworks.com>
Authored: Mon Aug 18 19:21:38 2014 +0300
Committer: atkach <at...@hortonworks.com>
Committed: Mon Aug 18 19:21:38 2014 +0300

----------------------------------------------------------------------
 ambari-web/app/controllers/global/cluster_controller.js | 2 ++
 ambari-web/app/views/main/menu.js                       | 5 +++--
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/620978b6/ambari-web/app/controllers/global/cluster_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/global/cluster_controller.js b/ambari-web/app/controllers/global/cluster_controller.js
index ba1006c..d612039 100644
--- a/ambari-web/app/controllers/global/cluster_controller.js
+++ b/ambari-web/app/controllers/global/cluster_controller.js
@@ -364,6 +364,8 @@ App.ClusterController = Em.Controller.extend({
         sender: this,
         success: 'loadViewInstancesSuccess'
       });
+    } else {
+      this.set('ambariViews', []);
     }
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/620978b6/ambari-web/app/views/main/menu.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/menu.js b/ambari-web/app/views/main/menu.js
index c6e4683..888a806 100644
--- a/ambari-web/app/views/main/menu.js
+++ b/ambari-web/app/views/main/menu.js
@@ -30,7 +30,7 @@ App.MainMenuView = Em.CollectionView.extend({
     return App.router.get('clusterController.ambariViews');
   }.property('App.router.clusterController.ambariViews'),
 
-  content:function(){
+  content: function(){
     var result = [];
     if (App.router.get('loggedIn')) {
 
@@ -62,7 +62,8 @@ App.MainMenuView = Em.CollectionView.extend({
 
     }
     return result;
-  }.property('App.router.loggedIn', 'App.router.clusterController.isLoaded', 'App.supports.views', 'App.supports.mirroring', 'App.supports.secureCluster', 'App.supports.highAvailability'),
+  }.property('App.router.loggedIn', 'App.router.clusterController.isLoaded', 'App.supports.views', 'App.supports.mirroring',
+      'App.supports.secureCluster', 'App.supports.highAvailability', 'views.length'),
 
     /**
      *    Adds observer on lastSetURL and calls navigation sync procedure