Skip to content

Commit

Permalink
[8.12] [SentinelOne] Fix Agent status on Timeline Alert details (#176210
Browse files Browse the repository at this point in the history
) (#176663)

# Backport

This will backport the following commits from `main` to `8.12`:
- [[SentinelOne] Fix Agent status on Timeline Alert details
(#176210)](#176210)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Patryk
Kopyciński","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-02-10T12:28:32Z","message":"[SentinelOne]
Fix Agent status on Timeline Alert details (#176210)\n\n## Summary\r\n
\r\nFixes #174235 \r\n\r\n<img
width=\"1906\" alt=\"Zrzut ekranu 2024-02-5 o 11 54
15\"\r\nsrc=\"https://github.com/elastic/kibana/assets/5188868/5f40dc64-c0fc-4fbf-b4b9-d8ee6e75c890\">\r\n\r\n<img
width=\"1910\" alt=\"Zrzut ekranu 2024-02-5 o 11 53
53\"\r\nsrc=\"https://github.com/elastic/kibana/assets/5188868/425efd0b-242e-4bb7-b034-13b34c1dde44\">\r\n\r\nCo-authored-by:
Ash
<[email protected]>","sha":"361398cd9d8af89210dfb8c70dd0631e22ec5beb","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","OLM
Sprint","v8.13.0","v8.12.2"],"number":176210,"url":"https://github.com/elastic/kibana/pull/176210","mergeCommit":{"message":"[SentinelOne]
Fix Agent status on Timeline Alert details (#176210)\n\n## Summary\r\n
\r\nFixes #174235 \r\n\r\n<img
width=\"1906\" alt=\"Zrzut ekranu 2024-02-5 o 11 54
15\"\r\nsrc=\"https://github.com/elastic/kibana/assets/5188868/5f40dc64-c0fc-4fbf-b4b9-d8ee6e75c890\">\r\n\r\n<img
width=\"1910\" alt=\"Zrzut ekranu 2024-02-5 o 11 53
53\"\r\nsrc=\"https://github.com/elastic/kibana/assets/5188868/425efd0b-242e-4bb7-b034-13b34c1dde44\">\r\n\r\nCo-authored-by:
Ash
<[email protected]>","sha":"361398cd9d8af89210dfb8c70dd0631e22ec5beb"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/176210","number":176210,"mergeCommit":{"message":"[SentinelOne]
Fix Agent status on Timeline Alert details (#176210)\n\n## Summary\r\n
\r\nFixes #174235 \r\n\r\n<img
width=\"1906\" alt=\"Zrzut ekranu 2024-02-5 o 11 54
15\"\r\nsrc=\"https://github.com/elastic/kibana/assets/5188868/5f40dc64-c0fc-4fbf-b4b9-d8ee6e75c890\">\r\n\r\n<img
width=\"1910\" alt=\"Zrzut ekranu 2024-02-5 o 11 53
53\"\r\nsrc=\"https://github.com/elastic/kibana/assets/5188868/425efd0b-242e-4bb7-b034-13b34c1dde44\">\r\n\r\nCo-authored-by:
Ash
<[email protected]>","sha":"361398cd9d8af89210dfb8c70dd0631e22ec5beb"}},{"branch":"8.12","label":"v8.12.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Patryk Kopyciński <[email protected]>
  • Loading branch information
ashokaditya and patrykkopycinski authored Feb 12, 2024
1 parent 916aaf6 commit 3bc8190
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export const FieldValueCell = React.memo(
eventId={eventId}
fieldFormat={data.format}
fieldName={data.field}
fieldFromBrowserField={fieldFromBrowserField}
fieldType={data.type}
isAggregatable={fieldFromBrowserField.aggregatable}
isDraggable={isDraggable}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui';
import { isNumber, isEmpty } from 'lodash/fp';
import React from 'react';

import type { BrowserField } from '../../../../../common/containers/source';
import { SENTINEL_ONE_AGENT_ID_FIELD } from '../../../../../common/utils/sentinelone_alert_check';
import { SentinelOneAgentStatus } from '../../../../../detections/components/host_isolation/sentinel_one_agent_status';
import { EndpointAgentStatusById } from '../../../../../common/components/endpoint/endpoint_agent_status';
Expand Down Expand Up @@ -57,6 +58,7 @@ const FormattedFieldValueComponent: React.FC<{
isAggregatable?: boolean;
isObjectArray?: boolean;
fieldFormat?: string;
fieldFromBrowserField?: BrowserField;
fieldName: string;
fieldType?: string;
isButton?: boolean;
Expand All @@ -76,6 +78,7 @@ const FormattedFieldValueComponent: React.FC<{
isAggregatable = false,
fieldName,
fieldType = '',
fieldFromBrowserField,
isButton,
isObjectArray = false,
isDraggable = true,
Expand Down Expand Up @@ -240,15 +243,18 @@ const FormattedFieldValueComponent: React.FC<{
iconSide={isButton ? 'right' : undefined}
/>
);
} else if (
fieldName === SENTINEL_ONE_AGENT_ID_FIELD ||
fieldFromBrowserField?.name === SENTINEL_ONE_AGENT_ID_FIELD
) {
return <SentinelOneAgentStatus agentId={String(value ?? '')} />;
} else if (fieldName === AGENT_STATUS_FIELD_NAME) {
return (
<EndpointAgentStatusById
endpointAgentId={String(value ?? '')}
data-test-subj="endpointHostAgentStatus"
/>
);
} else if (fieldName === SENTINEL_ONE_AGENT_ID_FIELD) {
return <SentinelOneAgentStatus agentId={String(value ?? '')} />;
} else if (
[
RULE_REFERENCE_FIELD_NAME,
Expand Down

0 comments on commit 3bc8190

Please sign in to comment.