You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ni...@apache.org on 2017/09/12 14:49:28 UTC

[2/2] atlas git commit: ATLAS-2111 : UI: Select query is not able to render the search table in Advance search

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

Signed-off-by: nixonrodrigues <ni...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/2acf41fd
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/2acf41fd
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/2acf41fd

Branch: refs/heads/master
Commit: 2acf41fd1e5e3c86a9b377c407f8aee2b7be53a0
Parents: d603afa
Author: kevalbhatt <kb...@apache.org>
Authored: Wed Sep 6 14:46:05 2017 +0530
Committer: nixonrodrigues <ni...@apache.org>
Committed: Tue Sep 12 19:14:54 2017 +0530

----------------------------------------------------------------------
 dashboardv2/public/js/collection/VSearchList.js     | 16 ++++++++++++++--
 .../js/views/search/SearchResultLayoutView.js       |  2 +-
 2 files changed, 15 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/2acf41fd/dashboardv2/public/js/collection/VSearchList.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/collection/VSearchList.js b/dashboardv2/public/js/collection/VSearchList.js
index 0a7b713..2005fe3 100644
--- a/dashboardv2/public/js/collection/VSearchList.js
+++ b/dashboardv2/public/js/collection/VSearchList.js
@@ -31,14 +31,26 @@ define(['require',
             model: VSearch,
 
             initialize: function() {
-                this.modelName = 'VSearch';
+                this.modelName = 'VSearchList';
                 this.modelAttrName = '';
             },
             parseRecords: function(resp, options) {
                 this.queryType = resp.queryType;
                 this.queryText = resp.queryText;
                 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) {
                 var url = UrlLinks.searchApiUrl('basic');

http://git-wip-us.apache.org/repos/asf/atlas/blob/2acf41fd/dashboardv2/public/js/views/search/SearchResultLayoutView.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/views/search/SearchResultLayoutView.js b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
index 5be5f00..c8c83de 100644
--- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js
+++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
@@ -532,7 +532,7 @@ define(['require',
                             if (obj.guid) {
                                 nameHtml = '<a title="' + name + '" href="#!/detailPage/' + obj.guid + '">' + name + '</a>';
                             } else {
-                                nameHtml = '<a title="' + name + '">' + name + '</a>';
+                                nameHtml = '<span title="' + name + '">' + name + '</span>';
                             }
                             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>';