You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by kb...@apache.org on 2019/08/21 10:55:03 UTC
[atlas] branch branch-2.0 updated: ATLAS-3365.patch : Expose image
names on lineage page
This is an automated email from the ASF dual-hosted git repository.
kbhatt pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new a205dfd ATLAS-3365.patch : Expose image names on lineage page
a205dfd is described below
commit a205dfde1a01d3de7bd315b554df9156289d09ee
Author: kevalbhatt <kb...@apache.org>
AuthorDate: Wed Aug 21 16:19:52 2019 +0530
ATLAS-3365.patch : Expose image names on lineage page
---
dashboardv2/public/js/views/graph/LineageLayoutView.js | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/dashboardv2/public/js/views/graph/LineageLayoutView.js b/dashboardv2/public/js/views/graph/LineageLayoutView.js
index bdc9ee2..bcf0428 100644
--- a/dashboardv2/public/js/views/graph/LineageLayoutView.js
+++ b/dashboardv2/public/js/views/graph/LineageLayoutView.js
@@ -571,13 +571,7 @@ define(['require',
.attr("href", function(d) {
var that = this;
if (node) {
- // to check for IE-10
- var originLink = window.location.origin;
- if (platform.name === "IE") {
- originLink = window.location.protocol + "//" + window.location.host;
- }
- var imageIconPath = Utils.getEntityIconPath({ entityData: node }),
- imagePath = ((originLink + Utils.getBaseUrl(window.location.pathname)) + imageIconPath);
+ var imageIconPath = Utils.getEntityIconPath({ entityData: node });
var getImageData = function(options) {
var imagePath = options.imagePath,
@@ -590,12 +584,12 @@ define(['require',
if (platform.name !== "IE") {
ajaxOptions["mimeType"] = "text/plain; charset=x-user-defined";
}
+ shapeSvg.attr("data-iconpath", imagePath);
$.ajax(ajaxOptions)
.always(function(data, status, xhr) {
if (data.status == 404) {
getImageData({
- "imagePath": Utils.getEntityIconPath({ entityData: node, errorUrl: imagePath }),
- "imageIconPath": imageIconPath
+ "imagePath": Utils.getEntityIconPath({ entityData: node, errorUrl: imagePath })
});
} else if (data) {
if (platform.name !== "IE") {
@@ -608,8 +602,7 @@ define(['require',
}
if (_.keys(imageObject).indexOf(imageIconPath) === -1) {
getImageData({
- "imagePath": imagePath,
- "imageIconPath": imageIconPath
+ "imagePath": imageIconPath
});
}
@@ -621,6 +614,9 @@ define(['require',
imageObject[imageIconPath].push(d3.select(that));
} else {
d3.select(that).attr("xlink:href", imageObject[imageIconPath]);
+ if (imageIconPath !== shapeSvg.attr("data-iconpath")) {
+ shapeSvg.attr("data-iconpathorigin", imageIconPath);
+ }
return imageObject[imageIconPath];
}
}