Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixes #439 so we hide the Fabric tab on jboss fuse 6.0 and earlier; l…
…ooking for newer mbeans only available on 6.1 or later
  • Loading branch information
jstrachan committed Sep 7, 2013
1 parent 6733fad commit c5067b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hawtio-web/src/main/webapp/app/fabric/js/fabricPlugin.ts
Expand Up @@ -44,7 +44,7 @@ module Fabric {
workspace.topLevelTabs.push( {
content: "Fabric",
title: "Manage your containers and middleware in a fabric",
isValid: (workspace) => workspace.treeContainsDomainAndProperties(jmxDomain),
isValid: (workspace) => Fabric.hasFabric(workspace),
href: () => "#/fabric/view",
isActive: (workspace: Workspace) => workspace.isLinkActive("fabric")
});
Expand Down
6 changes: 5 additions & 1 deletion hawtio-web/src/main/webapp/app/fabric/js/helpers.ts
Expand Up @@ -5,7 +5,11 @@ module Fabric {
export var clusterBootstrapManagerMBean = "org.fusesource.fabric:type=ClusterBootstrapManager";

export function hasFabric(workspace) {
return workspace.treeContainsDomainAndProperties(Fabric.jmxDomain, {type: "Fabric"});
// lets make sure we only have a fabric if we have the ClusterBootstrapManager available
// so that we hide Fabric for 6.0 or earlier of JBoss Fuse which doesn't have the necessary
// mbeans for hawtio awesomeness
return workspace.treeContainsDomainAndProperties(Fabric.jmxDomain, {type: "Fabric"})
&& workspace.treeContainsDomainAndProperties(Fabric.jmxDomain, {type: "ClusterBootstrapManager"});
}

export function initScope($scope, workspace) {
Expand Down

0 comments on commit c5067b6

Please sign in to comment.