-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[Security team: AWP] [Session view] Add alert fly out callback #127991
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
Changes from all commits
e69bec2
f65d31f
201b579
57f24b2
8a5c745
f1c437e
26f0b5f
a61c73e
07e5811
bc09de9
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 |
|---|---|---|
|
|
@@ -4,9 +4,40 @@ | |
| * 2.0; you may not use this file except in compliance with the Elastic License | ||
| * 2.0. | ||
| */ | ||
| import { Process, ProcessEvent, ProcessMap } from '../../../common/types/process_tree'; | ||
| import { | ||
| AlertStatusEventEntityIdMap, | ||
| Process, | ||
| ProcessEvent, | ||
| ProcessMap, | ||
| } from '../../../common/types/process_tree'; | ||
| import { ProcessImpl } from './hooks'; | ||
|
|
||
| // if given event is an alert, and it exist in updatedAlertsStatus, update the alert's status | ||
| // with the updated status value in updatedAlertsStatus Map | ||
| export const updateAlertEventStatus = ( | ||
| events: ProcessEvent[], | ||
| updatedAlertsStatus: AlertStatusEventEntityIdMap | ||
| ) => | ||
| events.map((event) => { | ||
| // do nothing if event is not an alert | ||
| if (!event.kibana) { | ||
|
Contributor
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. Can do in a follow up PR, but in the future
Author
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. Thanks Michael, will update in my follow up PR! |
||
| return event; | ||
| } | ||
|
|
||
| return { | ||
| ...event, | ||
| kibana: { | ||
| ...event.kibana, | ||
| alert: { | ||
| ...event.kibana.alert, | ||
| workflow_status: | ||
| updatedAlertsStatus[event.kibana.alert?.uuid]?.status ?? | ||
| event.kibana.alert?.workflow_status, | ||
| }, | ||
| }, | ||
| }; | ||
| }); | ||
|
|
||
| // given a page of new events, add these events to the appropriate process class model | ||
| // create a new process if none are created and return the mutated processMap | ||
| export const updateProcessMap = (processMap: ProcessMap, events: ProcessEvent[]) => { | ||
|
|
||
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.
duplicate of https://github.com/elastic/kibana/pull/127500/files#diff-3f0eab56b857974f26a9eb0b3987c0c099c5b8b6506f19c766c9e56273eef26d