This is an automated email from the ASF dual-hosted git repository. ababiichuk pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push: new 1af8731 AMBARI-23951 Selection information disappears when a filter is applied. (ababiichuk) 1af8731 is described below commit 1af8731d61f24456466478b4428c316e98dc5570 Author: ababiichuk <ababiic...@hortonworks.com> AuthorDate: Fri May 25 15:24:14 2018 +0300 AMBARI-23951 Selection information disappears when a filter is applied. (ababiichuk) --- ambari-web/app/mixins/common/table_server_view_mixin.js | 5 ++--- ambari-web/app/templates/main/host.hbs | 4 ++-- ambari-web/app/views/main/host.js | 7 ++----- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/ambari-web/app/mixins/common/table_server_view_mixin.js b/ambari-web/app/mixins/common/table_server_view_mixin.js index 6fdbaa1..9695579 100644 --- a/ambari-web/app/mixins/common/table_server_view_mixin.js +++ b/ambari-web/app/mixins/common/table_server_view_mixin.js @@ -65,9 +65,8 @@ App.TableServerViewMixin = Em.Mixin.create({ * @param iColumn * @param value * @param type - * @param preserveSelection */ - updateFilter: function (iColumn, value, type, preserveSelection) { + updateFilter: function (iColumn, value, type) { // Do not even trigger update flow if it's a blank update if (this.isBlankFilterUpdate(iColumn, value, type)) { return; } @@ -83,7 +82,7 @@ App.TableServerViewMixin = Em.Mixin.create({ this.set('controller.resetStartIndex', true); //save filter only when it's applied this.saveFilterConditions(iColumn, value, type, false); - this.refresh(preserveSelection); + this.refresh(); } return true; }, diff --git a/ambari-web/app/templates/main/host.hbs b/ambari-web/app/templates/main/host.hbs index 86ab272..4b832f0 100644 --- a/ambari-web/app/templates/main/host.hbs +++ b/ambari-web/app/templates/main/host.hbs @@ -132,11 +132,11 @@ <td colspan="13"> {{#if view.showSelectedFilter}} <div class="display-inline-block"> - <a {{action filterSelected target="view"}} href="#"> + <a {{action filterSelected target="view"}} {{QAAttr "selected-hosts-count"}} href="#"> {{view.selectedHosts.length}} {{pluralize view.selectedHostsCount singular="t:hosts.filters.selectedHostInfo" plural="t:hosts.filters.selectedHostsInfo"}} </a> - - <a {{action clearSelection target="view"}} href="#">{{t hosts.filters.clearSelection}}</a> + - <a {{action clearSelection target="view"}} {{QAAttr "clear-hosts-selection"}} href="#">{{t hosts.filters.clearSelection}}</a> </div> {{/if}} {{view App.PaginationView isDataLoadedBinding="view.filteringComplete" rowsPerPageSelectViewBinding="view.rowsPerPageSelectView"}} diff --git a/ambari-web/app/views/main/host.js b/ambari-web/app/views/main/host.js index f91af3b..53f2953 100644 --- a/ambari-web/app/views/main/host.js +++ b/ambari-web/app/views/main/host.js @@ -79,14 +79,11 @@ App.MainHostView = App.TableView.extend(App.TableServerViewMixin, { * request latest data filtered by new parameters * called when trigger property(<code>refreshTriggers</code>) is changed */ - refresh: function (preserveSelection) { + refresh: function () { App.loadTimer.start('Hosts Page'); this.set('filteringComplete', false); var updaterMethodName = this.get('updater.tableUpdaterMap')[this.get('tableName')]; this.get('updater')[updaterMethodName](this.updaterSuccessCb.bind(this), this.updaterErrorCb.bind(this), true); - if (!preserveSelection) { - this.clearSelection(); - } return true; }, @@ -283,7 +280,7 @@ App.MainHostView = App.TableView.extend(App.TableServerViewMixin, { */ filterSelected: function() { //10 is an index of selected column - this.updateFilter(10, this.get('selectedHosts'), 'multiple', true); + this.updateFilter(10, this.get('selectedHosts'), 'multiple'); }, /** -- To stop receiving notification emails like this one, please contact ababiic...@apache.org.