Skip to content

Commit

Permalink
fix: register right navigation for dev tool only when console is enab…
Browse files Browse the repository at this point in the history
…led (#6701)

Signed-off-by: tygao <tygao@amazon.com>
  • Loading branch information
raintygao authored May 2, 2024
1 parent 1029884 commit b5121d3
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions src/plugins/dev_tools/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,19 +137,21 @@ export class DevToolsPlugin implements Plugin<DevToolsSetup> {
public start(core: CoreStart) {
if (this.getSortedDevTools().length === 0) {
this.appStateUpdater.next(() => ({ navLinkStatus: AppNavLinkStatus.hidden }));
} else {
// Register right navigation for dev tool only when console is enabled.
core.chrome.navControls.registerRight({
order: RightNavigationOrder.DevTool,
mount: toMountPoint(
React.createElement(RightNavigationButton, {
appId: this.id,
iconType: 'consoleApp',
title: this.title,
application: core.application,
http: core.http,
})
),
});
}
core.chrome.navControls.registerRight({
order: RightNavigationOrder.DevTool,
mount: toMountPoint(
React.createElement(RightNavigationButton, {
appId: this.id,
iconType: 'consoleApp',
title: this.title,
application: core.application,
http: core.http,
})
),
});
}

public stop() {}
Expand Down

0 comments on commit b5121d3

Please sign in to comment.