Commit b699d54d by Vishal Kadam

Added drill down from lineage graph

parent cd6625a8
'use strict'; 'use strict';
angular.module('dgc.lineage').controller('LineageController', ['$element', '$scope', '$stateParams', 'LineageResource', 'd3', angular.module('dgc.lineage').controller('LineageController', ['$element', '$scope', '$state', '$stateParams', 'LineageResource', 'd3',
function($element, $scope, $stateParams, LineageResource, d3) { function($element, $scope, $state, $stateParams, LineageResource, d3) {
function render(nodes) { function render(nodes) {
var links = d3.layout.tree().links(nodes); var links = d3.layout.tree().links(nodes);
...@@ -29,7 +29,7 @@ angular.module('dgc.lineage').controller('LineageController', ['$element', '$sco ...@@ -29,7 +29,7 @@ angular.module('dgc.lineage').controller('LineageController', ['$element', '$sco
var nodeEnter = node.enter().append('g') var nodeEnter = node.enter().append('g')
.attr('class', 'node') .attr('class', 'node')
//.on('click', click) .on('click', click)
.call(force.drag); .call(force.drag);
nodeEnter.append('circle') nodeEnter.append('circle')
...@@ -48,6 +48,14 @@ angular.module('dgc.lineage').controller('LineageController', ['$element', '$sco ...@@ -48,6 +48,14 @@ angular.module('dgc.lineage').controller('LineageController', ['$element', '$sco
.style('fill', color);*/ .style('fill', color);*/
} }
function click(node) {
$state.go('details', {
id: node.guid
}, {
location: 'replace'
});
}
function tick() { function tick() {
link.attr('x1', function(d) { link.attr('x1', function(d) {
return d.source.x; return d.source.x;
......
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