Commit f5508315 by kevalbhatt Committed by Madhan Neethiraj

ATLAS-2111 : UI: Select query is not able to render the search table in Advance search

parent 5746ec9d
...@@ -39,16 +39,22 @@ define(['require', ...@@ -39,16 +39,22 @@ define(['require',
this.queryText = resp.queryText; this.queryText = resp.queryText;
this.referredEntities = resp.referredEntities; this.referredEntities = resp.referredEntities;
if (resp.attributes) { if (resp.attributes) {
this.dynamicTable = true;
var entities = []; var entities = [];
_.each(resp.attributes.values, function(obj) { _.each(resp.attributes.values, function(obj) {
var temp = { attributes: {} } var temp = {};
_.each(obj, function(val, key) { _.each(obj, function(val, index) {
temp.attributes[resp.attributes.name[key]] = val; var key = resp.attributes.name[index];
if (key == "__guid") {
key = "guid"
}
temp[key] = val;
}); });
entities.push(temp); entities.push(temp);
}); });
return entities; return entities;
} else { } else {
this.dynamicTable = false;
return resp.entities ? resp.entities : []; return resp.entities ? resp.entities : [];
} }
}, },
......
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