Repository: atlas Updated Branches: refs/heads/branch-1.0 8d8b81c30 -> 4d4bd5564
ATLAS-2707: Audit detail table is not able to render object type Signed-off-by: Madhan Neethiraj <mad...@apache.org> (cherry picked from commit 65338c4ded5fbfe43e7e645b62010b8c4218b8f6) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/4d4bd556 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/4d4bd556 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/4d4bd556 Branch: refs/heads/branch-1.0 Commit: 4d4bd556473dd67e4f1162a2433385978091b253 Parents: 4427f73 Author: kevalbhatt <kbh...@apache.org> Authored: Mon May 21 17:11:18 2018 +0530 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Mon May 21 07:40:13 2018 -0700 ---------------------------------------------------------------------- dashboardv2/public/js/utils/CommonViewFunction.js | 6 +++++- .../public/js/views/audit/CreateAuditTableLayoutView.js | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/atlas/blob/4d4bd556/dashboardv2/public/js/utils/CommonViewFunction.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/utils/CommonViewFunction.js b/dashboardv2/public/js/utils/CommonViewFunction.js index bcff5e4..171f662 100644 --- a/dashboardv2/public/js/utils/CommonViewFunction.js +++ b/dashboardv2/public/js/utils/CommonViewFunction.js @@ -221,6 +221,10 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum 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); } @@ -824,4 +828,4 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum } } return CommonViewFunction; -}); \ No newline at end of file +}); http://git-wip-us.apache.org/repos/asf/atlas/blob/4d4bd556/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js ---------------------------------------------------------------------- diff --git a/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js b/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js index 5670b8c..02b4c6f 100644 --- a/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js +++ b/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js @@ -83,7 +83,7 @@ define(['require', this.ui.name.text(name); if (parseDetailsObject) { this.ui.auditHeaderValue.html('<th>Key</th><th>New Value</th>'); - table = CommonViewFunction.propertyTable({ scope: this, valueObject: parseDetailsObject, attributeDefs: this.attributeDefs, extractJSON: { extractKey: 'value' } }); + table = CommonViewFunction.propertyTable({ scope: this, valueObject: parseDetailsObject, attributeDefs: this.attributeDefs }); if (table.length) { this.ui.noData.hide(); this.ui.tableAudit.show();