Commit 3635e8e2 by pratik24mac Committed by kevalbhatt

ATLAS-2441 - UI, DSL Search : type select __guid doesn't display result though…

ATLAS-2441 - UI, DSL Search : type select __guid doesn't display result though the result has GUID response
parent a6949642
...@@ -215,6 +215,8 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum ...@@ -215,6 +215,8 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
val = keyValue val = keyValue
} else if (Utils.isUrl(keyValue)) { } else if (Utils.isUrl(keyValue)) {
val = '<a target="_blank" class="blue-link" href="' + keyValue + '">' + keyValue + '</a>'; val = '<a target="_blank" class="blue-link" href="' + keyValue + '">' + keyValue + '</a>';
} else if (key === 'guid' || key === "__guid") {
val = '<a title="' + key + '" href="#!/detailPage/' + keyValue + '">' + keyValue + '</a>';
} else { } else {
val = _.escape(keyValue); val = _.escape(keyValue);
} }
...@@ -383,7 +385,8 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum ...@@ -383,7 +385,8 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
var attrQuery = [], var attrQuery = [],
attrObj = options.value, attrObj = options.value,
formatedDateToLong = options.formatedDateToLong, formatedDateToLong = options.formatedDateToLong,
attributeDefs = options.attributeDefs, /* set attributeType for criterion while creating object*/ attributeDefs = options.attributeDefs,
/* set attributeType for criterion while creating object*/
spliter = 1; spliter = 1;
attrQuery = conditionalURl(attrObj, spliter); attrQuery = conditionalURl(attrObj, spliter);
...@@ -402,7 +405,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum ...@@ -402,7 +405,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
} }
var type = (obj.type || obj.attributeType), var type = (obj.type || obj.attributeType),
//obj.value will come as an object when selected type is Date and operator is isNull or not_null; //obj.value will come as an object when selected type is Date and operator is isNull or not_null;
value = ((_.isString(obj.value) && _.contains(["is_null","not_null"], obj.operator) && type === 'date') || _.isObject(obj.value) ? "" : _.trim(obj.value || obj.attributeValue)), value = ((_.isString(obj.value) && _.contains(["is_null", "not_null"], obj.operator) && type === 'date') || _.isObject(obj.value) ? "" : _.trim(obj.value || obj.attributeValue)),
url = [(obj.id || obj.attributeName), mapApiOperatorToUI(obj.operator), (type === 'date' && formatedDateToLong && value.length ? Date.parse(value) : value)]; url = [(obj.id || obj.attributeName), mapApiOperatorToUI(obj.operator), (type === 'date' && formatedDateToLong && value.length ? Date.parse(value) : value)];
if (type) { if (type) {
url.push(type); url.push(type);
......
...@@ -731,7 +731,6 @@ define(['require', ...@@ -731,7 +731,6 @@ define(['require',
if (valueObj && valueObj.length) { if (valueObj && valueObj.length) {
var firstObj = _.first(valueObj); var firstObj = _.first(valueObj);
_.each(_.keys(firstObj), function(key) { _.each(_.keys(firstObj), function(key) {
if (key !== 'guid') {
col[key] = { col[key] = {
label: key.capitalize(), label: key.capitalize(),
cell: "Html", cell: "Html",
...@@ -768,7 +767,6 @@ define(['require', ...@@ -768,7 +767,6 @@ define(['require',
} }
}) })
}; };
}
}); });
} }
return this.searchCollection.constructor.getTableCols(col, this.searchCollection); return this.searchCollection.constructor.getTableCols(col, this.searchCollection);
......
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