-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: duplicate selected/all saved objects UI #305
Changes from 6 commits
783863b
5e472e1
8536391
be72ad9
251df79
2a00d66
f7c18b4
2be9d0c
3294e6c
49c6134
c127a79
cf1a8ac
c3f0ce6
c0f62aa
4d5af83
eddc611
8114a6f
997d1b7
1cd26a3
334129a
6b382e6
c4ef126
33bffaf
98bfa54
e62431f
a44deab
3c374f6
d873930
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,27 @@ | ||||||||||||||||||||||||||||||
/* | ||||||||||||||||||||||||||||||
* SPDX-License-Identifier: Apache-2.0 | ||||||||||||||||||||||||||||||
* | ||||||||||||||||||||||||||||||
* The OpenSearch Contributors require contributions made to | ||||||||||||||||||||||||||||||
* this file be licensed under the Apache-2.0 license or a | ||||||||||||||||||||||||||||||
* compatible open source license. | ||||||||||||||||||||||||||||||
* | ||||||||||||||||||||||||||||||
* Any modifications Copyright OpenSearch Contributors. See | ||||||||||||||||||||||||||||||
* GitHub history for details. | ||||||||||||||||||||||||||||||
*/ | ||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
import { HttpStart } from 'src/core/public'; | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
export async function duplicateSavedObjects( | ||||||||||||||||||||||||||||||
http: HttpStart, | ||||||||||||||||||||||||||||||
objects: any[], | ||||||||||||||||||||||||||||||
includeReferencesDeep: boolean = true, | ||||||||||||||||||||||||||||||
targetWorkspace: string | ||||||||||||||||||||||||||||||
) { | ||||||||||||||||||||||||||||||
return await http.post('/api/saved_objects/_copy', { | ||||||||||||||||||||||||||||||
body: JSON.stringify({ | ||||||||||||||||||||||||||||||
objects, | ||||||||||||||||||||||||||||||
includeReferencesDeep, | ||||||||||||||||||||||||||||||
targetWorkspace, | ||||||||||||||||||||||||||||||
}), | ||||||||||||||||||||||||||||||
}); | ||||||||||||||||||||||||||||||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code in copy.ts and copy.test.ts are old, please use the code in the
workspace-pr-integr
branch.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have reverted these codes