This is an automated email from the ASF dual-hosted git repository.
pinal pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push:
new 684b4a0 ATLAS-4409:UI: #1 Showing lineage for entity having no
lineage, fixed
684b4a0 is described below
commit 684b4a0b801c9c0ad4659a5a8521255d40c2e0c6
Author: prasad pawar <[email protected]>
AuthorDate: Tue Aug 31 14:44:39 2021 +0530
ATLAS-4409:UI: #1 Showing lineage for entity having no lineage, fixed
Signed-off-by: Pinal Shah <[email protected]>
---
.../js/external_lib/atlas-lineage/dist/index.js | 2 +-
.../public/js/views/graph/LineageLayoutView.js | 21 +++++++++++++++++++++
.../js/external_lib/atlas-lineage/dist/index.js | 2 +-
.../public/js/views/graph/LineageLayoutView.js | 21 +++++++++++++++++++++
4 files changed, 44 insertions(+), 2 deletions(-)
diff --git a/dashboardv2/public/js/external_lib/atlas-lineage/dist/index.js
b/dashboardv2/public/js/external_lib/atlas-lineage/dist/index.js
index 279c37a..b31ee49 100644
--- a/dashboardv2/public/js/external_lib/atlas-lineage/dist/index.js
+++ b/dashboardv2/public/js/external_lib/atlas-lineage/dist/index.js
@@ -1 +1 @@
-!function(t,e){"object"==typeof exports&&"object"==typeof
module?module.exports=e(require("platform"),require("dagreD3")):"function"==typeof
define&&define.amd?define(["platform","dagreD3"],e):"object"==typeof
exports?exports.LineageHelper=e(require("platform"),require("dagreD3")):t.LineageHelper=e(t.platform,t.dagreD3)}(window,(function(t,e){return
function(t){var e={};function n(r){if(e[r])return e[r].exports;var
i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i. [...]
\ No newline at end of file
+!function(t,e){"object"==typeof exports&&"object"==typeof
module?module.exports=e(require("platform"),require("dagreD3")):"function"==typeof
define&&define.amd?define(["platform","dagreD3"],e):"object"==typeof
exports?exports.LineageHelper=e(require("platform"),require("dagreD3")):t.LineageHelper=e(t.platform,t.dagreD3)}(window,(function(t,e){return
function(t){var e={};function n(r){if(e[r])return e[r].exports;var
i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i. [...]
\ No newline at end of file
diff --git a/dashboardv2/public/js/views/graph/LineageLayoutView.js
b/dashboardv2/public/js/views/graph/LineageLayoutView.js
index b106ee6..e989c47 100644
--- a/dashboardv2/public/js/views/graph/LineageLayoutView.js
+++ b/dashboardv2/public/js/views/graph/LineageLayoutView.js
@@ -254,6 +254,22 @@ define(['require',
"el": that.$graphButtonsEl,
disabled: true
});
+ //Create data for displaying just entityNode when no
relationships are present.
+ var classificationNamesArray = [];
+ if (this.entity.classifications) {
+ this.entity.classifications.forEach(function(item) {
+ classificationNamesArray.push(item.typeName);
+ });
+ }
+ this.currentEntityData = {
+ classificationNames: classificationNamesArray,
+ displayText: that.entity.attributes.name,
+ labels: [],
+ meaningNames: [],
+ meanings: []
+ }
+ _.extend(this.currentEntityData, _.pick(this.entity,
'attributes', 'guid', 'isIncomplete', 'status', 'typeName'));
+ //End
this.collection.getLineage(this.guid, {
queryParam: queryParam,
success: function(data) {
@@ -271,6 +287,11 @@ define(['require',
});
}
that.lineageRelationshipLength = data.relations.length;
+ if (_.isEmpty(data.relations)) {
+ if (_.isEmpty(data.guidEntityMap) ||
!data.guidEntityMap[data.baseEntityGuid]) {
+ data.guidEntityMap[data.baseEntityGuid] =
that.currentEntityData;
+ }
+ }
that.createGraph(data);
that.renderLineageTypeSearch(data);
},
diff --git a/dashboardv3/public/js/external_lib/atlas-lineage/dist/index.js
b/dashboardv3/public/js/external_lib/atlas-lineage/dist/index.js
index 279c37a..b31ee49 100644
--- a/dashboardv3/public/js/external_lib/atlas-lineage/dist/index.js
+++ b/dashboardv3/public/js/external_lib/atlas-lineage/dist/index.js
@@ -1 +1 @@
-!function(t,e){"object"==typeof exports&&"object"==typeof
module?module.exports=e(require("platform"),require("dagreD3")):"function"==typeof
define&&define.amd?define(["platform","dagreD3"],e):"object"==typeof
exports?exports.LineageHelper=e(require("platform"),require("dagreD3")):t.LineageHelper=e(t.platform,t.dagreD3)}(window,(function(t,e){return
function(t){var e={};function n(r){if(e[r])return e[r].exports;var
i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i. [...]
\ No newline at end of file
+!function(t,e){"object"==typeof exports&&"object"==typeof
module?module.exports=e(require("platform"),require("dagreD3")):"function"==typeof
define&&define.amd?define(["platform","dagreD3"],e):"object"==typeof
exports?exports.LineageHelper=e(require("platform"),require("dagreD3")):t.LineageHelper=e(t.platform,t.dagreD3)}(window,(function(t,e){return
function(t){var e={};function n(r){if(e[r])return e[r].exports;var
i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i. [...]
\ No newline at end of file
diff --git a/dashboardv3/public/js/views/graph/LineageLayoutView.js
b/dashboardv3/public/js/views/graph/LineageLayoutView.js
index b106ee6..e989c47 100644
--- a/dashboardv3/public/js/views/graph/LineageLayoutView.js
+++ b/dashboardv3/public/js/views/graph/LineageLayoutView.js
@@ -254,6 +254,22 @@ define(['require',
"el": that.$graphButtonsEl,
disabled: true
});
+ //Create data for displaying just entityNode when no
relationships are present.
+ var classificationNamesArray = [];
+ if (this.entity.classifications) {
+ this.entity.classifications.forEach(function(item) {
+ classificationNamesArray.push(item.typeName);
+ });
+ }
+ this.currentEntityData = {
+ classificationNames: classificationNamesArray,
+ displayText: that.entity.attributes.name,
+ labels: [],
+ meaningNames: [],
+ meanings: []
+ }
+ _.extend(this.currentEntityData, _.pick(this.entity,
'attributes', 'guid', 'isIncomplete', 'status', 'typeName'));
+ //End
this.collection.getLineage(this.guid, {
queryParam: queryParam,
success: function(data) {
@@ -271,6 +287,11 @@ define(['require',
});
}
that.lineageRelationshipLength = data.relations.length;
+ if (_.isEmpty(data.relations)) {
+ if (_.isEmpty(data.guidEntityMap) ||
!data.guidEntityMap[data.baseEntityGuid]) {
+ data.guidEntityMap[data.baseEntityGuid] =
that.currentEntityData;
+ }
+ }
that.createGraph(data);
that.renderLineageTypeSearch(data);
},