Commit e050bc06 by kevalbhatt

ATLAS-3174 : UI : Exclude process or deleted entity from search drop-down if…

ATLAS-3174 : UI : Exclude process or deleted entity from search drop-down if respective options are chosen
parent eaee02fe
......@@ -219,9 +219,6 @@ define(['require',
that.lineageData = $.extend(true, {}, data);
that.relationshipMap = that.crateLineageRelationshipHashMap(data);
that.guidEntityMap = $.extend(true, {}, data.guidEntityMap);
if (that.lineageData) {
that.renderLineageTypeSearch();
}
that.generateData({ "relationshipMap": that.relationshipMap, "guidEntityMap": that.guidEntityMap });
that.toggleDisableState({
"el": that.$(".graph-button-group button,select[data-id='selectDepth']")
......@@ -442,6 +439,7 @@ define(['require',
this.fromToNodeData[this.guid]['isLineage'] = false;
this.findImpactNodeAndUpdateData({ "relationshipMap": filterRelationshipMap, "guid": this.guid, "getStyleObjStr": getStyleObjStr });
}
this.renderLineageTypeSearch();
this.createGraph();
},
findImpactNodeAndUpdateData: function(options) {
......@@ -759,8 +757,9 @@ define(['require',
});
svgGroup.selectAll("g.edgePath path.path").on('click', function(d) {
var data = { obj: _.find(that.lineageData.relations, { "fromEntityId": d.v, "toEntityId": d.w }) },
relationshipId = data.obj.relationshipId;
var data = { obj: _.find(that.lineageData.relations, { "fromEntityId": d.v, "toEntityId": d.w }) };
if (data.obj) {
var relationshipId = data.obj.relationshipId;
require(['views/graph/PropagationPropertyModal'], function(PropagationPropertyModal) {
var view = new PropagationPropertyModal({
edgeInfo: data,
......@@ -770,6 +769,7 @@ define(['require',
detailPageFetchCollection: that.fetchCollection
});
});
}
})
$('body').on('mouseover', '.d3-tip', function(el) {
that.activeTip = true;
......@@ -818,18 +818,23 @@ define(['require',
}).init();
},
renderLineageTypeSearch: function() {
var that = this;
var lineageData = $.extend(true, {}, this.lineageData);
var data = [];
var typeStr = '<option></option>';
var that = this,
lineageData = $.extend(true, {}, this.lineageData),
data = [],
typeStr = '<option></option>';
if (!_.isEmpty(lineageData)) {
_.each(lineageData.guidEntityMap, function(obj, index) {
var nodeData = that.fromToNodeData[obj.guid];
if (that.filterObj.isProcessHideCheck && nodeData && nodeData.isProcess) {
return;
} else if (that.filterObj.isDeletedEntityHideCheck && nodeData && nodeData.isDeleted) {
return
}
typeStr += '<option value="' + obj.guid + '">' + obj.attributes.name + '</option>';
});
}
that.ui.lineageTypeSearch.html(typeStr);
this.initilizelineageTypeSearch()
this.initilizelineageTypeSearch();
},
initilizelineageTypeSearch: function() {
var that = this;
......@@ -939,9 +944,10 @@ define(['require',
scaleFactor = 1,
svgWidth = that.$('svg').width(),
svgHeight = that.$('svg').height();
if (platform.name != "Chrome") {
svgClone.setAttribute('width', svgWidth);
svgClone.setAttribute('height', svgHeight);
}
$('.hidden-svg').html(svgClone);
$(svgClone).find('>g').attr("transform", "scale(" + scaleFactor + ")");
var canvasOffset = { x: 150, y: 150 },
......@@ -975,8 +981,9 @@ define(['require',
img.onload = function() {
try {
var a = document.createElement("a");
a.download = that.entityName + ".png";
var a = document.createElement("a"),
entityAttributes = that.entity && that.entity.attributes;
a.download = ((entityAttributes && entityAttributes.qualifiedName) || "lineage_export") + ".png";
document.body.appendChild(a);
ctx.drawImage(img, 50, 50, canvas.width, canvas.height);
canvas.toBlob(function(blob) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment