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 66ed1b6d83407f98c4a12c39600f6f6d9f97ef1f
Author: prasad pawar <[email protected]>
AuthorDate: Tue Dec 15 11:29:53 2020 +0530

    Atlas-4078 master:UI - Lineage tab not shown on UI for entity with type 
Dataset or Process
    
    Signed-off-by: nixonrodrigues <[email protected]>
    (cherry picked from commit 2d91fc1ba393265b8ec6bc3a5e29280ff716c98f)
---
 dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js | 6 +++++-
 dashboardv3/public/js/views/detail_page/DetailPageLayoutView.js | 8 ++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js 
b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
index a6fcd8c..b878f6d 100644
--- a/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
+++ b/dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js
@@ -167,6 +167,7 @@ define(['require',
 
                     // check if entity is process
                     var isProcess = false,
+                        typeName = Utils.getName(collectionJSON, 'typeName'),
                         superTypes = Utils.getNestedSuperTypes({ data: 
this.activeEntityDef.toJSON(), collection: this.entityDefCollection }),
                         isLineageRender = _.find(superTypes, function(type) {
                             if (type === "DataSet" || type === "Process") {
@@ -176,6 +177,9 @@ define(['require',
                                 return true;
                             }
                         });
+                    if (!isLineageRender) {
+                        isLineageRender = (typeName === "DataSet" || typeName 
=== "Process") ? true : null;
+                    }
 
                     if (collectionJSON && collectionJSON.guid) {
                         var tagGuid = collectionJSON.guid;
@@ -393,7 +397,7 @@ define(['require',
                     case "raudits":
                         regionRef = this.RReplicationAuditTableLayoutView;
                         break;
-                     case "profile":
+                    case "profile":
                         regionRef = this.RProfileLayoutView;
                         break;
                 }
diff --git a/dashboardv3/public/js/views/detail_page/DetailPageLayoutView.js 
b/dashboardv3/public/js/views/detail_page/DetailPageLayoutView.js
index 4a7cc3a..dbbbcde 100644
--- a/dashboardv3/public/js/views/detail_page/DetailPageLayoutView.js
+++ b/dashboardv3/public/js/views/detail_page/DetailPageLayoutView.js
@@ -171,6 +171,7 @@ define(['require',
 
                     // check if entity is process
                     var isProcess = false,
+                        typeName = Utils.getName(collectionJSON, 'typeName'),
                         superTypes = Utils.getNestedSuperTypes({ data: 
this.activeEntityDef.toJSON(), collection: this.entityDefCollection }),
                         isLineageRender = _.find(superTypes, function(type) {
                             if (type === "DataSet" || type === "Process") {
@@ -180,7 +181,9 @@ define(['require',
                                 return true;
                             }
                         });
-
+                    if (!isLineageRender) {
+                        isLineageRender = (typeName === "DataSet" || typeName 
=== "Process") ? true : null;
+                    }
                     if (collectionJSON && collectionJSON.guid) {
                         var tagGuid = collectionJSON.guid;
                         this.readOnly = 
Enums.entityStateReadOnly[collectionJSON.status];
@@ -194,6 +197,7 @@ define(['require',
                     }
                     if (collectionJSON) {
                         this.name = Utils.getName(collectionJSON);
+
                         if (collectionJSON.attributes) {
                             if (collectionJSON.typeName) {
                                 collectionJSON.attributes.typeName = 
_.escape(collectionJSON.typeName);
@@ -397,7 +401,7 @@ define(['require',
                     case "raudits":
                         regionRef = this.RReplicationAuditTableLayoutView;
                         break;
-                     case "profile":
+                    case "profile":
                         regionRef = this.RProfileLayoutView;
                         break;
                 }

Reply via email to