ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rz...@apache.org
Subject ambari git commit: AMBARI-12824. Components filter on Hosts page doesn't work (rzang)
Date Thu, 20 Aug 2015 06:20:03 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 ae4a36a2e -> e044c15ec


AMBARI-12824. Components filter on Hosts page doesn't work (rzang)


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

Branch: refs/heads/branch-2.1
Commit: e044c15ecbb1111390287b5f97598198f222e24e
Parents: ae4a36a
Author: Richard Zang <rzang@apache.org>
Authored: Wed Aug 19 23:16:16 2015 -0700
Committer: Richard Zang <rzang@apache.org>
Committed: Wed Aug 19 23:18:58 2015 -0700

----------------------------------------------------------------------
 ambari-web/app/controllers/main/host.js | 14 ++------------
 ambari-web/app/routes/main.js           |  1 +
 ambari-web/app/views/main/host.js       |  8 ++++----
 3 files changed, 7 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e044c15e/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 9ebc99f..8bf9065 100644
--- a/ambari-web/app/controllers/main/host.js
+++ b/ambari-web/app/controllers/main/host.js
@@ -45,25 +45,15 @@ App.MainHostController = Em.ArrayController.extend(App.TableServerMixin,
{
   startIndex: 1,
 
   /**
-   * true if any host filter got cleared
+   * true if any host page filter changed
    */
-  filterClearHappened: false,
+  filterChangeHappened: false,
 
   /**
    * if true, do not clean stored filter before hosts page rendering.
    */
   showFilterConditionsFirstLoad: false,
 
-  /**
-   * Components which will be shown in component filter
-   * @returns {Array}
-   */
-  componentsForFilter: function () {
-    var installedComponents = App.StackServiceComponent.find().toArray();
-    installedComponents.setEach('checkedForHostFilter', false);
-    return installedComponents;
-  }.property('App.router.clusterController.isLoaded'),
-
   content: App.Host.find(),
 
   allHostStackVersions: App.HostStackVersion.find(),

http://git-wip-us.apache.org/repos/asf/ambari/blob/e044c15e/ambari-web/app/routes/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js
index 5a6dc26..d5b9f39 100644
--- a/ambari-web/app/routes/main.js
+++ b/ambari-web/app/routes/main.js
@@ -761,6 +761,7 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
       return;
     router.get('mainHostController').filterByComponent(component.context);
     router.get('mainHostController').set('showFilterConditionsFirstLoad', true);
+    router.get('mainHostController').set('filterChangeHappened', true);
     router.transitionTo('hosts.index');
   },
   showDetails: function (router, event) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/e044c15e/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 9491744..a0f1a0c 100644
--- a/ambari-web/app/views/main/host.js
+++ b/ambari-web/app/views/main/host.js
@@ -182,7 +182,7 @@ App.MainHostView = App.TableView.extend(App.TableServerViewMixin, {
   willInsertElement: function () {
     if (!this.get('controller.showFilterConditionsFirstLoad')) {
       var didClearedSomething = this.clearFilterCondition();
-      this.set('controller.filterClearHappened', didClearedSomething);
+      this.set('controller.filterChangeHappened', didClearedSomething);
     }
     this._super();
     this.set('startIndex', this.get('controller.startIndex'));
@@ -212,15 +212,15 @@ App.MainHostView = App.TableView.extend(App.TableServerViewMixin, {
 
   onInitialLoad: function () {
     if (this.get('tableFilteringComplete')) {
-      if (this.get('controller.filterClearHappened')) {
+      if (this.get('controller.filterChangeHappened')) {
         this.refresh();
       } else {
         // no refresh but still need to enable pagination controls
         this.propertyDidChange('filteringComplete');
       }
     }
-    // reset filter cleaning marker
-    this.set('controller.filterClearHappened', false);
+    // reset filter change marker
+    this.set('controller.filterChangeHappened', false);
   }.observes('tableFilteringComplete'),
 
   /**


Mime
View raw message