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
val = keyValue
} else if (Utils.isUrl(keyValue)) {
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 {
val = _.escape(keyValue);
}
......@@ -383,7 +385,8 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
var attrQuery = [],
attrObj = options.value,
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;
attrQuery = conditionalURl(attrObj, spliter);
......@@ -402,7 +405,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
}
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;
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)];
if (type) {
url.push(type);
......
......@@ -731,7 +731,6 @@ define(['require',
if (valueObj && valueObj.length) {
var firstObj = _.first(valueObj);
_.each(_.keys(firstObj), function(key) {
if (key !== 'guid') {
col[key] = {
label: key.capitalize(),
cell: "Html",
......@@ -768,7 +767,6 @@ define(['require',
}
})
};
}
});
}
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