[SIEM] Use proper icons on Detections view (#55215) (#55297)

This commit is contained in:
patrykkopycinski 2020-01-20 14:01:44 +01:00 committed by GitHub
parent f6c882eb23
commit 3e6c1e063f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 9 deletions

View file

@ -42,6 +42,10 @@ const WrappedByAutoSizer = styled.div`
`; // required by AutoSizer `; // required by AutoSizer
WrappedByAutoSizer.displayName = 'WrappedByAutoSizer'; WrappedByAutoSizer.displayName = 'WrappedByAutoSizer';
const StyledEuiPanel = styled(EuiPanel)`
max-width: 100%;
`;
interface Props { interface Props {
browserFields: BrowserFields; browserFields: BrowserFields;
columns: ColumnHeader[]; columns: ColumnHeader[];
@ -113,7 +117,7 @@ const EventsViewerComponent: React.FC<Props> = ({
); );
return ( return (
<EuiPanel data-test-subj="events-viewer-panel"> <StyledEuiPanel data-test-subj="events-viewer-panel">
<AutoSizer detectAnyWindowResize={true} content> <AutoSizer detectAnyWindowResize={true} content>
{({ measureRef, content: { width = 0 } }) => ( {({ measureRef, content: { width = 0 } }) => (
<> <>
@ -225,7 +229,7 @@ const EventsViewerComponent: React.FC<Props> = ({
</> </>
)} )}
</AutoSizer> </AutoSizer>
</EuiPanel> </StyledEuiPanel>
); );
}; };

View file

@ -188,13 +188,13 @@ export const getSignalsActions = ({
updateTimelineIsLoading: ({ id, isLoading }: { id: string; isLoading: boolean }) => void; updateTimelineIsLoading: ({ id, isLoading }: { id: string; isLoading: boolean }) => void;
}): TimelineAction[] => [ }): TimelineAction[] => [
{ {
getAction: ({ eventId, ecsData }: TimelineActionProps): JSX.Element => ( getAction: ({ ecsData }: TimelineActionProps): JSX.Element => (
<EuiToolTip <EuiToolTip
data-test-subj="send-signal-to-timeline-tool-tip" data-test-subj="send-signal-to-timeline-tool-tip"
content={i18n.ACTION_VIEW_IN_TIMELINE} content={i18n.ACTION_VIEW_IN_TIMELINE}
> >
<EuiButtonIcon <EuiButtonIcon
data-test-subj={'send-signal-to-timeline-button'} data-test-subj="send-signal-to-timeline-button"
onClick={() => onClick={() =>
sendSignalToTimelineAction({ sendSignalToTimelineAction({
apolloClient, apolloClient,
@ -203,7 +203,7 @@ export const getSignalsActions = ({
updateTimelineIsLoading, updateTimelineIsLoading,
}) })
} }
iconType="tableDensityNormal" iconType="timeline"
aria-label="Next" aria-label="Next"
/> />
</EuiToolTip> </EuiToolTip>
@ -228,7 +228,7 @@ export const getSignalsActions = ({
}) })
} }
isDisabled={!canUserCRUD || !hasIndexWrite} isDisabled={!canUserCRUD || !hasIndexWrite}
iconType={status === FILTER_OPEN ? 'indexOpen' : 'indexClose'} iconType={status === FILTER_OPEN ? 'securitySignalDetected' : 'securitySignalResolved'}
aria-label="Next" aria-label="Next"
/> />
</EuiToolTip> </EuiToolTip>

View file

@ -61,7 +61,7 @@ export const getBatchItems = ({
<EuiContextMenuItem <EuiContextMenuItem
key={filterString} key={filterString}
icon={isFilteredToOpen ? 'indexClose' : 'indexOpen'} icon={isFilteredToOpen ? 'securitySignalResolved' : 'securitySignalDetected'}
disabled={allDisabled} disabled={allDisabled}
onClick={async () => { onClick={async () => {
closePopover(); closePopover();

View file

@ -80,7 +80,7 @@ const SignalsUtilityBarComponent: React.FC<SignalsUtilityBarProps> = ({
<UtilityBarAction <UtilityBarAction
disabled={areEventsLoading || isEmpty(selectedEventIds)} disabled={areEventsLoading || isEmpty(selectedEventIds)}
iconType={isFilteredToOpen ? 'indexClose' : 'indexOpen'} iconType={isFilteredToOpen ? 'securitySignalResolved' : 'securitySignalDetected'}
onClick={handleUpdateStatus} onClick={handleUpdateStatus}
> >
{isFilteredToOpen {isFilteredToOpen
@ -89,7 +89,7 @@ const SignalsUtilityBarComponent: React.FC<SignalsUtilityBarProps> = ({
</UtilityBarAction> </UtilityBarAction>
<UtilityBarAction <UtilityBarAction
iconType="listAdd" iconType={showClearSelection ? 'cross' : 'pagesSelect'}
onClick={() => { onClick={() => {
if (!showClearSelection) { if (!showClearSelection) {
selectAll(); selectAll();