You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ak...@apache.org on 2014/08/29 16:25:12 UTC

git commit: AMBARI-7080. Empty views dropdown in main menu doesn't show 'No Views' message. (akovalenko)

Repository: ambari
Updated Branches:
  refs/heads/trunk 748009628 -> 7ec3d3ba4


AMBARI-7080. Empty views dropdown in main menu doesn't show 'No Views' message. (akovalenko)


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

Branch: refs/heads/trunk
Commit: 7ec3d3ba4714c1612474befecd305e1caefa7d80
Parents: 7480096
Author: Aleksandr Kovalenko <ak...@hortonworks.com>
Authored: Fri Aug 29 17:22:43 2014 +0300
Committer: Aleksandr Kovalenko <ak...@hortonworks.com>
Committed: Fri Aug 29 17:24:06 2014 +0300

----------------------------------------------------------------------
 ambari-web/app/templates/main/menu_item.hbs | 6 ++----
 ambari-web/app/views/main/menu.js           | 2 +-
 2 files changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7ec3d3ba/ambari-web/app/templates/main/menu_item.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/menu_item.hbs b/ambari-web/app/templates/main/menu_item.hbs
index e5ee05d..794a56f 100644
--- a/ambari-web/app/templates/main/menu_item.hbs
+++ b/ambari-web/app/templates/main/menu_item.hbs
@@ -39,11 +39,9 @@
 {{/if}}
 {{#if view.isViewsItem}}
   <ul class="top-nav-dropdown-menu">
-    {{#if view.content.views}}
+    {{#if view.content.views.length}}
       {{#each category in view.content.views}}
-        {{#if category.visible }}
-          <li><a href="#" {{action "setView" category target="App.router.mainViewsController"}}>{{category.label}}</a></li>
-        {{/if}}
+        <li><a href="#" {{action "setView" category target="App.router.mainViewsController"}}>{{category.label}}</a></li>
       {{/each}}
     {{else}}
       <li class="disabled"><a href="javascript:void(null);">{{t menu.item.views.noViews}}</a></li>

http://git-wip-us.apache.org/repos/asf/ambari/blob/7ec3d3ba/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 34eeac4..5925bac 100644
--- a/ambari-web/app/views/main/menu.js
+++ b/ambari-web/app/views/main/menu.js
@@ -57,7 +57,7 @@ App.MainMenuView = Em.CollectionView.extend({
       }
 
       if (App.supports.views) {
-        result.push({ label:Em.I18n.t('menu.item.views'), routing:'views.index', isView:true, views: this.get('views')});
+        result.push({ label:Em.I18n.t('menu.item.views'), routing:'views.index', isView:true, views: this.get('views').filterProperty('visible')});
       }
 
     }