You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ni...@apache.org on 2021/07/07 05:06:14 UTC
[atlas] branch master updated: ATLAS-4345:UI: Lineage issues for
when entities are greater than 9k in a given lineage. fixed
This is an automated email from the ASF dual-hosted git repository.
nixon 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 475a89b ATLAS-4345:UI: Lineage issues for when entities are greater than 9k in a given lineage. fixed
475a89b is described below
commit 475a89b30864bd95909837a2b3480779fc7ee5e2
Author: prasad pawar <pr...@freestoneinfotech.com>
AuthorDate: Mon Jul 5 15:36:08 2021 +0530
ATLAS-4345:UI: Lineage issues for when entities are greater than 9k in a given lineage. fixed
Signed-off-by: nixonrodrigues <ni...@apache.org>
---
dashboardv2/public/js/views/graph/LineageLayoutView.js | 17 +++++++++++++++++
dashboardv3/public/js/views/graph/LineageLayoutView.js | 18 ++++++++++++++++++
2 files changed, 35 insertions(+)
diff --git a/dashboardv2/public/js/views/graph/LineageLayoutView.js b/dashboardv2/public/js/views/graph/LineageLayoutView.js
index 5ad657e..b106ee6 100644
--- a/dashboardv2/public/js/views/graph/LineageLayoutView.js
+++ b/dashboardv2/public/js/views/graph/LineageLayoutView.js
@@ -226,6 +226,13 @@ define(['require',
this.labelFullText = false;
},
onClickSaveSvg: function(e, a) {
+ var that = this;
+ if (that.lineageRelationshipLength >= 1000) {
+ Utils.notifyInfo({
+ content: "There was an error in downloading lineage: Lineage exceeds display parameters!"
+ });
+ return;
+ }
this.LineageHelperRef.exportLineage();
},
onClickZoomIn: function() {
@@ -254,6 +261,16 @@ define(['require',
return;
}
data["legends"] = options ? options.legends : true;
+ // show only main part of lineage current entity is at bottom, so reverse is done
+ var relationsReverse = data.relations ? data.relations.reverse() : null,
+ lineageMaxRelationCount = 9000;
+ if (relationsReverse.length > lineageMaxRelationCount) {
+ data.relations = relationsReverse.splice(relationsReverse.length - lineageMaxRelationCount, relationsReverse.length - 1);
+ Utils.notifyInfo({
+ content: "Lineage exceeds display parameters and hence only upto 9000 relationships from this lineage can be displayed"
+ });
+ }
+ that.lineageRelationshipLength = data.relations.length;
that.createGraph(data);
that.renderLineageTypeSearch(data);
},
diff --git a/dashboardv3/public/js/views/graph/LineageLayoutView.js b/dashboardv3/public/js/views/graph/LineageLayoutView.js
index 954d9af..b106ee6 100644
--- a/dashboardv3/public/js/views/graph/LineageLayoutView.js
+++ b/dashboardv3/public/js/views/graph/LineageLayoutView.js
@@ -226,6 +226,13 @@ define(['require',
this.labelFullText = false;
},
onClickSaveSvg: function(e, a) {
+ var that = this;
+ if (that.lineageRelationshipLength >= 1000) {
+ Utils.notifyInfo({
+ content: "There was an error in downloading lineage: Lineage exceeds display parameters!"
+ });
+ return;
+ }
this.LineageHelperRef.exportLineage();
},
onClickZoomIn: function() {
@@ -254,6 +261,16 @@ define(['require',
return;
}
data["legends"] = options ? options.legends : true;
+ // show only main part of lineage current entity is at bottom, so reverse is done
+ var relationsReverse = data.relations ? data.relations.reverse() : null,
+ lineageMaxRelationCount = 9000;
+ if (relationsReverse.length > lineageMaxRelationCount) {
+ data.relations = relationsReverse.splice(relationsReverse.length - lineageMaxRelationCount, relationsReverse.length - 1);
+ Utils.notifyInfo({
+ content: "Lineage exceeds display parameters and hence only upto 9000 relationships from this lineage can be displayed"
+ });
+ }
+ that.lineageRelationshipLength = data.relations.length;
that.createGraph(data);
that.renderLineageTypeSearch(data);
},
@@ -269,6 +286,7 @@ define(['require',
createGraph: function(data) {
var that = this;
$('.resizeGraph').css("height", this.$('.svg').height() + "px");
+
this.LineageHelperRef = new LineageHelper.default({
entityDefCollection: this.entityDefCollection.fullCollection.toJSON(),
data: data,