From b11539f3dc1026d650ac18c2bb83825f1c4cdab6 Mon Sep 17 00:00:00 2001 From: tygao Date: Fri, 26 Apr 2024 13:27:50 +0800 Subject: [PATCH] fix: update DSM id in workspace 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() ); }