Repository: atlas Updated Branches: refs/heads/master 72cc566a7 -> 52d5e4742
ATLAS-2728: UI renders integer attribute values as date - kafka_topic.retentiontimeLocalInHrs, kafka_topic.retentiontimeNationalInHrs Signed-off-by: Madhan Neethiraj <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/52d5e474 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/52d5e474 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/52d5e474 Branch: refs/heads/master Commit: 52d5e474214041993db50818a8fb3609adf486fb Parents: 72cc566 Author: kevalbhatt <[email protected]> Authored: Thu May 31 22:52:51 2018 +0530 Committer: Madhan Neethiraj <[email protected]> Committed: Thu May 31 16:23: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/52d5e474/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); }
