ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject git commit: AMBARI-5655. when no views, show 'No Views'. (xiwang via yusaku)
Date Thu, 01 May 2014 23:32:11 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-1.6.0 61d2658a4 -> ecea19ada


AMBARI-5655. when no views, show 'No Views'. (xiwang via yusaku)


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

Branch: refs/heads/branch-1.6.0
Commit: ecea19adac6f68b3598d71677d0c4e1f999b7ca2
Parents: 61d2658
Author: Yusaku Sako <yusaku@hortonworks.com>
Authored: Thu May 1 16:29:31 2014 -0700
Committer: Yusaku Sako <yusaku@hortonworks.com>
Committed: Thu May 1 16:32:01 2014 -0700

----------------------------------------------------------------------
 ambari-web/app/messages.js                  |  1 +
 ambari-web/app/styles/application.less      | 12 ++++++++----
 ambari-web/app/templates/main/menu_item.hbs |  8 ++++++--
 ambari-web/app/views/main/menu.js           |  1 -
 4 files changed, 15 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ecea19ad/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index afbdb95..b8d5ffe 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1984,6 +1984,7 @@ Em.I18n.translations = {
   'menu.item.jobs':'Jobs',
   'menu.item.admin':'Admin',
   'menu.item.views':'<i class="icon-th"></i>',
+  'menu.item.views.noViews':'No Views',
 
   'jobs.nothingToShow': 'No jobs to display',
   'jobs.loadingTasks': 'Loading...',

http://git-wip-us.apache.org/repos/asf/ambari/blob/ecea19ad/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index 0b9fefd..fe66e1c 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -276,9 +276,6 @@ footer {
       .top-nav-dropdown-menu > li{
         position: relative;
       }
-      .top-nav-dropdown-menu > li.active > a{
-        background-color: @top-nav-menu-dropdown-border-color;
-      }
       .top-nav-dropdown-menu > li > a {
         text-decoration: none;
         text-align: left;
@@ -300,7 +297,14 @@ footer {
         background-image: linear-gradient(to bottom, #666666, #555555);
         background-repeat: repeat-x;
       }
-
+      .top-nav-dropdown-menu > li.disabled > a {
+        color: #a9a9a9;
+      }
+      .top-nav-dropdown-menu > li.disabled > a:hover {
+        color: #a9a9a9;
+        background-color: @top-nav-menu-dropdown-bg-color;
+        background-image: none;
+      }
     }
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ecea19ad/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 894e491..9581512 100644
--- a/ambari-web/app/templates/main/menu_item.hbs
+++ b/ambari-web/app/templates/main/menu_item.hbs
@@ -36,9 +36,13 @@
 {{/if}}
 {{#if view.isViewsItem}}
   <ul class="top-nav-dropdown-menu">
-    {{#each category in view.content.views}}
+    {{#if view.content.views}}
+      {{#each category in view.content.views}}
         <li><a href="#" {{action "setView" category target="App.router.mainViewsController"}}>{{category.label}}</a></li>
-    {{/each}}
+      {{/each}}
+    {{else}}
+      <li class="disabled"><a href="javascript:void(null);">{{t menu.item.views.noViews}}</a></li>
+    {{/if}}
   </ul>
 {{/if}}
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ecea19ad/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 98b6047..f93b3de 100644
--- a/ambari-web/app/views/main/menu.js
+++ b/ambari-web/app/views/main/menu.js
@@ -111,7 +111,6 @@ App.MainMenuView = Em.CollectionView.extend({
       return this.get('content').routing == 'views';
     }.property(''),
     goToCategory: function (event) {
-      //App.router.transitionTo('admin.service.summary', service);
       var itemName = this.get('content').routing;
       // route to correct category of current menu item
       if (itemName == 'admin') {


Mime
View raw message