Skip to content
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

Merged
merged 4 commits into from
Nov 3, 2022

Conversation

maximpn
Copy link
Contributor

@maximpn maximpn commented Nov 3, 2022

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 and You'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

@maximpn maximpn added bug Fixes for quality problems that affect the customer experience release_note:fix backport:skip This commit does not require backporting Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Feature:Rule Management Security Solution Detection Rule Management area Team:Detection Rule Management Security Detection Rule Management Team v8.6.0 labels Nov 3, 2022
@maximpn maximpn self-assigned this Nov 3, 2022
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 3204 3205 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 9.6MB 9.6MB +2.4KB
Unknown metric groups

ESLint disabled in files

id before after diff
osquery 1 2 +1

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
fleet 58 64 +6
osquery 106 111 +5
securitySolution 440 446 +6
total +19

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
fleet 66 72 +6
osquery 107 113 +6
securitySolution 517 523 +6
total +20

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @maximpn

@maximpn maximpn marked this pull request as ready for review November 3, 2022 11:02
@maximpn maximpn requested review from a team as code owners November 3, 2022 11:02
@maximpn maximpn requested a review from xcrzx November 3, 2022 11:02
@banderror banderror requested review from jpdjere and removed request for xcrzx November 3, 2022 12:07
Copy link
Contributor

@jpdjere jpdjere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maximpn The PR i'm working on extends the API so return if any rules were skipped, so we can inform that precisely. So I think the logic to only show the additional info about data views for index pattern-related actions is not needed.

Take a look and let's align:

#144461

Copy link
Contributor

@jpdjere jpdjere left a 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.

Comment on lines +65 to +75
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
}`;
Copy link
Contributor

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.

@maximpn maximpn merged commit 190354a into elastic:main Nov 3, 2022
@maximpn maximpn deleted the fix-toast-message-for-bulk-index-edit branch November 3, 2022 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting bug Fixes for quality problems that affect the customer experience Feature:Rule Management Security Solution Detection Rule Management area release_note:fix Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.6.0
Projects
None yet
3 participants