From 4cdb74f6fb4e029b5b8a36ce2ee24ef69a502777 Mon Sep 17 00:00:00 2001 From: Angela Chuang <6295984+angorayc@users.noreply.github.com> Date: Wed, 8 Jul 2020 22:29:39 +0100 Subject: [PATCH] [SIEM] update wordings (#71119) * update wordings * remove redundant wordings --- .../components/open_timeline/translations.ts | 3 +- .../routes/create_timelines_route.test.ts | 2 +- .../timeline/routes/import_timelines_route.ts | 2 +- .../timeline/routes/utils/create_timelines.ts | 5 --- .../timeline/routes/utils/failure_cases.ts | 32 +++++++++++-------- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/translations.ts index 7b07548af67a..8d55d00b50e1 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/translations.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/translations.ts @@ -298,6 +298,7 @@ export const IMPORT_FAILED_DETAILED = (id: string, statusCode: number, message: export const TEMPLATE_CALL_OUT_MESSAGE = i18n.translate( 'xpack.securitySolution.timelines.components.templateCallOutMessageTitle', { - defaultMessage: 'Now you can add timeline templates and link it to rules.', + defaultMessage: + 'Prebuit detection rules are now packaged with Timeline templates. You can also create your own Timeline templates and associate them with any rule.', } ); diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/create_timelines_route.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/create_timelines_route.test.ts index f5345c3dce22..84a18cb1573d 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/create_timelines_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/create_timelines_route.test.ts @@ -28,7 +28,7 @@ import { import { CREATE_TEMPLATE_TIMELINE_ERROR_MESSAGE, CREATE_TIMELINE_ERROR_MESSAGE, -} from './utils/create_timelines'; +} from './utils/failure_cases'; describe('create timelines', () => { let server: ReturnType; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/import_timelines_route.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/import_timelines_route.ts index fb4991d7d1e7..0f4e8f3204e2 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/import_timelines_route.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/import_timelines_route.ts @@ -46,7 +46,7 @@ import { createTimelines } from './utils/create_timelines'; import { TimelineStatus } from '../../../../common/types/timeline'; const CHUNK_PARSED_OBJECT_SIZE = 10; -const DEFAULT_IMPORT_ERROR = `Something went wrong, there's something we didn't handle properly, please help us improve by providing the file you try to import on https://discuss.elastic.co/c/security/siem`; +const DEFAULT_IMPORT_ERROR = `Something has gone wrong. We didn't handle something properly. To help us fix this, please upload your file to https://discuss.elastic.co/c/security/siem.`; export const importTimelinesRoute = ( router: IRouter, diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/utils/create_timelines.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/utils/create_timelines.ts index abe298566341..67965469e1a9 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/utils/create_timelines.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/utils/create_timelines.ts @@ -13,11 +13,6 @@ import { SavedTimeline, TimelineSavedObject } from '../../../../../common/types/ import { SavedNote } from '../../../../../common/types/timeline/note'; import { NoteResult, ResponseTimeline } from '../../../../graphql/types'; -export const CREATE_TIMELINE_ERROR_MESSAGE = - 'UPDATE timeline with POST is not allowed, please use PATCH instead'; -export const CREATE_TEMPLATE_TIMELINE_ERROR_MESSAGE = - 'UPDATE template timeline with POST is not allowed, please use PATCH instead'; - export const saveTimelines = ( frameworkRequest: FrameworkRequest, timeline: SavedTimeline, diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/utils/failure_cases.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/utils/failure_cases.ts index 60ba5389280c..5e7a73ca18d0 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/utils/failure_cases.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/utils/failure_cases.ts @@ -11,27 +11,31 @@ import { } from '../../../../../common/types/timeline'; export const UPDATE_TIMELINE_ERROR_MESSAGE = - 'CREATE timeline with PATCH is not allowed, please use POST instead'; + 'You cannot create new timelines with PATCH. Use POST instead.'; export const UPDATE_TEMPLATE_TIMELINE_ERROR_MESSAGE = - "CREATE template timeline with PATCH is not allowed, please use POST instead (Given template timeline doesn't exist)"; + 'You cannot create new Timeline templates with PATCH. Use POST instead (templateTimelineId does not exist).'; export const NO_MATCH_VERSION_ERROR_MESSAGE = - 'TimelineVersion conflict: The given version doesn not match with existing timeline'; + 'Timeline template version conflict. The provided templateTimelineVersion does not match the current template.'; export const NO_MATCH_ID_ERROR_MESSAGE = - "Timeline id doesn't match with existing template timeline"; -export const TEMPLATE_TIMELINE_VERSION_CONFLICT_MESSAGE = 'Template timelineVersion conflict'; + 'There are no Timeline templates that match the provided templateTimelineId.'; +export const TEMPLATE_TIMELINE_VERSION_CONFLICT_MESSAGE = + 'To update existing Timeline templates, you must increment the templateTimelineVersion value.'; export const CREATE_TIMELINE_ERROR_MESSAGE = - 'UPDATE timeline with POST is not allowed, please use PATCH instead'; + 'You cannot update timelines with POST. Use PATCH instead.'; export const CREATE_TEMPLATE_TIMELINE_ERROR_MESSAGE = - 'UPDATE template timeline with POST is not allowed, please use PATCH instead'; -export const EMPTY_TITLE_ERROR_MESSAGE = 'Title cannot be empty'; -export const UPDATE_STATUS_ERROR_MESSAGE = 'Update an immutable timeline is is not allowed'; + 'You cannot update Timeline templates with POST. Use PATCH instead.'; +export const EMPTY_TITLE_ERROR_MESSAGE = 'The title field cannot be empty.'; +export const UPDATE_STATUS_ERROR_MESSAGE = + 'You are not allowed to set the status field value to immutable.'; export const CREATE_TEMPLATE_TIMELINE_WITHOUT_VERSION_ERROR_MESSAGE = - 'Create template timeline without a valid templateTimelineVersion is not allowed. Please start from 1 to create a new template timeline'; -export const CREATE_WITH_INVALID_STATUS_ERROR_MESSAGE = 'Cannot create a draft timeline'; -export const NOT_ALLOW_UPDATE_STATUS_ERROR_MESSAGE = 'Update status is not allowed'; -export const NOT_ALLOW_UPDATE_TIMELINE_TYPE_ERROR_MESSAGE = 'Update timelineType is not allowed'; + 'You must provide a valid templateTimelineVersion value. Use 1 for new Timeline templates.'; +export const CREATE_WITH_INVALID_STATUS_ERROR_MESSAGE = + 'You are not allowed to set the status field value to draft.'; +export const NOT_ALLOW_UPDATE_STATUS_ERROR_MESSAGE = 'You are not allowed to set the status field.'; +export const NOT_ALLOW_UPDATE_TIMELINE_TYPE_ERROR_MESSAGE = + 'You cannot convert a Timeline template to a timeline, or a timeline to a Timeline template.'; export const UPDAT_TIMELINE_VIA_IMPORT_NOT_ALLOWED_ERROR_MESSAGE = - 'Update timeline via import is not allowed'; + 'You cannot update a timeline via imports. Use the UI to modify existing timelines.'; const isUpdatingStatus = ( isHandlingTemplateTimeline: boolean,