Skip to content

Commit

Permalink
Merge branch 'feat-hide-menu' of https://github.com/raintygao/OpenSea…
Browse files Browse the repository at this point in the history
…rch-Dashboards into feat-hide-menu
  • Loading branch information
raintygao committed Apr 12, 2024
2 parents b2aa530 + 9485827 commit e8aef97
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/plugins/workspace/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,9 @@ export class WorkspacePlugin implements Plugin<{}, {}> {
this.managementCurrentWorkspaceIdSubscription = currentWorkspaceId$.subscribe(
(currentWorkspaceId) => {
if (currentWorkspaceId) {
const managementSectionApps = management.sections.section.opensearchDashboards.getAppsEnabled();
const disabledApps = managementSectionApps.filter(
(app) => app.id === 'settings' || app.id === 'dataSources'
['settings', 'dataSources'].forEach((appId) =>
management.sections.section.opensearchDashboards.getApp(appId)?.disable()
);
disabledApps?.forEach((app) => app.disable());
}
}
);
Expand Down

0 comments on commit e8aef97

Please sign in to comment.