Skip to content

Commit

Permalink
malware protections notify user versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
parkiino committed Oct 21, 2020
1 parent cd19bd3 commit d17f05a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
EuiRadio,
EuiSwitch,
EuiTitle,
EuiText,
EuiSpacer,
htmlIdGenerator,
EuiCallOut,
Expand All @@ -28,6 +29,7 @@ import { policyConfig } from '../../../store/policy_details/selectors';
import { usePolicyDetailsSelector } from '../../policy_hooks';
import { clone } from '../../../models/policy_details_config';
import { LinkToApp } from '../../../../../../common/components/endpoint/link_to_app';
import { popupVersionsMap } from './popup_options_to_versions';

const ProtectionRadioGroup = styled.div`
display: flex;
Expand Down Expand Up @@ -189,14 +191,17 @@ export const MalwareProtections = React.memo(() => {
/>
</h6>
</EuiTitle>
<EuiText color="subdued" size="xs">
<i>{`Endpoint versions ${popupVersionsMap.get('malware')}`}</i>
</EuiText>
<EuiSpacer size="s" />
<EuiCheckbox
id="xpack.securitySolution.endpoint.policyDetail.malware.userNotification"
onChange={handleUserNotificationCheckbox}
checked={userNotificationSelected}
label={i18n.translate(
'xpack.securitySolution.endpoint.policyDetail.malware.userNotification',
{ defaultMessage: 'User Notification' }
)}
label={i18n.translate('xpack.securitySolution.endpoint.policyDetail.malware.notifyUser', {
defaultMessage: 'Notify User',
})}
/>
</>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import { i18n } from '@kbn/i18n';

const popupVersions: Array<[string, string]> = [
[
'malware',
i18n.translate('xpack.securitySolution.endpoint.policyDetails.popup.version.7.11', {
defaultMessage: '7.11+',
}),
],
];

export const popupVersionsMap = new Map<string, string>(popupVersions);

0 comments on commit d17f05a

Please sign in to comment.