Commit a230f4ff by Suma Shivaprasad

ATLAS-405 ATLAS-405 UI: Lineage is broken seemingly if there are more than one…

ATLAS-405 ATLAS-405 UI: Lineage is broken seemingly if there are more than one input Processes creating a Dataset (darshankumar89 via sumasai)
parent ab6e6420
No related merge requests found
...@@ -29,7 +29,7 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$ ...@@ -29,7 +29,7 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
$.each(edgs, function(key, value) { $.each(edgs, function(key, value) {
for (var k = 0; k < value.length; k++) { for (var k = 0; k < value.length; k++) {
newEdgsObj[value[k]] = newEdgsObj[value[k]] || []; newEdgsObj[value[k]] = newEdgsObj[value[k]] || [];
newEdgsObj[value[k]] = [key]; newEdgsObj[value[k]].push(key);
} }
}); });
return newEdgsObj; return newEdgsObj;
...@@ -41,8 +41,8 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$ ...@@ -41,8 +41,8 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
type: 'outputs' type: 'outputs'
}).$promise.then( }).$promise.then(
function lineageSuccess(response1) { function lineageSuccess(response1) {
// $scope.$emit('show_lineage'); // $scope.$emit('show_lineage');
$('#lineageGraph').removeClass('hide'); $('#lineageGraph').removeClass('hide');
LineageResource.get({ LineageResource.get({
tableName: tableData.tableName, tableName: tableData.tableName,
type: 'inputs' type: 'inputs'
...@@ -98,7 +98,6 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$ ...@@ -98,7 +98,6 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
} }
function loadProcess(edges, vertices) { function loadProcess(edges, vertices) {
var urlCalls = []; var urlCalls = [];
var deferred = $q.defer(); var deferred = $q.defer();
for (var guid in edges) { for (var guid in edges) {
...@@ -436,7 +435,7 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$ ...@@ -436,7 +435,7 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
// Function to center node when clicked/dropped so node doesn't get lost when collapsing/moving with large amount of children. // Function to center node when clicked/dropped so node doesn't get lost when collapsing/moving with large amount of children.
function centerNode(source) { function centerNode(source) {
var scale = (depthwidth === 10) ? zoomListener.scale() : 0.4; var scale = zoomListener.scale();
var x = -source.y0; var x = -source.y0;
var y = -source.x0; var y = -source.x0;
x = x * scale - 130; x = x * scale - 130;
...@@ -492,7 +491,9 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$ ...@@ -492,7 +491,9 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
} }
}; };
childCount(0, root); childCount(0, root);
tree = tree.nodeSize([50, 100]); //tree = tree.nodeSize([50, 100]);
tree = tree.separation(function(a, b) { return ((a.parent === root) && (b.parent === root)) ? 3 : 1; })
.size([viewerHeight, viewerWidth - 160]);
// Compute the new tree layout. // Compute the new tree layout.
var nodes = tree.nodes(root).reverse(); var nodes = tree.nodes(root).reverse();
...@@ -522,7 +523,7 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$ ...@@ -522,7 +523,7 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
if (levelWidth.length > 1 && depthwidth === 10) { if (levelWidth.length > 1 && depthwidth === 10) {
for (var o = 0; o < levelWidth.length; o++) { for (var o = 0; o < levelWidth.length; o++) {
if (levelWidth[o] > 4) { if (levelWidth[o] > 4) {
depthwidth = 70; depthwidth = 10;
break; break;
} }
} }
...@@ -559,7 +560,9 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$ ...@@ -559,7 +560,9 @@ angular.module('dgc.lineage').controller('Lineage_ioController', ['$element', '$
nodeEnter.append("image") nodeEnter.append("image")
.attr("class", "nodeImage") .attr("class", "nodeImage")
.attr("xlink:href", function(d) { .attr("xlink:href", function(d) {
return (d.type && d.type !== '' && d.type.toLowerCase().indexOf('edges') !== -1) ? '../img/process.png' : '../img/tableicon.png'; return (d.type && d.type !== '' && d.type.toLowerCase().indexOf('edges') !== -1) ?
((d.guid === $scope.guid) ? '../img/process1.png' : '../img/process.png') :
((d.guid === $scope.guid) ? '../img/tableicon1.png' : '../img/tableicon.png');
}) })
.on('mouseover', function(d) { .on('mouseover', function(d) {
if (d.type === 'edges' || 'Table') { if (d.type === 'edges' || 'Table') {
......
...@@ -15,6 +15,7 @@ ATLAS-3 Mixed Index creation fails with Date types (sumasai via shwethags) ...@@ -15,6 +15,7 @@ ATLAS-3 Mixed Index creation fails with Date types (sumasai via shwethags)
ATLAS-47 Entity mutations for complex types (sumasai via shwethags) ATLAS-47 Entity mutations for complex types (sumasai via shwethags)
ALL CHANGES: ALL CHANGES:
ATLAS-405 UI: Lineage is broken seemingly if there are more than one input Processes creating a Dataset (darshankumar89 via sumasai)
ATLAS-402 UI : Validation of Associating a Tag (darshankumar89 via sumasai) ATLAS-402 UI : Validation of Associating a Tag (darshankumar89 via sumasai)
ATLAS-395 UI : In details page maps not displayed for different data models (darshankumar89 via sumasai) ATLAS-395 UI : In details page maps not displayed for different data models (darshankumar89 via sumasai)
ATLAS-394 Fix BaseResourceIT.waitForNotification (shwethags via sumasai) ATLAS-394 Fix BaseResourceIT.waitForNotification (shwethags via sumasai)
......
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