Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
#353 update the diagram selection with the last stopped node
  • Loading branch information
jstrachan committed Jun 4, 2013
1 parent b10c82f commit 023fc51
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions hawtio-web/src/main/webapp/app/camel/js/debug.ts
Expand Up @@ -111,6 +111,28 @@ module Camel {

function onSelectionChanged() {
//console.log("===== selection changed!!! and its now " + $scope.gridOptions.selectedItems.length);
var toNode = getStoppedBreakpointId();
if (toNode) {
// lets highlight the node in the diagram
var nodes = d3.select("svg").selectAll("g .node");

// lets clear the selected node first
nodes.attr("class", "node");

nodes.filter(function (item) {
if (item) {
var cid = item["cid"];
var rid = item["rid"];
if (cid) {
// we should match cid if defined
return toNode === cid;
} else {
return toNode === rid;
}
}
return null;
}).attr("class", "node selected");
}
/*
angular.forEach($scope.gridOptions.selectedItems, (selected) => {
if (selected) {
Expand Down Expand Up @@ -192,6 +214,9 @@ module Camel {
var stopNodeId = getStoppedBreakpointId();
if (mbean && stopNodeId) {
jolokia.execute(mbean, 'dumpTracedMessagesAsXml', stopNodeId, onSuccess(onMessages));

// lets update the diagram selection to the newly stopped node
$scope.selectedDiagramNodeId = stopNodeId;
}
updateBreakpointIcons();
Core.$apply($scope);
Expand Down

0 comments on commit 023fc51

Please sign in to comment.