diff --git a/packages/hawtio/src/plugins/springboot/index.ts b/packages/hawtio/src/plugins/springboot/index.ts index ffcef010..ff469f67 100644 --- a/packages/hawtio/src/plugins/springboot/index.ts +++ b/packages/hawtio/src/plugins/springboot/index.ts @@ -1,18 +1,21 @@ import { hawtio, HawtioPlugin } from '@hawtiosrc/core' -import { pluginId, pluginPath } from './globals' -import { workspace } from '@hawtiosrc/plugins' import { helpRegistry } from '@hawtiosrc/help' -import help from './help.md' import { SpringBoot } from '@hawtiosrc/plugins/springboot/SpringBoot' +import { pluginId, pluginPath } from './globals' +import help from './help.md' +import { isActive } from './springboot-service' + +const order = 17 export const springboot: HawtioPlugin = () => { hawtio.addPlugin({ id: pluginId, title: 'Spring Boot', path: pluginPath, + order, component: SpringBoot, - isActive: async () => workspace.treeContainsDomainAndProperties('org.springframework.boot'), + isActive, }) - helpRegistry.add(pluginId, 'Spring Boot', help, 17) + helpRegistry.add(pluginId, 'Spring Boot', help, order) } diff --git a/packages/hawtio/src/plugins/springboot/springboot-service.ts b/packages/hawtio/src/plugins/springboot/springboot-service.ts index 36cf9c72..e0913c8e 100644 --- a/packages/hawtio/src/plugins/springboot/springboot-service.ts +++ b/packages/hawtio/src/plugins/springboot/springboot-service.ts @@ -1,6 +1,10 @@ import { jolokiaService, workspace } from '@hawtiosrc/plugins' import { HealthComponent, HealthData, JolokiaHealthData, Logger, LoggerConfiguration } from './types' +export function isActive(): Promise { + return workspace.treeContainsDomainAndProperties('org.springframework.boot') +} + export async function loadHealth(): Promise { const data = (await jolokiaService.execute( 'org.springframework.boot:type=Endpoint,name=Health',