OpenSearch-Dashboards
OpenSearch-Dashboards copied to clipboard
[Workspace] Enable workspace params in saved objects management page
Description
Issues Resolved
closes #6028
Screenshot
When enter saved objects management page in workspace foo. The page shows nothing as no objects have been created in this workspace.
After importing with the ndjson file, objects can be found only in workspace foo.
By switching to another workspace bar, no objects can be found because the objects imported before was in workspace foo
Testing the changes
- Using the branch to bootstrap
- Download the patch file test.patch
-
git apply ./test.patch
, it will- enable workspace feature flag
- switch to workspace foo manually as there is not a UI component to switch workspace for now
- Start OSD by using
yarn start --no-base-path
to make sure no random base path will be appended - Navigate to devTools
- Insert test workspaces by calling
PUT .kibana/_doc/workspace:foo
{
"type": "workspace",
"workspace": {
"name": "foo"
}
}
PUT .kibana/_doc/workspace:bar
{
"type": "workspace",
"workspace": {
"name": "bar"
}
}
- Visit the saved objects management page:
http://localhost:5601/app/management/opensearch-dashboards/objects
- You will find nothing can be found in this workspace(After applying the patch file, you are in workspace foo)
- Import by using the file, download the file and extract that to find the import file.
- You will find some dashboards and visualizations are imported in the workspace.
- Go to file
src/plugins/workspace/public/plugin.ts
, change the 'foo' workspace to 'bar'. Refresh the page. By doing so you are in workspace bar. - You will find the objects can not be found again.
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
Codecov Report
Attention: Patch coverage is 73.91304%
with 6 lines
in your changes are missing coverage. Please review.
Project coverage is 67.10%. Comparing base (
4b89ad0
) to head (0a844f5
).
Additional details and impacted files
@@ Coverage Diff @@
## main #6026 +/- ##
==========================================
- Coverage 67.14% 67.10% -0.04%
==========================================
Files 3326 3331 +5
Lines 64394 64497 +103
Branches 10358 10369 +11
==========================================
+ Hits 43237 43281 +44
- Misses 18627 18684 +57
- Partials 2530 2532 +2
Flag | Coverage Δ | |
---|---|---|
Linux_1 | 31.95% <20.00%> (+0.21%) |
:arrow_up: |
Linux_2 | 55.23% <ø> (ø) |
|
Linux_3 | 44.72% <ø> (+0.01%) |
:arrow_up: |
Linux_4 | 35.12% <72.72%> (+0.04%) |
:arrow_up: |
Windows_1 | 31.97% <20.00%> (+0.21%) |
:arrow_up: |
Windows_2 | 55.20% <ø> (ø) |
|
Windows_3 | 44.73% <ø> (ø) |
|
Windows_4 | 35.12% <72.72%> (+0.04%) |
:arrow_up: |
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.
What is this PR waiting on?
@BionIT Migrate management related comment from #6014 to here and addressed them.
What is this PR waiting on?
Change to ready for review. Was working on how to test the PR.
change to draft as we are investigating if to add such logic in server side.