Skip to content

Commit

Permalink
Fix #551 and also recursively search the tree when matching mbeans
Browse files Browse the repository at this point in the history
  • Loading branch information
gashcrumb committed Sep 16, 2013
1 parent 465a850 commit 8adf47a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hawtio-karaf-terminal/src/main/webapp/app/js/gogoPlugin.js
Expand Up @@ -31,7 +31,7 @@ var simplePlugin = angular.module(pluginName, ['hawtioCore'])
workspace.topLevelTabs.push({
content: "Terminal",
title: "Open a terminal to the server",
isValid: function() { return true; },
isValid: function () { return workspace.treeContainsDomainAndProperties("hawtio", {type: "plugin", name: "hawtio-karaf-terminal"}) },
href: function() { return "#/gogo"; },
isActive: function() { return workspace.isLinkActive("gogo"); }
});
Expand Down
13 changes: 12 additions & 1 deletion hawtio-web/src/main/webapp/app/core/js/workspace.ts
Expand Up @@ -637,7 +637,18 @@ class Workspace {
if (folder) {
if (properties) {
var children = folder.children || [];
return children.some((node) => this.matchesProperties(node.entries, properties));
var checkProperties = (node) => {
if (!this.matchesProperties(node.entries, properties)) {
if (node.domain === domainName && node.children && node.children.length > 0) {
return node.children.some(checkProperties);
} else {
return false;
}
} else {
return true;
}
};
return children.some(checkProperties);
}
return true;
} else {
Expand Down

0 comments on commit 8adf47a

Please sign in to comment.