Skip to content

Commit 5c457d1

Browse files
authored
[Security Solution][Resolver] Analyzed event styling (#77115)
1 parent 8f54c50 commit 5c457d1

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

x-pack/plugins/security_solution/public/resolver/view/assets.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ export const useResolverTheme = (): {
477477
),
478478
isLabelFilled: false,
479479
labelButtonFill: 'primary',
480-
strokeColor: `${theme.euiColorPrimary}33`, // 33 = 20% opacity
480+
strokeColor: theme.euiColorPrimary,
481481
},
482482
terminatedTriggerCube: {
483483
backingFill: colorMap.triggerBackingFill,
@@ -491,7 +491,7 @@ export const useResolverTheme = (): {
491491
),
492492
isLabelFilled: false,
493493
labelButtonFill: 'danger',
494-
strokeColor: `${theme.euiColorDanger}33`,
494+
strokeColor: theme.euiColorDanger,
495495
},
496496
};
497497

x-pack/plugins/security_solution/public/resolver/view/process_event_dot.tsx

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import React, { useCallback, useMemo } from 'react';
1010
import styled from 'styled-components';
1111
import { htmlIdGenerator, EuiButton, EuiI18nNumber, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
1212
import { useSelector } from 'react-redux';
13+
import { FormattedMessage } from '@kbn/i18n/react';
1314
import { NodeSubMenu, subMenuAssets } from './submenu';
1415
import { applyMatrix3 } from '../models/vector2';
1516
import { Vector2, Matrix3, ResolverState } from '../types';
@@ -119,6 +120,7 @@ const UnstyledProcessEventDot = React.memo(
119120
// Node (html id=) IDs
120121
const ariaActiveDescendant = useSelector(selectors.ariaActiveDescendant);
121122
const selectedNode = useSelector(selectors.selectedNode);
123+
const originID = useSelector(selectors.originID);
122124
const nodeID: string | undefined = eventModel.entityIDSafeVersion(event);
123125
if (nodeID === undefined) {
124126
// NB: this component should be taking nodeID as a `string` instead of handling this logic here
@@ -231,6 +233,7 @@ const UnstyledProcessEventDot = React.memo(
231233

232234
const isAriaCurrent = nodeID === ariaActiveDescendant;
233235
const isAriaSelected = nodeID === selectedNode;
236+
const isOrigin = nodeID === originID;
234237

235238
const dispatch = useResolverDispatch();
236239

@@ -359,6 +362,20 @@ const UnstyledProcessEventDot = React.memo(
359362
height={markerSize * 1.5}
360363
className="backing"
361364
/>
365+
{isOrigin && (
366+
<use
367+
xlinkHref={`#${SymbolIds.processCubeActiveBacking}`}
368+
fill="transparent" // Transparent so we don't double up on the default hover
369+
x={-15.35}
370+
y={-15.35}
371+
stroke={strokeColor}
372+
strokeOpacity={0.35}
373+
strokeDashoffset={0}
374+
width={markerSize * 1.5}
375+
height={markerSize * 1.5}
376+
className="origin"
377+
/>
378+
)}
362379
<use
363380
role="presentation"
364381
xlinkHref={cubeSymbol}
@@ -392,7 +409,14 @@ const UnstyledProcessEventDot = React.memo(
392409
color={colorMap.descriptionText}
393410
isDisplaying={isShowingDescriptionText}
394411
>
395-
{descriptionText}
412+
<FormattedMessage
413+
id="xpack.securitySolution.endpoint.resolver.processDescription"
414+
defaultMessage="{originText}{descriptionText}"
415+
values={{
416+
originText: isOrigin ? 'Analyzed Event · ' : '',
417+
descriptionText,
418+
}}
419+
/>
396420
</StyledDescriptionText>
397421
<div
398422
className={xScale >= 2 ? 'euiButton' : 'euiButton euiButton--small'}

0 commit comments

Comments
 (0)