diff --git a/x-pack/legacy/plugins/siem/public/lib/connectors/jira/config.ts b/x-pack/legacy/plugins/siem/public/lib/connectors/jira/config.ts index 229feaf5f90ee5f..e6151a54bff74f4 100644 --- a/x-pack/legacy/plugins/siem/public/lib/connectors/jira/config.ts +++ b/x-pack/legacy/plugins/siem/public/lib/connectors/jira/config.ts @@ -6,12 +6,12 @@ import { ConnectorConfiguration } from './types'; -import { JIRA_TITLE } from './translations'; +import * as i18n from './translations'; import logo from './logo.svg'; export const connector: ConnectorConfiguration = { id: '.jira', - name: JIRA_TITLE, + name: i18n.JIRA_TITLE, logo, enabled: true, enabledInConfig: true, @@ -19,19 +19,19 @@ export const connector: ConnectorConfiguration = { minimumLicenseRequired: 'platinum', fields: { summary: { - label: 'Summary', + label: i18n.MAPPING_FIELD_SUMMARY, validSourceFields: ['title', 'description'], defaultSourceField: 'title', defaultActionType: 'overwrite', }, description: { - label: 'Description', + label: i18n.MAPPING_FIELD_DESC, validSourceFields: ['title', 'description'], defaultSourceField: 'description', defaultActionType: 'overwrite', }, comments: { - label: 'Comments', + label: i18n.MAPPING_FIELD_COMMENTS, validSourceFields: ['comments'], defaultSourceField: 'comments', defaultActionType: 'append', diff --git a/x-pack/legacy/plugins/siem/public/lib/connectors/jira/translations.ts b/x-pack/legacy/plugins/siem/public/lib/connectors/jira/translations.ts index 751aaecdad9641a..f95663d40260475 100644 --- a/x-pack/legacy/plugins/siem/public/lib/connectors/jira/translations.ts +++ b/x-pack/legacy/plugins/siem/public/lib/connectors/jira/translations.ts @@ -26,3 +26,10 @@ export const JIRA_PROJECT_KEY_REQUIRED = i18n.translate( defaultMessage: 'Project key is required', } ); + +export const MAPPING_FIELD_SUMMARY = i18n.translate( + 'xpack.siem.case.configureCases.mappingFieldSummary', + { + defaultMessage: 'Summary', + } +); diff --git a/x-pack/legacy/plugins/siem/public/lib/connectors/servicenow/config.ts b/x-pack/legacy/plugins/siem/public/lib/connectors/servicenow/config.ts index 7882dc3b87fda00..35c677c9574e367 100644 --- a/x-pack/legacy/plugins/siem/public/lib/connectors/servicenow/config.ts +++ b/x-pack/legacy/plugins/siem/public/lib/connectors/servicenow/config.ts @@ -5,12 +5,12 @@ */ import { ConnectorConfiguration } from './types'; -import { SERVICENOW_TITLE } from './translations'; +import * as i18n from './translations'; import logo from './logo.svg'; export const connector: ConnectorConfiguration = { id: '.servicenow', - name: SERVICENOW_TITLE, + name: i18n.SERVICENOW_TITLE, logo, enabled: true, enabledInConfig: true, @@ -18,19 +18,19 @@ export const connector: ConnectorConfiguration = { minimumLicenseRequired: 'platinum', fields: { short_description: { - label: 'Short Description', + label: i18n.MAPPING_FIELD_SHORT_DESC, validSourceFields: ['title', 'description'], defaultSourceField: 'title', defaultActionType: 'overwrite', }, description: { - label: 'Description', + label: i18n.MAPPING_FIELD_DESC, validSourceFields: ['title', 'description'], defaultSourceField: 'description', defaultActionType: 'overwrite', }, comments: { - label: 'Comments', + label: i18n.MAPPING_FIELD_COMMENTS, validSourceFields: ['comments'], defaultSourceField: 'comments', defaultActionType: 'append', diff --git a/x-pack/legacy/plugins/siem/public/lib/connectors/servicenow/translations.ts b/x-pack/legacy/plugins/siem/public/lib/connectors/servicenow/translations.ts index 5dac9eddd153695..39d0ee96513a250 100644 --- a/x-pack/legacy/plugins/siem/public/lib/connectors/servicenow/translations.ts +++ b/x-pack/legacy/plugins/siem/public/lib/connectors/servicenow/translations.ts @@ -21,3 +21,10 @@ export const SERVICENOW_TITLE = i18n.translate( defaultMessage: 'ServiceNow', } ); + +export const MAPPING_FIELD_SHORT_DESC = i18n.translate( + 'xpack.siem.case.configureCases.mappingFieldShortDescription', + { + defaultMessage: 'Short Description', + } +); diff --git a/x-pack/legacy/plugins/siem/public/lib/connectors/translations.ts b/x-pack/legacy/plugins/siem/public/lib/connectors/translations.ts index b9c1d0fa2a17fa8..071fd8ef12645f6 100644 --- a/x-pack/legacy/plugins/siem/public/lib/connectors/translations.ts +++ b/x-pack/legacy/plugins/siem/public/lib/connectors/translations.ts @@ -79,3 +79,17 @@ export const EMAIL_REQUIRED = i18n.translate( defaultMessage: 'Email is required', } ); + +export const MAPPING_FIELD_DESC = i18n.translate( + 'xpack.siem.case.configureCases.mappingFieldDescription', + { + defaultMessage: 'Description', + } +); + +export const MAPPING_FIELD_COMMENTS = i18n.translate( + 'xpack.siem.case.configureCases.mappingFieldComments', + { + defaultMessage: 'Comments', + } +); diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/field_mapping.tsx b/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/field_mapping.tsx index 4241d7d639a7ce0..7926770b4dfd71f 100644 --- a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/field_mapping.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/field_mapping.tsx @@ -30,29 +30,6 @@ const FieldRowWrapper = styled.div` font-size: 14px; `; -// const supportedThirdPartyFields: Array> = [ -// { -// value: 'not_mapped', -// inputDisplay: {i18n.FIELD_MAPPING_FIELD_NOT_MAPPED}, -// 'data-test-subj': 'third-party-field-not-mapped', -// }, -// { -// value: 'short_description', -// inputDisplay: {i18n.FIELD_MAPPING_FIELD_SHORT_DESC}, -// 'data-test-subj': 'third-party-field-short-description', -// }, -// { -// value: 'comments', -// inputDisplay: {i18n.FIELD_MAPPING_FIELD_COMMENTS}, -// 'data-test-subj': 'third-party-field-comments', -// }, -// { -// value: 'description', -// inputDisplay: {i18n.FIELD_MAPPING_FIELD_DESC}, -// 'data-test-subj': 'third-party-field-description', -// }, -// ]; - const actionTypeOptions: Array> = [ { value: 'nothing', @@ -88,6 +65,7 @@ const getThirdPartyOptions = ( Object.keys(thirdPartyFields) .filter(key => thirdPartyFields[key].validSourceFields.includes(caseField)) .map(key => ({ key: key as AllThirdPartyFields, label: thirdPartyFields[key].label })) + .concat([{ key: 'not_mapped', label: i18n.MAPPING_FIELD_NOT_MAPPED }]) ); export interface FieldMappingProps { diff --git a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/translations.ts b/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/translations.ts index 49caeae1c3a3447..0d4cf94dc9f6f18 100644 --- a/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/translations.ts +++ b/x-pack/legacy/plugins/siem/public/pages/case/components/configure_cases/translations.ts @@ -159,34 +159,13 @@ export const WARNING_NO_CONNECTOR_MESSAGE = i18n.translate( } ); -export const FIELD_MAPPING_FIELD_NOT_MAPPED = i18n.translate( - 'xpack.siem.case.configureCases.fieldMappingFieldNotMapped', +export const MAPPING_FIELD_NOT_MAPPED = i18n.translate( + 'xpack.siem.case.configureCases.mappingFieldNotMapped', { defaultMessage: 'Not mapped', } ); -export const FIELD_MAPPING_FIELD_SHORT_DESC = i18n.translate( - 'xpack.siem.case.configureCases.fieldMappingFieldShortDescription', - { - defaultMessage: 'Short Description', - } -); - -export const FIELD_MAPPING_FIELD_DESC = i18n.translate( - 'xpack.siem.case.configureCases.fieldMappingFieldDescription', - { - defaultMessage: 'Description', - } -); - -export const FIELD_MAPPING_FIELD_COMMENTS = i18n.translate( - 'xpack.siem.case.configureCases.fieldMappingFieldComments', - { - defaultMessage: 'Comments', - } -); - export const UPDATE_CONNECTOR = i18n.translate('xpack.siem.case.configureCases.updateConnector', { defaultMessage: 'Update connector', });