-
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
[Security Solution] Fix success bulk edit toast message #144497
[Security Solution] Fix success bulk edit toast message #144497
Conversation
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Unknown metric groupsESLint disabled in files
ESLint disabled line counts
Total ESLint disabled count
To update your PR or re-run it, just comment with: cc @maximpn |
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.
Aligned with Maxim that we will get this changes merged first and then apply the changes to the bulk edit API -to include skipped
rules in the response- on top of these changes.
That will allow us to display the warning for skipped rules only when rules to be edited were actually skipped.
if ( | ||
editPayload.some( | ||
(x) => | ||
x.type === BulkActionEditType.add_index_patterns || | ||
x.type === BulkActionEditType.set_index_patterns || | ||
x.type === BulkActionEditType.delete_index_patterns | ||
) | ||
) { | ||
return `${i18n.RULES_BULK_EDIT_SUCCESS_DESCRIPTION(summary.succeeded)}. ${ | ||
i18n.RULES_BULK_EDIT_SUCCESS_INDEX_EDIT_DESCRIPTION | ||
}`; |
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.
Will modify this logic in #144461 so that the warning that explains that rules with data views were skipped will only show when rules were actually skipped, along with the detail of how many rules were skipped.
Resolves: #139897
Summary
Fixes bulk edit success toast's message. Displays
You've successfully updated X rules. If you did not select to apply changes to rules using Kibana data views, those rules were not updated and will continue using data views.
when rule's index patterns were edited andYou've successfully updated X rules.
in the other cases.Before:
Screen.Recording.2022-11-03.at.10.29.25.mov
After:
Screen.Recording.2022-11-03.at.10.28.17.mov
Checklist