[Cases] Enable auto-extract observables in alerts table#235433
[Cases] Enable auto-extract observables in alerts table#235433michaelolo24 merged 4 commits intoelastic:mainfrom
Conversation
e50319f to
ced2f44
Compare
2217a04 to
760557f
Compare
6bc1dfb to
0a8b410
Compare
ab6391b to
2f88eea
Compare
|
Pinging @elastic/kibana-cases (Team:Cases) |
PhilippeOberti
left a comment
There was a problem hiding this comment.
Code review only for the files impacting the @elastic/security-threat-hunting-investigations team.
This code really motivates me to cleanup those ecsData and all objects. We're manipulating these so many times over and over again, we need to find a more performant approach. I know it's a huge effort and will impact so many places within Security Solution...
One day! 😆
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
History
|
| ): TimelineItem[] => { | ||
| return Array.from(rowSelection.keys()).map((rowIndex: number) => { | ||
| const alert = alerts[rowIndex]; | ||
| const data = Object.entries(alert).map(([key, value]) => ({ |
There was a problem hiding this comment.
nit: how about adding the fallback values for the well known fields here instead of iterating on the fields array each time?
| const data = Object.entries(alert).map(([key, value]) => ({ | |
| const data = Object.entries({ | |
| [ALERT_CASE_IDS]: [], | |
| [ALERT_WORKFLOW_TAGS]: [], | |
| [ALERT_WORKFLOW_ASSIGNEE_IDS]: [], | |
| ...alert, | |
| }).map(([key, value]) => ({ |
There was a problem hiding this comment.
Apologies, missed this comment before I merged. Made a tiny pr to fix here: #237307
umbopepato
left a comment
There was a problem hiding this comment.
RO code changes LGTM! Thanks for changing the alert format locally 🙏 🚀
2f88eea to
a0825e1
Compare
## Summary Fix based on feedback [here](#235433 (comment))
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
## Summary Dependency: elastic#233027 to be merged first. This PR enables auto-extract toggle in alerts table when user adds alerts to a case. This applies to row actions and bulk actions. To enable the feature in security update the [case configuration](https://github.com/elastic/kibana/blob/50299491246af6cc8055a1ff8a975ce82b114495/x-pack/solutions/security/plugins/security_solution/public/detections/components/alerts_table/index.tsx#L143) to `extractObservables: true,` <img width="1490" height="730" alt="image" src="https://github.com/user-attachments/assets/1c31cfee-a086-490b-b2d8-69306eb3ae4c" /> ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
…37307) ## Summary Fix based on feedback [here](elastic#235433 (comment))
Summary
Dependency: #233027 to be merged first.
This PR enables auto-extract toggle in alerts table when user adds alerts to a case. This applies to row actions and bulk actions.
To enable the feature in security update the case configuration to
extractObservables: true,Checklist
release_note:*label is applied per the guidelinesbackport:*labels.