-
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, Lists] Replace legacy imports from 'elasticsearch' package #107226
Changes from all commits
74d09fe
a108af5
8746a88
ef54ff6
6c9bc3e
93aa2db
e2f31cb
765e6c9
34fb078
63aa115
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,7 +94,7 @@ export const updateAlertStatusAction = async ({ | |
// TODO: Only delete those that were successfully updated from updatedRules | ||
setEventsDeleted({ eventIds: alertIds, isDeleted: true }); | ||
|
||
if (response.version_conflicts > 0 && alertIds.length === 1) { | ||
if (response.version_conflicts && alertIds.length === 1) { | ||
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. won't this not run if 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. Correct, a value of 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. I wasn't sure if you wanted it to now given the defaults below (should have added that point). 👍🏾 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. Ah, I see! I think |
||
throw new Error( | ||
i18n.translate( | ||
'xpack.securitySolution.detectionEngine.alerts.updateAlertStatusFailedSingleAlert', | ||
|
@@ -105,7 +105,11 @@ export const updateAlertStatusAction = async ({ | |
); | ||
} | ||
|
||
onAlertStatusUpdateSuccess(response.updated, response.version_conflicts, selectedStatus); | ||
onAlertStatusUpdateSuccess( | ||
response.updated ?? 0, | ||
response.version_conflicts ?? 0, | ||
selectedStatus | ||
); | ||
} catch (error) { | ||
onAlertStatusUpdateFailure(selectedStatus, error); | ||
} finally { | ||
|
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.
nifty