Repository: atlas
Updated Branches:
  refs/heads/branch-0.8 d0ac50a4a -> 562739a14


ATLAS-2441 - UI, DSL Search : type select __guid doesn't display result though 
the result has GUID response

(cherry picked from commit 3635e8e245cfa4a5b74ebdd2d986b45fb96a5680)


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

Branch: refs/heads/branch-0.8
Commit: 562739a14b379add2e2376c06b4c7ad7e68e46c4
Parents: d0ac50a
Author: pratik24mac <pratik2...@gmail.com>
Authored: Tue Feb 13 15:57:05 2018 +0530
Committer: Madhan Neethiraj <mad...@apache.org>
Committed: Wed Feb 14 09:18:06 2018 -0800

----------------------------------------------------------------------
 dashboardv2/public/js/utils/CommonViewFunction.js            | 7 +++++--
 dashboardv2/public/js/views/search/SearchResultLayoutView.js | 2 --
 2 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/562739a1/dashboardv2/public/js/utils/CommonViewFunction.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/utils/CommonViewFunction.js 
b/dashboardv2/public/js/utils/CommonViewFunction.js
index 40ac83f..0165bdd 100644
--- a/dashboardv2/public/js/utils/CommonViewFunction.js
+++ b/dashboardv2/public/js/utils/CommonViewFunction.js
@@ -221,6 +221,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);
             }
@@ -534,7 +536,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);
 
@@ -553,7 +556,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);

http://git-wip-us.apache.org/repos/asf/atlas/blob/562739a1/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 26e1b5f..18e7a83 100644
--- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js
+++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js
@@ -781,7 +781,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",
@@ -818,7 +817,6 @@ define(['require',
                                     }
                                 })
                             };
-                        }
                     });
                 }
                 return this.searchCollection.constructor.getTableCols(col, 
this.searchCollection);

Reply via email to