-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Security Solution][Resolver] Analyzed event styling #77115
Changes from all commits
608adce
57210a9
bf968e1
595c484
eabe8c1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ import React, { useCallback, useMemo } from 'react'; | |
import styled from 'styled-components'; | ||
import { htmlIdGenerator, EuiButton, EuiI18nNumber, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; | ||
import { useSelector } from 'react-redux'; | ||
import { FormattedMessage } from '@kbn/i18n/react'; | ||
import { NodeSubMenu, subMenuAssets } from './submenu'; | ||
import { applyMatrix3 } from '../models/vector2'; | ||
import { Vector2, Matrix3, ResolverState } from '../types'; | ||
|
@@ -119,6 +120,7 @@ const UnstyledProcessEventDot = React.memo( | |
// Node (html id=) IDs | ||
const ariaActiveDescendant = useSelector(selectors.ariaActiveDescendant); | ||
const selectedNode = useSelector(selectors.selectedNode); | ||
const originID = useSelector(selectors.originID); | ||
const nodeID: string | undefined = eventModel.entityIDSafeVersion(event); | ||
if (nodeID === undefined) { | ||
// NB: this component should be taking nodeID as a `string` instead of handling this logic here | ||
|
@@ -231,6 +233,7 @@ const UnstyledProcessEventDot = React.memo( | |
|
||
const isAriaCurrent = nodeID === ariaActiveDescendant; | ||
const isAriaSelected = nodeID === selectedNode; | ||
const isOrigin = nodeID === originID; | ||
|
||
const dispatch = useResolverDispatch(); | ||
|
||
|
@@ -359,6 +362,20 @@ const UnstyledProcessEventDot = React.memo( | |
height={markerSize * 1.5} | ||
className="backing" | ||
/> | ||
{isOrigin && ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added a second backing layer for the origin rather than modifying the existing one to maintain the outline effect on top of the more translucent line. If there is a better way to do this lmk. |
||
<use | ||
xlinkHref={`#${SymbolIds.processCubeActiveBacking}`} | ||
fill="transparent" // Transparent so we don't double up on the default hover | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ℹ️ Does this make it through the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, so I guess the fill does get through the boundary using the presentation attribute on the outer |
||
x={-15.35} | ||
y={-15.35} | ||
stroke={strokeColor} | ||
strokeOpacity={0.35} | ||
strokeDashoffset={0} | ||
width={markerSize * 1.5} | ||
height={markerSize * 1.5} | ||
className="origin" | ||
/> | ||
)} | ||
<use | ||
role="presentation" | ||
xlinkHref={cubeSymbol} | ||
|
@@ -392,7 +409,14 @@ const UnstyledProcessEventDot = React.memo( | |
color={colorMap.descriptionText} | ||
isDisplaying={isShowingDescriptionText} | ||
> | ||
{descriptionText} | ||
<FormattedMessage | ||
id="xpack.securitySolution.endpoint.resolver.processDescription" | ||
defaultMessage="{originText}{descriptionText}" | ||
values={{ | ||
originText: isOrigin ? 'Analyzed Event · ' : '', | ||
descriptionText, | ||
}} | ||
/> | ||
</StyledDescriptionText> | ||
<div | ||
className={xScale >= 2 ? 'euiButton' : 'euiButton euiButton--small'} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maintaining the same outline color since the more translucent outline now signifies the analyzed event