You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by at...@apache.org on 2015/11/11 18:00:04 UTC

ambari git commit: AMBARI-13839 Config History: Filter applied after refresh. (atkach)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 a29826854 -> 8ebd2aace


AMBARI-13839 Config History: Filter applied after refresh. (atkach)


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

Branch: refs/heads/branch-2.1
Commit: 8ebd2aace495c23d545a9646bab9aa0da50f18c8
Parents: a298268
Author: Andrii Tkach <at...@hortonworks.com>
Authored: Wed Nov 11 18:48:51 2015 +0200
Committer: Andrii Tkach <at...@hortonworks.com>
Committed: Wed Nov 11 18:59:57 2015 +0200

----------------------------------------------------------------------
 .../main/dashboard/config_history_controller.js           |  6 ++++++
 .../app/views/main/dashboard/config_history_view.js       | 10 ++++++++++
 2 files changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8ebd2aac/ambari-web/app/controllers/main/dashboard/config_history_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/dashboard/config_history_controller.js b/ambari-web/app/controllers/main/dashboard/config_history_controller.js
index 66ae200..5197ad9 100644
--- a/ambari-web/app/controllers/main/dashboard/config_history_controller.js
+++ b/ambari-web/app/controllers/main/dashboard/config_history_controller.js
@@ -33,6 +33,12 @@ App.MainConfigHistoryController = Em.ArrayController.extend(App.TableServerMixin
   }.property('App.clusterName'),
 
   /**
+   * @type {boolean}
+   * @default false
+   */
+  showFilterConditionsFirstLoad: false,
+
+  /**
    * associations between host property and column index
    * @type {Array}
    */

http://git-wip-us.apache.org/repos/asf/ambari/blob/8ebd2aac/ambari-web/app/views/main/dashboard/config_history_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/config_history_view.js b/ambari-web/app/views/main/dashboard/config_history_view.js
index 7cc95a3..4c77445 100644
--- a/ambari-web/app/views/main/dashboard/config_history_view.js
+++ b/ambari-web/app/views/main/dashboard/config_history_view.js
@@ -57,6 +57,16 @@ App.MainConfigHistoryView = App.TableView.extend(App.TableServerViewMixin, {
     clearTimeout(this.get('controller.timeoutRef'));
   },
 
+  /**
+   * clear filters on initial loading
+   */
+  willInsertElement: function () {
+    if (!this.get('controller.showFilterConditionsFirstLoad')) {
+      this.clearFilterConditionsFromLocalStorage();
+    }
+    this._super();
+  },
+
   updateFilter: function (iColumn, value, type) {
     if (!this.get('isInitialRendering')) {
       this._super(iColumn, value, type);