OpenSearch-Dashboards
OpenSearch-Dashboards copied to clipboard
[Workspace] feat: comply recent items with workspace
Description
Recent items storage is using basePath as the partition of its storage.
Before workspace feature is introduced, it works well because the only factor of basePath is serverBasePath, which is defined in opensearch_dashboards.yml file.
After workspace feature is enabled, things get weird because workspace will modify basePath service so that basePath consists of two parts: 1. serverBasePath 2. currentWorkspaceId. As a result, recent items storage is distinct by workspace, and user can not see all the recent items in any of the page or workspace.
This PR is fixing this issue by only take serverBasePath into consideration when generating the storage key of recent items.
Issues Resolved
closes #7116
Screenshot
You can see all the recent items in home or inside workspace
Redirect when clicking items in recent items section
https://github.com/opensearch-project/OpenSearch-Dashboards/assets/13493605/c3ae85c3-84ed-47c6-b9e8-72014c4e7219
Testing the changes
- Enable workspace feature in opensearch_dashboards.yml file
- Create a visualization outside workspace
- Create a workspace
- Create a visualization inside a workspace
- Clicking the one outside workspace in recent sections of left navigation, you should find yourself being redirect out of workspace.
- Clicking the one inside workspace in recent sections of left navigation, you should find yourself being redirect inside the workspace the visualization sits in.
Changelog
- feat: comply
recent itemswith workspace
Check List
- [x] All tests pass
- [x]
yarn test:jest - [x]
yarn test:jest_integration
- [x]
- [x] New functionality includes testing.
- [x] New functionality has been documented.
- [x] Update CHANGELOG.md
- [x] Commits are signed per the DCO using --signoff