Repository: ambari Updated Branches: refs/heads/trunk 43ed20c0b -> dd8b03cf0
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/dd8b03cf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dd8b03cf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dd8b03cf Branch: refs/heads/trunk Commit: dd8b03cf01935c4babda7d32ef215151cbaa58af Parents: 43ed20c Author: Oleg Nechiporenko <onechipore...@apache.org> Authored: Tue Jun 24 15:39:49 2014 +0300 Committer: Oleg Nechiporenko <onechipore...@apache.org> Committed: Tue Jun 24 15:49:26 2014 +0300 ---------------------------------------------------------------------- ambari-web/app/styles/application.less | 3 +++ ambari-web/app/views/main/host.js | 21 ++++++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/dd8b03cf/ambari-web/app/styles/application.less ---------------------------------------------------------------------- diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less index a3e0afb..ce72348 100644 --- a/ambari-web/app/styles/application.less +++ b/ambari-web/app/styles/application.less @@ -3289,6 +3289,9 @@ table.graphs { position: absolute; opacity: 0.9; background-color: #fefefe; + .spinner { + display: none; + } } .status-dot-position { http://git-wip-us.apache.org/repos/asf/ambari/blob/dd8b03cf/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 d089d68..0076087 100644 --- a/ambari-web/app/views/main/host.js +++ b/ambari-web/app/views/main/host.js @@ -158,6 +158,7 @@ App.MainHostView = App.TableView.extend(App.TableServerProvider, { this.addObserver('selectAllHosts', this, this.toggleAllHosts); this.set('controller.isCountersUpdating', true); this.get('controller').updateStatusCounters(); + this.addObserver('filteringComplete', this, this.overlayObserver); }, /** @@ -247,24 +248,26 @@ App.MainHostView = App.TableView.extend(App.TableServerProvider, { }, /** - * Show spinner when filter/sorting request is processed + * Show spinner when filter/sorting request is in processing * @method overlayObserver */ overlayObserver: function() { + var $tbody = this.$('tbody'), + $overlay = this.$('.hosts-overlay'), + $spinner = $($overlay).find('.spinner'); 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() + $spinner.css('display', 'block'); + $overlay.css({ + top: tbodyPos.top + 1, + left: tbodyPos.left + 1, + width: $tbody.width() - 1, + height: $tbody.height() - 1 }); } - }.observes('filteringComplete'), + }, /** * Clear selectedFilter