This is an automated email from the ASF dual-hosted git repository.

nixon pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git

commit 5aec0b8290d778cff8f59cde580e1576dd40c12e
Author: prasad pawar <[email protected]>
AuthorDate: Wed Dec 16 13:12:33 2020 +0530

    ATLAS-4058: UI: Fix Entity detail page Hive Column Position with 0 is set 
to NA.
    
    (cherry picked from commit de87800c19ea06f53904a2948fcde29a57d2f051)
---
 .../public/js/views/audit/CreateAuditTableLayoutView.js        |  3 +++
 .../public/js/views/entity/EntityDetailTableLayoutView.js      | 10 +++++++++-
 .../public/js/views/audit/CreateAuditTableLayoutView.js        |  3 +++
 .../public/js/views/entity/EntityDetailTableLayoutView.js      | 10 +++++++++-
 4 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js 
b/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js
index 41ad4ac..3733195 100644
--- a/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js
+++ b/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js
@@ -78,6 +78,9 @@ define(['require',
                     getValue: function(val, key) {
                         if (key && key.toLowerCase().indexOf("time") > 0) {
                             return Utils.formatDate({ date: val });
+                        } else if (key && 
key.toLowerCase().indexOf("position") === 0 && val === 0) {
+                            //if position value is 0 we are showing N/A
+                            return "N/A";
                         } else {
                             return val;
                         }
diff --git a/dashboardv2/public/js/views/entity/EntityDetailTableLayoutView.js 
b/dashboardv2/public/js/views/entity/EntityDetailTableLayoutView.js
index a5b5262..a47e075 100644
--- a/dashboardv2/public/js/views/entity/EntityDetailTableLayoutView.js
+++ b/dashboardv2/public/js/views/entity/EntityDetailTableLayoutView.js
@@ -81,7 +81,15 @@ define(['require',
                         scope: this,
                         valueObject: _.extend({ "isIncomplete": 
this.entity.isIncomplete }, this.entity.attributes),
                         attributeDefs: this.attributeDefs,
-                        highlightString: highlightString
+                        highlightString: highlightString,
+                        getValue: function(val, key) {
+                            if (key && key.toLowerCase().indexOf("position") 
=== 0 && val === 0) {
+                                //if position value is 0 we are showing N/A
+                                return "N/A";
+                            } else {
+                                return val;
+                            }
+                        }
                     });
                 this.ui.detailValue.append(table);
                 Utils.togglePropertyRelationshipTableEmptyValues({
diff --git a/dashboardv3/public/js/views/audit/CreateAuditTableLayoutView.js 
b/dashboardv3/public/js/views/audit/CreateAuditTableLayoutView.js
index 41ad4ac..3733195 100644
--- a/dashboardv3/public/js/views/audit/CreateAuditTableLayoutView.js
+++ b/dashboardv3/public/js/views/audit/CreateAuditTableLayoutView.js
@@ -78,6 +78,9 @@ define(['require',
                     getValue: function(val, key) {
                         if (key && key.toLowerCase().indexOf("time") > 0) {
                             return Utils.formatDate({ date: val });
+                        } else if (key && 
key.toLowerCase().indexOf("position") === 0 && val === 0) {
+                            //if position value is 0 we are showing N/A
+                            return "N/A";
                         } else {
                             return val;
                         }
diff --git a/dashboardv3/public/js/views/entity/EntityDetailTableLayoutView.js 
b/dashboardv3/public/js/views/entity/EntityDetailTableLayoutView.js
index a5b5262..a47e075 100644
--- a/dashboardv3/public/js/views/entity/EntityDetailTableLayoutView.js
+++ b/dashboardv3/public/js/views/entity/EntityDetailTableLayoutView.js
@@ -81,7 +81,15 @@ define(['require',
                         scope: this,
                         valueObject: _.extend({ "isIncomplete": 
this.entity.isIncomplete }, this.entity.attributes),
                         attributeDefs: this.attributeDefs,
-                        highlightString: highlightString
+                        highlightString: highlightString,
+                        getValue: function(val, key) {
+                            if (key && key.toLowerCase().indexOf("position") 
=== 0 && val === 0) {
+                                //if position value is 0 we are showing N/A
+                                return "N/A";
+                            } else {
+                                return val;
+                            }
+                        }
                     });
                 this.ui.detailValue.append(table);
                 Utils.togglePropertyRelationshipTableEmptyValues({

Reply via email to