You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by rz...@apache.org on 2015/08/20 08:18:22 UTC
ambari git commit: AMBARI-12824. Components filter on Hosts page
doesn't work (rzang)
Repository: ambari
Updated Branches:
refs/heads/trunk 108b4961e -> 988d7e1c5
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/988d7e1c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/988d7e1c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/988d7e1c
Branch: refs/heads/trunk
Commit: 988d7e1c52f6dbdd04ce6ca7e924a8f8d6c720f2
Parents: 108b496
Author: Richard Zang <rz...@apache.org>
Authored: Wed Aug 19 23:16:16 2015 -0700
Committer: Richard Zang <rz...@apache.org>
Committed: Wed Aug 19 23:16:16 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/988d7e1c/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/988d7e1c/ambari-web/app/routes/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js
index b2bf9ef..b7807f5 100644
--- a/ambari-web/app/routes/main.js
+++ b/ambari-web/app/routes/main.js
@@ -724,6 +724,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/988d7e1c/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'),
/**