[SIEM] Use bulk actions API when updating or deleting rules#54521
[SIEM] Use bulk actions API when updating or deleting rules#54521spong merged 4 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/siem (Team:SIEM) |
| }, | ||
| tags: [], | ||
| }, | ||
| ]; |
| }); | ||
| }); | ||
| }); | ||
| }); |
There was a problem hiding this comment.
Thanks for the tests! 👍
| export const DUPLICATE_RULE_ERROR = i18n.translate( | ||
| 'xpack.siem.detectionEngine.rules.allRules.actions.duplicateRuleErrorDescription', | ||
| { | ||
| defaultMessage: 'Error duplicating rule…', |
There was a problem hiding this comment.
Design has been having them as ellipses iirc, so I've been following that convention. @MichaelMarcialis, can you confirm which we should be conforming too?
There was a problem hiding this comment.
Great question. I'd prefer our usage be of a horizontal ellipsis (… or …) going forward.
There was a problem hiding this comment.
Perfect -- thanks @MichaelMarcialis! I've created #54677 for tracking so it doesn't get lost in the shuffle! 🙂
FrankHassanabad
left a comment
There was a problem hiding this comment.
Checked it out and tested it and everything works as expected.
Really fast changes for this appreciate it!
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
…54521) ## Summary This PR updates the `All Rules Table` actions to use the new bulk API introduced in elastic#53543. More robust error reporting has also been added to let the user know exactly which operation has failed. Note that individual `update`/`delete` requests now also go through the bulk API as this simplifies the implementation and error handling. Additional features: * Adds toast error when failing to activate, deactivate or delete a rule (related elastic#54515) * Extracted commonly used toast utility for better re-use * Removes ability to delete `immutable` rules ##### Activate/Deactivate Before:  (Ignore failed requests from test env -- request count is important here) ##### Activate/Deactivate After:  ##### Delete Before:  (Ignore failed requests from test env -- request count is important here) ##### Delete After:  ### Checklist Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR. - [x] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md) - [ ] ~[Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~ - [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios - [ ] ~This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~ ### For maintainers - [ ] ~This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~ - [ ] ~This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~
…54663) ## Summary This PR updates the `All Rules Table` actions to use the new bulk API introduced in #53543. More robust error reporting has also been added to let the user know exactly which operation has failed. Note that individual `update`/`delete` requests now also go through the bulk API as this simplifies the implementation and error handling. Additional features: * Adds toast error when failing to activate, deactivate or delete a rule (related #54515) * Extracted commonly used toast utility for better re-use * Removes ability to delete `immutable` rules ##### Activate/Deactivate Before:  (Ignore failed requests from test env -- request count is important here) ##### Activate/Deactivate After:  ##### Delete Before:  (Ignore failed requests from test env -- request count is important here) ##### Delete After:  ### Checklist Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR. - [x] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md) - [ ] ~[Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~ - [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios - [ ] ~This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~ ### For maintainers - [ ] ~This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~ - [ ] ~This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~
* upstream/master: (26 commits) Take page offset into account too (elastic#54567) [APM] Support error.{log,exception}.stacktrace.classname (elastic#54577) Np migration tsvb route validation (elastic#51850) [ML] MML calculator enhancements for multi-metric job wizard (elastic#54573) [SIEM] Fix Inspect query 'request timestamp' value changes when curso… (elastic#54223) Fix chromeless NP apps not using full page width (elastic#54550) Remove extraneous public import to prevent failing Kibana startup (elastic#54676) [Uptime] Temporarily skip flakey tests (elastic#54675) Skip failing uptime tests Create UI for alerting and actions plugin (elastic#48959) [dev/build/sass] build stylesheets for disabled plugins too (elastic#54654) [SIEM] Use bulk actions API when updating or deleting rules (elastic#54521) Support "Deprecated" label in advanced settings (elastic#54539) [Maps] add text halo color and width style properties (elastic#53827) Service Map Data API at Runtime (elastic#54027) [SIEM] Detection Engine Create Rule Design Review #1 (elastic#54442) Skip flaky test [Canvas] Enable Embeddable maps (elastic#53971) [SIEM][Detection Engine] Increases the number or rules you can view on a single page (elastic#54628) uiSettings - use validation field for image field maxSize (elastic#54522) ...
…54521) ## Summary This PR updates the `All Rules Table` actions to use the new bulk API introduced in elastic#53543. More robust error reporting has also been added to let the user know exactly which operation has failed. Note that individual `update`/`delete` requests now also go through the bulk API as this simplifies the implementation and error handling. Additional features: * Adds toast error when failing to activate, deactivate or delete a rule (related elastic#54515) * Extracted commonly used toast utility for better re-use * Removes ability to delete `immutable` rules ##### Activate/Deactivate Before:  (Ignore failed requests from test env -- request count is important here) ##### Activate/Deactivate After:  ##### Delete Before:  (Ignore failed requests from test env -- request count is important here) ##### Delete After:  ### Checklist Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR. - [x] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md) - [ ] ~[Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~ - [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios - [ ] ~This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~ ### For maintainers - [ ] ~This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~ - [ ] ~This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~

Summary
This PR updates the
All Rules Tableactions to use the new bulk API introduced in #53543. More robust error reporting has also been added to let the user know exactly which operation has failed. Note that individualupdate/deleterequests now also go through the bulk API as this simplifies the implementation and error handling.Additional features:
immutablerulesActivate/Deactivate Before:
(Ignore failed requests from test env -- request count is important here)
Activate/Deactivate After:
Delete Before:
(Ignore failed requests from test env -- request count is important here)
Delete After:
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.Documentation was added for features that require explanation or tutorialsThis was checked for keyboard-only and screenreader accessibilityFor maintainers
This was checked for breaking API changes and was labeled appropriatelyThis includes a feature addition or change that requires a release note and was labeled appropriately