Skip to content

Commit

Permalink
show origin node details in panel on load
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelolo24 committed Jul 27, 2020
1 parent bc65c5e commit a6ba12b
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions x-pack/plugins/security_solution/public/resolver/view/map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

/* eslint-disable react/display-name */

import React, { useContext } from 'react';
import React, { useContext, useEffect } from 'react';
import { useSelector } from 'react-redux';
import { useEffectOnce } from 'react-use';
import { EuiLoadingSpinner } from '@elastic/eui';
Expand Down Expand Up @@ -68,11 +68,22 @@ export const ResolverMap = React.memo(function ({
const hasError = useSelector(selectors.hasError);
const activeDescendantId = useSelector(selectors.ariaActiveDescendant);
const { colorMap } = useResolverTheme();
const { cleanUpQueryParams } = useResolverQueryParams();
const {
cleanUpQueryParams,
queryParams: { crumbId },
pushToQueryParams,
} = useResolverQueryParams();

useEffectOnce(() => {
return () => cleanUpQueryParams();
});

useEffect(() => {
if (activeDescendantId && crumbId !== activeDescendantId) {
pushToQueryParams({ crumbId: activeDescendantId, crumbEvent: '' });
}
}, [crumbId, activeDescendantId, pushToQueryParams]);

return (
<StyledMapContainer className={className} backgroundColor={colorMap.resolverBackground}>
{isLoading ? (
Expand Down

0 comments on commit a6ba12b

Please sign in to comment.