Skip to content

Commit

Permalink
[Workspace] Recover data source management in workspace (#7296) (#7315)
Browse files Browse the repository at this point in the history
* recover DSM in workspace



* Changeset file for PR #7296 created/updated

---------




(cherry picked from commit 352682b)

Signed-off-by: tygao <tygao@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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>
  • Loading branch information
4 people authored Jul 20, 2024
1 parent d84a5aa commit 4b3bc43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/7296.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
feat:
- Recover data source management in workspace ([#7296](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7296))
4 changes: 2 additions & 2 deletions src/plugins/workspace/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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$;
Expand All @@ -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()
);
}
Expand Down

0 comments on commit 4b3bc43

Please sign in to comment.