Skip to content

[8.x] [Security Solution] clean unused types, export components and add many unit tests (#217100)#217253

Merged
PhilippeOberti merged 1 commit intoelastic:8.xfrom
PhilippeOberti:backport/8.x/pr-217100
Apr 4, 2025
Merged

[8.x] [Security Solution] clean unused types, export components and add many unit tests (#217100)#217253
PhilippeOberti merged 1 commit intoelastic:8.xfrom
PhilippeOberti:backport/8.x/pr-217100

Conversation

@PhilippeOberti
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

…y unit tests (elastic#217100)

## Summary

This code change was originally part of [a bigger
PR](elastic#216744) related to the AI for
SOC effort. I decided to split the work for 2 reasons:
- less files to review, less teams impacted
- this current PR will easily be backported to `8.x` while the AI for
SOC is only targeting `9.1`

This PR makes only a few small changes:
- remove unused types
- export a few components/functions outside of the `alerts_table` folder
to make them reusable within the new AI for SOC alert summary page (see
PR linked above)
- add a lot of unit tests to everything, especially the now exported
components/functions

#### UI remains unchanged:

![Screenshot 2025-04-03 at 6 09
57 PM](https://github.com/user-attachments/assets/3e4135e7-6e2f-4b4f-94e5-0dd72f1710bb)
![Screenshot 2025-04-03 at 6 10
06 PM](https://github.com/user-attachments/assets/382391d6-7ae1-4da4-a76f-495b6db69db3)
![Screenshot 2025-04-03 at 6 10
13 PM](https://github.com/user-attachments/assets/28c5947b-2168-4080-b298-5fea1f3f97c7)
![Screenshot 2025-04-03 at 6 10
21 PM](https://github.com/user-attachments/assets/2dc75fcb-9929-4821-830d-b84fceaf232d)

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [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

Will unblock elastic/security-team#11973

(cherry picked from commit 837059b)

# Conflicts:
#	src/platform/packages/shared/kbn-grouping/src/containers/query/index.test.ts
#	src/platform/packages/shared/kbn-grouping/src/mocks.ts
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

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.1MB 9.1MB -671.0B

@PhilippeOberti PhilippeOberti merged commit 84449b3 into elastic:8.x Apr 4, 2025
11 checks passed
@PhilippeOberti PhilippeOberti deleted the backport/8.x/pr-217100 branch April 5, 2025 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants