ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject git commit: AMBARI-4127. Hosts Filter does not say that a filter is enabled (not possible to figure out if a filter is enabled or not easily). (xiwang via yusaku)
Date Fri, 20 Dec 2013 23:19:00 GMT
Updated Branches:
  refs/heads/branch-1.4.3 205b884c3 -> 39867e3df


AMBARI-4127. Hosts Filter does not say that a filter is enabled (not possible to figure out
if a filter is enabled or not easily). (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/39867e3d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/39867e3d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/39867e3d

Branch: refs/heads/branch-1.4.3
Commit: 39867e3dfe92523e5926526d10279fed68543f4d
Parents: 205b884
Author: Yusaku Sako <yusaku@hortonworks.com>
Authored: Fri Dec 20 15:18:29 2013 -0800
Committer: Yusaku Sako <yusaku@hortonworks.com>
Committed: Fri Dec 20 15:18:29 2013 -0800

----------------------------------------------------------------------
 ambari-web/app/styles/application.less     | 17 +++++++++++++++++
 ambari-web/app/templates/main/host.hbs     |  2 +-
 ambari-web/app/views/common/filter_view.js |  7 ++++++-
 ambari-web/app/views/common/sort_view.js   |  6 +++++-
 ambari-web/app/views/main/host.js          |  5 +++++
 5 files changed, 34 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/39867e3d/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index de30a90..718139d 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -2555,12 +2555,29 @@ table.graphs {
       th {
         padding: 4px 4px 4px 8px;
       }
+      .active-sort {
+        color: #555555;
+        text-decoration: none;
+        background-color: #e5e5e5;
+        -webkit-box-shadow: inset 0 5px 8px rgba(0, 0, 0, 0.100);
+        -moz-box-shadow: inset 0 5px 8px rgba(0, 0, 0, 0.100);
+        box-shadow: inset 0 5px 8px rgba(0, 0, 0, 0.100);
+      }
     }
+
     #filter-row {
       th {
         padding: 0px;
         padding-left: 8px;
       }
+      .active-filter {
+        color: #555555;
+        text-decoration: none;
+        background-color: #e5e5e5;
+        -webkit-box-shadow: inset 0 -5px 8px rgba(0, 0, 0, 0.05);
+        -moz-box-shadow: inset 0 -5px 8px rgba(0, 0, 0, 0.05);
+        box-shadow: inset 0 -5px 8px rgba(0, 0, 0, 0.05);
+      }
       input {
         font-size: 12px;
         height: 14px;

http://git-wip-us.apache.org/repos/asf/ambari/blob/39867e3d/ambari-web/app/templates/main/host.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/host.hbs b/ambari-web/app/templates/main/host.hbs
index 1bf69f7..fcadc6f 100644
--- a/ambari-web/app/templates/main/host.hbs
+++ b/ambari-web/app/templates/main/host.hbs
@@ -68,7 +68,7 @@
         {{view view.parentView.memorySort}}
         {{view view.parentView.diskUsageSort}}
         {{view view.parentView.loadAvgSort}}
-        <th>{{t common.components}}</th>
+        <th class="sort-view-6">{{t common.components}}</th>
       {{/view}}
       <tr id="filter-row">
         <th class="first"> </th>

http://git-wip-us.apache.org/repos/asf/ambari/blob/39867e3d/ambari-web/app/views/common/filter_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/filter_view.js b/ambari-web/app/views/common/filter_view.js
index 942c8a2..b974e0f 100644
--- a/ambari-web/app/views/common/filter_view.js
+++ b/ambari-web/app/views/common/filter_view.js
@@ -73,11 +73,16 @@ var wrapperView = Ember.View.extend({
     if(!this.get('parentNode')){
       return;
     }
-
+    // get the sort view element in the same column to current filter view to highlight them
together
+    var relatedSort = $('.sort-view-' + this.get('column'));
     if(this.isEmpty()){
+      this.get('parentNode').removeClass('active-filter');
       this.get('parentNode').addClass('notActive');
+      relatedSort.removeClass('active-sort');
     } else {
       this.get('parentNode').removeClass('notActive');
+      this.get('parentNode').addClass('active-filter');
+      relatedSort.addClass('active-sort');
     }
 
     if(this.get('fieldId')){

http://git-wip-us.apache.org/repos/asf/ambari/blob/39867e3d/ambari-web/app/views/common/sort_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/sort_view.js b/ambari-web/app/views/common/sort_view.js
index fa8bef8..25cdc5a 100644
--- a/ambari-web/app/views/common/sort_view.js
+++ b/ambari-web/app/views/common/sort_view.js
@@ -151,12 +151,16 @@ var wrapperView = Em.View.extend({
  */
 var fieldView = Em.View.extend({
   template:Em.Handlebars.compile('{{view.displayName}}'),
-  classNameBindings: ['status'],
+  classNameBindings: ['status', 'viewNameClass'],
   tagName: 'th',
   name: null,
   displayName: null,
   status: 'sorting',
+  viewNameClass: function () {
+    return 'sort-view-' + this.get('column');
+  }.property(),
   type: null,
+  column: 0,
   /**
    * callback that run sorting and define order of sorting
    * @param event

http://git-wip-us.apache.org/repos/asf/ambari/blob/39867e3d/ambari-web/app/views/main/host.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host.js b/ambari-web/app/views/main/host.js
index da6483b..b03e394 100644
--- a/ambari-web/app/views/main/host.js
+++ b/ambari-web/app/views/main/host.js
@@ -49,20 +49,24 @@ App.MainHostView = App.TableView.extend({
 
   sortView: sort.wrapperView,
   nameSort: sort.fieldView.extend({
+    column: 1,
     name:'publicHostName',
     displayName: Em.I18n.t('common.name')
   }),
   ipSort: sort.fieldView.extend({
+    column: 2,
     name:'ip',
     displayName: Em.I18n.t('common.ipAddress'),
     type: 'ip'
   }),
   cpuSort: sort.fieldView.extend({
+    column: 3,
     name:'cpu',
     displayName: Em.I18n.t('common.cpu'),
     type: 'number'
   }),
   memorySort: sort.fieldView.extend({
+    column: 4,
     name:'memory',
     displayName: Em.I18n.t('common.ram'),
     type: 'number'
@@ -72,6 +76,7 @@ App.MainHostView = App.TableView.extend({
     displayName: Em.I18n.t('common.diskUsage')
   }),
   loadAvgSort: sort.fieldView.extend({
+    column: 5,
     name:'loadAvg',
     displayName: Em.I18n.t('common.loadAvg'),
     type: 'number'


Mime
View raw message