ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atk...@apache.org
Subject ambari git commit: AMBARI-9241 Ambari Web highlighting option in Admin even though I'm not on that page. (atkach)
Date Wed, 21 Jan 2015 17:37:41 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk bc6f2c785 -> 3b205d4f0


AMBARI-9241 Ambari Web highlighting option in Admin even though I'm not on that page. (atkach)


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

Branch: refs/heads/trunk
Commit: 3b205d4f014eac27a07bdef5c521aa6936e675bf
Parents: bc6f2c7
Author: Andrii Tkach <atkach@hortonworks.com>
Authored: Wed Jan 21 19:14:07 2015 +0200
Committer: Andrii Tkach <atkach@hortonworks.com>
Committed: Wed Jan 21 19:14:07 2015 +0200

----------------------------------------------------------------------
 ambari-web/app/controllers/main/admin.js | 8 +++++++-
 ambari-web/app/views/main/admin.js       | 7 ++++++-
 ambari-web/app/views/main/menu.js        | 2 +-
 3 files changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3b205d4f/ambari-web/app/controllers/main/admin.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin.js b/ambari-web/app/controllers/main/admin.js
index 84dbc49..1a8b567 100644
--- a/ambari-web/app/controllers/main/admin.js
+++ b/ambari-web/app/controllers/main/admin.js
@@ -20,7 +20,13 @@ var App = require('app');
 
 App.MainAdminController = Em.Controller.extend({
   name: 'mainAdminController',
-  category: 'user',
+
+  /**
+   * @type {string}
+   * @default null
+   */
+  category: null,
+
   /**
    * Check if access page available.
    * Turn on if YARN service is installed with Application Timeline Server component and
TEZ installed too.

http://git-wip-us.apache.org/repos/asf/ambari/blob/3b205d4f/ambari-web/app/views/main/admin.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin.js b/ambari-web/app/views/main/admin.js
index 0c61d01..4d9e3a8 100644
--- a/ambari-web/app/views/main/admin.js
+++ b/ambari-web/app/views/main/admin.js
@@ -57,6 +57,11 @@ App.MainAdminView = Em.View.extend({
     isActive: function () {
       return this.get('item') === this.get('parentView.selected');
     }.property('item', 'parentView.selected')
-  })
+  }),
+
+  willDestroyElement: function () {
+    //reset selected category in Admin sub-menu after leaving admin section
+    this.set('controller.category', null);
+  }
 });
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/3b205d4f/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 0108a12..8bc8f2e 100644
--- a/ambari-web/app/views/main/menu.js
+++ b/ambari-web/app/views/main/menu.js
@@ -147,7 +147,7 @@ App.MainMenuView = Em.CollectionView.extend({
       tagName: 'li',
       classNameBindings: 'isActive:active'.w(),
       isActive: function () {
-        return this.get('item').toLowerCase().contains(this.get('parentView.selectedAdminItem').toLowerCase());
+        return this.get('item') === this.get('parentView.selectedAdminItem');
       }.property('item', 'parentView.selectedAdminItem'),
 
       goToCategory: function (event) {


Mime
View raw message