OpenSearch-Dashboards
OpenSearch-Dashboards copied to clipboard
[Workspace] Copy selected/all saved objects
Description
This PR follows up https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6288 which can be used to duplicate saved objects among workspaces. Only UI change in this PR.
Issues Resolved
https://github.com/opensearch-project/OpenSearch-Dashboards/issues/6388
Screenshot
https://github.com/opensearch-project/OpenSearch-Dashboards/assets/71875999/89fe15e1-c876-4f7c-b64a-77a5c550002c
There are three types of duplicate buttons on the saved objects management page.
If the user clicks the duplicate button, a modal window will pop up as follows:
Changelog
- feat: [Workspace] Duplicate selected/all saved objects
Testing the changes
- Clone the latest code and run yarn osd bootstrap
- Modify config/opensearch_dashboards.yml, add workspace.enabled: true
- Run yarn start --no-base-path
- Create a workspace and create some saved objects like index patterns, visualizations, etc.
- Call the copy api following the above usage.
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 91.89189% with 12 lines in your changes missing coverage. Please review.
Project coverage is 64.02%. Comparing base (
9348bd4) to head (b850070). Report is 278 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #6478 +/- ##
==========================================
+ Coverage 63.96% 64.02% +0.06%
==========================================
Files 3597 3603 +6
Lines 78262 78477 +215
Branches 12339 12382 +43
==========================================
+ Hits 50057 50244 +187
- Misses 25185 25207 +22
- Partials 3020 3026 +6
| Flag | Coverage Δ | |
|---|---|---|
| Linux_1 | 30.68% <6.16%> (-0.40%) |
:arrow_down: |
| Linux_2 | 55.58% <ø> (+0.04%) |
:arrow_up: |
| Linux_3 | 40.64% <2.14%> (-0.67%) |
:arrow_down: |
| Linux_4 | 31.69% <91.54%> (+0.15%) |
:arrow_up: |
| Windows_1 | 30.70% <6.16%> (-0.40%) |
:arrow_down: |
| Windows_2 | 55.53% <ø> (+0.04%) |
:arrow_up: |
| Windows_3 | 40.65% <2.14%> (-0.66%) |
:arrow_down: |
| Windows_4 | 31.69% <91.54%> (+0.15%) |
: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.
❌ Invalid Changelog Heading
The '## Changelog' heading in your PR description is either missing or malformed. Please make sure that your PR description includes a '## Changelog' heading with proper spelling, capitalization, spacing, and Markdown syntax.
Hey @yubonluo, thanks for opening. I'm not able to see the videos.
Do you have some screen shots? Also just confirming with @opensearch-project/opensearch-ux the expected workflow.
Hey @yubonluo, thanks for opening. I'm not able to see the videos.
Do you have some screen shots? Also just confirming with @opensearch-project/opensearch-ux the expected workflow.
@yubonluo I’d like to make some adjustments to the workflow you shared earlier. I’m putting my recommendation together.
Hey @yubonluo, thanks for opening. I'm not able to see the videos.
Do you have some screen shots? Also just confirming with @opensearch-project/opensearch-ux the expected workflow.
The screen shots has been added.
CC @SuZhou-Joe @ruanyl could you please help me review this pr?
Hi @yubonluo , are we targeting this PR for 2.15 or 2.16?
Hi @yubonluo , are we targeting this PR for 2.15 or 2.16?
Hi @BionIT due to waiting for the final confirmation of the UI text, this PR will be released on 2.16.
The backport to 2.x failed:
The process '/usr/bin/git' failed with exit code 128
To backport manually, run these commands in your terminal:
# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.x
# Create a new branch
git switch --create backport/backport-6478-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 9abde5c91b86bdcedde315f8ea7f650ffadac20e
# Push it to GitHub
git push --set-upstream origin backport/backport-6478-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.x
Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-6478-to-2.x.
The backport to 2.16 failed:
The process '/usr/bin/git' failed with exit code 1
To backport manually, run these commands in your terminal:
# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-2.16 2.16
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.16
# Create a new branch
git switch --create backport/backport-6478-to-2.16
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 9abde5c91b86bdcedde315f8ea7f650ffadac20e
# Push it to GitHub
git push --set-upstream origin backport/backport-6478-to-2.16
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.16
Then, create a pull request where the base branch is 2.16 and the compare/head branch is backport/backport-6478-to-2.16.
The backport to 2.16 failed:
The process '/usr/bin/git' failed with exit code 128
To backport manually, run these commands in your terminal:
# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-2.16 2.16
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.16
# Create a new branch
git switch --create backport/backport-6478-to-2.16
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 9abde5c91b86bdcedde315f8ea7f650ffadac20e
# Push it to GitHub
git push --set-upstream origin backport/backport-6478-to-2.16
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.16
Then, create a pull request where the base branch is 2.16 and the compare/head branch is backport/backport-6478-to-2.16.