Browse Source

AMBARI-17703 - Hosts page: after component filter hosts have wrong list of components (rzang)

Richard Zang 9 years ago
parent
commit
0d477f96c3

+ 2 - 2
ambari-web/app/controllers/global/update_controller.js

@@ -366,7 +366,7 @@ App.UpdateController = Em.Controller.extend({
     var preLoadKeys = this.get('hostsPreLoadKeys');
     var preLoadKeys = this.get('hostsPreLoadKeys');
 
 
     if (this.get('queryParams.Hosts').length > 0 && this.get('queryParams.Hosts').filter(function (param) {
     if (this.get('queryParams.Hosts').length > 0 && this.get('queryParams.Hosts').filter(function (param) {
-      return preLoadKeys.contains(param.key);
+      return param.isComponentRelatedFilter;
     }, this).length > 0) {
     }, this).length > 0) {
       this.getHostByHostComponents(callback);
       this.getHostByHostComponents(callback);
       return true;
       return true;
@@ -407,7 +407,7 @@ App.UpdateController = Em.Controller.extend({
       params.callback(skipCall);
       params.callback(skipCall);
     } else {
     } else {
       queryParams = queryParams.filter(function (param) {
       queryParams = queryParams.filter(function (param) {
-        return !preLoadKeys.contains(param.key);
+        return !param.isComponentRelatedFilter;
       });
       });
 
 
       queryParams.push({
       queryParams.push({

+ 2 - 1
ambari-web/app/controllers/main/host.js

@@ -258,7 +258,8 @@ App.MainHostController = Em.ArrayController.extend(App.TableServerMixin, {
           key: property.key,
           key: property.key,
           value: filter.value,
           value: filter.value,
           type: property.type,
           type: property.type,
-          isFilter: true
+          isFilter: true,
+          isComponentRelatedFilter: ([13,15].indexOf(filter.iColumn) != -1)
         };
         };
         if (filter.type === 'string' && sortProperties.someProperty('name', colPropAssoc[filter.iColumn])) {
         if (filter.type === 'string' && sortProperties.someProperty('name', colPropAssoc[filter.iColumn])) {
           if (Em.isArray(filter.value)) {
           if (Em.isArray(filter.value)) {