Commit 8b6715be by pratik24mac Committed by kevalbhatt

ATLAS-2483 : UI - Display of faceted query

Signed-off-by: 's avatarkevalbhatt <kbhatt@apache.org>
parent e96b1acc
...@@ -280,14 +280,16 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum ...@@ -280,14 +280,16 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
if (value.type) { if (value.type) {
var typeKeyValue = '<span class="key">Type:</span>&nbsp<span class="value">' + _.escape(value.type) + '</span>'; var typeKeyValue = '<span class="key">Type:</span>&nbsp<span class="value">' + _.escape(value.type) + '</span>';
if (entityFilters) { if (entityFilters) {
typeKeyValue += '&nbsp<span class="operator">AND</span>&nbsp(<span class="operator">' + entityFilters.condition + '</span>&nbsp(' + objToString(entityFilters) + '))'; var conditionForEntity = entityFilters.rules.length == 1 ? '' : 'AND';
typeKeyValue += '&nbsp<span class="operator">' + conditionForEntity + '</span>&nbsp(<span class="operator">' + entityFilters.condition + '</span>&nbsp(' + objToString(entityFilters) + '))';
} }
queryArray.push(typeKeyValue) queryArray.push(typeKeyValue)
} }
if (value.tag) { if (value.tag) {
var tagKeyValue = '<span class="key">Classification:</span>&nbsp<span class="value">' + _.escape(value.tag) + '</span>'; var tagKeyValue = '<span class="key">Classification:</span>&nbsp<span class="value">' + _.escape(value.tag) + '</span>';
if (tagFilters) { if (tagFilters) {
tagKeyValue += '&nbsp<span class="operator">AND</span>&nbsp(<span class="operator">' + tagFilters.condition + '</span>&nbsp(' + objToString(tagFilters) + '))'; var conditionFortag = tagFilters.rules.length == 1 ? '' : 'AND';
tagKeyValue += '&nbsp<span class="operator">' + conditionFortag + '</span>&nbsp(<span class="operator">' + tagFilters.condition + '</span>&nbsp(' + objToString(tagFilters) + '))';
} }
queryArray.push(tagKeyValue); queryArray.push(tagKeyValue);
} }
......
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