Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixed up the reloading of the camel tree when mbeans are added and re…
…moved
  • Loading branch information
jstrachan committed Apr 26, 2013
1 parent 1b2f074 commit 5e48e89
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions hawtio-web/src/main/webapp/app/camel/js/tree.ts
Expand Up @@ -7,10 +7,17 @@ module Camel {
setTimeout(updateSelectionFromURL, 50);
});

$scope.$on('jmxTreeUpdated', reloadFunction);
$scope.$watch('workspace.tree', reloadFunction);
$scope.$watch('workspace.tree', function () {
reloadFunction();
});

$scope.$on('jmxTreeUpdated', function () {
reloadFunction();
});

function reloadFunction() {
console.log("reloading the camel tree!!!");

var children = [];
var domainName = "org.apache.camel";

Expand Down Expand Up @@ -90,7 +97,7 @@ module Camel {
}

var treeElement = $("#cameltree");
Jmx.enableTree($scope, $location, workspace, treeElement, [rootFolder]);
Jmx.enableTree($scope, $location, workspace, treeElement, [rootFolder], true);
/*
// lets select the first node if we have no selection
Expand Down

0 comments on commit 5e48e89

Please sign in to comment.