Skip to content

Commit

Permalink
[Security Solution][Endpoint] Task/policy save modal text change, rem…
Browse files Browse the repository at this point in the history
…ove duplicate policy details text (#73130) (#73176)

[Security Solution][Endpoint] updates policy details text
  • Loading branch information
parkiino authored Jul 24, 2020
1 parent 037d28b commit 0a578f7
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ describe('Policy Details', () => {
);
expect(warningCallout).toHaveLength(1);
expect(warningCallout.text()).toEqual(
'This action will update 5 hostsSaving these changes will apply the updates to all active endpoints assigned to this policy'
'This action will update 5 hostsSaving these changes will apply updates to all endpoints assigned to this policy'
);
});
it('should close dialog if cancel button is clicked', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ const ConfirmUpdate = React.memo<{
>
<FormattedMessage
id="xpack.securitySolution.endpoint.policy.details.updateConfirm.warningMessage"
defaultMessage="Saving these changes will apply the updates to all active endpoints assigned to this policy"
defaultMessage="Saving these changes will apply updates to all endpoints assigned to this policy"
/>
</EuiCallOut>
<EuiSpacer size="xl" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,10 @@ export const ConfigForm: React.FC<{
*/
supportedOss: React.ReactNode;
children: React.ReactNode;
/**
* A description for the component.
*/
description: string;
/**
* The `data-test-subj` attribute to append to a certain child element.
*/
dataTestSubj: string;
/** React Node to be put on the right corner of the card */
rightCorner: React.ReactNode;
}> = React.memo(({ type, supportedOss, children, dataTestSubj, rightCorner, description }) => {
}> = React.memo(({ type, supportedOss, children, dataTestSubj, rightCorner }) => {
const typeTitle = useMemo(() => {
return (
<EuiFlexGroup direction="row" gutterSize="none" alignItems="center">
Expand Down Expand Up @@ -85,12 +78,7 @@ export const ConfigForm: React.FC<{

return (
<PolicyDetailCard>
<EuiCard
description={description}
data-test-subj={dataTestSubj}
textAlign="left"
title={typeTitle}
>
<EuiCard description data-test-subj={dataTestSubj} textAlign="left" title={typeTitle}>
<EuiHorizontalRule margin="m" />
{children}
</EuiCard>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,6 @@ export const LinuxEvents = React.memo(() => {
type={i18n.translate('xpack.securitySolution.endpoint.policy.details.eventCollection', {
defaultMessage: 'Event Collection',
})}
description={i18n.translate(
'xpack.securitySolution.endpoint.policy.details.eventCollectionLabel',
{
defaultMessage: 'Event Collection',
}
)}
supportedOss={i18n.translate('xpack.securitySolution.endpoint.policy.details.linux', {
defaultMessage: 'Linux',
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,6 @@ export const MacEvents = React.memo(() => {
type={i18n.translate('xpack.securitySolution.endpoint.policy.details.eventCollection', {
defaultMessage: 'Event Collection',
})}
description={i18n.translate(
'xpack.securitySolution.endpoint.policy.details.eventCollectionLabel',
{
defaultMessage: 'Event Collection',
}
)}
supportedOss={i18n.translate('xpack.securitySolution.endpoint.policy.details.mac', {
defaultMessage: 'Mac',
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,6 @@ export const WindowsEvents = React.memo(() => {
type={i18n.translate('xpack.securitySolution.endpoint.policy.details.eventCollection', {
defaultMessage: 'Event Collection',
})}
description={i18n.translate('xpack.securitySolution.endpoint.policy.details.windowsLabel', {
defaultMessage: 'Windows',
})}
supportedOss={i18n.translate('xpack.securitySolution.endpoint.policy.details.windows', {
defaultMessage: 'Windows',
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,6 @@ export const MalwareProtections = React.memo(() => {
defaultMessage: 'Windows, Mac',
})}
dataTestSubj="malwareProtectionsForm"
description={i18n.translate('xpack.securitySolution.endpoint.policy.details.malwareLabel', {
defaultMessage: 'Malware',
})}
rightCorner={protectionSwitch}
>
{radioButtons}
Expand Down

0 comments on commit 0a578f7

Please sign in to comment.