From d46c14751061ed8669a98338acdbbaf4703cf642 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Tue, 2 Jan 2024 12:17:06 -0500 Subject: [PATCH] [8.12] [Security Solution][Timeline] fix share alert not working with 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)](https://github.com/elastic/kibana/pull/174005) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Philippe Oberti --- .../side_panel/event_details/expandable_event.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/expandable_event.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/expandable_event.tsx index 2b195eb11fe3c..2d4d493c5f8ca 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/expandable_event.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/expandable_event.tsx @@ -24,6 +24,7 @@ import styled from 'styled-components'; import { ALERT_WORKFLOW_ASSIGNEE_IDS } from '@kbn/rule-data-utils'; import { TableId } from '@kbn/securitysolution-data-table'; +import { URL_PARAM_KEY } from '../../../../common/hooks/use_url_state'; import type { GetFieldsData } from '../../../../common/hooks/use_get_fields_data'; import { Assignees } from '../../../../flyout/document_details/right/components/assignees'; import { useAssistantAvailability } from '../../../../assistant/use_assistant_availability'; @@ -107,6 +108,9 @@ export const ExpandableEventTitle = React.memo( _index: eventIndex, timestamp, }); + const urlModifier = (value: string) => { + return `${value}&${URL_PARAM_KEY.eventFlyout}=(preview:!(),rightPanel:(id:document-details-right,params:(id:${eventId},indexName:${eventIndex},scopeId:${scopeId})))`; + }; const { refetch } = useRefetchByScope({ scopeId }); const alertAssignees = useMemo( @@ -160,7 +164,7 @@ export const ExpandableEventTitle = React.memo( )} {isAlert && alertDetailsLink && ( - + {(copy) => (