This is an automated email from the ASF dual-hosted git repository. pinal pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/atlas.git
commit 2e51163578c0e00a9511354dd1c08baaf2d1bbc8 Author: prasad pawar <prasad.pa...@freestoneinfotech.com> 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 <pinal.s...@freestoneinfotech.com> --- .../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); },