OpenSearch-Dashboards
OpenSearch-Dashboards copied to clipboard
[Workspace][Data Source] Support data source assignment in workspace
Description
- Add data source assignment in workspace create/update page.
- Add addToWorkspaces and deleteFromWorkspaces method in savedObject client.
- Update savedObject update/bulkUpdate in savedObject client and repository to support update workspace field.
Screenshot
https://github.com/opensearch-project/OpenSearch-Dashboards/assets/42465692/7e2a7b89-4d01-42d7-b6a3-dcac5e4adf18
Testing the changes
-
Use find API to find any data sources and what workspaces they belong to.
http://localhost:6601/w/${OSD_ID}/api/saved_objects/_find?fields=id&fields=title&fields=workspaces&per_page=10000&type=data-source&workspaces=* -
Enter workspace create/update page to create workspaces and assign data sources or update and assign data sources.
-
Enter workspace update page or use find API to find that data source have been assigned to specific workspace.
http://localhost:6601/w/${OSD_ID}/api/saved_objects/_find?fields=id&fields=title&fields=workspaces&per_page=10000&type=data-source&workspaces=${WORKSPACE_ID}
Changelog
- feat: Support data source assignment in workspace.
Check List
- [ ] All tests pass
- [ ]
yarn test:jest - [ ]
yarn test:jest_integration
- [ ]
- [ ] New functionality includes testing.
- [ ] New functionality has been documented.
- [ ] Update CHANGELOG.md
- [ ] Commits are signed per the DCO using --signoff
Codecov Report
Attention: Patch coverage is 89.31298% with 14 lines in your changes missing coverage. Please review.
Project coverage is 67.56%. Comparing base (
417246b) to head (5004aee). Report is 351 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #7101 +/- ##
==========================================
+ Coverage 67.50% 67.56% +0.06%
==========================================
Files 3468 3469 +1
Lines 68402 68508 +106
Branches 11117 11141 +24
==========================================
+ Hits 46174 46287 +113
+ Misses 19532 19515 -17
- Partials 2696 2706 +10
| Flag | Coverage Δ | |
|---|---|---|
| Linux_1 | 33.17% <70.22%> (+0.12%) |
:arrow_up: |
| Linux_2 | 55.25% <96.15%> (+0.04%) |
:arrow_up: |
| Linux_3 | 45.31% <0.00%> (-0.04%) |
:arrow_down: |
| Linux_4 | 34.73% <7.69%> (-0.02%) |
:arrow_down: |
| Windows_1 | 33.19% <70.22%> (+0.12%) |
:arrow_up: |
| Windows_2 | 55.20% <96.15%> (+0.04%) |
:arrow_up: |
| Windows_3 | 45.32% <0.00%> (-0.03%) |
:arrow_down: |
| Windows_4 | 34.73% <7.69%> (-0.02%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.