Skip to content

Commit

Permalink
fix: Regression of discover plugin not displaying on default
Browse files Browse the repository at this point in the history
* Since slicing the discover plugin in two, hawtio opens with no plugin
  selected. This is due to discover-core being chosen as the default
  plugin rather than discover (UI)

* Change the presentation order of the plugins to ensure that discover is
  first in the order and so selected by default
  • Loading branch information
phantomjinx committed Oct 31, 2024
1 parent 73bbb5f commit 9923e7b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/online-shell/src/discover-core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ export const discoverCore: HawtioPlugin = () => {
id: pluginId,
title: pluginTitle,
headerItems: [{ component: HeaderMenuDropDown, universal: true }],
/*
* order must be bigger (low priority) than discover-core
* to ensure it is not the default
*/
order: 200,
isActive: async () => true,
})

Expand Down
5 changes: 5 additions & 0 deletions packages/online-shell/src/discover/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ export const discover: HawtioPlugin = () => {
title: pluginTitle,
path: pluginPath,
component: Discover,
/*
* order must be smaller (higher priority) than discover-core
* to ensure it is the default
*/
order: 31,
isActive: async () => {
// Only active is there is NO current connection
const connection = await connectService.getCurrentConnection()
Expand Down

0 comments on commit 9923e7b

Please sign in to comment.