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) (#6708)

(cherry picked from commit b5121d3)

Signed-off-by: tygao <tygao@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent dbe0a48 commit 2ba07ee
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 2ba07ee

Please sign in to comment.