Skip to content

Commit

Permalink
[SentinelOne] Fix Agent status on Timeline Alert details
Browse files Browse the repository at this point in the history
  • Loading branch information
patrykkopycinski committed Feb 5, 2024
1 parent ae499c3 commit 0083a18
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 @@ -13,6 +13,7 @@ import { isNumber, isEmpty } from 'lodash/fp';
import React from 'react';
import { css } from '@emotion/css';

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 @@ -65,6 +66,7 @@ const FormattedFieldValueComponent: React.FC<{
isAggregatable?: boolean;
isObjectArray?: boolean;
fieldFormat?: string;
fieldFromBrowserField?: BrowserField;
fieldName: string;
fieldType?: string;
isButton?: boolean;
Expand All @@ -84,6 +86,7 @@ const FormattedFieldValueComponent: React.FC<{
isAggregatable = false,
fieldName,
fieldType = '',
fieldFromBrowserField,
isButton,
isObjectArray = false,
isDraggable = true,
Expand Down Expand Up @@ -256,15 +259,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 0083a18

Please sign in to comment.