mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[Security Solution] - Fix boolean check for threat intel summary view (#143534)
* update boolean to show threat intel data * pr review
This commit is contained in:
parent
4e3461a9b6
commit
2b11ca723e
1 changed files with 20 additions and 16 deletions
|
@ -179,6 +179,12 @@ const EventDetailsComponent: React.FC<Props> = ({
|
|||
[detailsEcsData]
|
||||
);
|
||||
|
||||
const showThreatSummary = useMemo(() => {
|
||||
const hasEnrichments = enrichmentCount > 0;
|
||||
const hasRiskInfoWithLicense = isLicenseValid && (hostRisk || userRisk);
|
||||
return hasEnrichments || hasRiskInfoWithLicense;
|
||||
}, [enrichmentCount, hostRisk, isLicenseValid, userRisk]);
|
||||
|
||||
const summaryTab: EventViewTab | undefined = useMemo(
|
||||
() =>
|
||||
isAlert
|
||||
|
@ -237,20 +243,19 @@ const EventDetailsComponent: React.FC<Props> = ({
|
|||
isReadOnly={isReadOnly}
|
||||
/>
|
||||
|
||||
{enrichmentCount > 0 ||
|
||||
(isLicenseValid && (hostRisk || userRisk) && (
|
||||
<ThreatSummaryView
|
||||
isDraggable={isDraggable}
|
||||
hostRisk={hostRisk}
|
||||
userRisk={userRisk}
|
||||
browserFields={browserFields}
|
||||
data={data}
|
||||
eventId={id}
|
||||
timelineId={timelineId}
|
||||
enrichments={allEnrichments}
|
||||
isReadOnly={isReadOnly}
|
||||
/>
|
||||
))}
|
||||
{showThreatSummary && (
|
||||
<ThreatSummaryView
|
||||
isDraggable={isDraggable}
|
||||
hostRisk={hostRisk}
|
||||
userRisk={userRisk}
|
||||
browserFields={browserFields}
|
||||
data={data}
|
||||
eventId={id}
|
||||
timelineId={timelineId}
|
||||
enrichments={allEnrichments}
|
||||
isReadOnly={isReadOnly}
|
||||
/>
|
||||
)}
|
||||
|
||||
{isEnrichmentsLoading && (
|
||||
<>
|
||||
|
@ -268,7 +273,6 @@ const EventDetailsComponent: React.FC<Props> = ({
|
|||
browserFields,
|
||||
data,
|
||||
detailsEcsData,
|
||||
enrichmentCount,
|
||||
goToTableTab,
|
||||
handleOnEventClosed,
|
||||
hostRisk,
|
||||
|
@ -277,7 +281,7 @@ const EventDetailsComponent: React.FC<Props> = ({
|
|||
isAlert,
|
||||
isDraggable,
|
||||
isEnrichmentsLoading,
|
||||
isLicenseValid,
|
||||
showThreatSummary,
|
||||
isReadOnly,
|
||||
renderer,
|
||||
timelineId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue