Skip to content

Commit

Permalink
fix: update DSM id in workspace (opensearch-project#6650)
Browse files Browse the repository at this point in the history
Signed-off-by: tygao <[email protected]>
  • Loading branch information
raintygao authored Apr 26, 2024
1 parent b29d90e commit 857f8cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/plugins/data_source_management/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export interface DataSourceManagementPluginStart {
getAuthenticationMethodRegistry: () => IAuthenticationMethodRegistry;
}

// src/plugins/workspace/public/plugin.ts Workspace depends on this ID and hard code to avoid adding dependency on DSM bundle.
export const DSM_APP_ID = 'dataSources';

export class DataSourceManagementPlugin
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/workspace/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export class WorkspacePlugin implements Plugin<{}, {}, WorkspacePluginSetupDeps>
this.managementCurrentWorkspaceIdSubscription = currentWorkspaceId$.subscribe(
(currentWorkspaceId) => {
if (currentWorkspaceId) {
['settings', 'dataSourceManagement'].forEach((appId) =>
['settings', 'dataSources'].forEach((appId) =>
management.sections.section.opensearchDashboards.getApp(appId)?.disable()
);
}
Expand Down

0 comments on commit 857f8cb

Please sign in to comment.