Commit 65c6f9c8 by pratik24mac Committed by nixonrodrigues

ATLAS-2506 : Attributes of filters in the inner filter group are not added to…

ATLAS-2506 : Attributes of filters in the inner filter group are not added to attributes JSON array of the Basic POST request body Signed-off-by: 's avatarnixonrodrigues <nixon@apache.org>
parent 6ad7a5a8
...@@ -106,8 +106,8 @@ define(['require', ...@@ -106,8 +106,8 @@ define(['require',
pageLimit: null, pageLimit: null,
entityFilters: null, entityFilters: null,
includeDE: null, includeDE: null,
excludeST:null, excludeST: null,
excludeSC : null excludeSC: null
} }
}; };
if (!this.value) { if (!this.value) {
...@@ -383,7 +383,8 @@ define(['require', ...@@ -383,7 +383,8 @@ define(['require',
okAttrFilterButton: function(e) { okAttrFilterButton: function(e) {
var isTag = this.attrModal.tag ? true : false, var isTag = this.attrModal.tag ? true : false,
filtertype = isTag ? 'tagFilters' : 'entityFilters', filtertype = isTag ? 'tagFilters' : 'entityFilters',
queryBuilderRef = this.attrModal.RQueryBuilder.currentView.ui.builder; queryBuilderRef = this.attrModal.RQueryBuilder.currentView.ui.builder,
col = [];
if (queryBuilderRef.data('queryBuilder')) { if (queryBuilderRef.data('queryBuilder')) {
var rule = queryBuilderRef.queryBuilder('getRules'); var rule = queryBuilderRef.queryBuilder('getRules');
} }
...@@ -395,12 +396,23 @@ define(['require', ...@@ -395,12 +396,23 @@ define(['require',
if (!this.searchTableColumns[this.value.type]) { if (!this.searchTableColumns[this.value.type]) {
this.searchTableColumns[this.value.type] = ["selected", "name", "owner", "description", "tag", "typeName"] this.searchTableColumns[this.value.type] = ["selected", "name", "owner", "description", "tag", "typeName"]
} }
this.searchTableColumns[this.value.type] = _.sortBy(_.union(this.searchTableColumns[this.value.type], _.pluck(rule.rules, 'id'))); this.searchTableColumns[this.value.type] = _.sortBy(_.union(this.searchTableColumns[this.value.type], getIdFromRuleObject(rule)));
} }
this.attrModal.modal.close(); this.attrModal.modal.close();
if ($(e.currentTarget).hasClass('search')) { if ($(e.currentTarget).hasClass('search')) {
this.findSearchResult(); this.findSearchResult();
} }
function getIdFromRuleObject(rule) {
_.map(rule.rules, function(obj, key) {
if (_.has(obj, 'condition')) {
return getIdFromRuleObject(obj);
} else {
return col.push(obj.id)
}
});
return col;
}
} }
}, },
manualRender: function(paramObj) { manualRender: function(paramObj) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment