Skip to content

[9.0] [Security Solution][Alert details] save selected prevalence time to local storage (#243543)#243868

Closed
PhilippeOberti wants to merge 1 commit into
elastic:9.0from
PhilippeOberti:backport/9.0/pr-243543
Closed

[9.0] [Security Solution][Alert details] save selected prevalence time to local storage (#243543)#243868
PhilippeOberti wants to merge 1 commit into
elastic:9.0from
PhilippeOberti:backport/9.0/pr-243543

Conversation

@PhilippeOberti
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 9.0:

Questions ?

Please refer to the Backport tool documentation

…ocal storage (elastic#243543)

## Summary

This PR makes a small improvement to the alert details flyout, by saving
the time selected by the user in the expanded section prevalence details
to local storage.

- If no value is present in local storage, we default to the value we
had before, which is `Last 30 days`.
- When the user selects a new interval in the flyout expanded section
Insights => Prevalence tab, we persist that value in local storage under
the `securitySolution.documentDetailsFlyout.prevalenceInterval` key. We
save the `start` and `end` values.
- We apply those saved `start` and `end` values both to the prevalence
details (expanded flyout tab) and prevalence overview (collapsed flyout)
components.

https://github.com/user-attachments/assets/c8e3ed00-e696-45e4-b45c-f90deb285ece

We add a tooltip to let the user know that the prevalence overview (in
the right panel) fetches prevalence data for the interval set within the
expanded section

| Default time range  | If time range has been saved in local storage |
| ------------- | ------------- |
| <img width="573" height="805" alt="Screenshot 2025-11-20 at 10 10
37 PM"
src="https://github.com/user-attachments/assets/80dc5f74-31d7-4e93-a06d-8fb0a3d546b6"
/> | <img width="571" height="805" alt="Screenshot 2025-11-20 at 10 11
16 PM"
src="https://github.com/user-attachments/assets/8cbf34b4-93ad-4a9e-9ed4-45c78310cbdd"
/> |

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

(cherry picked from commit d417fc9)

# Conflicts:
#	x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/prevalence_overview.test.tsx
#	x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/shared/constants/local_storage.ts
@PhilippeOberti PhilippeOberti added the backport This PR is a backport of another PR label Nov 21, 2025
@PhilippeOberti PhilippeOberti enabled auto-merge (squash) November 21, 2025 16:37
@elasticmachine
Copy link
Copy Markdown
Contributor

CI was triggered for this PR, but this PR targets 9.0 which should not receive a future release. CI is not supported for these branches. Please consult the release schedule, or contact #kibana-operations if you believe this is an error.

The following branches are currently considered to be open:

  • main
  • 9.2
  • 9.1
  • 8.19
  • 7.17

1 similar comment
@elasticmachine
Copy link
Copy Markdown
Contributor

CI was triggered for this PR, but this PR targets 9.0 which should not receive a future release. CI is not supported for these branches. Please consult the release schedule, or contact #kibana-operations if you believe this is an error.

The following branches are currently considered to be open:

  • main
  • 9.2
  • 9.1
  • 8.19
  • 7.17

auto-merge was automatically disabled November 21, 2025 20:02

Pull request was closed

@PhilippeOberti PhilippeOberti deleted the backport/9.0/pr-243543 branch November 21, 2025 20:02
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