Repository: ambari Updated Branches: refs/heads/trunk 150a7118f -> f80eb83fa
AMBARI-9760. Host Alerts table: clear filters link doesn't work. (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/f80eb83f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f80eb83f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f80eb83f Branch: refs/heads/trunk Commit: f80eb83fa66e24bebc3bbd2a112cfd343bb3d44e Parents: 150a711 Author: Yusaku Sako <yus...@hortonworks.com> Authored: Mon Feb 23 19:36:36 2015 -0800 Committer: Yusaku Sako <yus...@hortonworks.com> Committed: Mon Feb 23 19:36:36 2015 -0800 ---------------------------------------------------------------------- ambari-web/app/views/main/host/host_alerts_view.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/f80eb83f/ambari-web/app/views/main/host/host_alerts_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/host/host_alerts_view.js b/ambari-web/app/views/main/host/host_alerts_view.js index dc88232..80731a7 100644 --- a/ambari-web/app/views/main/host/host_alerts_view.js +++ b/ambari-web/app/views/main/host/host_alerts_view.js @@ -236,6 +236,18 @@ App.MainHostAlertsView = App.TableView.extend({ Em.run.next(this, function () { App.tooltip($(".enable-disable-button, .timeago, .alert-text")); }); - }.observes('pageContent.@each') + }.observes('pageContent.@each'), + + /** + * Run <code>clearFilter</code> in the each child filterView + */ + clearFilters: function() { + this.set('filterConditions', []); + this.get('childViews').forEach(function(childView) { + if (childView['clearFilter']) { + childView.clearFilter(); + } + }); + } });