From 4b3bc4335e7206783ac91db1f762e50014743384 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Sat, 20 Jul 2024 14:56:07 +0800 Subject: [PATCH] [Workspace] Recover data source management in workspace (#7296) (#7315) * recover DSM in workspace * Changeset file for PR #7296 created/updated --------- (cherry picked from commit 352682b162f689f6cc12a770f9d222612c3c4630) Signed-off-by: tygao Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> Co-authored-by: ZilongX <99905560+ZilongX@users.noreply.github.com> --- changelogs/fragments/7296.yml | 2 ++ src/plugins/workspace/public/plugin.ts | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/7296.yml diff --git a/changelogs/fragments/7296.yml b/changelogs/fragments/7296.yml new file mode 100644 index 000000000000..15b7ae679cce --- /dev/null +++ b/changelogs/fragments/7296.yml @@ -0,0 +1,2 @@ +feat: +- Recover data source management in workspace ([#7296](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7296)) \ No newline at end of file diff --git a/src/plugins/workspace/public/plugin.ts b/src/plugins/workspace/public/plugin.ts index ec67754cee3c..db496633128c 100644 --- a/src/plugins/workspace/public/plugin.ts +++ b/src/plugins/workspace/public/plugin.ts @@ -143,7 +143,7 @@ export class WorkspacePlugin implements Plugin<{}, {}, WorkspacePluginSetupDeps> }; /** - * If workspace is enabled and user has entered workspace, hide advance settings and dataSource menu by disabling the corresponding apps. + * If workspace is enabled and user has entered workspace, hide advance settings by disabling the corresponding apps. */ private disableManagementApps(core: CoreSetup, management: ManagementSetup) { const currentWorkspaceId$ = core.workspaces.currentWorkspaceId$; @@ -152,7 +152,7 @@ export class WorkspacePlugin implements Plugin<{}, {}, WorkspacePluginSetupDeps> this.managementCurrentWorkspaceIdSubscription = currentWorkspaceId$.subscribe( (currentWorkspaceId) => { if (currentWorkspaceId) { - ['settings', 'dataSources'].forEach((appId) => + ['settings'].forEach((appId) => management.sections.section.opensearchDashboards.getApp(appId)?.disable() ); }