[Security_Solution][Resolver] Update resolver load experience and disabled text (#85618)

This commit is contained in:
Michael Olorunnisola 2020-12-10 17:12:41 -05:00 committed by GitHub
parent ac189b8c25
commit 5897017ac5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 6 deletions

View file

@ -11,6 +11,7 @@ import {
EuiFlexItem,
EuiHorizontalRule,
EuiToolTip,
EuiLoadingSpinner,
} from '@elastic/eui';
import React, { useCallback, useMemo } from 'react';
import { useDispatch } from 'react-redux';
@ -72,7 +73,7 @@ const NavigationComponent: React.FC<NavigationProps> = ({
timelineFullScreen,
toggleFullScreen,
}) => (
<EuiFlexGroup alignItems="flexStart" gutterSize="none">
<EuiFlexGroup alignItems="center" gutterSize="none">
<EuiFlexItem grow={false}>
<EuiButtonEmpty iconType="cross" onClick={onCloseOverlay} size="xs">
{i18n.CLOSE_ANALYZER}
@ -167,15 +168,17 @@ const GraphOverlayComponent: React.FC<OwnProps> = ({ isEventViewer, timelineId }
/>
</EuiFlexItem>
</EuiFlexGroup>
<EuiHorizontalRule margin="none" />
{graphEventId !== undefined && indices !== null && (
{graphEventId !== undefined && indices !== null ? (
<StyledResolver
databaseDocumentID={graphEventId}
resolverComponentInstanceID={timelineId}
indices={indices}
/>
) : (
<EuiFlexGroup alignItems="center" justifyContent="center" style={{ height: '100%' }}>
<EuiLoadingSpinner size="xl" />
</EuiFlexGroup>
)}
</OverlayContainer>
);

View file

@ -144,9 +144,11 @@ const InvestigateInResolverActionComponent: React.FC<InvestigateInResolverAction
return (
<ActionIconItem
ariaLabel={i18n.ACTION_INVESTIGATE_IN_RESOLVER}
content={i18n.ACTION_INVESTIGATE_IN_RESOLVER}
content={
isDisabled ? i18n.INVESTIGATE_IN_RESOLVER_DISABLED : i18n.ACTION_INVESTIGATE_IN_RESOLVER
}
dataTestSubj="investigate-in-resolver"
iconType="node"
iconType="analyzeEvent"
id="investigateInResolver"
isDisabled={isDisabled}
onClick={handleClick}

View file

@ -93,3 +93,10 @@ export const ACTION_INVESTIGATE_IN_RESOLVER = i18n.translate(
defaultMessage: 'Analyze event',
}
);
export const INVESTIGATE_IN_RESOLVER_DISABLED = i18n.translate(
'xpack.securitySolution.timeline.body.actions.investigateInResolverDisabledTooltip',
{
defaultMessage: 'This event cannot be analyzed since it has incompatible field mappings',
}
);