ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From onechipore...@apache.org
Subject git commit: AMBARI-6236. Hosts page: there is no indication that filtering/sorting/paging is happening or not (confusing). (onechiporenko)
Date Mon, 23 Jun 2014 13:02:51 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-1.6.1 102eb2526 -> 8da3c7cbd


AMBARI-6236. Hosts page: there is no indication that filtering/sorting/paging is happening
or not (confusing). (onechiporenko)


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

Branch: refs/heads/branch-1.6.1
Commit: 8da3c7cbd7637d5b6f0c6d2e957918e7d75e814b
Parents: 102eb25
Author: Oleg Nechiporenko <onechiporenko@apache.org>
Authored: Mon Jun 23 15:57:09 2014 +0300
Committer: Oleg Nechiporenko <onechiporenko@apache.org>
Committed: Mon Jun 23 15:57:09 2014 +0300

----------------------------------------------------------------------
 ambari-web/app/controllers/main/host.js         |  2 +-
 .../app/mixins/common/tableServerProvider.js    |  3 ++-
 ambari-web/app/styles/application.less          |  7 +++++++
 ambari-web/app/templates/main/host.hbs          |  4 ++++
 ambari-web/app/views/main/host.js               | 20 ++++++++++++++++++++
 5 files changed, 34 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8da3c7cb/ambari-web/app/controllers/main/host.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host.js b/ambari-web/app/controllers/main/host.js
index 11bffd1..2a8511c 100644
--- a/ambari-web/app/controllers/main/host.js
+++ b/ambari-web/app/controllers/main/host.js
@@ -206,7 +206,7 @@ App.MainHostController = Em.ArrayController.extend({
    * Detect if user have passed string as regular expression or extend
    * string to regexp.
    *
-   * @params {String} value
+   * @param {String} value
    * @return {String}
    **/
   getRegExp: function (value) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/8da3c7cb/ambari-web/app/mixins/common/tableServerProvider.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/common/tableServerProvider.js b/ambari-web/app/mixins/common/tableServerProvider.js
index 3315011..76e1693 100644
--- a/ambari-web/app/mixins/common/tableServerProvider.js
+++ b/ambari-web/app/mixins/common/tableServerProvider.js
@@ -52,7 +52,8 @@ App.TableServerProvider = Em.Mixin.create({
     if (!this.get('filteringComplete')) return false;
 
     this.set('filteringComplete', false);
-    this.get('updater')[this.get('updater.tableUpdaterMap')[this.get('tableName')]](function
() {
+    var updaterMethodName = this.get('updater.tableUpdaterMap')[this.get('tableName')];
+    this.get('updater')[updaterMethodName](function () {
       self.set('filteringComplete', true);
       self.propertyDidChange('pageContent');
     }, function() {

http://git-wip-us.apache.org/repos/asf/ambari/blob/8da3c7cb/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index b46815d..336330d 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -3284,6 +3284,13 @@ table.graphs {
       background: none repeat scroll 0 0 #F8F8F8;
     }
   }
+
+  .hosts-overlay {
+    position: absolute;
+    opacity: 0.9;
+    background-color: #fefefe;
+  }
+
   .status-dot-position {
     background-position: center;
     background-repeat: no-repeat;

http://git-wip-us.apache.org/repos/asf/ambari/blob/8da3c7cb/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 731e76e..2e59a6c 100644
--- a/ambari-web/app/templates/main/host.hbs
+++ b/ambari-web/app/templates/main/host.hbs
@@ -142,6 +142,10 @@
     </tbody>
   </table>
 
+  <div {{bindAttr class="view.filteringComplete:hidden :hosts-overlay"}}>
+    <div class="spinner"></div>
+  </div>
+
   <div class="page-bar">
     <div class="filtered-hosts-info span4">
       <label>{{view.filteredContentInfo}} - <a {{action clearFilters target="view"}}
href="#">{{t tableView.filters.clearAllFilters}}</a></label>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8da3c7cb/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 24608f2..d089d68 100644
--- a/ambari-web/app/views/main/host.js
+++ b/ambari-web/app/views/main/host.js
@@ -247,6 +247,26 @@ App.MainHostView = App.TableView.extend(App.TableServerProvider, {
   },
 
   /**
+   * Show spinner when filter/sorting request is processed
+   * @method overlayObserver
+   */
+  overlayObserver: function() {
+    if (!this.get('filteringComplete')) {
+      var $tbody = this.$('tbody');
+      if (!$tbody) return;
+      var tbodyPos =  $tbody.position();
+      if (!tbodyPos) return;
+
+      this.$('.hosts-overlay').css({
+        top: tbodyPos.top,
+        left: tbodyPos.left,
+        width: $tbody.width(),
+        height: $tbody.height()
+      });
+    }
+  }.observes('filteringComplete'),
+
+  /**
    * Clear selectedFilter
    * Set <code>selected</code> to false for each host
    */


Mime
View raw message