Skip to content

[Security Solution][Timeline] fix share alert not working with alert details expandable flyout#174005

Merged
PhilippeOberti merged 4 commits intoelastic:mainfrom
PhilippeOberti:fix-timeline-share-alert
Jan 2, 2024
Merged

[Security Solution][Timeline] fix share alert not working with alert details expandable flyout#174005
PhilippeOberti merged 4 commits intoelastic:mainfrom
PhilippeOberti:fix-timeline-share-alert

Conversation

@PhilippeOberti
Copy link
Copy Markdown
Contributor

@PhilippeOberti PhilippeOberti commented Dec 27, 2023

Summary

This PR fixes an issue with the Share alert functionality within timeline. We introduced a different of managing the state of the new alert details expandable flyout in this previous PR, where we read all information from the url.
When clicking on the Share alert button in timeline, there is no flyout information in the url yet, so the values that are added to the link that is being copied does not contain he correct information to reopen the expandable flyout in the new tab.

While the implementation for this fix is pretty basic and might not be the fanciest, it is robust and safe. I decided to not add any unit tests for this for 2 reasons:

  • there aren't any existing uni tests for his file
  • his code will be very soon deleted as we will be using the new expandable flyout everywhere (indluding in timeline)

I verified that the fix is working with the old flyout as well as the new flyout.

From timeline - old flyout:

Screen.Recording.2023-12-27.at.4.02.01.PM.mov

From timeline - new flyout:

Screen.Recording.2023-12-27.at.4.02.41.PM.mov

I also verified the functionality of the Share alert from the expandable flyout is still working correctly (just to be safe, the code change didn't impact this so there was no reason for it to not work...)

Screen.Recording.2023-12-27.at.4.03.08.PM.mov

Fixes #173956

@kibana-ci
Copy link
Copy Markdown

💚 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 11.3MB 11.3MB +143.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@PhilippeOberti PhilippeOberti merged commit ea35c53 into elastic:main Jan 2, 2024
@PhilippeOberti PhilippeOberti deleted the fix-timeline-share-alert branch January 2, 2024 15:39
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 2, 2024
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
8.12

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jan 2, 2024
… alert details expandable flyout (#174005) (#174094)

# Backport

This will backport the following commits from `main` to `8.12`:
- [[Security Solution][Timeline] fix share alert not working with alert
details expandable flyout
(#174005)](#174005)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Philippe
Oberti","email":"philippe.oberti@elastic.co"},"sourceCommit":{"committedDate":"2024-01-02T15:38:58Z","message":"[Security
Solution][Timeline] fix share alert not working with alert details
expandable flyout
(#174005)","sha":"ea35c5343c1477e7a9eb8c68811c86a6042aa6f6","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Threat
Hunting:Investigations","v8.12.1","v8.13.0"],"title":"[Security
Solution][Timeline] fix share alert not working with alert details
expandable
flyout","number":174005,"url":"https://github.com/elastic/kibana/pull/174005","mergeCommit":{"message":"[Security
Solution][Timeline] fix share alert not working with alert details
expandable flyout
(#174005)","sha":"ea35c5343c1477e7a9eb8c68811c86a6042aa6f6"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","branchLabelMappingKey":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/174005","number":174005,"mergeCommit":{"message":"[Security
Solution][Timeline] fix share alert not working with alert details
expandable flyout
(#174005)","sha":"ea35c5343c1477e7a9eb8c68811c86a6042aa6f6"}}]}]
BACKPORT-->

Co-authored-by: Philippe Oberti <philippe.oberti@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Security Solution]Share alert fly out not opens up from timeline

4 participants