mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[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) <!--- 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>
This commit is contained in:
parent
a5720abf72
commit
d46c147510
1 changed files with 5 additions and 1 deletions
|
@ -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<ExpandableEventTitleProps>(
|
|||
_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<ExpandableEventTitleProps>(
|
|||
)}
|
||||
{isAlert && alertDetailsLink && (
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiCopy textToCopy={alertDetailsLink}>
|
||||
<EuiCopy textToCopy={urlModifier(alertDetailsLink)}>
|
||||
{(copy) => (
|
||||
<EuiButtonEmpty
|
||||
onClick={copy}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue