Skip to content

Commit 428eed5

Browse files
[8.x] [Security Solution][Document Flyout] Fix toggle column missing in timeline (#200647) (#200662)
# Backport This will backport the following commits from `main` to `8.x`: - [[Security Solution][Document Flyout] Fix toggle column missing in timeline (#200647)](#200647) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"christineweng","email":"18648970+christineweng@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-11-18T23:44:43Z","message":"[Security Solution][Document Flyout] Fix toggle column missing in timeline (#200647)\n\n## Summary\r\n\r\nRelated: https://github.com/elastic/kibana/issues/200046\r\n\r\nReenabling toggle columns for events. It was mistakenly excluded in\r\n[this\r\nrefactor](https://github.com/elastic/kibana/pull/190560/files#diff-d9edcdb9ad0f231269f791e8392d2d0fe1d10105c223c89d9f86e546972bc342)\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/e787c227-f167-4f3a-a0e0-d1ac1ad45670)","sha":"467d7370ad5eafda73a8a6ff39deb29709ade5ae","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["backport","release_note:fix","v9.0.0","Team:Threat Hunting","Team:Threat Hunting:Investigations","v8.17.0","v8.16.1"],"title":"[Security Solution][Document Flyout] Fix toggle column missing in timeline","number":200647,"url":"https://github.com/elastic/kibana/pull/200647","mergeCommit":{"message":"[Security Solution][Document Flyout] Fix toggle column missing in timeline (#200647)\n\n## Summary\r\n\r\nRelated: https://github.com/elastic/kibana/issues/200046\r\n\r\nReenabling toggle columns for events. It was mistakenly excluded in\r\n[this\r\nrefactor](https://github.com/elastic/kibana/pull/190560/files#diff-d9edcdb9ad0f231269f791e8392d2d0fe1d10105c223c89d9f86e546972bc342)\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/e787c227-f167-4f3a-a0e0-d1ac1ad45670)","sha":"467d7370ad5eafda73a8a6ff39deb29709ade5ae"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/200647","number":200647,"mergeCommit":{"message":"[Security Solution][Document Flyout] Fix toggle column missing in timeline (#200647)\n\n## Summary\r\n\r\nRelated: https://github.com/elastic/kibana/issues/200046\r\n\r\nReenabling toggle columns for events. It was mistakenly excluded in\r\n[this\r\nrefactor](https://github.com/elastic/kibana/pull/190560/files#diff-d9edcdb9ad0f231269f791e8392d2d0fe1d10105c223c89d9f86e546972bc342)\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/e787c227-f167-4f3a-a0e0-d1ac1ad45670)","sha":"467d7370ad5eafda73a8a6ff39deb29709ade5ae"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: christineweng <18648970+christineweng@users.noreply.github.com>
1 parent 1e5dba6 commit 428eed5

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

  • x-pack/plugins/security_solution/public/flyout/document_details/shared/components

x-pack/plugins/security_solution/public/flyout/document_details/shared/components/cell_actions.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import type { FC } from 'react';
99
import React, { useMemo } from 'react';
1010
import { useDocumentDetailsContext } from '../context';
1111
import { getSourcererScopeId } from '../../../../helpers';
12-
import { useBasicDataFromDetailsData } from '../hooks/use_basic_data_from_details_data';
1312
import { SecurityCellActionType } from '../../../../app/actions/constants';
1413
import {
1514
CellActionsMode,
@@ -40,12 +39,7 @@ interface CellActionsProps {
4039
* Security cell action wrapper for document details flyout
4140
*/
4241
export const CellActions: FC<CellActionsProps> = ({ field, value, isObjectArray, children }) => {
43-
const { dataFormattedForFieldBrowser, scopeId, isPreview } = useDocumentDetailsContext();
44-
const { isAlert } = useBasicDataFromDetailsData(dataFormattedForFieldBrowser);
45-
46-
const triggerId = isAlert
47-
? SecurityCellActionsTrigger.DETAILS_FLYOUT
48-
: SecurityCellActionsTrigger.DEFAULT;
42+
const { scopeId, isPreview } = useDocumentDetailsContext();
4943

5044
const data = useMemo(() => ({ field, value }), [field, value]);
5145
const metadata = useMemo(() => ({ scopeId, isObjectArray }), [scopeId, isObjectArray]);
@@ -58,7 +52,7 @@ export const CellActions: FC<CellActionsProps> = ({ field, value, isObjectArray,
5852
<SecurityCellActions
5953
data={data}
6054
mode={CellActionsMode.HOVER_DOWN}
61-
triggerId={triggerId}
55+
triggerId={SecurityCellActionsTrigger.DETAILS_FLYOUT}
6256
visibleCellActions={6}
6357
sourcererScopeId={getSourcererScopeId(scopeId)}
6458
metadata={metadata}

0 commit comments

Comments
 (0)