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 2018/06/26 13:50:39 UTC

atlas git commit: ATLAS-2766: Turn off hyperlinks for entities with no entity-read access in search result display

Repository: atlas
Updated Branches:
  refs/heads/master eb895a62f -> bae327559


ATLAS-2766: Turn off hyperlinks for entities with no entity-read access in search result display

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/bae32755
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/bae32755
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/bae32755

Branch: refs/heads/master
Commit: bae327559d12f94b617e7321c7e334152e5388ce
Parents: eb895a6
Author: Abhishek Kadam <ab...@gmail.com>
Authored: Tue Jun 26 19:04:55 2018 +0530
Committer: nixonrodrigues <ni...@apache.org>
Committed: Tue Jun 26 19:18:33 2018 +0530

----------------------------------------------------------------------
 .../public/js/views/search/SearchResultLayoutView.js    | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/bae32755/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 7fa088b..24117af 100644
--- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js
+++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
@@ -627,7 +627,11 @@ define(['require',
                                 nameHtml = "",
                                 name = Utils.getName(obj);
                             if (obj.guid) {
-                                nameHtml = '<a title="' + name + '" href="#!/detailPage/' + obj.guid + (that.fromView ? "?from=" + that.fromView : "") + '">' + name + '</a>';
+                                if (obj.guid == "-1") {
+                                    nameHtml = '<span title="' + name + '">' + name + '</span>';
+                                } else {
+                                    nameHtml = '<a title="' + name + '" href="#!/detailPage/' + obj.guid + (that.fromView ? "?from=" + that.fromView : "") + '">' + name + '</a>';
+                                }
                             } else {
                                 nameHtml = '<span title="' + name + '">' + name + '</span>';
                             }
@@ -826,6 +830,9 @@ define(['require',
                         formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
                             fromRaw: function(rawValue, model) {
                                 var obj = model.toJSON();
+                                if (obj.guid == "-1") {
+                                    return
+                                }
                                 if (obj.status && Enums.entityStateReadOnly[obj.status]) {
                                     return '<div class="readOnly">' + CommonViewFunction.tagForTable(obj); + '</div>';
                                 } else {
@@ -854,6 +861,9 @@ define(['require',
                         formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
                             fromRaw: function(rawValue, model) {
                                 var obj = model.toJSON();
+                                if (obj.guid == "-1") {
+                                    return
+                                }
                                 if (obj.typeName && !(_.startsWith(obj.typeName, "AtlasGlossary"))) {
                                     if (obj.status && Enums.entityStateReadOnly[obj.status]) {
                                         return '<div class="readOnly">' + CommonViewFunction.termForTable(obj); + '</div>';