From 857f8cbe4c7718c82d7700ff87cd6c71934b32e2 Mon Sep 17 00:00:00 2001 From: tygao Date: Fri, 26 Apr 2024 14:32:45 +0800 Subject: [PATCH] fix: update DSM id in workspace (#6650) Signed-off-by: tygao --- src/plugins/data_source_management/public/plugin.ts | 1 + src/plugins/workspace/public/plugin.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/data_source_management/public/plugin.ts b/src/plugins/data_source_management/public/plugin.ts index 564139749ce7..7f0eb9760be2 100644 --- a/src/plugins/data_source_management/public/plugin.ts +++ b/src/plugins/data_source_management/public/plugin.ts @@ -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 diff --git a/src/plugins/workspace/public/plugin.ts b/src/plugins/workspace/public/plugin.ts index ca62edde3e0f..8c6bd2ddc0e6 100644 --- a/src/plugins/workspace/public/plugin.ts +++ b/src/plugins/workspace/public/plugin.ts @@ -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() ); }