This is an automated email from the ASF dual-hosted git repository. nbonte pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/atlas.git
commit cab21a8cd821e02d352cb091405e0906af6312b2 Author: KevalBhatt <[email protected]> AuthorDate: Thu Sep 17 12:22:22 2020 +0530 ATLAS-3945: UI: Entity details page, Show N/A for date if date value is 0 or null Signed-off-by: Nikhil Bonte <[email protected]> (cherry picked from commit e6c382680d1a3fa3284b5c9a9026264fc5bd3957) --- dashboardv2/public/js/utils/CommonViewFunction.js | 2 +- dashboardv3/public/js/utils/CommonViewFunction.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dashboardv2/public/js/utils/CommonViewFunction.js b/dashboardv2/public/js/utils/CommonViewFunction.js index 041f1f6..84728f7 100644 --- a/dashboardv2/public/js/utils/CommonViewFunction.js +++ b/dashboardv2/public/js/utils/CommonViewFunction.js @@ -263,7 +263,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum if (defEntity && defEntity.typeName) { var defEntityType = defEntity.typeName.toLocaleLowerCase(); if (defEntityType === 'date') { - keyValue = keyValue > 0 ? new Date(keyValue) : ""; + keyValue = keyValue > 0 ? new Date(keyValue) : null; } else if (_.isObject(keyValue)) { keyValue = extractObject({ "keyValue": keyValue, "key": key, 'defEntity': defEntity }); } diff --git a/dashboardv3/public/js/utils/CommonViewFunction.js b/dashboardv3/public/js/utils/CommonViewFunction.js index 0621277..9d75a27 100644 --- a/dashboardv3/public/js/utils/CommonViewFunction.js +++ b/dashboardv3/public/js/utils/CommonViewFunction.js @@ -263,7 +263,7 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum if (defEntity && defEntity.typeName) { var defEntityType = defEntity.typeName.toLocaleLowerCase(); if (defEntityType === 'date') { - keyValue = keyValue > 0 ? new Date(keyValue) : ""; + keyValue = keyValue > 0 ? new Date(keyValue) : null; } else if (_.isObject(keyValue)) { keyValue = extractObject({ "keyValue": keyValue, "key": key, 'defEntity': defEntity }); }
