Skip to content

Commit

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

## Summary
 
Fixes elastic#174235 

<img width="1906" alt="Zrzut ekranu 2024-02-5 o 11 54 15"
src="https://github.com/elastic/kibana/assets/5188868/5f40dc64-c0fc-4fbf-b4b9-d8ee6e75c890">

<img width="1910" alt="Zrzut ekranu 2024-02-5 o 11 53 53"
src="https://github.com/elastic/kibana/assets/5188868/425efd0b-242e-4bb7-b034-13b34c1dde44">

Co-authored-by: Ash <1849116+ashokaditya@users.noreply.github.com>
  • Loading branch information
2 people authored and CoenWarmer committed Feb 15, 2024
1 parent 4447390 commit 80261bd
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 {
ALERT_HOST_CRITICALITY,
ALERT_USER_CRITICALITY,
Expand Down Expand Up @@ -70,6 +71,7 @@ const FormattedFieldValueComponent: React.FC<{
isAggregatable?: boolean;
isObjectArray?: boolean;
fieldFormat?: string;
fieldFromBrowserField?: BrowserField;
fieldName: string;
fieldType?: string;
isButton?: boolean;
Expand All @@ -89,6 +91,7 @@ const FormattedFieldValueComponent: React.FC<{
isAggregatable = false,
fieldName,
fieldType = '',
fieldFromBrowserField,
isButton,
isObjectArray = false,
isDraggable = true,
Expand Down Expand Up @@ -261,6 +264,11 @@ 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 === ALERT_HOST_CRITICALITY || fieldName === ALERT_USER_CRITICALITY) {
return (
<AssetCriticalityLevel
Expand All @@ -280,8 +288,6 @@ const FormattedFieldValueComponent: React.FC<{
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 80261bd

Please sign in to comment.