Skip to content

[AI4DSOC] Alert summary table truncates long values and display the field/value pair in tooltip#219438

Merged
PhilippeOberti merged 1 commit intoelastic:mainfrom
PhilippeOberti:alert-summary-table-cell-truncate
Apr 28, 2025
Merged

[AI4DSOC] Alert summary table truncates long values and display the field/value pair in tooltip#219438
PhilippeOberti merged 1 commit intoelastic:mainfrom
PhilippeOberti:alert-summary-table-cell-truncate

Conversation

@PhilippeOberti
Copy link
Contributor

@PhilippeOberti PhilippeOberti commented Apr 28, 2025

Summary

This PR fixes a small rendering issue in the AI4DSOC alert summary alerts table (those changes will also be automatically applied to the alerts table in the Cases and Attack discovery pages also for AI4DSOC). The basic cell renderer (which renders all values outside of a couple of selected custom renderers we have) was not truncating values, which sometimes lead to weird renders, as seen in the video below.

Screen.Recording.2025-04-28.at.12.56.37.PM.mov

This PR reuses the same logic used today in the Alerts page alerts table: it truncates the values and show the field and value pairs in a tooltip.

Screen.Recording.2025-04-28.at.12.55.35.PM.mov

How to test

This needs to be ran in Serverless:

  • yarn es serverless --projectType security
  • yarn serverless-security --no-base-path

You also need to enable the AI for SOC tier, by adding the following to your serverless.security.dev.yaml file:

xpack.securitySolutionServerless.productTypes:
  [
    { product_line: 'ai_soc', product_tier: 'search_ai_lake' },
  ]

Use one of these Serverless users:

  • platform_engineer
  • endpoint_operations_analyst
  • endpoint_policy_manager
  • admin
  • system_indices_superuser

Then:

  • generate data: yarn test:generate:serverless-dev
  • create 4 catch all rules, each with a name of a AI for SOC integration (google_secops, microsoft_sentinel,, sentinel_one and crowdstrike) => to do that you'll need to temporary comment the serverless.security.dev.yaml config changes as the rules page is not accessible in AI for SOC.
  • change this line to installedPackages: availablePackages to force having some packages installed

Checklist

Relates to https://github.com/elastic/security-team/issues/11973

@PhilippeOberti PhilippeOberti added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:Threat Hunting:Investigations Security Solution Threat Hunting Investigations Team Team:Security Generative AI Security Generative AI v9.1.0 labels Apr 28, 2025
@PhilippeOberti PhilippeOberti requested a review from a team as a code owner April 28, 2025 18:28
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting-investigations (Team:Threat Hunting:Investigations)

@elasticmachine
Copy link
Contributor

elasticmachine commented Apr 28, 2025

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Osquery Cypress Tests #5 / EcsMapping "before each" hook for "should hide and show ecs mappings on Advanced accordion click"
  • [job] [logs] Osquery Cypress Tests #5 / EcsMapping "before each" hook for "should properly show static values in form and results"

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 +313.0B

History

