Skip to content

Commit

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

Signed-off-by: tygao <tygao@amazon.com>

* Changeset file for PR #7296 created/updated

---------

Signed-off-by: tygao <tygao@amazon.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
3 people authored Jul 19, 2024
1 parent 89c92ef commit 352682b
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 @@ -129,7 +129,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 @@ -138,7 +138,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 352682b

Please sign in to comment.