ATLAS-2707: Audit detail table is not able to render object type 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/65338c4d Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/65338c4d Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/65338c4d Branch: refs/heads/master Commit: 65338c4ded5fbfe43e7e645b62010b8c4218b8f6 Parents: 0265955 Author: kevalbhatt <[email protected]> Authored: Mon May 21 17:11:18 2018 +0530 Committer: Madhan Neethiraj <[email protected]> Committed: Mon May 21 07:34:47 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/65338c4d/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/65338c4d/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();
