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

[Security Solution] UX fixes for Policy page and Case Host Isolation comment #106027

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,17 @@
* 2.0.
*/

import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiLink, EuiCommentProps } from '@elastic/eui';
import React from 'react';
import {
EuiFlexGroup,
EuiFlexItem,
EuiIcon,
EuiLink,
EuiCommentProps,
EuiToken,
} from '@elastic/eui';
import React, { useContext } from 'react';
import classNames from 'classnames';
import { ThemeContext } from 'styled-components';
import {
CaseFullExternalService,
ActionConnector,
Expand Down Expand Up @@ -37,6 +45,7 @@ interface LabelTitle {
action: CaseUserActions;
field: string;
}

export type RuleDetailsNavigation = CasesNavigation<string | null | undefined, 'configurable'>;

export type ActionsNavigation = CasesNavigation<string, 'configurable'>;
Expand Down Expand Up @@ -365,6 +374,21 @@ export const getGeneratedAlertsAttachment = ({
),
});

const ActionIcon = React.memo<{
actionType: string;
}>(({ actionType }) => {
const theme = useContext(ThemeContext);
return (
<EuiToken
style={{ marginTop: '8px' }}
iconType={actionType === 'isolate' ? 'lock' : 'lockOpen'}
size="m"
shape="circle"
color={theme.eui.euiColorLightestShade}
/>
);
});

export const getActionAttachment = ({
comment,
userCanCrud,
Expand Down Expand Up @@ -407,7 +431,7 @@ export const getActionAttachment = ({
),
'data-test-subj': 'endpoint-action',
timestamp: <UserActionTimestamp createdAt={action.actionAt} />,
timelineIcon: comment.actions.type === 'isolate' ? 'lock' : 'lockOpen',
timelineIcon: <ActionIcon actionType={comment.actions.type} />,
actions: (
<UserActionContentToolbar
getCaseDetailHrefWithCommentId={getCaseDetailHrefWithCommentId}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ import { PolicyDetailsForm } from './policy_details_form';
const maxFormWidth = '770px';
const PolicyDetailsHeader = styled.div`
padding: ${(props) => props.theme.eui.paddingSizes.xl} 0;
background-color: #fafbfd;
border-bottom: 1px solid #d3dae6;
.securitySolutionHeaderPage {
max-width: ${maxFormWidth};
Expand Down