Skip to content

Commit

Permalink
feat: only register index patterns to settings and setup when workspa…
Browse files Browse the repository at this point in the history
…ce is disabled

Signed-off-by: SuZhou-Joe <[email protected]>
  • Loading branch information
SuZhou-Joe committed Aug 16, 2024
1 parent 44607ea commit 1dcc264
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/plugins/index_pattern_management/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,17 @@ export class IndexPatternManagementPlugin
},
});

core.chrome.navGroup.addNavLinksToGroup(DEFAULT_NAV_GROUPS.settingsAndSetup, [
{
id: IPM_APP_ID,
title: sectionsHeader,
order: 400,
},
]);
core.getStartServices().then(([coreStart]) => {
if (!coreStart.application.capabilities.workspaces.enabled) {
core.chrome.navGroup.addNavLinksToGroup(DEFAULT_NAV_GROUPS.settingsAndSetup, [
{
id: IPM_APP_ID,
title: sectionsHeader,
order: 400,
},
]);
}
});

return this.indexPatternManagementService.setup({ httpClient: core.http });
}
Expand Down

0 comments on commit 1dcc264

Please sign in to comment.