You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jl...@apache.org on 2016/03/11 06:47:29 UTC

[21/21] ambari git commit: AMBARI-15378 Create multiple version state filters instead of one combined one on host page for version page (Joe Wang via rzang)

AMBARI-15378 Create multiple version state filters instead of one combined one on host page for version page (Joe Wang via rzang)


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

Branch: refs/heads/AMBARI-13364
Commit: 171379abd1bd525c5ff9693f7e8bc27bc182fec4
Parents: a9d5621
Author: Richard Zang <rz...@apache.org>
Authored: Thu Mar 10 15:08:35 2016 -0800
Committer: Richard Zang <rz...@apache.org>
Committed: Thu Mar 10 15:08:35 2016 -0800

----------------------------------------------------------------------
 ambari-web/app/controllers/main/host.js | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/171379ab/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 efc0ba2..ec745e7 100644
--- a/ambari-web/app/controllers/main/host.js
+++ b/ambari-web/app/controllers/main/host.js
@@ -528,7 +528,7 @@ App.MainHostController = Em.ArrayController.extend(App.TableServerMixin, {
     if (Em.isNone(displayName) || Em.isNone(states) || !states.length) return;
     var colPropAssoc = this.get('colPropAssoc');
     var map = this.get('labelValueMap');
-    var displayStates = [];
+    var stateFilterStrs = [];
 
     var versionFilter = {
       iColumn: 16,
@@ -544,12 +544,11 @@ App.MainHostController = Em.ArrayController.extend(App.TableServerMixin, {
     map["Version State"] = colPropAssoc[stateFilter.iColumn];
     stateFilter.value.forEach(function(state) {
       map[App.HostStackVersion.formatStatus(state)] = state;
-      displayStates.push(App.HostStackVersion.formatStatus(state));
+      stateFilterStrs.push('"Version State": "' + App.HostStackVersion.formatStatus(state) + '"');
     });
     var versionFilterStr = '"Stack Version": "' + versionFilter.value + '"';
-    var stateFilterStr = '"Version State": "' + displayStates.join(',') + '"';
     App.db.setFilterConditions(this.get('name'), [versionFilter, stateFilter]);
-    App.db.setComboSearchQuery(this.get('name'), [versionFilterStr, stateFilterStr].join(' '));
+    App.db.setComboSearchQuery(this.get('name'), [versionFilterStr, stateFilterStrs.join(' ')].join(' '));
   },
 
   goToHostAlerts: function (event) {