return <>{getOrEmptyTagFromValue(displayValue)}</>;
return (
<TruncatableText dataTestSubj={BASIC_CELL_RENDERER_TRUNCATE_TEST_ID}>
<EuiToolTip
Copy link
Contributor

@christineweng christineweng Apr 28, 2025

Choose a reason for hiding this comment

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

nit: there is a tooltipContent prop in TruncateableText, you can probably reuse that here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just tried and something is actually funky if you use the tooltipContent from the TruncateableText component.
Here's how it looks:

Screenshot 2025-04-28 at 3 24 41 PM

And here's with the current code

Screenshot 2025-04-28 at 3 25 11 PM

I wonder if that's why it was used like this in our current alerts table (which is where I stole the code from).

I'm going to keep the code I have for now. I don't want to make a change to the TruncateableText component as it's being used in a few places and some of them do use the tooltipContent prop....

@PhilippeOberti PhilippeOberti merged commit 7b3efa8 into elastic:main Apr 28, 2025
21 checks passed
@PhilippeOberti PhilippeOberti deleted the alert-summary-table-cell-truncate branch April 28, 2025 20:31
akowalska622 pushed a commit to akowalska622/kibana that referenced this pull request May 29, 2025
…ield/value pair in tooltip (elastic#219438)

## Summary

This PR fixes a small rendering issue in the AI4DSOC alert summary
alerts table (those changes will also be automatically applied to the
alerts table in the Cases and Attack discovery pages also for AI4DSOC).
The basic cell renderer (which renders all values outside of a couple of
selected custom renderers we have) was not truncating values, which
sometimes lead to weird renders, as seen in the video below.


https://github.com/user-attachments/assets/efcca0b7-5f0e-46d6-be85-85a9e824835c

This PR reuses the same logic used today in the Alerts page alerts
table: it truncates the values and show the field and value pairs in a
tooltip.


https://github.com/user-attachments/assets/3941ba38-1ecc-49d9-9989-20015f219677

## How to test

This needs to be ran in Serverless:
- `yarn es serverless --projectType security`
- `yarn serverless-security --no-base-path`

You also need to enable the AI for SOC tier, by adding the following to
your `serverless.security.dev.yaml` file:
```
xpack.securitySolutionServerless.productTypes:
  [
    { product_line: 'ai_soc', product_tier: 'search_ai_lake' },
  ]
```

Use one of these Serverless users:
- `platform_engineer`
- `endpoint_operations_analyst`
- `endpoint_policy_manager`
- `admin`
- `system_indices_superuser`

Then:
- generate data: `yarn test:generate:serverless-dev`
- create 4 catch all rules, each with a name of a AI for SOC integration
(`google_secops`, `microsoft_sentinel`,, `sentinel_one` and
`crowdstrike`) => to do that you'll need to temporary comment the
`serverless.security.dev.yaml` config changes as the rules page is not
accessible in AI for SOC.
- change [this
line](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/detections/hooks/alert_summary/use_fetch_integrations.ts#L73)
to `installedPackages: availablePackages` to force having some packages
installed

### 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

Relates to elastic/security-team#11973
PhilippeOberti added a commit to PhilippeOberti/kibana that referenced this pull request May 30, 2025
…ield/value pair in tooltip (elastic#219438)

## Summary

This PR fixes a small rendering issue in the AI4DSOC alert summary
alerts table (those changes will also be automatically applied to the
alerts table in the Cases and Attack discovery pages also for AI4DSOC).
The basic cell renderer (which renders all values outside of a couple of
selected custom renderers we have) was not truncating values, which
sometimes lead to weird renders, as seen in the video below.

https://github.com/user-attachments/assets/efcca0b7-5f0e-46d6-be85-85a9e824835c

This PR reuses the same logic used today in the Alerts page alerts
table: it truncates the values and show the field and value pairs in a
tooltip.

https://github.com/user-attachments/assets/3941ba38-1ecc-49d9-9989-20015f219677

## How to test

This needs to be ran in Serverless:
- `yarn es serverless --projectType security`
- `yarn serverless-security --no-base-path`

You also need to enable the AI for SOC tier, by adding the following to
your `serverless.security.dev.yaml` file:
```
xpack.securitySolutionServerless.productTypes:
  [
    { product_line: 'ai_soc', product_tier: 'search_ai_lake' },
  ]
```

Use one of these Serverless users:
- `platform_engineer`
- `endpoint_operations_analyst`
- `endpoint_policy_manager`
- `admin`
- `system_indices_superuser`

Then:
- generate data: `yarn test:generate:serverless-dev`
- create 4 catch all rules, each with a name of a AI for SOC integration
(`google_secops`, `microsoft_sentinel`,, `sentinel_one` and
`crowdstrike`) => to do that you'll need to temporary comment the
`serverless.security.dev.yaml` config changes as the rules page is not
accessible in AI for SOC.
- change [this
line](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/detections/hooks/alert_summary/use_fetch_integrations.ts#L73)
to `installedPackages: availablePackages` to force having some packages
installed

### 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

Relates to elastic/security-team#11973

(cherry picked from commit 7b3efa8)
PhilippeOberti added a commit to PhilippeOberti/kibana that referenced this pull request May 30, 2025
…ield/value pair in tooltip (elastic#219438)

## Summary

This PR fixes a small rendering issue in the AI4DSOC alert summary
alerts table (those changes will also be automatically applied to the
alerts table in the Cases and Attack discovery pages also for AI4DSOC).
The basic cell renderer (which renders all values outside of a couple of
selected custom renderers we have) was not truncating values, which
sometimes lead to weird renders, as seen in the video below.

https://github.com/user-attachments/assets/efcca0b7-5f0e-46d6-be85-85a9e824835c

This PR reuses the same logic used today in the Alerts page alerts
table: it truncates the values and show the field and value pairs in a
tooltip.

https://github.com/user-attachments/assets/3941ba38-1ecc-49d9-9989-20015f219677

## How to test

This needs to be ran in Serverless:
- `yarn es serverless --projectType security`
- `yarn serverless-security --no-base-path`

You also need to enable the AI for SOC tier, by adding the following to
your `serverless.security.dev.yaml` file:
```
xpack.securitySolutionServerless.productTypes:
  [
    { product_line: 'ai_soc', product_tier: 'search_ai_lake' },
  ]
```

Use one of these Serverless users:
- `platform_engineer`
- `endpoint_operations_analyst`
- `endpoint_policy_manager`
- `admin`
- `system_indices_superuser`

Then:
- generate data: `yarn test:generate:serverless-dev`
- create 4 catch all rules, each with a name of a AI for SOC integration
(`google_secops`, `microsoft_sentinel`,, `sentinel_one` and
`crowdstrike`) => to do that you'll need to temporary comment the
`serverless.security.dev.yaml` config changes as the rules page is not
accessible in AI for SOC.
- change [this
line](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/detections/hooks/alert_summary/use_fetch_integrations.ts#L73)
to `installedPackages: availablePackages` to force having some packages
installed

### 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

Relates to elastic/security-team#11973

(cherry picked from commit 7b3efa8)
PhilippeOberti added a commit to PhilippeOberti/kibana that referenced this pull request Jun 4, 2025
…ield/value pair in tooltip (elastic#219438)

## Summary

This PR fixes a small rendering issue in the AI4DSOC alert summary
alerts table (those changes will also be automatically applied to the
alerts table in the Cases and Attack discovery pages also for AI4DSOC).
The basic cell renderer (which renders all values outside of a couple of
selected custom renderers we have) was not truncating values, which
sometimes lead to weird renders, as seen in the video below.

https://github.com/user-attachments/assets/efcca0b7-5f0e-46d6-be85-85a9e824835c

This PR reuses the same logic used today in the Alerts page alerts
table: it truncates the values and show the field and value pairs in a
tooltip.

https://github.com/user-attachments/assets/3941ba38-1ecc-49d9-9989-20015f219677

## How to test

This needs to be ran in Serverless:
- `yarn es serverless --projectType security`
- `yarn serverless-security --no-base-path`

You also need to enable the AI for SOC tier, by adding the following to
your `serverless.security.dev.yaml` file:
```
xpack.securitySolutionServerless.productTypes:
  [
    { product_line: 'ai_soc', product_tier: 'search_ai_lake' },
  ]
```

Use one of these Serverless users:
- `platform_engineer`
- `endpoint_operations_analyst`
- `endpoint_policy_manager`
- `admin`
- `system_indices_superuser`

Then:
- generate data: `yarn test:generate:serverless-dev`
- create 4 catch all rules, each with a name of a AI for SOC integration
(`google_secops`, `microsoft_sentinel`,, `sentinel_one` and
`crowdstrike`) => to do that you'll need to temporary comment the
`serverless.security.dev.yaml` config changes as the rules page is not
accessible in AI for SOC.
- change [this
line](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/detections/hooks/alert_summary/use_fetch_integrations.ts#L73)
to `installedPackages: availablePackages` to force having some packages
installed

### 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

Relates to elastic/security-team#11973

(cherry picked from commit 7b3efa8)
PhilippeOberti added a commit to PhilippeOberti/kibana that referenced this pull request Jun 4, 2025
…ield/value pair in tooltip (elastic#219438)

## Summary

This PR fixes a small rendering issue in the AI4DSOC alert summary
alerts table (those changes will also be automatically applied to the
alerts table in the Cases and Attack discovery pages also for AI4DSOC).
The basic cell renderer (which renders all values outside of a couple of
selected custom renderers we have) was not truncating values, which
sometimes lead to weird renders, as seen in the video below.

https://github.com/user-attachments/assets/efcca0b7-5f0e-46d6-be85-85a9e824835c

This PR reuses the same logic used today in the Alerts page alerts
table: it truncates the values and show the field and value pairs in a
tooltip.

https://github.com/user-attachments/assets/3941ba38-1ecc-49d9-9989-20015f219677

## How to test

This needs to be ran in Serverless:
- `yarn es serverless --projectType security`
- `yarn serverless-security --no-base-path`

You also need to enable the AI for SOC tier, by adding the following to
your `serverless.security.dev.yaml` file:
```
xpack.securitySolutionServerless.productTypes:
  [
    { product_line: 'ai_soc', product_tier: 'search_ai_lake' },
  ]
```

Use one of these Serverless users:
- `platform_engineer`
- `endpoint_operations_analyst`
- `endpoint_policy_manager`
- `admin`
- `system_indices_superuser`

Then:
- generate data: `yarn test:generate:serverless-dev`
- create 4 catch all rules, each with a name of a AI for SOC integration
(`google_secops`, `microsoft_sentinel`,, `sentinel_one` and
`crowdstrike`) => to do that you'll need to temporary comment the
`serverless.security.dev.yaml` config changes as the rules page is not
accessible in AI for SOC.
- change [this
line](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/detections/hooks/alert_summary/use_fetch_integrations.ts#L73)
to `installedPackages: availablePackages` to force having some packages
installed

### 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

Relates to elastic/security-team#11973

(cherry picked from commit 7b3efa8)
PhilippeOberti added a commit that referenced this pull request Jun 4, 2025
…) (#222074)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[AI4DSOC] Alert summary page routing and initialization
(#214889)](#214889)
- [[AI4DSOC] Alert summary landing page
(#215246)](#215246)
- [[AI4DSOC] Alert summary dataview
(#215265)](#215265)
- [[AI4DSOC] Alert summary KQL bar
[#215586]](#215586)
- [[AI4DSOC] Alert summary KPI charts
[#215585]](#215585)
- [[AI4DSOR] Alert summary integrations section
[#215266]](#215266)
- [[AI4DSOC] Fix issue with filtering by integrations
[#216574]](#216574)
- [[AI4DSOC] Alert summary table setup
[#216744]](#216744)
- [Alerty summary table flyout setup
[#217421]](#217421)
- [[AI4DSOC] Alert summary alert actions in table and flyout
[#217696]](#217696)
- [[AI4DSOC] Alert summary table custom cell renderers
[#217124]](#217124)
- [[AI4DSOC] Alert summary table and flyout ai assistant
[#217744]](#217744)
- [[AI4DSOC] Alert summary page performance improvements
[#218632]](#218632)
- [[AI4DSOC] Change the Attack Discovery page to use the AI for SOC
alerts table [#218736]](#218736)
- [[AI4DSOC] Change the Cases page to use the AI for SOC alerts table
[#218742]](#218742)
- [[AI4DSOC] Fix spacing issue on alert summary landing page integration
card [#218868]](#218868)
- [[AI4DSOC][ResponseOps] Fix alerts table not handling undefined
maintenanceWindow capability
[#218999]](#218999)
- [[AI4DSOC] Fix link to the new integrations page
[#219030]](#219030)
- [[AI4DSOC] Disable CellActions and PreviewLinks on the Attack
discovery page [#219033]](#219033)
- [[AI4DSOC] Add cell renderer for datetime fields to the alert summary
table [#219126]](#219126)
- [[AI4DSOC] Remove Assistant icon from row action in alert summary
table [#219141]](#219141)
- [[AI4DSOC] Add checkboxes to the alert summary table
[#219169]](#219169)
- [[Security Solution][AI4DSOC] Fix table not applying alert tags for
Attack discovery and Cases pages in AI4DSOC
[#219410]](#219410)
- [[AI4DSOC] Fix logic that renders the group title when grouping by
integrations [#219430]](#219430)
- [[AI4DSOC] Alert summary table truncates long values and display the
field/value pair in tooltip
[#219438]](#219438)
- [[Security Solution] Fix alerts table potentially not applying alert
assignees [#219460]](#219460)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Security Generative AI Security Generative AI Team:Threat Hunting:Investigations Security Solution Threat Hunting Investigations Team v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants