diff --git a/x-pack/plugins/security_solution/public/resolver/view/process_event_dot.tsx b/x-pack/plugins/security_solution/public/resolver/view/process_event_dot.tsx index 05f2e0cbfcfa9..b84edae20da84 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/process_event_dot.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/process_event_dot.tsx @@ -32,11 +32,13 @@ const StyledActionsContainer = styled.div` color: ${(props) => props.color}; display: flex; flex-flow: column; + /* TODO, remove from class */ font-size: ${(props) => `${props.fontSize}px`}; left: 20.9%; line-height: 140%; padding: 0.25rem 0 0 0.1rem; position: absolute; + /* TODO, remove from class */ top: ${(props) => `${props.topPct}%`}; width: auto; `; @@ -47,21 +49,6 @@ interface StyledDescriptionText { readonly isDisplaying: boolean; } -const StyledDescriptionText = styled.div` - background-color: ${(props) => props.backgroundColor}; - color: ${(props) => props.color}; - display: ${(props) => (props.isDisplaying ? 'block' : 'none')}; - font-size: 0.8rem; - font-weight: bold; - letter-spacing: -0.01px; - line-height: 1; - margin: 0; - padding: 4px 0 0 2px; - text-align: left; - text-transform: uppercase; - width: fit-content; -`; - /** * An artifact that represents a process node and the things associated with it in the Resolver */ @@ -136,6 +123,7 @@ const UnstyledProcessEventDot = React.memo( /** * As the resolver zooms and buttons and text change visibility, we look to keep the overall container properly vertically aligned */ + // TODO, fix this. use css for alignment const actionableButtonsTopOffset = (isShowingEventActions ? 3.5 : isShowingDescriptionText ? 1 : 21) * xScale + 5; @@ -152,6 +140,7 @@ const UnstyledProcessEventDot = React.memo( /** * As the scale changes and button visibility toggles on the graph, these offsets help scale to keep the nodes centered on the edge */ + // TODO, fix this. use CSS for alignment const nodeXOffsetValue = isShowingEventActions ? -0.147413 : -0.147413 - (xScale - 0.5) * 0.08; const nodeYOffsetValue = isShowingEventActions ? -0.53684 @@ -256,6 +245,7 @@ const UnstyledProcessEventDot = React.memo( * e.g. "10 DNS", "230 File" */ + // TODO AFTER 7.9, move this into `NodeSubMenu` const relatedEventOptions = useMemo(() => { const relatedStatsList = []; @@ -297,8 +287,12 @@ const UnstyledProcessEventDot = React.memo( */ return (
` + background-color: ${(props) => props.backgroundColor}; + color: ${(props) => props.color}; + display: ${(props) => (props.isDisplaying ? 'block' : 'none')}; + font-size: 0.8rem; + font-weight: bold; + letter-spacing: -0.01px; + line-height: 1; + margin: 0; + padding: 4px 0 0 2px; + text-align: left; + text-transform: uppercase; + width: fit-content; +`;