diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/logical_condition/components/condition_entry.tsx b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/logical_condition/components/condition_entry.tsx index 55d0622c3f9a9..020ab3f1cf1fd 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/logical_condition/components/condition_entry.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/logical_condition/components/condition_entry.tsx @@ -16,6 +16,7 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { TrustedApp } from '../../../../../../../../common/endpoint/types'; +import { CONDITION_FIELD_TITLE } from '../../../translations'; const ConditionEntryCell = memo<{ showLabel: boolean; @@ -72,17 +73,11 @@ export const ConditionEntry = memo( const fieldOptions = useMemo>>(() => { return [ { - inputDisplay: i18n.translate( - 'xpack.securitySolution.trustedapps.logicalConditionBuilder.entry.field.hash', - { defaultMessage: 'Hash' } - ), + inputDisplay: CONDITION_FIELD_TITLE['process.hash.*'], value: 'process.hash.*', }, { - inputDisplay: i18n.translate( - 'xpack.securitySolution.trustedapps.logicalConditionBuilder.entry.field.path', - { defaultMessage: 'Path' } - ), + inputDisplay: CONDITION_FIELD_TITLE['process.executable.caseless'], value: 'process.executable.caseless', }, ]; diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/trusted_app_card/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/trusted_app_card/__snapshots__/index.test.tsx.snap index c5a10c740ec7e..8f04fa0a7133a 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/trusted_app_card/__snapshots__/index.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/trusted_app_card/__snapshots__/index.test.tsx.snap @@ -36,6 +36,7 @@ exports[`trusted_app_card TrustedAppCard should render correctly 1`] = ` Object { "field": "field", "name": "Field", + "render": [Function], "sortable": false, "textOnly": true, "truncateText": true, @@ -44,6 +45,7 @@ exports[`trusted_app_card TrustedAppCard should render correctly 1`] = ` Object { "field": "operator", "name": "Operator", + "render": [Function], "sortable": false, "truncateText": true, "width": "20%", @@ -107,6 +109,7 @@ exports[`trusted_app_card TrustedAppCard should trim long descriptions 1`] = ` Object { "field": "field", "name": "Field", + "render": [Function], "sortable": false, "textOnly": true, "truncateText": true, @@ -115,6 +118,7 @@ exports[`trusted_app_card TrustedAppCard should trim long descriptions 1`] = ` Object { "field": "operator", "name": "Operator", + "render": [Function], "sortable": false, "truncateText": true, "width": "20%", diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/trusted_app_card/index.tsx b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/trusted_app_card/index.tsx index 438331b706cc3..e31ff9e3b313b 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/trusted_app_card/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/trusted_app_card/index.tsx @@ -7,6 +7,7 @@ import React, { memo, useCallback, useMemo } from 'react'; import { EuiTableFieldDataColumnType } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; import { Immutable, TrustedApp, @@ -27,6 +28,7 @@ import { PROPERTY_TITLES, ENTRY_PROPERTY_TITLES, CARD_DELETE_BUTTON_LABEL, + CONDITION_FIELD_TITLE, } from '../../translations'; type Entry = MacosLinuxConditionEntry | WindowsConditionEntry; @@ -47,6 +49,9 @@ const getEntriesColumnDefinitions = (): Array truncateText: true, textOnly: true, width: '30%', + render(field: MacosLinuxConditionEntry['field'], entry: Entry) { + return CONDITION_FIELD_TITLE[field]; + }, }, { field: 'operator', @@ -54,6 +59,11 @@ const getEntriesColumnDefinitions = (): Array sortable: false, truncateText: true, width: '20%', + render() { + return i18n.translate('xpack.securitySolution.trustedapps.card.operator.includes', { + defaultMessage: 'is', + }); + }, }, { field: 'value', diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/translations.ts b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/translations.ts index c6990159943e6..b442704169d06 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/translations.ts +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/translations.ts @@ -28,6 +28,17 @@ export const OS_TITLES: Readonly<{ [K in TrustedApp['os']]: string }> = { }), }; +export const CONDITION_FIELD_TITLE: { [K in MacosLinuxConditionEntry['field']]: string } = { + 'process.hash.*': i18n.translate( + 'xpack.securitySolution.trustedapps.logicalConditionBuilder.entry.field.hash', + { defaultMessage: 'Hash' } + ), + 'process.executable.caseless': i18n.translate( + 'xpack.securitySolution.trustedapps.logicalConditionBuilder.entry.field.path', + { defaultMessage: 'Path' } + ), +}; + export const PROPERTY_TITLES: Readonly< { [K in keyof Omit]: string } > = {