Commit 2acf41fd by kevalbhatt Committed by nixonrodrigues

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

parent d603afa2
...@@ -31,14 +31,26 @@ define(['require', ...@@ -31,14 +31,26 @@ define(['require',
model: VSearch, model: VSearch,
initialize: function() { initialize: function() {
this.modelName = 'VSearch'; this.modelName = 'VSearchList';
this.modelAttrName = ''; this.modelAttrName = '';
}, },
parseRecords: function(resp, options) { parseRecords: function(resp, options) {
this.queryType = resp.queryType; this.queryType = resp.queryType;
this.queryText = resp.queryText; this.queryText = resp.queryText;
this.referredEntities = resp.referredEntities; this.referredEntities = resp.referredEntities;
return resp.entities ? resp.entities : []; if (resp.attributes) {
var entities = [];
_.each(resp.attributes.values, function(obj) {
var temp = { attributes: {} }
_.each(obj, function(val, key) {
temp.attributes[resp.attributes.name[key]] = val;
});
entities.push(temp);
});
return entities;
} else {
return resp.entities ? resp.entities : [];
}
}, },
getBasicRearchResult: function(options) { getBasicRearchResult: function(options) {
var url = UrlLinks.searchApiUrl('basic'); var url = UrlLinks.searchApiUrl('basic');
......
...@@ -532,7 +532,7 @@ define(['require', ...@@ -532,7 +532,7 @@ define(['require',
if (obj.guid) { if (obj.guid) {
nameHtml = '<a title="' + name + '" href="#!/detailPage/' + obj.guid + '">' + name + '</a>'; nameHtml = '<a title="' + name + '" href="#!/detailPage/' + obj.guid + '">' + name + '</a>';
} else { } else {
nameHtml = '<a title="' + name + '">' + name + '</a>'; nameHtml = '<span title="' + name + '">' + name + '</span>';
} }
if (obj.status && Enums.entityStateReadOnly[obj.status]) { if (obj.status && Enums.entityStateReadOnly[obj.status]) {
nameHtml += '<button type="button" title="Deleted" class="btn btn-atlasAction btn-atlas deleteBtn"><i class="fa fa-trash"></i></button>'; nameHtml += '<button type="button" title="Deleted" class="btn btn-atlasAction btn-atlas deleteBtn"><i class="fa fa-trash"></i></button>';
......
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