Repository: atlas
Updated Branches:
  refs/heads/branch-1.0 0b3bc9898 -> c542deb6d


ATLAS-2728: UI renders integer attribute values as date - 
kafka_topic.retentiontimeLocalInHrs, kafka_topic.retentiontimeNationalInHrs

Signed-off-by: Madhan Neethiraj <mad...@apache.org>
(cherry picked from commit 52d5e474214041993db50818a8fb3609adf486fb)


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

Branch: refs/heads/branch-1.0
Commit: 80f0ef478e34516fa687d2359b86e928806d824f
Parents: 0b3bc98
Author: kevalbhatt <kbh...@apache.org>
Authored: Thu May 31 22:52:51 2018 +0530
Committer: Madhan Neethiraj <mad...@apache.org>
Committed: Sun Jun 3 23:26:54 2018 -0700

----------------------------------------------------------------------
 dashboardv2/public/js/utils/CommonViewFunction.js | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/80f0ef47/dashboardv2/public/js/utils/CommonViewFunction.js
----------------------------------------------------------------------
diff --git a/dashboardv2/public/js/utils/CommonViewFunction.js 
b/dashboardv2/public/js/utils/CommonViewFunction.js
index af52ec4..b8e023a 100644
--- a/dashboardv2/public/js/utils/CommonViewFunction.js
+++ b/dashboardv2/public/js/utils/CommonViewFunction.js
@@ -202,7 +202,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 
'utils/Messages', 'utils/Enum
             var defEntity = _.find(attributeDefs, { name: key });
             if (defEntity && defEntity.typeName) {
                 var defEntityType = defEntity.typeName.toLocaleLowerCase();
-                if (defEntityType === 'date' || defEntityType === 'time') {
+                if (defEntityType === 'date') {
                     keyValue = new Date(keyValue);
                 } else if (_.isObject(keyValue)) {
                     keyValue = extractObject(keyValue);
@@ -219,12 +219,6 @@ define(['require', 'utils/Utils', 'modules/Modal', 
'utils/Messages', 'utils/Enum
                 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 if (key.toLocaleLowerCase().indexOf("time") !== -1 || 
key.toLocaleLowerCase().indexOf("date") !== -1) {
-                val = new Date(keyValue);
-
-                if (isNaN(val.getTime())) {
-                    val = _.escape(keyValue);
-                }
             } else {
                 val = _.escape(keyValue);
             }

Reply via email to