You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by on...@apache.org on 2014/01/29 17:14:02 UTC

git commit: AMBARI-4454. Bulk Ops: UI tweaks. (onechiporenko)

Updated Branches:
  refs/heads/trunk 7bc910320 -> 1a54ce4c6


AMBARI-4454. Bulk Ops: UI tweaks. (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 1a54ce4c6103f545d37d5993774f3668c9a75b22
Parents: 7bc9103
Author: Oleg Nechiporenko <on...@apache.org>
Authored: Wed Jan 29 13:24:48 2014 +0200
Committer: Oleg Nechiporenko <on...@apache.org>
Committed: Wed Jan 29 18:13:44 2014 +0200

----------------------------------------------------------------------
 ambari-web/app/messages.js                                 | 1 +
 ambari-web/app/styles/application.less                     | 8 ++++++++
 ambari-web/app/templates/main/host/bulk_operation_menu.hbs | 6 +++---
 ambari-web/app/views/main/host/hosts_table_menu_view.js    | 8 ++++----
 4 files changed, 16 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1a54ce4c/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 9b86447..aed505e 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1336,6 +1336,7 @@ Em.I18n.translations = {
   'hosts.table.menu.l1.selectedHosts':'Selected Hosts',
   'hosts.table.menu.l1.filteredHosts':'Filtered Hosts',
   'hosts.table.menu.l1.allHosts':'All Hosts',
+  'hosts.table.menu.l2.allComponents':'All Components',
   'hosts.table.menu.l2.restartAllComponents':'Restart All Components',
 
   'hosts.bulkOperation.confirmation.header':'Confirm Bulk Operation',

http://git-wip-us.apache.org/repos/asf/ambari/blob/1a54ce4c/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index 7bc6599..b0a5939 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -2582,6 +2582,14 @@ table.graphs {
 /*Hosts*/
 #hosts {
 
+  .bulk-menu {
+    a {
+      &.disabled {
+        color: gray;
+      }
+    }
+  }
+
   #hosts-table {
     margin-top: 10px;
     margin-bottom: 10px;

http://git-wip-us.apache.org/repos/asf/ambari/blob/1a54ce4c/ambari-web/app/templates/main/host/bulk_operation_menu.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/host/bulk_operation_menu.hbs b/ambari-web/app/templates/main/host/bulk_operation_menu.hbs
index 19a9cb0..315b11d 100644
--- a/ambari-web/app/templates/main/host/bulk_operation_menu.hbs
+++ b/ambari-web/app/templates/main/host/bulk_operation_menu.hbs
@@ -16,7 +16,7 @@
 * limitations under the License.
 }}
 
-<div class="dropdown">
+<div class="dropdown bulk-menu">
   <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">{{t common.actions}} <span class="caret"></span></a>
   <ul class="dropdown-menu">
     {{#if App.isAdmin}}
@@ -24,7 +24,7 @@
       <li class="divider"></li>
     {{/if}}
     <li class="dropdown-submenu">
-      <a tabindex="-1" href="javascript:void(null);">{{view.menuItems.s.label}}
+      <a {{bindAttr class="view.parentView.selectedCategory.hasHosts::disabled"}} tabindex="-1" href="javascript:void(null);">{{view.menuItems.s.label}}
         ({{view.parentView.selectedCategory.hostsCount}})</a>
       <ul {{bindAttr class="view.parentView.selectedCategory.hasHosts::hidden :dropdown-menu"}}>
         {{#each subMenuItem in view.menuItems.s.submenu}}
@@ -42,7 +42,7 @@
       </ul>
     </li>
     <li class="dropdown-submenu">
-      <a tabindex="-1" href="javascript:void(null);">{{view.menuItems.f.label}}
+      <a {{bindAttr class="view.parentView.hasFilteredItems::disabled"}} tabindex="-1" href="javascript:void(null);">{{view.menuItems.f.label}}
         ({{view.parentView.filteredContent.length}})</a>
       <ul {{bindAttr class="view.parentView.hasFilteredItems::hidden :dropdown-menu"}}>
         {{#each subMenuItem in view.menuItems.f.submenu}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/1a54ce4c/ambari-web/app/views/main/host/hosts_table_menu_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host/hosts_table_menu_view.js b/ambari-web/app/views/main/host/hosts_table_menu_view.js
index 9fbbdef..dc682a5 100644
--- a/ambari-web/app/views/main/host/hosts_table_menu_view.js
+++ b/ambari-web/app/views/main/host/hosts_table_menu_view.js
@@ -102,7 +102,7 @@ App.HostTableMenuView = Em.View.extend({
   getHostItemsTemplate: function() {
     return Em.A([
       Em.Object.create({
-        label: Em.I18n.t('hosts.host.details.startAllComponents'),
+        label: Em.I18n.t('common.start'),
         operationData: Em.Object.create({
           action: 'STARTED',
           actionToCheck: 'INSTALLED',
@@ -110,7 +110,7 @@ App.HostTableMenuView = Em.View.extend({
         })
       }),
       Em.Object.create({
-        label: Em.I18n.t('hosts.host.details.stopAllComponents'),
+        label: Em.I18n.t('common.stop'),
         operationData: Em.Object.create({
           action: 'INSTALLED',
           actionToCheck: 'STARTED',
@@ -118,7 +118,7 @@ App.HostTableMenuView = Em.View.extend({
         })
       }),
       Em.Object.create({
-        label: Em.I18n.t('hosts.table.menu.l2.restartAllComponents'),
+        label: Em.I18n.t('common.restart'),
         operationData: Em.Object.create({
           action: 'RESTART',
           message: Em.I18n.t('hosts.table.menu.l2.restartAllComponents')
@@ -153,7 +153,7 @@ App.HostTableMenuView = Em.View.extend({
    * @returns {Array}
    */
   getSubMenuItemsTemplate: function(selection) {
-    var submenu = [{label: Em.I18n.t('common.hosts'), submenu: this.getHostItemsTemplate()}];
+    var submenu = [{label: Em.I18n.t('hosts.table.menu.l2.allComponents'), submenu: this.getHostItemsTemplate()}];
 
     if (!!App.HDFSService.find().content.length) {
       var slaveItemsForHdfs = this.getSlaveItemsTemplate('NAMENODE', 'DATANODE');