Skip to content
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

Hide unused resolver buttons #70112

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions x-pack/plugins/security_solution/public/resolver/store/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,6 @@ interface UserSelectedRelatedEventCategory {
};
}

/**
* This action should dispatch to indicate that the user chose to focus
* on examining alerts related to a particular ResolverEvent
*/
interface UserSelectedRelatedAlerts {
readonly type: 'userSelectedRelatedAlerts';
readonly payload: ResolverEvent;
}

export type ResolverAction =
| CameraAction
| DataAction
Expand All @@ -160,7 +151,6 @@ export type ResolverAction =
| UserSelectedResolverNode
| UserRequestedRelatedEventData
| UserSelectedRelatedEventCategory
| UserSelectedRelatedAlerts
| AppDetectedNewIdFromQueryParams
| AppDisplayedDifferentPanel
| AppDetectedMissingEventData;
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export const Resolver = React.memo(function Resolver({
projectionMatrix={projectionMatrix}
/>
))}
{[...processNodePositions].map(([processEvent, position], index) => {
{[...processNodePositions].map(([processEvent, position]) => {
const adjacentNodeMap = processToAdjacencyMap.get(processEvent);
const processEntityId = entityId(processEvent);
if (!adjacentNodeMap) {
Expand All @@ -145,7 +145,7 @@ export const Resolver = React.memo(function Resolver({
}
return (
<ProcessEventDot
key={index}
key={processEntityId}
position={position}
projectionMatrix={projectionMatrix}
event={processEvent}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,13 +414,6 @@ const ProcessEventDotComponents = React.memo(
});
}, [dispatch, selfId]);

const handleRelatedAlertsRequest = useCallback(() => {
dispatch({
type: 'userSelectedRelatedAlerts',
payload: event,
});
}, [dispatch, event]);

const history = useHistory();
const urlSearch = history.location.search;

Expand Down Expand Up @@ -637,22 +630,16 @@ const ProcessEventDotComponents = React.memo(
}}
>
<EuiFlexItem grow={false} className="related-dropdown">
<NodeSubMenu
count={grandTotal}
buttonBorderColor={labelButtonFill}
buttonFill={colorMap.resolverBackground}
menuAction={handleRelatedEventRequest}
menuTitle={subMenuAssets.relatedEvents.title}
optionsWithActions={relatedEventStatusOrOptions}
/>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<NodeSubMenu
buttonBorderColor={labelButtonFill}
buttonFill={colorMap.resolverBackground}
menuTitle={subMenuAssets.relatedAlerts.title}
menuAction={handleRelatedAlertsRequest}
/>
{grandTotal > 0 && (
<NodeSubMenu
count={grandTotal}
buttonBorderColor={labelButtonFill}
buttonFill={colorMap.resolverBackground}
menuAction={handleRelatedEventRequest}
menuTitle={subMenuAssets.relatedEvents.title}
optionsWithActions={relatedEventStatusOrOptions}
/>
)}
</EuiFlexItem>
</EuiFlexGroup>
</StyledActionsContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ export const subMenuAssets = {
menuError: i18n.translate('xpack.securitySolution.endpoint.resolver.relatedRetrievalError', {
defaultMessage: 'There was an error retrieving related events.',
}),
relatedAlerts: {
title: i18n.translate('xpack.securitySolution.endpoint.resolver.relatedAlerts', {
defaultMessage: 'Related Alerts',
}),
},
relatedEvents: {
title: i18n.translate('xpack.securitySolution.endpoint.resolver.relatedEvents', {
defaultMessage: 'Events',
Expand Down