Skip to content

Commit

Permalink
Update src/plugins/workspace/public/plugin.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Yulong Ruan <[email protected]>
  • Loading branch information
raintygao and ruanyl authored Apr 12, 2024
1 parent b8477fc commit 9485827
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 9485827

Please sign in to comment.