You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by at...@apache.org on 2014/11/14 15:52:54 UTC

ambari git commit: AMBARI-8331 Host Details: tab isn't restored after refresh. (atkach)

Repository: ambari
Updated Branches:
  refs/heads/trunk 2ae722627 -> feab062b8


AMBARI-8331 Host Details: tab isn't restored after refresh. (atkach)


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

Branch: refs/heads/trunk
Commit: feab062b8a51f3815472d6998016c6c73f8b03ee
Parents: 2ae7226
Author: Andrii Tkach <at...@hortonworks.com>
Authored: Fri Nov 14 16:52:48 2014 +0200
Committer: Andrii Tkach <at...@hortonworks.com>
Committed: Fri Nov 14 16:52:48 2014 +0200

----------------------------------------------------------------------
 ambari-web/app/views/main/host/menu.js | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/feab062b/ambari-web/app/views/main/host/menu.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host/menu.js b/ambari-web/app/views/main/host/menu.js
index c8b2461..d00a480 100644
--- a/ambari-web/app/views/main/host/menu.js
+++ b/ambari-web/app/views/main/host/menu.js
@@ -33,7 +33,7 @@ App.MainHostMenuView = Em.CollectionView.extend({
       }
       /* { label:'Audit', routing:'audit'} */
     ];
-    if (App.supports.stackUpgrade) {
+    if (App.get('supports.stackUpgrade')) {
       array.push({
         label: Em.I18n.t('hosts.host.menu.stackVersions'),
         routing: 'stackVersions'
@@ -50,9 +50,10 @@ App.MainHostMenuView = Em.CollectionView.extend({
 
   init: function(){ this._super(); this.activateView(); },
 
-  activateView:function () {
+  activateView: function () {
+    var defaultRoute = App.router.get('currentState.name') || "summary";
     $.each(this._childViews, function () {
-      this.set('active', (this.get('content.routing') == 'summary' ? "active" : ""));
+      this.set('active', (this.get('content.routing') == defaultRoute ? "active" : ""));
     });
   },