mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[Security Solution][Timeline] fix share alert not working with alert details expandable flyout (#174005)
This commit is contained in:
parent
4df6951882
commit
ea35c5343c
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