-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
SOM: hide actions for hidden types #98290
SOM: hide actions for hidden types #98290
Conversation
const objects = await savedObjectsClient.bulkGet(selectedSavedObjects); | ||
const deletes = objects.savedObjects.map((object) => | ||
savedObjectsClient.delete(object.type, object.id, { force: true }) | ||
); | ||
const deletes = selectedSavedObjects | ||
.filter((object) => !object.meta.hiddenType) | ||
.map((object) => savedObjectsClient.delete(object.type, object.id, { force: true })); |
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.
This was performing a bulkGet
for no reason, as we already have all the info we need on the client side to perform the deletes.
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.
Another use case for bulkDelete
(context #30503)
@@ -15,6 +15,5 @@ export default function ({ loadTestFile }: PluginFunctionalProviderContext) { | |||
loadTestFile(require.resolve('./resolve_import_errors')); | |||
loadTestFile(require.resolve('./find')); | |||
loadTestFile(require.resolve('./delete')); | |||
loadTestFile(require.resolve('./interface/saved_objects_management')); |
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.
Tests moved to saved_objects_management/hidden_types.ts
💚 Build SucceededMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
Pinging @elastic/kibana-core (Team:Core) |
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.
LGTM
const objects = await savedObjectsClient.bulkGet(selectedSavedObjects); | ||
const deletes = objects.savedObjects.map((object) => | ||
savedObjectsClient.delete(object.type, object.id, { force: true }) | ||
); | ||
const deletes = selectedSavedObjects | ||
.filter((object) => !object.meta.hiddenType) | ||
.map((object) => savedObjectsClient.delete(object.type, object.id, { force: true })); |
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.
Another use case for bulkDelete
(context #30503)
@@ -90,8 +90,6 @@ export class SavedObjectExportTransformsPlugin implements Plugin { | |||
}, | |||
}); | |||
|
|||
///////////// | |||
///////////// |
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.
👀
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.
Spaces changes LGTM!
* SOM: hide actions for hidden types * fix FTR tests * add and fix tests * fix unit tests * fix test types * fix FTR test assertions * add more FTR tests * delete old file
Summary
Fix #94351
Hide the
share to space
,copy to space
anddelete
actions for hidden saved object typesChecklist