mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Security Solution] Adds read only prop to preview table details flyout threat summary (#138665)
This commit is contained in:
parent
1c59a09965
commit
cb0ca889a9
3 changed files with 20 additions and 3 deletions
|
@ -33,6 +33,7 @@ export interface ThreatSummaryDescription {
|
|||
timelineId: string;
|
||||
value: string | undefined;
|
||||
isDraggable?: boolean;
|
||||
isReadOnly?: boolean;
|
||||
}
|
||||
|
||||
const EnrichmentFieldFeedName = styled.span`
|
||||
|
@ -65,6 +66,7 @@ const EnrichmentDescription: React.FC<ThreatSummaryDescription> = ({
|
|||
timelineId,
|
||||
value,
|
||||
isDraggable,
|
||||
isReadOnly,
|
||||
}) => {
|
||||
if (!data || !value) return null;
|
||||
const key = `alert-details-value-formatted-field-value-${timelineId}-${eventId}-${data.field}-${value}-${index}-${feedName}`;
|
||||
|
@ -92,7 +94,7 @@ const EnrichmentDescription: React.FC<ThreatSummaryDescription> = ({
|
|||
</div>
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem>
|
||||
{value && (
|
||||
{value && !isReadOnly && (
|
||||
<ActionCell
|
||||
data={data}
|
||||
contextId={timelineId}
|
||||
|
@ -115,7 +117,8 @@ const EnrichmentSummaryComponent: React.FC<{
|
|||
timelineId: string;
|
||||
eventId: string;
|
||||
isDraggable?: boolean;
|
||||
}> = ({ browserFields, data, enrichments, timelineId, eventId, isDraggable }) => {
|
||||
isReadOnly?: boolean;
|
||||
}> = ({ browserFields, data, enrichments, timelineId, eventId, isDraggable, isReadOnly }) => {
|
||||
const parsedEnrichments = enrichments.map((enrichment, index) => {
|
||||
const { field, type, feedName, value } = getEnrichmentIdentifiers(enrichment);
|
||||
const eventData = data.find((item) => item.field === field);
|
||||
|
@ -168,6 +171,7 @@ const EnrichmentSummaryComponent: React.FC<{
|
|||
data={fieldsData}
|
||||
browserField={browserField}
|
||||
isDraggable={isDraggable}
|
||||
isReadOnly={isReadOnly}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
@ -198,6 +202,7 @@ const EnrichmentSummaryComponent: React.FC<{
|
|||
data={fieldsData}
|
||||
browserField={browserField}
|
||||
isDraggable={isDraggable}
|
||||
isReadOnly={isReadOnly}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
|
|
@ -127,7 +127,17 @@ const ThreatSummaryViewComponent: React.FC<{
|
|||
timelineId: string;
|
||||
hostRisk: HostRisk | null;
|
||||
isDraggable?: boolean;
|
||||
}> = ({ browserFields, data, enrichments, eventId, timelineId, hostRisk, isDraggable }) => {
|
||||
isReadOnly?: boolean;
|
||||
}> = ({
|
||||
browserFields,
|
||||
data,
|
||||
enrichments,
|
||||
eventId,
|
||||
timelineId,
|
||||
hostRisk,
|
||||
isDraggable,
|
||||
isReadOnly,
|
||||
}) => {
|
||||
if (!hostRisk && enrichments.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
@ -155,6 +165,7 @@ const ThreatSummaryViewComponent: React.FC<{
|
|||
timelineId={timelineId}
|
||||
eventId={eventId}
|
||||
isDraggable={isDraggable}
|
||||
isReadOnly={isReadOnly}
|
||||
/>
|
||||
</EuiFlexGroup>
|
||||
</>
|
||||
|
|
|
@ -202,6 +202,7 @@ const EventDetailsComponent: React.FC<Props> = ({
|
|||
eventId={id}
|
||||
timelineId={timelineId}
|
||||
enrichments={allEnrichments}
|
||||
isReadOnly={isReadOnly}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue