Skip to content

Commit 8c07eb9

Browse files
authored
[Security Solution][Endpoint][Admin] Malware Protections Notify User Version (#81415)
1 parent 9d602e3 commit 8c07eb9

File tree

2 files changed

+35
-4
lines changed

2 files changed

+35
-4
lines changed

x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/protections/malware.tsx

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
EuiRadio,
1212
EuiSwitch,
1313
EuiTitle,
14+
EuiText,
1415
EuiSpacer,
1516
htmlIdGenerator,
1617
EuiCallOut,
@@ -28,6 +29,7 @@ import { policyConfig } from '../../../store/policy_details/selectors';
2829
import { usePolicyDetailsSelector } from '../../policy_hooks';
2930
import { clone } from '../../../models/policy_details_config';
3031
import { LinkToApp } from '../../../../../../common/components/endpoint/link_to_app';
32+
import { popupVersionsMap } from './popup_options_to_versions';
3133

3234
const ProtectionRadioGroup = styled.div`
3335
display: flex;
@@ -83,6 +85,25 @@ const ProtectionRadio = React.memo(({ id, label }: { id: ProtectionModes; label:
8385

8486
ProtectionRadio.displayName = 'ProtectionRadio';
8587

88+
const SupportedVersionNotice = ({ optionName }: { optionName: string }) => {
89+
const version = popupVersionsMap.get(optionName);
90+
if (!version) {
91+
return null;
92+
}
93+
94+
return (
95+
<EuiText color="subdued" size="xs">
96+
<i>
97+
<FormattedMessage
98+
id="xpack.securitySolution.endpoint.policyDetails.supportedVersion"
99+
defaultMessage="Agent version {version}"
100+
values={{ version }}
101+
/>
102+
</i>
103+
</EuiText>
104+
);
105+
};
106+
86107
/** The Malware Protections form for policy details
87108
* which will configure for all relevant OSes.
88109
*/
@@ -189,14 +210,15 @@ export const MalwareProtections = React.memo(() => {
189210
/>
190211
</h6>
191212
</EuiTitle>
213+
<SupportedVersionNotice optionName="malware" />
214+
<EuiSpacer size="s" />
192215
<EuiCheckbox
193216
id="xpack.securitySolution.endpoint.policyDetail.malware.userNotification"
194217
onChange={handleUserNotificationCheckbox}
195218
checked={userNotificationSelected}
196-
label={i18n.translate(
197-
'xpack.securitySolution.endpoint.policyDetail.malware.userNotification',
198-
{ defaultMessage: 'User Notification' }
199-
)}
219+
label={i18n.translate('xpack.securitySolution.endpoint.policyDetail.malware.notifyUser', {
220+
defaultMessage: 'Notify User',
221+
})}
200222
/>
201223
</>
202224
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License;
4+
* you may not use this file except in compliance with the Elastic License.
5+
*/
6+
7+
const popupVersions: Array<[string, string]> = [['malware', '7.11+']];
8+
9+
export const popupVersionsMap: ReadonlyMap<string, string> = new Map<string, string>(popupVersions);

0 commit comments

Comments
 (0)