diff --git a/api_docs/case.json b/api_docs/cases.json similarity index 75% rename from api_docs/case.json rename to api_docs/cases.json index 24f49c97e61ba..ca02367539e60 100644 --- a/api_docs/case.json +++ b/api_docs/cases.json @@ -21,28 +21,28 @@ "children": [ { "tags": [], - "id": "def-server.CaseRequestContext.getCaseClient", + "id": "def-server.CaseRequestContext.getCasesClient", "type": "Function", - "label": "getCaseClient", + "label": "getCasesClient", "description": [], "source": { - "path": "x-pack/plugins/case/server/types.ts", + "path": "x-pack/plugins/cases/server/types.ts", "lineNumber": 14 }, "signature": [ "() => ", { - "pluginId": "case", + "pluginId": "cases", "scope": "server", "docId": "kibCasePluginApi", - "section": "def-server.CaseClient", - "text": "CaseClient" + "section": "def-server.CasesClient", + "text": "CasesClient" } ] } ], "source": { - "path": "x-pack/plugins/case/server/types.ts", + "path": "x-pack/plugins/cases/server/types.ts", "lineNumber": 13 }, "initialIsOpen": false @@ -60,4 +60,4 @@ "misc": [], "objects": [] } -} \ No newline at end of file +} diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index 877026ef313ba..64433aa5946c2 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -320,7 +320,7 @@ Failure to have auth enabled in Kibana will make for a broken UI. UI-based error |"Never look back. The past is done. The future is a blank canvas." ― Suzy Kassem, Rise Up and Salute the Sun -|{kib-repo}blob/{branch}/x-pack/plugins/case/README.md[case] +|{kib-repo}blob/{branch}/x-pack/plugins/cases/README.md[cases] |Experimental Feature diff --git a/src/dev/cli_dev_mode/get_server_watch_paths.test.ts b/src/dev/cli_dev_mode/get_server_watch_paths.test.ts index 14da4726f8120..7f84338b4efb8 100644 --- a/src/dev/cli_dev_mode/get_server_watch_paths.test.ts +++ b/src/dev/cli_dev_mode/get_server_watch_paths.test.ts @@ -69,7 +69,7 @@ it('produces the right watch and ignore list', () => { /x-pack/plugins/apm/e2e, /x-pack/plugins/apm/scripts, /x-pack/plugins/canvas/canvas_plugin_src, - /x-pack/plugins/case/server/scripts, + /x-pack/plugins/cases/server/scripts, /x-pack/plugins/lists/scripts, /x-pack/plugins/lists/server/scripts, /x-pack/plugins/security_solution/scripts, diff --git a/src/dev/cli_dev_mode/get_server_watch_paths.ts b/src/dev/cli_dev_mode/get_server_watch_paths.ts index 8e6cbaeaeb36f..4e00dd4ca98b9 100644 --- a/src/dev/cli_dev_mode/get_server_watch_paths.ts +++ b/src/dev/cli_dev_mode/get_server_watch_paths.ts @@ -69,7 +69,7 @@ export function getServerWatchPaths({ pluginPaths, pluginScanDirs }: Options) { fromRoot('x-pack/plugins/apm/e2e'), fromRoot('x-pack/plugins/apm/scripts'), fromRoot('x-pack/plugins/canvas/canvas_plugin_src'), // prevents server from restarting twice for Canvas plugin changes, - fromRoot('x-pack/plugins/case/server/scripts'), + fromRoot('x-pack/plugins/cases/server/scripts'), fromRoot('x-pack/plugins/lists/scripts'), fromRoot('x-pack/plugins/lists/server/scripts'), fromRoot('x-pack/plugins/security_solution/scripts'), diff --git a/x-pack/.i18nrc.json b/x-pack/.i18nrc.json index 24d837708e9f7..14579a6461bb7 100644 --- a/x-pack/.i18nrc.json +++ b/x-pack/.i18nrc.json @@ -9,7 +9,7 @@ "xpack.apm": "plugins/apm", "xpack.beatsManagement": "plugins/beats_management", "xpack.canvas": "plugins/canvas", - "xpack.case": "plugins/case", + "xpack.cases": "plugins/cases", "xpack.cloud": "plugins/cloud", "xpack.dashboard": "plugins/dashboard_enhanced", "xpack.discover": "plugins/discover_enhanced", diff --git a/x-pack/plugins/actions/server/builtin_action_types/jira/translations.ts b/x-pack/plugins/actions/server/builtin_action_types/jira/translations.ts index 277c4c69d96a5..f3baefc9e2900 100644 --- a/x-pack/plugins/actions/server/builtin_action_types/jira/translations.ts +++ b/x-pack/plugins/actions/server/builtin_action_types/jira/translations.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; -export const NAME = i18n.translate('xpack.actions.builtin.case.jiraTitle', { +export const NAME = i18n.translate('xpack.actions.builtin.cases.jiraTitle', { defaultMessage: 'Jira', }); diff --git a/x-pack/plugins/actions/server/builtin_action_types/resilient/translations.ts b/x-pack/plugins/actions/server/builtin_action_types/resilient/translations.ts index 7e52c9d71e841..fcb800c1499db 100644 --- a/x-pack/plugins/actions/server/builtin_action_types/resilient/translations.ts +++ b/x-pack/plugins/actions/server/builtin_action_types/resilient/translations.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; -export const NAME = i18n.translate('xpack.actions.builtin.case.resilientTitle', { +export const NAME = i18n.translate('xpack.actions.builtin.cases.resilientTitle', { defaultMessage: 'IBM Resilient', }); diff --git a/x-pack/plugins/case/server/client/index.ts b/x-pack/plugins/case/server/client/index.ts deleted file mode 100644 index 900b5a92ebf92..0000000000000 --- a/x-pack/plugins/case/server/client/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { CaseClientFactoryArguments, CaseClient } from './types'; -import { CaseClientHandler } from './client'; - -export { CaseClientHandler } from './client'; -export { CaseClient } from './types'; - -/** - * Create a CaseClientHandler to external services (other plugins). - */ -export const createExternalCaseClient = (clientArgs: CaseClientFactoryArguments): CaseClient => { - const client = new CaseClientHandler(clientArgs); - return client; -}; diff --git a/x-pack/plugins/case/README.md b/x-pack/plugins/cases/README.md similarity index 100% rename from x-pack/plugins/case/README.md rename to x-pack/plugins/cases/README.md diff --git a/x-pack/plugins/case/common/api/cases/case.ts b/x-pack/plugins/cases/common/api/cases/case.ts similarity index 96% rename from x-pack/plugins/case/common/api/cases/case.ts rename to x-pack/plugins/cases/common/api/cases/case.ts index 33a93952b0e2d..a2bba7dba4b39 100644 --- a/x-pack/plugins/case/common/api/cases/case.ts +++ b/x-pack/plugins/cases/common/api/cases/case.ts @@ -83,7 +83,7 @@ const CasePostRequestNoTypeRt = rt.type({ /** * This type is used for validating a create case request. It requires that the type field be defined. */ -export const CaseClientPostRequestRt = rt.type({ +export const CasesClientPostRequestRt = rt.type({ ...CasePostRequestNoTypeRt.props, [caseTypeField]: CaseTypeRt, }); @@ -92,7 +92,7 @@ export const CaseClientPostRequestRt = rt.type({ * This type is not used for validation when decoding a request because intersection does not have props defined which * required for the excess function. Instead we use this as the type used by the UI. This allows the type field to be * optional and the server will handle setting it to a default value before validating that the request - * has all the necessary fields. CaseClientPostRequestRt is used for validation. + * has all the necessary fields. CasesClientPostRequestRt is used for validation. */ export const CasePostRequestRt = rt.intersection([ rt.partial({ type: CaseTypeRt }), @@ -178,7 +178,7 @@ export type CaseAttributes = rt.TypeOf; * that the type field be defined. The CasePostRequest should be used in most places (the UI etc). This type is really * only necessary for validation. */ -export type CaseClientPostRequest = rt.TypeOf; +export type CasesClientPostRequest = rt.TypeOf; export type CasePostRequest = rt.TypeOf; export type CaseResponse = rt.TypeOf; export type CasesResponse = rt.TypeOf; diff --git a/x-pack/plugins/case/common/api/cases/comment.ts b/x-pack/plugins/cases/common/api/cases/comment.ts similarity index 100% rename from x-pack/plugins/case/common/api/cases/comment.ts rename to x-pack/plugins/cases/common/api/cases/comment.ts diff --git a/x-pack/plugins/case/common/api/cases/configure.ts b/x-pack/plugins/cases/common/api/cases/configure.ts similarity index 100% rename from x-pack/plugins/case/common/api/cases/configure.ts rename to x-pack/plugins/cases/common/api/cases/configure.ts diff --git a/x-pack/plugins/case/common/api/cases/index.ts b/x-pack/plugins/cases/common/api/cases/index.ts similarity index 100% rename from x-pack/plugins/case/common/api/cases/index.ts rename to x-pack/plugins/cases/common/api/cases/index.ts diff --git a/x-pack/plugins/case/common/api/cases/status.ts b/x-pack/plugins/cases/common/api/cases/status.ts similarity index 100% rename from x-pack/plugins/case/common/api/cases/status.ts rename to x-pack/plugins/cases/common/api/cases/status.ts diff --git a/x-pack/plugins/case/common/api/cases/sub_case.ts b/x-pack/plugins/cases/common/api/cases/sub_case.ts similarity index 100% rename from x-pack/plugins/case/common/api/cases/sub_case.ts rename to x-pack/plugins/cases/common/api/cases/sub_case.ts diff --git a/x-pack/plugins/case/common/api/cases/user_actions.ts b/x-pack/plugins/cases/common/api/cases/user_actions.ts similarity index 95% rename from x-pack/plugins/case/common/api/cases/user_actions.ts rename to x-pack/plugins/cases/common/api/cases/user_actions.ts index 6c8e0de80903d..7188ee44efa93 100644 --- a/x-pack/plugins/case/common/api/cases/user_actions.ts +++ b/x-pack/plugins/cases/common/api/cases/user_actions.ts @@ -10,7 +10,7 @@ import * as rt from 'io-ts'; import { UserRT } from '../user'; /* To the next developer, if you add/removed fields here - * make sure to check this file (x-pack/plugins/case/server/services/user_actions/helpers.ts) too + * make sure to check this file (x-pack/plugins/cases/server/services/user_actions/helpers.ts) too */ const UserActionFieldTypeRt = rt.union([ rt.literal('comment'), diff --git a/x-pack/plugins/case/common/api/connectors/index.ts b/x-pack/plugins/cases/common/api/connectors/index.ts similarity index 100% rename from x-pack/plugins/case/common/api/connectors/index.ts rename to x-pack/plugins/cases/common/api/connectors/index.ts diff --git a/x-pack/plugins/case/common/api/connectors/jira.ts b/x-pack/plugins/cases/common/api/connectors/jira.ts similarity index 84% rename from x-pack/plugins/case/common/api/connectors/jira.ts rename to x-pack/plugins/cases/common/api/connectors/jira.ts index d61f4ba91575e..b8a8d0147420e 100644 --- a/x-pack/plugins/case/common/api/connectors/jira.ts +++ b/x-pack/plugins/cases/common/api/connectors/jira.ts @@ -7,7 +7,7 @@ import * as rt from 'io-ts'; -// New fields should also be added at: x-pack/plugins/case/server/connectors/case/schema.ts +// New fields should also be added at: x-pack/plugins/cases/server/connectors/case/schema.ts export const JiraFieldsRT = rt.type({ issueType: rt.union([rt.string, rt.null]), priority: rt.union([rt.string, rt.null]), diff --git a/x-pack/plugins/case/common/api/connectors/mappings.ts b/x-pack/plugins/cases/common/api/connectors/mappings.ts similarity index 100% rename from x-pack/plugins/case/common/api/connectors/mappings.ts rename to x-pack/plugins/cases/common/api/connectors/mappings.ts diff --git a/x-pack/plugins/case/common/api/connectors/resilient.ts b/x-pack/plugins/cases/common/api/connectors/resilient.ts similarity index 84% rename from x-pack/plugins/case/common/api/connectors/resilient.ts rename to x-pack/plugins/cases/common/api/connectors/resilient.ts index dc59588d1e6ed..d28c96968d6e5 100644 --- a/x-pack/plugins/case/common/api/connectors/resilient.ts +++ b/x-pack/plugins/cases/common/api/connectors/resilient.ts @@ -7,7 +7,7 @@ import * as rt from 'io-ts'; -// New fields should also be added at: x-pack/plugins/case/server/connectors/case/schema.ts +// New fields should also be added at: x-pack/plugins/cases/server/connectors/case/schema.ts export const ResilientFieldsRT = rt.type({ incidentTypes: rt.union([rt.array(rt.string), rt.null]), severityCode: rt.union([rt.string, rt.null]), diff --git a/x-pack/plugins/case/common/api/connectors/servicenow_itsm.ts b/x-pack/plugins/cases/common/api/connectors/servicenow_itsm.ts similarity index 87% rename from x-pack/plugins/case/common/api/connectors/servicenow_itsm.ts rename to x-pack/plugins/cases/common/api/connectors/servicenow_itsm.ts index 9eedbcb44907a..6a5453561c73d 100644 --- a/x-pack/plugins/case/common/api/connectors/servicenow_itsm.ts +++ b/x-pack/plugins/cases/common/api/connectors/servicenow_itsm.ts @@ -7,7 +7,7 @@ import * as rt from 'io-ts'; -// New fields should also be added at: x-pack/plugins/case/server/connectors/case/schema.ts +// New fields should also be added at: x-pack/plugins/cases/server/connectors/case/schema.ts export const ServiceNowITSMFieldsRT = rt.type({ impact: rt.union([rt.string, rt.null]), severity: rt.union([rt.string, rt.null]), diff --git a/x-pack/plugins/case/common/api/connectors/servicenow_sir.ts b/x-pack/plugins/cases/common/api/connectors/servicenow_sir.ts similarity index 88% rename from x-pack/plugins/case/common/api/connectors/servicenow_sir.ts rename to x-pack/plugins/cases/common/api/connectors/servicenow_sir.ts index b8d33f259ade7..3da8e694b473d 100644 --- a/x-pack/plugins/case/common/api/connectors/servicenow_sir.ts +++ b/x-pack/plugins/cases/common/api/connectors/servicenow_sir.ts @@ -7,7 +7,7 @@ import * as rt from 'io-ts'; -// New fields should also be added at: x-pack/plugins/case/server/connectors/case/schema.ts +// New fields should also be added at: x-pack/plugins/cases/server/connectors/case/schema.ts export const ServiceNowSIRFieldsRT = rt.type({ category: rt.union([rt.string, rt.null]), destIp: rt.union([rt.boolean, rt.null]), diff --git a/x-pack/plugins/case/common/api/helpers.ts b/x-pack/plugins/cases/common/api/helpers.ts similarity index 100% rename from x-pack/plugins/case/common/api/helpers.ts rename to x-pack/plugins/cases/common/api/helpers.ts diff --git a/x-pack/plugins/case/common/api/index.ts b/x-pack/plugins/cases/common/api/index.ts similarity index 100% rename from x-pack/plugins/case/common/api/index.ts rename to x-pack/plugins/cases/common/api/index.ts diff --git a/x-pack/plugins/case/common/api/runtime_types.ts b/x-pack/plugins/cases/common/api/runtime_types.ts similarity index 100% rename from x-pack/plugins/case/common/api/runtime_types.ts rename to x-pack/plugins/cases/common/api/runtime_types.ts diff --git a/x-pack/plugins/case/common/api/saved_object.ts b/x-pack/plugins/cases/common/api/saved_object.ts similarity index 100% rename from x-pack/plugins/case/common/api/saved_object.ts rename to x-pack/plugins/cases/common/api/saved_object.ts diff --git a/x-pack/plugins/case/common/api/user.ts b/x-pack/plugins/cases/common/api/user.ts similarity index 100% rename from x-pack/plugins/case/common/api/user.ts rename to x-pack/plugins/cases/common/api/user.ts diff --git a/x-pack/plugins/case/common/constants.ts b/x-pack/plugins/cases/common/constants.ts similarity index 98% rename from x-pack/plugins/case/common/constants.ts rename to x-pack/plugins/cases/common/constants.ts index cc69c7ecc2909..1e7cff99a00bd 100644 --- a/x-pack/plugins/case/common/constants.ts +++ b/x-pack/plugins/cases/common/constants.ts @@ -7,7 +7,7 @@ import { DEFAULT_MAX_SIGNALS } from '../../security_solution/common/constants'; -export const APP_ID = 'case'; +export const APP_ID = 'cases'; /** * Case routes diff --git a/x-pack/plugins/case/jest.config.js b/x-pack/plugins/cases/jest.config.js similarity index 87% rename from x-pack/plugins/case/jest.config.js rename to x-pack/plugins/cases/jest.config.js index 49eaf9f7145a7..6368eb8895ad1 100644 --- a/x-pack/plugins/case/jest.config.js +++ b/x-pack/plugins/cases/jest.config.js @@ -8,5 +8,5 @@ module.exports = { preset: '@kbn/test', rootDir: '../../..', - roots: ['/x-pack/plugins/case'], + roots: ['/x-pack/plugins/cases'], }; diff --git a/x-pack/plugins/case/kibana.json b/x-pack/plugins/cases/kibana.json similarity index 78% rename from x-pack/plugins/case/kibana.json rename to x-pack/plugins/cases/kibana.json index 2048ae41fa8ab..1aaf84decbe36 100644 --- a/x-pack/plugins/case/kibana.json +++ b/x-pack/plugins/cases/kibana.json @@ -1,6 +1,6 @@ { - "configPath": ["xpack", "case"], - "id": "case", + "configPath": ["xpack", "cases"], + "id": "cases", "kibanaVersion": "kibana", "requiredPlugins": ["actions", "securitySolution"], "optionalPlugins": [ diff --git a/x-pack/plugins/case/package.json b/x-pack/plugins/cases/package.json similarity index 90% rename from x-pack/plugins/case/package.json rename to x-pack/plugins/cases/package.json index 5a25414296946..bd9a547324ca6 100644 --- a/x-pack/plugins/case/package.json +++ b/x-pack/plugins/cases/package.json @@ -1,6 +1,6 @@ { "author": "Elastic", - "name": "case", + "name": "cases", "version": "8.0.0", "private": true, "license": "Elastic-License", diff --git a/x-pack/plugins/case/server/client/alerts/get.ts b/x-pack/plugins/cases/server/client/alerts/get.ts similarity index 89% rename from x-pack/plugins/case/server/client/alerts/get.ts rename to x-pack/plugins/cases/server/client/alerts/get.ts index 6a6e961e952c0..88298450e499a 100644 --- a/x-pack/plugins/case/server/client/alerts/get.ts +++ b/x-pack/plugins/cases/server/client/alerts/get.ts @@ -8,7 +8,7 @@ import { ElasticsearchClient, Logger } from 'kibana/server'; import { AlertInfo } from '../../common'; import { AlertServiceContract } from '../../services'; -import { CaseClientGetAlertsResponse } from './types'; +import { CasesClientGetAlertsResponse } from './types'; interface GetParams { alertsService: AlertServiceContract; @@ -22,7 +22,7 @@ export const get = async ({ alertsInfo, scopedClusterClient, logger, -}: GetParams): Promise => { +}: GetParams): Promise => { if (alertsInfo.length === 0) { return []; } diff --git a/x-pack/plugins/case/server/client/alerts/types.ts b/x-pack/plugins/cases/server/client/alerts/types.ts similarity index 87% rename from x-pack/plugins/case/server/client/alerts/types.ts rename to x-pack/plugins/cases/server/client/alerts/types.ts index 7b9d4a8856f48..26a582d92e54b 100644 --- a/x-pack/plugins/case/server/client/alerts/types.ts +++ b/x-pack/plugins/cases/server/client/alerts/types.ts @@ -16,4 +16,4 @@ interface Alert { }; } -export type CaseClientGetAlertsResponse = Alert[]; +export type CasesClientGetAlertsResponse = Alert[]; diff --git a/x-pack/plugins/case/server/client/alerts/update_status.test.ts b/x-pack/plugins/cases/server/client/alerts/update_status.test.ts similarity index 73% rename from x-pack/plugins/case/server/client/alerts/update_status.test.ts rename to x-pack/plugins/cases/server/client/alerts/update_status.test.ts index 4662ce1976620..5dfe6060da1db 100644 --- a/x-pack/plugins/case/server/client/alerts/update_status.test.ts +++ b/x-pack/plugins/cases/server/client/alerts/update_status.test.ts @@ -7,18 +7,18 @@ import { CaseStatuses } from '../../../common/api'; import { createMockSavedObjectsRepository } from '../../routes/api/__fixtures__'; -import { createCaseClientWithMockSavedObjectsClient } from '../mocks'; +import { createCasesClientWithMockSavedObjectsClient } from '../mocks'; describe('updateAlertsStatus', () => { it('updates the status of the alert correctly', async () => { const savedObjectsClient = createMockSavedObjectsRepository(); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - await caseClient.client.updateAlertsStatus({ + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); + await casesClient.client.updateAlertsStatus({ alerts: [{ id: 'alert-id-1', index: '.siem-signals', status: CaseStatuses.closed }], }); - expect(caseClient.services.alertsService.updateAlertsStatus).toHaveBeenCalledWith({ + expect(casesClient.services.alertsService.updateAlertsStatus).toHaveBeenCalledWith({ logger: expect.anything(), scopedClusterClient: expect.anything(), alerts: [{ id: 'alert-id-1', index: '.siem-signals', status: CaseStatuses.closed }], diff --git a/x-pack/plugins/case/server/client/alerts/update_status.ts b/x-pack/plugins/cases/server/client/alerts/update_status.ts similarity index 100% rename from x-pack/plugins/case/server/client/alerts/update_status.ts rename to x-pack/plugins/cases/server/client/alerts/update_status.ts diff --git a/x-pack/plugins/case/server/client/cases/create.test.ts b/x-pack/plugins/cases/server/client/cases/create.test.ts similarity index 87% rename from x-pack/plugins/case/server/client/cases/create.test.ts rename to x-pack/plugins/cases/server/client/cases/create.test.ts index e8cc1a8898f04..fe301dcca37ac 100644 --- a/x-pack/plugins/case/server/client/cases/create.test.ts +++ b/x-pack/plugins/cases/server/client/cases/create.test.ts @@ -5,7 +5,12 @@ * 2.0. */ -import { ConnectorTypes, CaseStatuses, CaseType, CaseClientPostRequest } from '../../../common/api'; +import { + ConnectorTypes, + CaseStatuses, + CaseType, + CasesClientPostRequest, +} from '../../../common/api'; import { isCaseError } from '../../common/error'; import { @@ -13,7 +18,7 @@ import { mockCaseConfigure, mockCases, } from '../../routes/api/__fixtures__'; -import { createCaseClientWithMockSavedObjectsClient } from '../mocks'; +import { createCasesClientWithMockSavedObjectsClient } from '../mocks'; describe('create', () => { beforeEach(async () => { @@ -26,7 +31,7 @@ describe('create', () => { describe('happy path', () => { test('it creates the case correctly', async () => { - const postCase: CaseClientPostRequest = { + const postCase: CasesClientPostRequest = { description: 'This is a brand new case of a bad meanie defacing data', title: 'Super Bad Security Issue', tags: ['defacement'], @@ -46,8 +51,8 @@ describe('create', () => { caseSavedObject: mockCases, caseConfigureSavedObject: mockCaseConfigure, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - const res = await caseClient.client.create(postCase); + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); + const res = await casesClient.client.create(postCase); expect(res).toMatchInlineSnapshot(` Object { @@ -93,7 +98,7 @@ describe('create', () => { `); expect( - caseClient.services.userActionService.postUserActions.mock.calls[0][0].actions + casesClient.services.userActionService.postUserActions.mock.calls[0][0].actions // using a snapshot here so we don't have to update the text field manually each time it changes ).toMatchInlineSnapshot(` Array [ @@ -130,7 +135,7 @@ describe('create', () => { }); test('it creates the case without connector in the configuration', async () => { - const postCase: CaseClientPostRequest = { + const postCase: CasesClientPostRequest = { description: 'This is a brand new case of a bad meanie defacing data', title: 'Super Bad Security Issue', tags: ['defacement'], @@ -149,8 +154,8 @@ describe('create', () => { const savedObjectsClient = createMockSavedObjectsRepository({ caseSavedObject: mockCases, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - const res = await caseClient.client.create(postCase); + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); + const res = await casesClient.client.create(postCase); expect(res).toMatchInlineSnapshot(` Object { @@ -193,7 +198,7 @@ describe('create', () => { }); test('Allow user to create case without authentication', async () => { - const postCase: CaseClientPostRequest = { + const postCase: CasesClientPostRequest = { description: 'This is a brand new case of a bad meanie defacing data', title: 'Super Bad Security Issue', tags: ['defacement'], @@ -212,11 +217,11 @@ describe('create', () => { const savedObjectsClient = createMockSavedObjectsRepository({ caseSavedObject: mockCases, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient, badAuth: true, }); - const res = await caseClient.client.create(postCase); + const res = await casesClient.client.create(postCase); expect(res).toMatchInlineSnapshot(` Object { @@ -276,9 +281,9 @@ describe('create', () => { const savedObjectsClient = createMockSavedObjectsRepository({ caseSavedObject: mockCases, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); return ( - caseClient.client + casesClient.client // @ts-expect-error .create({ theCase: postCase }) .catch((e) => { @@ -305,9 +310,9 @@ describe('create', () => { const savedObjectsClient = createMockSavedObjectsRepository({ caseSavedObject: mockCases, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); return ( - caseClient.client + casesClient.client // @ts-expect-error .create({ theCase: postCase }) .catch((e) => { @@ -334,9 +339,9 @@ describe('create', () => { const savedObjectsClient = createMockSavedObjectsRepository({ caseSavedObject: mockCases, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); return ( - caseClient.client + casesClient.client // @ts-expect-error .create({ theCase: postCase }) .catch((e) => { @@ -358,9 +363,9 @@ describe('create', () => { const savedObjectsClient = createMockSavedObjectsRepository({ caseSavedObject: mockCases, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); return ( - caseClient.client + casesClient.client // @ts-expect-error .create({ theCase: postCase }) .catch((e) => { @@ -388,9 +393,9 @@ describe('create', () => { const savedObjectsClient = createMockSavedObjectsRepository({ caseSavedObject: mockCases, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); return ( - caseClient.client + casesClient.client // @ts-expect-error .create({ theCase: postCase }) .catch((e) => { @@ -423,8 +428,8 @@ describe('create', () => { const savedObjectsClient = createMockSavedObjectsRepository({ caseSavedObject: mockCases, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - return caseClient.client.create(postCase).catch((e) => { + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); + return casesClient.client.create(postCase).catch((e) => { expect(e).not.toBeNull(); expect(e.isBoom).toBe(true); expect(e.output.statusCode).toBe(400); @@ -432,7 +437,7 @@ describe('create', () => { }); it(`Returns an error if postNewCase throws`, async () => { - const postCase: CaseClientPostRequest = { + const postCase: CasesClientPostRequest = { description: 'Throw an error', title: 'Super Bad Security Issue', tags: ['error'], @@ -450,9 +455,9 @@ describe('create', () => { const savedObjectsClient = createMockSavedObjectsRepository({ caseSavedObject: mockCases, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); - return caseClient.client.create(postCase).catch((e) => { + return casesClient.client.create(postCase).catch((e) => { expect(e).not.toBeNull(); expect(isCaseError(e)).toBeTruthy(); const boomErr = e.boomify(); diff --git a/x-pack/plugins/case/server/client/cases/create.ts b/x-pack/plugins/cases/server/client/cases/create.ts similarity index 96% rename from x-pack/plugins/case/server/client/cases/create.ts rename to x-pack/plugins/cases/server/client/cases/create.ts index f88924483e0b8..59f9688836341 100644 --- a/x-pack/plugins/case/server/client/cases/create.ts +++ b/x-pack/plugins/cases/server/client/cases/create.ts @@ -18,7 +18,7 @@ import { excess, CaseResponseRt, CaseResponse, - CaseClientPostRequestRt, + CasesClientPostRequestRt, CasePostRequest, CaseType, User, @@ -62,7 +62,7 @@ export const create = async ({ const { type = CaseType.individual, ...nonTypeCaseFields } = theCase; const query = pipe( // decode with the defaulted type field - excess(CaseClientPostRequestRt).decode({ type, ...nonTypeCaseFields }), + excess(CasesClientPostRequestRt).decode({ type, ...nonTypeCaseFields }), fold(throwErrors(Boom.badRequest), identity) ); diff --git a/x-pack/plugins/case/server/client/cases/get.ts b/x-pack/plugins/cases/server/client/cases/get.ts similarity index 100% rename from x-pack/plugins/case/server/client/cases/get.ts rename to x-pack/plugins/cases/server/client/cases/get.ts diff --git a/x-pack/plugins/case/server/client/cases/mock.ts b/x-pack/plugins/cases/server/client/cases/mock.ts similarity index 100% rename from x-pack/plugins/case/server/client/cases/mock.ts rename to x-pack/plugins/cases/server/client/cases/mock.ts diff --git a/x-pack/plugins/case/server/client/cases/push.ts b/x-pack/plugins/cases/server/client/cases/push.ts similarity index 96% rename from x-pack/plugins/case/server/client/cases/push.ts rename to x-pack/plugins/cases/server/client/cases/push.ts index 8aab11be21b01..3217178768f89 100644 --- a/x-pack/plugins/case/server/client/cases/push.ts +++ b/x-pack/plugins/cases/server/client/cases/push.ts @@ -38,7 +38,7 @@ import { CaseServiceSetup, CaseUserActionServiceSetup, } from '../../services'; -import { CaseClientHandler } from '../client'; +import { CasesClientHandler } from '../client'; import { createCaseError } from '../../common/error'; /** @@ -65,7 +65,7 @@ interface PushParams { user: User; caseId: string; connectorId: string; - caseClient: CaseClientHandler; + casesClient: CasesClientHandler; actionsClient: ActionsClient; logger: Logger; } @@ -75,7 +75,7 @@ export const push = async ({ caseService, caseConfigureService, userActionService, - caseClient, + casesClient, actionsClient, connectorId, caseId, @@ -92,9 +92,9 @@ export const push = async ({ try { [theCase, connector, userActions] = await Promise.all([ - caseClient.get({ id: caseId, includeComments: true, includeSubCaseComments: true }), + casesClient.get({ id: caseId, includeComments: true, includeSubCaseComments: true }), actionsClient.get({ id: connectorId }), - caseClient.getUserActions({ caseId }), + casesClient.getUserActions({ caseId }), ]); } catch (e) { const message = `Error getting case and/or connector and/or user actions: ${e.message}`; @@ -111,7 +111,7 @@ export const push = async ({ const alertsInfo = getAlertInfoFromComments(theCase?.comments); try { - alerts = await caseClient.getAlerts({ + alerts = await casesClient.getAlerts({ alertsInfo, }); } catch (e) { @@ -123,7 +123,7 @@ export const push = async ({ } try { - connectorMappings = await caseClient.getMappings({ + connectorMappings = await casesClient.getMappings({ actionsClient, connectorId: connector.id, connectorType: connector.actionTypeId, diff --git a/x-pack/plugins/case/server/client/cases/types.ts b/x-pack/plugins/cases/server/client/cases/types.ts similarity index 100% rename from x-pack/plugins/case/server/client/cases/types.ts rename to x-pack/plugins/cases/server/client/cases/types.ts diff --git a/x-pack/plugins/case/server/client/cases/update.test.ts b/x-pack/plugins/cases/server/client/cases/update.test.ts similarity index 86% rename from x-pack/plugins/case/server/client/cases/update.test.ts rename to x-pack/plugins/cases/server/client/cases/update.test.ts index be68aa1266023..79c3b2838c3b2 100644 --- a/x-pack/plugins/case/server/client/cases/update.test.ts +++ b/x-pack/plugins/cases/server/client/cases/update.test.ts @@ -13,7 +13,7 @@ import { mockCases, mockCaseComments, } from '../../routes/api/__fixtures__'; -import { createCaseClientWithMockSavedObjectsClient } from '../mocks'; +import { createCasesClientWithMockSavedObjectsClient } from '../mocks'; describe('update', () => { beforeEach(async () => { @@ -40,8 +40,8 @@ describe('update', () => { caseSavedObject: mockCases, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - const res = await caseClient.client.update(patchCases); + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); + const res = await casesClient.client.update(patchCases); expect(res).toMatchInlineSnapshot(` Array [ @@ -93,7 +93,7 @@ describe('update', () => { `); expect( - caseClient.services.userActionService.postUserActions.mock.calls[0][0].actions + casesClient.services.userActionService.postUserActions.mock.calls[0][0].actions ).toEqual([ { attributes: { @@ -140,8 +140,8 @@ describe('update', () => { ], }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - const res = await caseClient.client.update(patchCases); + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); + const res = await casesClient.client.update(patchCases); expect(res).toMatchInlineSnapshot(` Array [ @@ -204,8 +204,8 @@ describe('update', () => { caseSavedObject: mockCases, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - const res = await caseClient.client.update(patchCases); + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); + const res = await casesClient.client.update(patchCases); expect(res).toMatchInlineSnapshot(` Array [ @@ -272,8 +272,8 @@ describe('update', () => { caseSavedObject: [mockCaseNoConnectorId], }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - const res = await caseClient.client.update(patchCases); + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); + const res = await casesClient.client.update(patchCases); expect(res).toMatchInlineSnapshot(` Array [ @@ -344,8 +344,8 @@ describe('update', () => { caseSavedObject: mockCases, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - const res = await caseClient.client.update(patchCases); + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); + const res = await casesClient.client.update(patchCases); expect(res).toMatchInlineSnapshot(` Array [ @@ -424,12 +424,12 @@ describe('update', () => { ], }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - caseClient.client.updateAlertsStatus = jest.fn(); + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); + casesClient.client.updateAlertsStatus = jest.fn(); - await caseClient.client.update(patchCases); + await casesClient.client.update(patchCases); - expect(caseClient.client.updateAlertsStatus).toHaveBeenCalledWith({ + expect(casesClient.client.updateAlertsStatus).toHaveBeenCalledWith({ alerts: [ { id: 'test-id', @@ -461,11 +461,11 @@ describe('update', () => { caseCommentSavedObject: [{ ...mockCaseComments[3] }], }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); - await caseClient.client.update(patchCases); + await casesClient.client.update(patchCases); - expect(caseClient.esClient.bulk).not.toHaveBeenCalled(); + expect(casesClient.esClient.bulk).not.toHaveBeenCalled(); }); test('it updates alert status when syncAlerts is turned on', async () => { @@ -489,12 +489,12 @@ describe('update', () => { caseCommentSavedObject: [{ ...mockCaseComments[3] }], }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - caseClient.client.updateAlertsStatus = jest.fn(); + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); + casesClient.client.updateAlertsStatus = jest.fn(); - await caseClient.client.update(patchCases); + await casesClient.client.update(patchCases); - expect(caseClient.client.updateAlertsStatus).toHaveBeenCalledWith({ + expect(casesClient.client.updateAlertsStatus).toHaveBeenCalledWith({ alerts: [{ id: 'test-id', index: 'test-index', status: 'open' }], }); }); @@ -515,11 +515,11 @@ describe('update', () => { caseCommentSavedObject: [{ ...mockCaseComments[3] }], }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); - await caseClient.client.update(patchCases); + await casesClient.client.update(patchCases); - expect(caseClient.esClient.bulk).not.toHaveBeenCalled(); + expect(casesClient.esClient.bulk).not.toHaveBeenCalled(); }); test('it updates alert status for multiple cases', async () => { @@ -572,12 +572,12 @@ describe('update', () => { ], }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - caseClient.client.updateAlertsStatus = jest.fn(); + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); + casesClient.client.updateAlertsStatus = jest.fn(); - await caseClient.client.update(patchCases); + await casesClient.client.update(patchCases); - expect(caseClient.client.updateAlertsStatus).toHaveBeenCalledWith({ + expect(casesClient.client.updateAlertsStatus).toHaveBeenCalledWith({ alerts: [ { id: 'test-id', index: 'test-index', status: 'open' }, { id: 'test-id-2', index: 'test-index-2', status: 'closed' }, @@ -600,11 +600,11 @@ describe('update', () => { caseSavedObject: mockCases, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); - await caseClient.client.update(patchCases); + await casesClient.client.update(patchCases); - expect(caseClient.esClient.bulk).not.toHaveBeenCalled(); + expect(casesClient.esClient.bulk).not.toHaveBeenCalled(); }); }); @@ -629,9 +629,9 @@ describe('update', () => { caseSavedObject: mockCases, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); return ( - caseClient.client + casesClient.client // @ts-expect-error .update({ cases: patchCases }) .catch((e) => { @@ -662,9 +662,9 @@ describe('update', () => { caseSavedObject: mockCases, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); return ( - caseClient.client + casesClient.client // @ts-expect-error .update({ cases: patchCases }) .catch((e) => { @@ -691,8 +691,8 @@ describe('update', () => { caseSavedObject: mockCases, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - return caseClient.client.update(patchCases).catch((e) => { + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); + return casesClient.client.update(patchCases).catch((e) => { expect(e).not.toBeNull(); expect(isCaseError(e)).toBeTruthy(); const boomErr = e.boomify(); @@ -723,8 +723,8 @@ describe('update', () => { caseSavedObject: mockCases, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - return caseClient.client.update(patchCases).catch((e) => { + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); + return casesClient.client.update(patchCases).catch((e) => { expect(e).not.toBeNull(); expect(isCaseError(e)).toBeTruthy(); const boomErr = e.boomify(); @@ -752,8 +752,8 @@ describe('update', () => { caseSavedObject: mockCases, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - return caseClient.client.update(patchCases).catch((e) => { + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); + return casesClient.client.update(patchCases).catch((e) => { expect(e).not.toBeNull(); expect(isCaseError(e)).toBeTruthy(); const boomErr = e.boomify(); diff --git a/x-pack/plugins/case/server/client/cases/update.ts b/x-pack/plugins/cases/server/client/cases/update.ts similarity index 98% rename from x-pack/plugins/case/server/client/cases/update.ts rename to x-pack/plugins/cases/server/client/cases/update.ts index 8c788d6f3bcd9..ff3c0a62407a1 100644 --- a/x-pack/plugins/case/server/client/cases/update.ts +++ b/x-pack/plugins/cases/server/client/cases/update.ts @@ -51,7 +51,7 @@ import { CASE_SAVED_OBJECT, SUB_CASE_SAVED_OBJECT, } from '../../saved_object_types'; -import { CaseClientHandler } from '..'; +import { CasesClientHandler } from '..'; import { createAlertUpdateRequest } from '../../common'; import { UpdateAlertRequest } from '../types'; import { createCaseError } from '../../common/error'; @@ -254,14 +254,14 @@ async function updateAlerts({ casesMap, caseService, client, - caseClient, + casesClient, }: { casesWithSyncSettingChangedToOn: ESCasePatchRequest[]; casesWithStatusChangedAndSynced: ESCasePatchRequest[]; casesMap: Map>; caseService: CaseServiceSetup; client: SavedObjectsClientContract; - caseClient: CaseClientHandler; + casesClient: CasesClientHandler; }) { /** * It's possible that a case ID can appear multiple times in each array. I'm intentionally placing the status changes @@ -309,7 +309,7 @@ async function updateAlerts({ [] ); - await caseClient.updateAlertsStatus({ alerts: alertsToUpdate }); + await casesClient.updateAlertsStatus({ alerts: alertsToUpdate }); } interface UpdateArgs { @@ -317,7 +317,7 @@ interface UpdateArgs { caseService: CaseServiceSetup; userActionService: CaseUserActionServiceSetup; user: User; - caseClient: CaseClientHandler; + casesClient: CasesClientHandler; cases: CasesPatchRequest; logger: Logger; } @@ -327,7 +327,7 @@ export const update = async ({ caseService, userActionService, user, - caseClient, + casesClient, cases, logger, }: UpdateArgs): Promise => { @@ -470,7 +470,7 @@ export const update = async ({ casesWithSyncSettingChangedToOn, caseService, client: savedObjectsClient, - caseClient, + casesClient, casesMap, }); diff --git a/x-pack/plugins/case/server/client/cases/utils.test.ts b/x-pack/plugins/cases/server/client/cases/utils.test.ts similarity index 100% rename from x-pack/plugins/case/server/client/cases/utils.test.ts rename to x-pack/plugins/cases/server/client/cases/utils.test.ts diff --git a/x-pack/plugins/case/server/client/cases/utils.ts b/x-pack/plugins/cases/server/client/cases/utils.ts similarity index 95% rename from x-pack/plugins/case/server/client/cases/utils.ts rename to x-pack/plugins/cases/server/client/cases/utils.ts index 67d5ef55f83c3..7e77bf4ac84cc 100644 --- a/x-pack/plugins/case/server/client/cases/utils.ts +++ b/x-pack/plugins/cases/server/client/cases/utils.ts @@ -23,7 +23,7 @@ import { } from '../../../common/api'; import { ActionsClient } from '../../../../actions/server'; import { externalServiceFormatters, FormatterConnectorTypes } from '../../connectors'; -import { CaseClientGetAlertsResponse } from '../../client/alerts/types'; +import { CasesClientGetAlertsResponse } from '../../client/alerts/types'; import { BasicParams, EntityInformation, @@ -46,7 +46,7 @@ interface CreateIncidentArgs { userActions: CaseUserActionsResponse; connector: ActionConnector; mappings: ConnectorMappingsAttributes[]; - alerts: CaseClientGetAlertsResponse; + alerts: CasesClientGetAlertsResponse; } export const getLatestPushInfo = ( @@ -210,22 +210,22 @@ export const FIELD_INFORMATION = ( ) => { switch (mode) { case 'create': - return i18n.translate('xpack.case.connectors.case.externalIncidentCreated', { + return i18n.translate('xpack.cases.connectors.cases.externalIncidentCreated', { values: { date, user }, defaultMessage: '(created at {date} by {user})', }); case 'update': - return i18n.translate('xpack.case.connectors.case.externalIncidentUpdated', { + return i18n.translate('xpack.cases.connectors.cases.externalIncidentUpdated', { values: { date, user }, defaultMessage: '(updated at {date} by {user})', }); case 'add': - return i18n.translate('xpack.case.connectors.case.externalIncidentAdded', { + return i18n.translate('xpack.cases.connectors.cases.externalIncidentAdded', { values: { date, user }, defaultMessage: '(added at {date} by {user})', }); default: - return i18n.translate('xpack.case.connectors.case.externalIncidentDefault', { + return i18n.translate('xpack.cases.connectors.cases.externalIncidentDefault', { values: { date, user }, defaultMessage: '(created at {date} by {user})', }); diff --git a/x-pack/plugins/case/server/client/client.ts b/x-pack/plugins/cases/server/client/client.ts similarity index 89% rename from x-pack/plugins/case/server/client/client.ts rename to x-pack/plugins/cases/server/client/client.ts index 9f4bf60677649..8f9058654d6fd 100644 --- a/x-pack/plugins/case/server/client/client.ts +++ b/x-pack/plugins/cases/server/client/client.ts @@ -7,16 +7,16 @@ import { ElasticsearchClient, SavedObjectsClientContract, Logger } from 'src/core/server'; import { - CaseClientFactoryArguments, - CaseClient, + CasesClientFactoryArguments, + CasesClient, ConfigureFields, MappingsClient, - CaseClientUpdateAlertsStatus, - CaseClientAddComment, - CaseClientGet, - CaseClientGetUserActions, - CaseClientGetAlerts, - CaseClientPush, + CasesClientUpdateAlertsStatus, + CasesClientAddComment, + CasesClientGet, + CasesClientGetUserActions, + CasesClientGetAlerts, + CasesClientPush, } from './types'; import { create } from './cases/create'; import { update } from './cases/update'; @@ -41,7 +41,7 @@ import { createCaseError } from '../common/error'; /** * This class is a pass through for common case functionality (like creating, get a case). */ -export class CaseClientHandler implements CaseClient { +export class CasesClientHandler implements CasesClient { private readonly _scopedClusterClient: ElasticsearchClient; private readonly _caseConfigureService: CaseConfigureServiceSetup; private readonly _caseService: CaseServiceSetup; @@ -52,7 +52,7 @@ export class CaseClientHandler implements CaseClient { private readonly _alertsService: AlertServiceContract; private readonly logger: Logger; - constructor(clientArgs: CaseClientFactoryArguments) { + constructor(clientArgs: CasesClientFactoryArguments) { this._scopedClusterClient = clientArgs.scopedClusterClient; this._caseConfigureService = clientArgs.caseConfigureService; this._caseService = clientArgs.caseService; @@ -92,7 +92,7 @@ export class CaseClientHandler implements CaseClient { userActionService: this._userActionService, user: this.user, cases, - caseClient: this, + casesClient: this, logger: this.logger, }); } catch (error) { @@ -108,13 +108,13 @@ export class CaseClientHandler implements CaseClient { } } - public async addComment({ caseId, comment }: CaseClientAddComment) { + public async addComment({ caseId, comment }: CasesClientAddComment) { try { return addComment({ savedObjectsClient: this._savedObjectsClient, caseService: this._caseService, userActionService: this._userActionService, - caseClient: this, + casesClient: this, caseId, comment, user: this.user, @@ -147,7 +147,7 @@ export class CaseClientHandler implements CaseClient { ...args, savedObjectsClient: this._savedObjectsClient, connectorMappingsService: this._connectorMappingsService, - caseClient: this, + casesClient: this, logger: this.logger, }); } catch (error) { @@ -159,7 +159,7 @@ export class CaseClientHandler implements CaseClient { } } - public async updateAlertsStatus(args: CaseClientUpdateAlertsStatus) { + public async updateAlertsStatus(args: CasesClientUpdateAlertsStatus) { try { return updateAlertsStatus({ ...args, @@ -178,7 +178,7 @@ export class CaseClientHandler implements CaseClient { } } - public async get(args: CaseClientGet) { + public async get(args: CasesClientGet) { try { return get({ ...args, @@ -192,7 +192,7 @@ export class CaseClientHandler implements CaseClient { } } - public async getUserActions(args: CaseClientGetUserActions) { + public async getUserActions(args: CasesClientGetUserActions) { try { return getUserActions({ ...args, @@ -208,7 +208,7 @@ export class CaseClientHandler implements CaseClient { } } - public async getAlerts(args: CaseClientGetAlerts) { + public async getAlerts(args: CasesClientGetAlerts) { try { return getAlerts({ ...args, @@ -227,7 +227,7 @@ export class CaseClientHandler implements CaseClient { } } - public async push(args: CaseClientPush) { + public async push(args: CasesClientPush) { try { return push({ ...args, @@ -235,7 +235,7 @@ export class CaseClientHandler implements CaseClient { caseService: this._caseService, userActionService: this._userActionService, user: this.user, - caseClient: this, + casesClient: this, caseConfigureService: this._caseConfigureService, logger: this.logger, }); diff --git a/x-pack/plugins/case/server/client/comments/add.test.ts b/x-pack/plugins/cases/server/client/comments/add.test.ts similarity index 85% rename from x-pack/plugins/case/server/client/comments/add.test.ts rename to x-pack/plugins/cases/server/client/comments/add.test.ts index 460a03643b63d..23b7bc37dc814 100644 --- a/x-pack/plugins/case/server/client/comments/add.test.ts +++ b/x-pack/plugins/cases/server/client/comments/add.test.ts @@ -13,7 +13,7 @@ import { mockCaseComments, mockCases, } from '../../routes/api/__fixtures__'; -import { createCaseClientWithMockSavedObjectsClient } from '../mocks'; +import { createCasesClientWithMockSavedObjectsClient } from '../mocks'; type AlertComment = CommentType.alert | CommentType.generatedAlert; @@ -33,8 +33,8 @@ describe('addComment', () => { caseCommentSavedObject: mockCaseComments, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - const res = await caseClient.client.addComment({ + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); + const res = await casesClient.client.addComment({ caseId: 'mock-id-1', comment: { comment: 'Wow, good luck catching that bad meanie!', @@ -71,8 +71,8 @@ describe('addComment', () => { caseCommentSavedObject: mockCaseComments, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - const res = await caseClient.client.addComment({ + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); + const res = await casesClient.client.addComment({ caseId: 'mock-id-1', comment: { type: CommentType.alert, @@ -119,8 +119,8 @@ describe('addComment', () => { caseCommentSavedObject: mockCaseComments, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - const res = await caseClient.client.addComment({ + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); + const res = await casesClient.client.addComment({ caseId: 'mock-id-1', comment: { comment: 'Wow, good luck catching that bad meanie!', @@ -142,8 +142,8 @@ describe('addComment', () => { caseCommentSavedObject: mockCaseComments, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - await caseClient.client.addComment({ + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); + await casesClient.client.addComment({ caseId: 'mock-id-1', comment: { comment: 'Wow, good luck catching that bad meanie!', @@ -152,7 +152,7 @@ describe('addComment', () => { }); expect( - caseClient.services.userActionService.postUserActions.mock.calls[0][0].actions + casesClient.services.userActionService.postUserActions.mock.calls[0][0].actions ).toEqual([ { attributes: { @@ -189,11 +189,11 @@ describe('addComment', () => { caseCommentSavedObject: mockCaseComments, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient, badAuth: true, }); - const res = await caseClient.client.addComment({ + const res = await casesClient.client.addComment({ caseId: 'mock-id-1', comment: { comment: 'Wow, good luck catching that bad meanie!', @@ -229,14 +229,14 @@ describe('addComment', () => { caseCommentSavedObject: mockCaseComments, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient, badAuth: true, }); - caseClient.client.updateAlertsStatus = jest.fn(); + casesClient.client.updateAlertsStatus = jest.fn(); - await caseClient.client.addComment({ + await casesClient.client.addComment({ caseId: 'mock-id-1', comment: { type: CommentType.alert, @@ -249,7 +249,7 @@ describe('addComment', () => { }, }); - expect(caseClient.client.updateAlertsStatus).toHaveBeenCalledWith({ + expect(casesClient.client.updateAlertsStatus).toHaveBeenCalledWith({ alerts: [{ id: 'test-alert', index: 'test-index', status: 'open' }], }); }); @@ -265,14 +265,14 @@ describe('addComment', () => { caseCommentSavedObject: mockCaseComments, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient, badAuth: true, }); - caseClient.client.updateAlertsStatus = jest.fn(); + casesClient.client.updateAlertsStatus = jest.fn(); - await caseClient.client.addComment({ + await casesClient.client.addComment({ caseId: 'mock-id-1', comment: { type: CommentType.alert, @@ -285,7 +285,7 @@ describe('addComment', () => { }, }); - expect(caseClient.client.updateAlertsStatus).not.toHaveBeenCalled(); + expect(casesClient.client.updateAlertsStatus).not.toHaveBeenCalled(); }); }); @@ -297,8 +297,8 @@ describe('addComment', () => { caseSavedObject: mockCases, caseCommentSavedObject: mockCaseComments, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - return caseClient.client + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); + return casesClient.client .addComment({ caseId: 'mock-id-1', // @ts-expect-error @@ -319,7 +319,7 @@ describe('addComment', () => { caseCommentSavedObject: mockCaseComments, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); const allRequestAttributes = { type: CommentType.user, comment: 'a comment', @@ -327,7 +327,7 @@ describe('addComment', () => { ['comment'].forEach((attribute) => { const requestAttributes = omit(attribute, allRequestAttributes); - return caseClient.client + return casesClient.client .addComment({ caseId: 'mock-id-1', // @ts-expect-error @@ -351,10 +351,10 @@ describe('addComment', () => { caseCommentSavedObject: mockCaseComments, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); ['alertId', 'index'].forEach((attribute) => { - return caseClient.client + return casesClient.client .addComment({ caseId: 'mock-id-1', comment: { @@ -379,7 +379,7 @@ describe('addComment', () => { caseCommentSavedObject: mockCaseComments, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); const allRequestAttributes = { type: CommentType.alert, index: 'test-index', @@ -388,7 +388,7 @@ describe('addComment', () => { ['alertId', 'index'].forEach((attribute) => { const requestAttributes = omit(attribute, allRequestAttributes); - return caseClient.client + return casesClient.client .addComment({ caseId: 'mock-id-1', // @ts-expect-error @@ -412,10 +412,10 @@ describe('addComment', () => { caseCommentSavedObject: mockCaseComments, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); ['comment'].forEach((attribute) => { - return caseClient.client + return casesClient.client .addComment({ caseId: 'mock-id-1', comment: { @@ -444,8 +444,8 @@ describe('addComment', () => { caseSavedObject: mockCases, caseCommentSavedObject: mockCaseComments, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - return caseClient.client + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); + return casesClient.client .addComment({ caseId: 'not-exists', comment: { @@ -469,8 +469,8 @@ describe('addComment', () => { caseSavedObject: mockCases, caseCommentSavedObject: mockCaseComments, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - return caseClient.client + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); + return casesClient.client .addComment({ caseId: 'mock-id-1', comment: { @@ -495,8 +495,8 @@ describe('addComment', () => { caseCommentSavedObject: mockCaseComments, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - return caseClient.client + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); + return casesClient.client .addComment({ caseId: 'mock-id-4', comment: { @@ -534,11 +534,11 @@ describe('addComment', () => { caseCommentSavedObject: mockCaseComments, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient, }); await expect( - caseClient.client.addComment({ + casesClient.client.addComment({ caseId: 'mock-id-4', comment: { // casting because type must be either alert or generatedAlert but type is CommentType @@ -568,11 +568,11 @@ describe('addComment', () => { caseCommentSavedObject: mockCaseComments, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient, }); await expect( - caseClient.client.addComment({ + casesClient.client.addComment({ caseId: 'mock-id-1', comment: { // casting because type must be either alert or generatedAlert but type is CommentType diff --git a/x-pack/plugins/case/server/client/comments/add.ts b/x-pack/plugins/cases/server/client/comments/add.ts similarity index 97% rename from x-pack/plugins/case/server/client/comments/add.ts rename to x-pack/plugins/cases/server/client/comments/add.ts index 22a59e4d0539b..45746613dc1d4 100644 --- a/x-pack/plugins/case/server/client/comments/add.ts +++ b/x-pack/plugins/cases/server/client/comments/add.ts @@ -33,7 +33,7 @@ import { import { CaseServiceSetup, CaseUserActionServiceSetup } from '../../services'; import { CommentableCase, createAlertUpdateRequest } from '../../common'; -import { CaseClientHandler } from '..'; +import { CasesClientHandler } from '..'; import { createCaseError } from '../../common/error'; import { CASE_COMMENT_SAVED_OBJECT } from '../../saved_object_types'; import { MAX_GENERATED_ALERTS_PER_SUB_CASE } from '../../../common/constants'; @@ -95,7 +95,7 @@ async function getSubCase({ } interface AddCommentFromRuleArgs { - caseClient: CaseClientHandler; + casesClient: CasesClientHandler; caseId: string; comment: CommentRequestAlertType; savedObjectsClient: SavedObjectsClientContract; @@ -108,7 +108,7 @@ const addGeneratedAlerts = async ({ savedObjectsClient, caseService, userActionService, - caseClient, + casesClient, caseId, comment, logger, @@ -177,7 +177,7 @@ const addGeneratedAlerts = async ({ comment: query, status: subCase.attributes.status, }); - await caseClient.updateAlertsStatus({ + await casesClient.updateAlertsStatus({ alerts: alertsToUpdate, }); } @@ -261,7 +261,7 @@ async function getCombinedCase({ } interface AddCommentArgs { - caseClient: CaseClientHandler; + casesClient: CasesClientHandler; caseId: string; comment: CommentRequest; savedObjectsClient: SavedObjectsClientContract; @@ -275,7 +275,7 @@ export const addComment = async ({ savedObjectsClient, caseService, userActionService, - caseClient, + casesClient, caseId, comment, user, @@ -290,7 +290,7 @@ export const addComment = async ({ return addGeneratedAlerts({ caseId, comment, - caseClient, + casesClient, savedObjectsClient, userActionService, caseService, @@ -329,7 +329,7 @@ export const addComment = async ({ status: updatedCase.status, }); - await caseClient.updateAlertsStatus({ + await casesClient.updateAlertsStatus({ alerts: alertsToUpdate, }); } diff --git a/x-pack/plugins/case/server/client/configure/get_fields.test.ts b/x-pack/plugins/cases/server/client/configure/get_fields.test.ts similarity index 84% rename from x-pack/plugins/case/server/client/configure/get_fields.test.ts rename to x-pack/plugins/cases/server/client/configure/get_fields.test.ts index 55355b33baead..2e2973516d0fd 100644 --- a/x-pack/plugins/case/server/client/configure/get_fields.test.ts +++ b/x-pack/plugins/cases/server/client/configure/get_fields.test.ts @@ -8,7 +8,7 @@ import { ConnectorTypes } from '../../../common/api'; import { createMockSavedObjectsRepository, mockCaseMappings } from '../../routes/api/__fixtures__'; -import { createCaseClientWithMockSavedObjectsClient } from '../mocks'; +import { createCasesClientWithMockSavedObjectsClient } from '../mocks'; import { actionsClientMock } from '../../../../actions/server/actions_client.mock'; import { actionsErrResponse, mappings, mockGetFieldsResponse } from './mock'; describe('get_fields', () => { @@ -23,8 +23,8 @@ describe('get_fields', () => { const savedObjectsClient = createMockSavedObjectsRepository({ caseMappingsSavedObject: mockCaseMappings, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - const res = await caseClient.client.getFields({ + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); + const res = await casesClient.client.getFields({ actionsClient: actionsMock, connectorType: ConnectorTypes.jira, connectorId: '123', @@ -44,8 +44,8 @@ describe('get_fields', () => { const savedObjectsClient = createMockSavedObjectsRepository({ caseMappingsSavedObject: mockCaseMappings, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - await caseClient.client + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); + await casesClient.client .getFields({ actionsClient: { ...actionsMock, execute: jest.fn().mockReturnValue(actionsErrResponse) }, connectorType: ConnectorTypes.jira, diff --git a/x-pack/plugins/case/server/client/configure/get_fields.ts b/x-pack/plugins/cases/server/client/configure/get_fields.ts similarity index 100% rename from x-pack/plugins/case/server/client/configure/get_fields.ts rename to x-pack/plugins/cases/server/client/configure/get_fields.ts diff --git a/x-pack/plugins/case/server/client/configure/get_mappings.test.ts b/x-pack/plugins/cases/server/client/configure/get_mappings.test.ts similarity index 81% rename from x-pack/plugins/case/server/client/configure/get_mappings.test.ts rename to x-pack/plugins/cases/server/client/configure/get_mappings.test.ts index d4dad182d815e..0ec2fc8b4621d 100644 --- a/x-pack/plugins/case/server/client/configure/get_mappings.test.ts +++ b/x-pack/plugins/cases/server/client/configure/get_mappings.test.ts @@ -8,7 +8,7 @@ import { ConnectorTypes } from '../../../common/api'; import { createMockSavedObjectsRepository, mockCaseMappings } from '../../routes/api/__fixtures__'; -import { createCaseClientWithMockSavedObjectsClient } from '../mocks'; +import { createCasesClientWithMockSavedObjectsClient } from '../mocks'; import { actionsClientMock } from '../../../../actions/server/actions_client.mock'; import { mappings, mockGetFieldsResponse } from './mock'; @@ -28,8 +28,8 @@ describe('get_mappings', () => { const savedObjectsClient = createMockSavedObjectsRepository({ caseMappingsSavedObject: mockCaseMappings, }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - const res = await caseClient.client.getMappings({ + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); + const res = await casesClient.client.getMappings({ actionsClient: actionsMock, connectorType: ConnectorTypes.jira, connectorId: '123', @@ -41,8 +41,8 @@ describe('get_mappings', () => { const savedObjectsClient = createMockSavedObjectsRepository({ caseMappingsSavedObject: [], }); - const caseClient = await createCaseClientWithMockSavedObjectsClient({ savedObjectsClient }); - const res = await caseClient.client.getMappings({ + const casesClient = await createCasesClientWithMockSavedObjectsClient({ savedObjectsClient }); + const res = await casesClient.client.getMappings({ actionsClient: actionsMock, connectorType: ConnectorTypes.jira, connectorId: '123', diff --git a/x-pack/plugins/case/server/client/configure/get_mappings.ts b/x-pack/plugins/cases/server/client/configure/get_mappings.ts similarity index 94% rename from x-pack/plugins/case/server/client/configure/get_mappings.ts rename to x-pack/plugins/cases/server/client/configure/get_mappings.ts index 5553580a41560..558c961f89e5b 100644 --- a/x-pack/plugins/case/server/client/configure/get_mappings.ts +++ b/x-pack/plugins/cases/server/client/configure/get_mappings.ts @@ -11,14 +11,14 @@ import { ConnectorMappingsAttributes, ConnectorTypes } from '../../../common/api // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { ACTION_SAVED_OBJECT_TYPE } from '../../../../actions/server/saved_objects'; import { ConnectorMappingsServiceSetup } from '../../services'; -import { CaseClientHandler } from '..'; +import { CasesClientHandler } from '..'; import { createCaseError } from '../../common/error'; interface GetMappingsArgs { savedObjectsClient: SavedObjectsClientContract; connectorMappingsService: ConnectorMappingsServiceSetup; actionsClient: ActionsClient; - caseClient: CaseClientHandler; + casesClient: CasesClientHandler; connectorType: string; connectorId: string; logger: Logger; @@ -28,7 +28,7 @@ export const getMappings = async ({ savedObjectsClient, connectorMappingsService, actionsClient, - caseClient, + casesClient, connectorType, connectorId, logger, @@ -49,7 +49,7 @@ export const getMappings = async ({ let theMapping; // Create connector mappings if there are none if (myConnectorMappings.total === 0) { - const res = await caseClient.getFields({ + const res = await casesClient.getFields({ actionsClient, connectorId, connectorType, diff --git a/x-pack/plugins/case/server/client/configure/mock.ts b/x-pack/plugins/cases/server/client/configure/mock.ts similarity index 100% rename from x-pack/plugins/case/server/client/configure/mock.ts rename to x-pack/plugins/cases/server/client/configure/mock.ts diff --git a/x-pack/plugins/case/server/client/configure/utils.test.ts b/x-pack/plugins/cases/server/client/configure/utils.test.ts similarity index 100% rename from x-pack/plugins/case/server/client/configure/utils.test.ts rename to x-pack/plugins/cases/server/client/configure/utils.test.ts diff --git a/x-pack/plugins/case/server/client/configure/utils.ts b/x-pack/plugins/cases/server/client/configure/utils.ts similarity index 100% rename from x-pack/plugins/case/server/client/configure/utils.ts rename to x-pack/plugins/cases/server/client/configure/utils.ts diff --git a/x-pack/plugins/case/server/client/index.test.ts b/x-pack/plugins/cases/server/client/index.test.ts similarity index 85% rename from x-pack/plugins/case/server/client/index.test.ts rename to x-pack/plugins/cases/server/client/index.test.ts index 6f4b4b136f68f..cfb30d6d5bcb6 100644 --- a/x-pack/plugins/case/server/client/index.test.ts +++ b/x-pack/plugins/cases/server/client/index.test.ts @@ -20,8 +20,8 @@ import { } from '../services/mocks'; jest.mock('./client'); -import { CaseClientHandler } from './client'; -import { createExternalCaseClient } from './index'; +import { CasesClientHandler } from './client'; +import { createExternalCasesClient } from './index'; const logger = loggingSystemMock.create().get('case'); const esClient = elasticsearchServiceMock.createElasticsearchClient(); @@ -32,9 +32,9 @@ const connectorMappingsService = connectorMappingsServiceMock(); const savedObjectsClient = savedObjectsClientMock.create(); const userActionService = createUserActionServiceMock(); -describe('createExternalCaseClient()', () => { +describe('createExternalCasesClient()', () => { test('it creates the client correctly', async () => { - createExternalCaseClient({ + createExternalCasesClient({ scopedClusterClient: esClient, alertsService, caseConfigureService, @@ -45,6 +45,6 @@ describe('createExternalCaseClient()', () => { userActionService, logger, }); - expect(CaseClientHandler).toHaveBeenCalledTimes(1); + expect(CasesClientHandler).toHaveBeenCalledTimes(1); }); }); diff --git a/x-pack/plugins/cases/server/client/index.ts b/x-pack/plugins/cases/server/client/index.ts new file mode 100644 index 0000000000000..fd7cae0edd2ea --- /dev/null +++ b/x-pack/plugins/cases/server/client/index.ts @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { CasesClientFactoryArguments, CasesClient } from './types'; +import { CasesClientHandler } from './client'; + +export { CasesClientHandler } from './client'; +export { CasesClient } from './types'; + +/** + * Create a CasesClientHandler to external services (other plugins). + */ +export const createExternalCasesClient = (clientArgs: CasesClientFactoryArguments): CasesClient => { + const client = new CasesClientHandler(clientArgs); + return client; +}; diff --git a/x-pack/plugins/case/server/client/mocks.ts b/x-pack/plugins/cases/server/client/mocks.ts similarity index 85% rename from x-pack/plugins/case/server/client/mocks.ts rename to x-pack/plugins/cases/server/client/mocks.ts index 5cbd31c79885e..51119070a798d 100644 --- a/x-pack/plugins/case/server/client/mocks.ts +++ b/x-pack/plugins/cases/server/client/mocks.ts @@ -15,12 +15,12 @@ import { CaseUserActionServiceSetup, ConnectorMappingsService, } from '../services'; -import { CaseClient } from './types'; +import { CasesClient } from './types'; import { authenticationMock } from '../routes/api/__fixtures__'; -import { createExternalCaseClient } from '.'; +import { createExternalCasesClient } from '.'; -export type CaseClientPluginContractMock = jest.Mocked; -export const createExternalCaseClientMock = (): CaseClientPluginContractMock => ({ +export type CasesClientPluginContractMock = jest.Mocked; +export const createExternalCasesClientMock = (): CasesClientPluginContractMock => ({ addComment: jest.fn(), create: jest.fn(), get: jest.fn(), @@ -33,7 +33,7 @@ export const createExternalCaseClientMock = (): CaseClientPluginContractMock => updateAlertsStatus: jest.fn(), }); -export const createCaseClientWithMockSavedObjectsClient = async ({ +export const createCasesClientWithMockSavedObjectsClient = async ({ savedObjectsClient, badAuth = false, omitFromContext = [], @@ -42,7 +42,7 @@ export const createCaseClientWithMockSavedObjectsClient = async ({ badAuth?: boolean; omitFromContext?: string[]; }): Promise<{ - client: CaseClient; + client: CasesClient; services: { userActionService: jest.Mocked; alertsService: jest.Mocked; @@ -71,7 +71,7 @@ export const createCaseClientWithMockSavedObjectsClient = async ({ getAlerts: jest.fn(), }; - const caseClient = createExternalCaseClient({ + const casesClient = createExternalCasesClient({ savedObjectsClient, user: auth.getCurrentUser(), caseService, @@ -83,7 +83,7 @@ export const createCaseClientWithMockSavedObjectsClient = async ({ logger: log, }); return { - client: caseClient, + client: casesClient, services: { userActionService, alertsService }, esClient, }; diff --git a/x-pack/plugins/case/server/client/types.ts b/x-pack/plugins/cases/server/client/types.ts similarity index 75% rename from x-pack/plugins/case/server/client/types.ts rename to x-pack/plugins/cases/server/client/types.ts index 3f4ef77d7f348..c62b3913da763 100644 --- a/x-pack/plugins/case/server/client/types.ts +++ b/x-pack/plugins/cases/server/client/types.ts @@ -27,34 +27,34 @@ import { AlertServiceContract, } from '../services'; import { ConnectorMappingsServiceSetup } from '../services/connector_mappings'; -import { CaseClientGetAlertsResponse } from './alerts/types'; +import { CasesClientGetAlertsResponse } from './alerts/types'; -export interface CaseClientGet { +export interface CasesClientGet { id: string; includeComments?: boolean; includeSubCaseComments?: boolean; } -export interface CaseClientPush { +export interface CasesClientPush { actionsClient: ActionsClient; caseId: string; connectorId: string; } -export interface CaseClientAddComment { +export interface CasesClientAddComment { caseId: string; comment: CommentRequest; } -export interface CaseClientUpdateAlertsStatus { +export interface CasesClientUpdateAlertsStatus { alerts: UpdateAlertRequest[]; } -export interface CaseClientGetAlerts { +export interface CasesClientGetAlerts { alertsInfo: AlertInfo[]; } -export interface CaseClientGetUserActions { +export interface CasesClientGetUserActions { caseId: string; subCaseId?: string; } @@ -65,7 +65,7 @@ export interface MappingsClient { connectorType: string; } -export interface CaseClientFactoryArguments { +export interface CasesClientFactoryArguments { scopedClusterClient: ElasticsearchClient; caseConfigureService: CaseConfigureServiceSetup; caseService: CaseServiceSetup; @@ -95,17 +95,17 @@ export interface UpdateAlertRequest { /** * This represents the interface that other plugins can access. */ -export interface CaseClient { - addComment(args: CaseClientAddComment): Promise; +export interface CasesClient { + addComment(args: CasesClientAddComment): Promise; create(theCase: CasePostRequest): Promise; - get(args: CaseClientGet): Promise; - getAlerts(args: CaseClientGetAlerts): Promise; + get(args: CasesClientGet): Promise; + getAlerts(args: CasesClientGetAlerts): Promise; getFields(args: ConfigureFields): Promise; getMappings(args: MappingsClient): Promise; - getUserActions(args: CaseClientGetUserActions): Promise; - push(args: CaseClientPush): Promise; + getUserActions(args: CasesClientGetUserActions): Promise; + push(args: CasesClientPush): Promise; update(args: CasesPatchRequest): Promise; - updateAlertsStatus(args: CaseClientUpdateAlertsStatus): Promise; + updateAlertsStatus(args: CasesClientUpdateAlertsStatus): Promise; } export interface MappingsClient { diff --git a/x-pack/plugins/case/server/client/user_actions/get.ts b/x-pack/plugins/cases/server/client/user_actions/get.ts similarity index 100% rename from x-pack/plugins/case/server/client/user_actions/get.ts rename to x-pack/plugins/cases/server/client/user_actions/get.ts diff --git a/x-pack/plugins/case/server/common/error.ts b/x-pack/plugins/cases/server/common/error.ts similarity index 100% rename from x-pack/plugins/case/server/common/error.ts rename to x-pack/plugins/cases/server/common/error.ts diff --git a/x-pack/plugins/case/server/common/index.ts b/x-pack/plugins/cases/server/common/index.ts similarity index 100% rename from x-pack/plugins/case/server/common/index.ts rename to x-pack/plugins/cases/server/common/index.ts diff --git a/x-pack/plugins/case/server/common/models/commentable_case.ts b/x-pack/plugins/cases/server/common/models/commentable_case.ts similarity index 100% rename from x-pack/plugins/case/server/common/models/commentable_case.ts rename to x-pack/plugins/cases/server/common/models/commentable_case.ts diff --git a/x-pack/plugins/case/server/common/models/index.ts b/x-pack/plugins/cases/server/common/models/index.ts similarity index 100% rename from x-pack/plugins/case/server/common/models/index.ts rename to x-pack/plugins/cases/server/common/models/index.ts diff --git a/x-pack/plugins/case/server/common/types.ts b/x-pack/plugins/cases/server/common/types.ts similarity index 100% rename from x-pack/plugins/case/server/common/types.ts rename to x-pack/plugins/cases/server/common/types.ts diff --git a/x-pack/plugins/case/server/common/utils.test.ts b/x-pack/plugins/cases/server/common/utils.test.ts similarity index 100% rename from x-pack/plugins/case/server/common/utils.test.ts rename to x-pack/plugins/cases/server/common/utils.test.ts diff --git a/x-pack/plugins/case/server/common/utils.ts b/x-pack/plugins/cases/server/common/utils.ts similarity index 100% rename from x-pack/plugins/case/server/common/utils.ts rename to x-pack/plugins/cases/server/common/utils.ts diff --git a/x-pack/plugins/case/server/config.ts b/x-pack/plugins/cases/server/config.ts similarity index 100% rename from x-pack/plugins/case/server/config.ts rename to x-pack/plugins/cases/server/config.ts diff --git a/x-pack/plugins/case/server/connectors/case/index.test.ts b/x-pack/plugins/cases/server/connectors/case/index.test.ts similarity index 98% rename from x-pack/plugins/case/server/connectors/case/index.test.ts rename to x-pack/plugins/cases/server/connectors/case/index.test.ts index e4c29bb099f0e..122f6bd77c693 100644 --- a/x-pack/plugins/case/server/connectors/case/index.test.ts +++ b/x-pack/plugins/cases/server/connectors/case/index.test.ts @@ -28,12 +28,12 @@ import { } from '../../services/mocks'; import { CaseActionType, CaseActionTypeExecutorOptions, CaseExecutorParams } from './types'; import { getActionType } from '.'; -import { createExternalCaseClientMock } from '../../client/mocks'; +import { createExternalCasesClientMock } from '../../client/mocks'; -const mockCaseClient = createExternalCaseClientMock(); +const mockCasesClient = createExternalCasesClientMock(); jest.mock('../../client', () => ({ - createExternalCaseClient: () => mockCaseClient, + createExternalCasesClient: () => mockCasesClient, })); const services = actionsMock.createServices(); @@ -877,7 +877,7 @@ describe('case connector', () => { }, }; - mockCaseClient.create.mockReturnValue(Promise.resolve(createReturn)); + mockCasesClient.create.mockReturnValue(Promise.resolve(createReturn)); const actionId = 'some-id'; const params: CaseExecutorParams = { @@ -913,7 +913,7 @@ describe('case connector', () => { const result = await caseActionType.executor(executorOptions); expect(result).toEqual({ actionId, status: 'ok', data: createReturn }); - expect(mockCaseClient.create).toHaveBeenCalledWith({ + expect(mockCasesClient.create).toHaveBeenCalledWith({ ...params.subActionParams, connector: { id: 'jira', @@ -974,7 +974,7 @@ describe('case connector', () => { }, ]; - mockCaseClient.update.mockReturnValue(Promise.resolve(updateReturn)); + mockCasesClient.update.mockReturnValue(Promise.resolve(updateReturn)); const actionId = 'some-id'; const params: CaseExecutorParams = { @@ -1002,7 +1002,7 @@ describe('case connector', () => { const result = await caseActionType.executor(executorOptions); expect(result).toEqual({ actionId, status: 'ok', data: updateReturn }); - expect(mockCaseClient.update).toHaveBeenCalledWith({ + expect(mockCasesClient.update).toHaveBeenCalledWith({ // Null values have been striped out. cases: [ { @@ -1064,7 +1064,7 @@ describe('case connector', () => { }, }; - mockCaseClient.addComment.mockReturnValue(Promise.resolve(commentReturn)); + mockCasesClient.addComment.mockReturnValue(Promise.resolve(commentReturn)); const actionId = 'some-id'; const params: CaseExecutorParams = { @@ -1089,7 +1089,7 @@ describe('case connector', () => { const result = await caseActionType.executor(executorOptions); expect(result).toEqual({ actionId, status: 'ok', data: commentReturn }); - expect(mockCaseClient.addComment).toHaveBeenCalledWith({ + expect(mockCasesClient.addComment).toHaveBeenCalledWith({ caseId: 'case-id', comment: { comment: 'a comment', diff --git a/x-pack/plugins/case/server/connectors/case/index.ts b/x-pack/plugins/cases/server/connectors/case/index.ts similarity index 95% rename from x-pack/plugins/case/server/connectors/case/index.ts rename to x-pack/plugins/cases/server/connectors/case/index.ts index 4a1d0569bde6d..da993faf0ef5c 100644 --- a/x-pack/plugins/case/server/connectors/case/index.ts +++ b/x-pack/plugins/cases/server/connectors/case/index.ts @@ -14,7 +14,7 @@ import { CommentRequest, CommentType, } from '../../../common/api'; -import { createExternalCaseClient } from '../../client'; +import { createExternalCasesClient } from '../../client'; import { CaseExecutorParamsSchema, CaseConfigurationSchema, CommentSchemaType } from './schema'; import { CaseExecutorResponse, @@ -75,7 +75,7 @@ async function executor( let data: CaseExecutorResponse | null = null; const { savedObjectsClient, scopedClusterClient } = services; - const caseClient = createExternalCaseClient({ + const casesClient = createExternalCasesClient({ savedObjectsClient, scopedClusterClient, // we might want the user information to be passed as part of the action request @@ -96,7 +96,7 @@ async function executor( if (subAction === 'create') { try { - data = await caseClient.create({ + data = await casesClient.create({ ...(subActionParams as CasePostRequest), }); } catch (error) { @@ -118,7 +118,7 @@ async function executor( ); try { - data = await caseClient.update({ cases: [updateParamsWithoutNullValues] }); + data = await casesClient.update({ cases: [updateParamsWithoutNullValues] }); } catch (error) { throw createCaseError({ message: `Failed to update case using connector id: ${updateParamsWithoutNullValues?.id} version: ${updateParamsWithoutNullValues?.version}: ${error}`, @@ -132,7 +132,7 @@ async function executor( const { caseId, comment } = subActionParams as ExecutorSubActionAddCommentParams; try { const formattedComment = transformConnectorComment(comment, logger); - data = await caseClient.addComment({ caseId, comment: formattedComment }); + data = await casesClient.addComment({ caseId, comment: formattedComment }); } catch (error) { throw createCaseError({ message: `Failed to create comment using connector case id: ${caseId}: ${error}`, diff --git a/x-pack/plugins/case/server/connectors/case/schema.ts b/x-pack/plugins/cases/server/connectors/case/schema.ts similarity index 100% rename from x-pack/plugins/case/server/connectors/case/schema.ts rename to x-pack/plugins/cases/server/connectors/case/schema.ts diff --git a/x-pack/plugins/case/server/connectors/case/translations.ts b/x-pack/plugins/cases/server/connectors/case/translations.ts similarity index 80% rename from x-pack/plugins/case/server/connectors/case/translations.ts rename to x-pack/plugins/cases/server/connectors/case/translations.ts index e6434b454e846..aa14ee5aa7a6e 100644 --- a/x-pack/plugins/case/server/connectors/case/translations.ts +++ b/x-pack/plugins/cases/server/connectors/case/translations.ts @@ -7,6 +7,6 @@ import { i18n } from '@kbn/i18n'; -export const NAME = i18n.translate('xpack.case.connectors.case.title', { +export const NAME = i18n.translate('xpack.cases.connectors.cases.title', { defaultMessage: 'Case', }); diff --git a/x-pack/plugins/case/server/connectors/case/types.ts b/x-pack/plugins/cases/server/connectors/case/types.ts similarity index 100% rename from x-pack/plugins/case/server/connectors/case/types.ts rename to x-pack/plugins/cases/server/connectors/case/types.ts diff --git a/x-pack/plugins/case/server/connectors/case/validators.ts b/x-pack/plugins/cases/server/connectors/case/validators.ts similarity index 100% rename from x-pack/plugins/case/server/connectors/case/validators.ts rename to x-pack/plugins/cases/server/connectors/case/validators.ts diff --git a/x-pack/plugins/case/server/connectors/index.ts b/x-pack/plugins/cases/server/connectors/index.ts similarity index 100% rename from x-pack/plugins/case/server/connectors/index.ts rename to x-pack/plugins/cases/server/connectors/index.ts diff --git a/x-pack/plugins/case/server/connectors/jira/external_service_formatter.test.ts b/x-pack/plugins/cases/server/connectors/jira/external_service_formatter.test.ts similarity index 100% rename from x-pack/plugins/case/server/connectors/jira/external_service_formatter.test.ts rename to x-pack/plugins/cases/server/connectors/jira/external_service_formatter.test.ts diff --git a/x-pack/plugins/case/server/connectors/jira/external_service_formatter.ts b/x-pack/plugins/cases/server/connectors/jira/external_service_formatter.ts similarity index 100% rename from x-pack/plugins/case/server/connectors/jira/external_service_formatter.ts rename to x-pack/plugins/cases/server/connectors/jira/external_service_formatter.ts diff --git a/x-pack/plugins/case/server/connectors/resilient/external_service_formatter.test.ts b/x-pack/plugins/cases/server/connectors/resilient/external_service_formatter.test.ts similarity index 100% rename from x-pack/plugins/case/server/connectors/resilient/external_service_formatter.test.ts rename to x-pack/plugins/cases/server/connectors/resilient/external_service_formatter.test.ts diff --git a/x-pack/plugins/case/server/connectors/resilient/external_service_formatter.ts b/x-pack/plugins/cases/server/connectors/resilient/external_service_formatter.ts similarity index 100% rename from x-pack/plugins/case/server/connectors/resilient/external_service_formatter.ts rename to x-pack/plugins/cases/server/connectors/resilient/external_service_formatter.ts diff --git a/x-pack/plugins/case/server/connectors/servicenow/itsm_formatter.ts b/x-pack/plugins/cases/server/connectors/servicenow/itsm_formatter.ts similarity index 100% rename from x-pack/plugins/case/server/connectors/servicenow/itsm_formatter.ts rename to x-pack/plugins/cases/server/connectors/servicenow/itsm_formatter.ts diff --git a/x-pack/plugins/case/server/connectors/servicenow/itsm_formmater.test.ts b/x-pack/plugins/cases/server/connectors/servicenow/itsm_formmater.test.ts similarity index 100% rename from x-pack/plugins/case/server/connectors/servicenow/itsm_formmater.test.ts rename to x-pack/plugins/cases/server/connectors/servicenow/itsm_formmater.test.ts diff --git a/x-pack/plugins/case/server/connectors/servicenow/sir_formatter.test.ts b/x-pack/plugins/cases/server/connectors/servicenow/sir_formatter.test.ts similarity index 100% rename from x-pack/plugins/case/server/connectors/servicenow/sir_formatter.test.ts rename to x-pack/plugins/cases/server/connectors/servicenow/sir_formatter.test.ts diff --git a/x-pack/plugins/case/server/connectors/servicenow/sir_formatter.ts b/x-pack/plugins/cases/server/connectors/servicenow/sir_formatter.ts similarity index 100% rename from x-pack/plugins/case/server/connectors/servicenow/sir_formatter.ts rename to x-pack/plugins/cases/server/connectors/servicenow/sir_formatter.ts diff --git a/x-pack/plugins/case/server/connectors/types.ts b/x-pack/plugins/cases/server/connectors/types.ts similarity index 91% rename from x-pack/plugins/case/server/connectors/types.ts rename to x-pack/plugins/cases/server/connectors/types.ts index ffda6f96ae3ba..f6c284b74667b 100644 --- a/x-pack/plugins/case/server/connectors/types.ts +++ b/x-pack/plugins/cases/server/connectors/types.ts @@ -14,7 +14,7 @@ import { // eslint-disable-next-line @kbn/eslint/no-restricted-paths } from '../../../actions/server/types'; import { CaseResponse, ConnectorTypes } from '../../common/api'; -import { CaseClientGetAlertsResponse } from '../client/alerts/types'; +import { CasesClientGetAlertsResponse } from '../client/alerts/types'; import { CaseServiceSetup, CaseConfigureServiceSetup, @@ -52,7 +52,7 @@ export interface RegisterConnectorsArgs extends GetActionTypeParams { export type FormatterConnectorTypes = Exclude; export interface ExternalServiceFormatter { - format: (theCase: CaseResponse, alerts: CaseClientGetAlertsResponse) => TExternalServiceParams; + format: (theCase: CaseResponse, alerts: CasesClientGetAlertsResponse) => TExternalServiceParams; } export type ExternalServiceFormatterMapper = { diff --git a/x-pack/plugins/case/server/index.ts b/x-pack/plugins/cases/server/index.ts similarity index 100% rename from x-pack/plugins/case/server/index.ts rename to x-pack/plugins/cases/server/index.ts diff --git a/x-pack/plugins/case/server/plugin.ts b/x-pack/plugins/cases/server/plugin.ts similarity index 94% rename from x-pack/plugins/case/server/plugin.ts rename to x-pack/plugins/cases/server/plugin.ts index 43daa51958429..0c661cc18c21b 100644 --- a/x-pack/plugins/case/server/plugin.ts +++ b/x-pack/plugins/cases/server/plugin.ts @@ -34,7 +34,7 @@ import { AlertService, AlertServiceContract, } from './services'; -import { CaseClientHandler, createExternalCaseClient } from './client'; +import { CasesClientHandler, createExternalCasesClient } from './client'; import { registerConnectors } from './connectors'; import type { CasesRequestHandlerContext } from './types'; @@ -88,7 +88,7 @@ export class CasePlugin { this.userActionService = await new CaseUserActionService(this.log).setup(); this.alertsService = new AlertService(); - core.http.registerRouteHandlerContext( + core.http.registerRouteHandlerContext( APP_ID, this.createRouteHandlerContext({ core, @@ -125,12 +125,12 @@ export class CasePlugin { public start(core: CoreStart) { this.log.debug(`Starting Case Workflow`); - const getCaseClientWithRequestAndContext = async ( + const getCasesClientWithRequestAndContext = async ( context: CasesRequestHandlerContext, request: KibanaRequest ) => { const user = await this.caseService!.getUser({ request }); - return createExternalCaseClient({ + return createExternalCasesClient({ scopedClusterClient: context.core.elasticsearch.client.asCurrentUser, savedObjectsClient: core.savedObjects.getScopedClient(request), user, @@ -144,7 +144,7 @@ export class CasePlugin { }; return { - getCaseClientWithRequestAndContext, + getCasesClientWithRequestAndContext, }; } @@ -168,13 +168,13 @@ export class CasePlugin { userActionService: CaseUserActionServiceSetup; alertsService: AlertServiceContract; logger: Logger; - }): IContextProvider => { + }): IContextProvider => { return async (context, request, response) => { const [{ savedObjects }] = await core.getStartServices(); const user = await caseService.getUser({ request }); return { - getCaseClient: () => { - return new CaseClientHandler({ + getCasesClient: () => { + return new CasesClientHandler({ scopedClusterClient: context.core.elasticsearch.client.asCurrentUser, savedObjectsClient: savedObjects.getScopedClient(request), caseService, diff --git a/x-pack/plugins/case/server/routes/api/__fixtures__/authc_mock.ts b/x-pack/plugins/cases/server/routes/api/__fixtures__/authc_mock.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/__fixtures__/authc_mock.ts rename to x-pack/plugins/cases/server/routes/api/__fixtures__/authc_mock.ts diff --git a/x-pack/plugins/case/server/routes/api/__fixtures__/create_mock_so_repository.ts b/x-pack/plugins/cases/server/routes/api/__fixtures__/create_mock_so_repository.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/__fixtures__/create_mock_so_repository.ts rename to x-pack/plugins/cases/server/routes/api/__fixtures__/create_mock_so_repository.ts diff --git a/x-pack/plugins/case/server/routes/api/__fixtures__/index.ts b/x-pack/plugins/cases/server/routes/api/__fixtures__/index.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/__fixtures__/index.ts rename to x-pack/plugins/cases/server/routes/api/__fixtures__/index.ts diff --git a/x-pack/plugins/case/server/routes/api/__fixtures__/mock_actions_client.ts b/x-pack/plugins/cases/server/routes/api/__fixtures__/mock_actions_client.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/__fixtures__/mock_actions_client.ts rename to x-pack/plugins/cases/server/routes/api/__fixtures__/mock_actions_client.ts diff --git a/x-pack/plugins/case/server/routes/api/__fixtures__/mock_router.ts b/x-pack/plugins/cases/server/routes/api/__fixtures__/mock_router.ts similarity index 96% rename from x-pack/plugins/case/server/routes/api/__fixtures__/mock_router.ts rename to x-pack/plugins/cases/server/routes/api/__fixtures__/mock_router.ts index 6b0c4adf9a680..18cce1b087e5d 100644 --- a/x-pack/plugins/case/server/routes/api/__fixtures__/mock_router.ts +++ b/x-pack/plugins/cases/server/routes/api/__fixtures__/mock_router.ts @@ -18,7 +18,7 @@ export const createRoute = async ( const httpService = httpServiceMock.createSetupContract(); const router = httpService.createRouter(); - const log = loggingSystemMock.create().get('case'); + const log = loggingSystemMock.create().get('cases'); const auth = badAuth ? authenticationMock.createInvalid() : authenticationMock.create(); const caseService = new CaseService(log, auth); const caseConfigureServicePlugin = new CaseConfigureService(log); diff --git a/x-pack/plugins/case/server/routes/api/__fixtures__/mock_saved_objects.ts b/x-pack/plugins/cases/server/routes/api/__fixtures__/mock_saved_objects.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/__fixtures__/mock_saved_objects.ts rename to x-pack/plugins/cases/server/routes/api/__fixtures__/mock_saved_objects.ts diff --git a/x-pack/plugins/case/server/routes/api/__fixtures__/route_contexts.ts b/x-pack/plugins/cases/server/routes/api/__fixtures__/route_contexts.ts similarity index 92% rename from x-pack/plugins/case/server/routes/api/__fixtures__/route_contexts.ts rename to x-pack/plugins/cases/server/routes/api/__fixtures__/route_contexts.ts index 7f66602c61fff..42e8561c2ac54 100644 --- a/x-pack/plugins/case/server/routes/api/__fixtures__/route_contexts.ts +++ b/x-pack/plugins/cases/server/routes/api/__fixtures__/route_contexts.ts @@ -6,7 +6,7 @@ */ import { elasticsearchServiceMock, loggingSystemMock } from 'src/core/server/mocks'; -import { createExternalCaseClient } from '../../../client'; +import { createExternalCasesClient } from '../../../client'; import { AlertService, CaseService, @@ -42,13 +42,13 @@ export const createRouteContext = async (client: any, badAuth = false) => { }, }, actions: { getActionsClient: () => actionsMock }, - case: { - getCaseClient: () => caseClient, + cases: { + getCasesClient: () => casesClient, }, } as unknown) as CasesRequestHandlerContext; const connectorMappingsService = await connectorMappingsServicePlugin.setup(); - const caseClient = createExternalCaseClient({ + const casesClient = createExternalCasesClient({ savedObjectsClient: client, user: authc.getCurrentUser(), caseService, diff --git a/x-pack/plugins/case/server/routes/api/__mocks__/request_responses.ts b/x-pack/plugins/cases/server/routes/api/__mocks__/request_responses.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/__mocks__/request_responses.ts rename to x-pack/plugins/cases/server/routes/api/__mocks__/request_responses.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/comments/delete_all_comments.ts b/x-pack/plugins/cases/server/routes/api/cases/comments/delete_all_comments.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/cases/comments/delete_all_comments.ts rename to x-pack/plugins/cases/server/routes/api/cases/comments/delete_all_comments.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/comments/delete_comment.test.ts b/x-pack/plugins/cases/server/routes/api/cases/comments/delete_comment.test.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/cases/comments/delete_comment.test.ts rename to x-pack/plugins/cases/server/routes/api/cases/comments/delete_comment.test.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/comments/delete_comment.ts b/x-pack/plugins/cases/server/routes/api/cases/comments/delete_comment.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/cases/comments/delete_comment.ts rename to x-pack/plugins/cases/server/routes/api/cases/comments/delete_comment.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/comments/find_comments.ts b/x-pack/plugins/cases/server/routes/api/cases/comments/find_comments.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/cases/comments/find_comments.ts rename to x-pack/plugins/cases/server/routes/api/cases/comments/find_comments.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/comments/get_all_comment.ts b/x-pack/plugins/cases/server/routes/api/cases/comments/get_all_comment.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/cases/comments/get_all_comment.ts rename to x-pack/plugins/cases/server/routes/api/cases/comments/get_all_comment.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/comments/get_comment.test.ts b/x-pack/plugins/cases/server/routes/api/cases/comments/get_comment.test.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/cases/comments/get_comment.test.ts rename to x-pack/plugins/cases/server/routes/api/cases/comments/get_comment.test.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/comments/get_comment.ts b/x-pack/plugins/cases/server/routes/api/cases/comments/get_comment.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/cases/comments/get_comment.ts rename to x-pack/plugins/cases/server/routes/api/cases/comments/get_comment.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/comments/patch_comment.test.ts b/x-pack/plugins/cases/server/routes/api/cases/comments/patch_comment.test.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/cases/comments/patch_comment.test.ts rename to x-pack/plugins/cases/server/routes/api/cases/comments/patch_comment.test.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/comments/patch_comment.ts b/x-pack/plugins/cases/server/routes/api/cases/comments/patch_comment.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/cases/comments/patch_comment.ts rename to x-pack/plugins/cases/server/routes/api/cases/comments/patch_comment.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/comments/post_comment.test.ts b/x-pack/plugins/cases/server/routes/api/cases/comments/post_comment.test.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/cases/comments/post_comment.test.ts rename to x-pack/plugins/cases/server/routes/api/cases/comments/post_comment.test.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/comments/post_comment.ts b/x-pack/plugins/cases/server/routes/api/cases/comments/post_comment.ts similarity index 90% rename from x-pack/plugins/case/server/routes/api/cases/comments/post_comment.ts rename to x-pack/plugins/cases/server/routes/api/cases/comments/post_comment.ts index b8dc43dbf3fae..110a16a610014 100644 --- a/x-pack/plugins/case/server/routes/api/cases/comments/post_comment.ts +++ b/x-pack/plugins/cases/server/routes/api/cases/comments/post_comment.ts @@ -28,17 +28,17 @@ export function initPostCommentApi({ router, logger }: RouteDeps) { }, }, async (context, request, response) => { - if (!context.case) { + if (!context.cases) { return response.badRequest({ body: 'RouteHandlerContext is not registered for cases' }); } - const caseClient = context.case.getCaseClient(); + const casesClient = context.cases.getCasesClient(); const caseId = request.query?.subCaseId ?? request.params.case_id; const comment = request.body as CommentRequest; try { return response.ok({ - body: await caseClient.addComment({ caseId, comment }), + body: await casesClient.addComment({ caseId, comment }), }); } catch (error) { logger.error( diff --git a/x-pack/plugins/case/server/routes/api/cases/configure/get_configure.test.ts b/x-pack/plugins/cases/server/routes/api/cases/configure/get_configure.test.ts similarity index 95% rename from x-pack/plugins/case/server/routes/api/cases/configure/get_configure.test.ts rename to x-pack/plugins/cases/server/routes/api/cases/configure/get_configure.test.ts index ff4216a05ae58..f328844acfd00 100644 --- a/x-pack/plugins/case/server/routes/api/cases/configure/get_configure.test.ts +++ b/x-pack/plugins/cases/server/routes/api/cases/configure/get_configure.test.ts @@ -20,7 +20,7 @@ import { initGetCaseConfigure } from './get_configure'; import { CASE_CONFIGURE_URL } from '../../../../../common/constants'; import { mappings } from '../../../../client/configure/mock'; import { ConnectorTypes } from '../../../../../common/api/connectors'; -import { CaseClient } from '../../../../client'; +import { CasesClient } from '../../../../client'; describe('GET configuration', () => { let routeHandler: RequestHandler; @@ -141,15 +141,15 @@ describe('GET configuration', () => { ); const mockThrowContext = { ...context, - case: { - ...context.case, - getCaseClient: () => + cases: { + ...context.cases, + getCasesClient: () => ({ - ...context?.case?.getCaseClient(), + ...context?.cases?.getCasesClient(), getMappings: () => { throw new Error(); }, - } as CaseClient), + } as CasesClient), }, }; diff --git a/x-pack/plugins/case/server/routes/api/cases/configure/get_configure.ts b/x-pack/plugins/cases/server/routes/api/cases/configure/get_configure.ts similarity index 94% rename from x-pack/plugins/case/server/routes/api/cases/configure/get_configure.ts rename to x-pack/plugins/cases/server/routes/api/cases/configure/get_configure.ts index 2ca34d25482dd..c916bd8f4140b 100644 --- a/x-pack/plugins/case/server/routes/api/cases/configure/get_configure.ts +++ b/x-pack/plugins/cases/server/routes/api/cases/configure/get_configure.ts @@ -29,16 +29,16 @@ export function initGetCaseConfigure({ caseConfigureService, router, logger }: R ?.attributes ?? { connector: null }; let mappings: ConnectorMappingsAttributes[] = []; if (connector != null) { - if (!context.case) { + if (!context.cases) { throw Boom.badRequest('RouteHandlerContext is not registered for cases'); } - const caseClient = context.case.getCaseClient(); + const casesClient = context.cases.getCasesClient(); const actionsClient = context.actions?.getActionsClient(); if (actionsClient == null) { throw Boom.notFound('Action client not found'); } try { - mappings = await caseClient.getMappings({ + mappings = await casesClient.getMappings({ actionsClient, connectorId: connector.id, connectorType: connector.type, diff --git a/x-pack/plugins/case/server/routes/api/cases/configure/get_connectors.test.ts b/x-pack/plugins/cases/server/routes/api/cases/configure/get_connectors.test.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/cases/configure/get_connectors.test.ts rename to x-pack/plugins/cases/server/routes/api/cases/configure/get_connectors.test.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/configure/get_connectors.ts b/x-pack/plugins/cases/server/routes/api/cases/configure/get_connectors.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/cases/configure/get_connectors.ts rename to x-pack/plugins/cases/server/routes/api/cases/configure/get_connectors.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/configure/patch_configure.test.ts b/x-pack/plugins/cases/server/routes/api/cases/configure/patch_configure.test.ts similarity index 97% rename from x-pack/plugins/case/server/routes/api/cases/configure/patch_configure.test.ts rename to x-pack/plugins/cases/server/routes/api/cases/configure/patch_configure.test.ts index f43f561e30e10..48d88e0f622f5 100644 --- a/x-pack/plugins/case/server/routes/api/cases/configure/patch_configure.test.ts +++ b/x-pack/plugins/cases/server/routes/api/cases/configure/patch_configure.test.ts @@ -19,7 +19,7 @@ import { mockCaseConfigure } from '../../__fixtures__/mock_saved_objects'; import { initPatchCaseConfigure } from './patch_configure'; import { CASE_CONFIGURE_URL } from '../../../../../common/constants'; import { ConnectorTypes } from '../../../../../common/api/connectors'; -import { CaseClient } from '../../../../client'; +import { CasesClient } from '../../../../client'; describe('PATCH configuration', () => { let routeHandler: RequestHandler; @@ -161,15 +161,15 @@ describe('PATCH configuration', () => { ); const mockThrowContext = { ...context, - case: { - ...context.case, - getCaseClient: () => + cases: { + ...context.cases, + getCasesClient: () => ({ - ...context?.case?.getCaseClient(), + ...context?.cases?.getCasesClient(), getMappings: () => { throw new Error(); }, - } as CaseClient), + } as CasesClient), }, }; diff --git a/x-pack/plugins/case/server/routes/api/cases/configure/patch_configure.ts b/x-pack/plugins/cases/server/routes/api/cases/configure/patch_configure.ts similarity index 96% rename from x-pack/plugins/case/server/routes/api/cases/configure/patch_configure.ts rename to x-pack/plugins/cases/server/routes/api/cases/configure/patch_configure.ts index cd764bb0e8a3e..ba0ea6eb17936 100644 --- a/x-pack/plugins/case/server/routes/api/cases/configure/patch_configure.ts +++ b/x-pack/plugins/cases/server/routes/api/cases/configure/patch_configure.ts @@ -67,16 +67,16 @@ export function initPatchCaseConfigure({ let mappings: ConnectorMappingsAttributes[] = []; if (connector != null) { - if (!context.case) { + if (!context.cases) { throw Boom.badRequest('RouteHandlerContext is not registered for cases'); } - const caseClient = context.case.getCaseClient(); + const casesClient = context.cases.getCasesClient(); const actionsClient = context.actions?.getActionsClient(); if (actionsClient == null) { throw Boom.notFound('Action client have not been found'); } try { - mappings = await caseClient.getMappings({ + mappings = await casesClient.getMappings({ actionsClient, connectorId: connector.id, connectorType: connector.type, diff --git a/x-pack/plugins/case/server/routes/api/cases/configure/post_configure.test.ts b/x-pack/plugins/cases/server/routes/api/cases/configure/post_configure.test.ts similarity index 98% rename from x-pack/plugins/case/server/routes/api/cases/configure/post_configure.test.ts rename to x-pack/plugins/cases/server/routes/api/cases/configure/post_configure.test.ts index 7dcb7d1fa12ca..882a10742d733 100644 --- a/x-pack/plugins/case/server/routes/api/cases/configure/post_configure.test.ts +++ b/x-pack/plugins/cases/server/routes/api/cases/configure/post_configure.test.ts @@ -20,7 +20,7 @@ import { initPostCaseConfigure } from './post_configure'; import { newConfiguration } from '../../__mocks__/request_responses'; import { CASE_CONFIGURE_URL } from '../../../../../common/constants'; import { ConnectorTypes } from '../../../../../common/api/connectors'; -import { CaseClient } from '../../../../client'; +import { CasesClient } from '../../../../client'; describe('POST configuration', () => { let routeHandler: RequestHandler; @@ -81,15 +81,15 @@ describe('POST configuration', () => { ); const mockThrowContext = { ...context, - case: { - ...context.case, - getCaseClient: () => + cases: { + ...context.cases, + getCasesClient: () => ({ - ...context?.case?.getCaseClient(), + ...context?.cases?.getCasesClient(), getMappings: () => { throw new Error(); }, - } as CaseClient), + } as CasesClient), }, }; diff --git a/x-pack/plugins/case/server/routes/api/cases/configure/post_configure.ts b/x-pack/plugins/cases/server/routes/api/cases/configure/post_configure.ts similarity index 96% rename from x-pack/plugins/case/server/routes/api/cases/configure/post_configure.ts rename to x-pack/plugins/cases/server/routes/api/cases/configure/post_configure.ts index f619a727e2e7a..469151a126898 100644 --- a/x-pack/plugins/case/server/routes/api/cases/configure/post_configure.ts +++ b/x-pack/plugins/cases/server/routes/api/cases/configure/post_configure.ts @@ -40,10 +40,10 @@ export function initPostCaseConfigure({ async (context, request, response) => { try { let error = null; - if (!context.case) { + if (!context.cases) { throw Boom.badRequest('RouteHandlerContext is not registered for cases'); } - const caseClient = context.case.getCaseClient(); + const casesClient = context.cases.getCasesClient(); const actionsClient = context.actions?.getActionsClient(); if (actionsClient == null) { throw Boom.notFound('Action client not found'); @@ -68,7 +68,7 @@ export function initPostCaseConfigure({ const creationDate = new Date().toISOString(); let mappings: ConnectorMappingsAttributes[] = []; try { - mappings = await caseClient.getMappings({ + mappings = await casesClient.getMappings({ actionsClient, connectorId: query.connector.id, connectorType: query.connector.type, diff --git a/x-pack/plugins/case/server/routes/api/cases/delete_cases.test.ts b/x-pack/plugins/cases/server/routes/api/cases/delete_cases.test.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/cases/delete_cases.test.ts rename to x-pack/plugins/cases/server/routes/api/cases/delete_cases.test.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/delete_cases.ts b/x-pack/plugins/cases/server/routes/api/cases/delete_cases.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/cases/delete_cases.ts rename to x-pack/plugins/cases/server/routes/api/cases/delete_cases.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/find_cases.test.ts b/x-pack/plugins/cases/server/routes/api/cases/find_cases.test.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/cases/find_cases.test.ts rename to x-pack/plugins/cases/server/routes/api/cases/find_cases.test.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/find_cases.ts b/x-pack/plugins/cases/server/routes/api/cases/find_cases.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/cases/find_cases.ts rename to x-pack/plugins/cases/server/routes/api/cases/find_cases.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/get_case.test.ts b/x-pack/plugins/cases/server/routes/api/cases/get_case.test.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/cases/get_case.test.ts rename to x-pack/plugins/cases/server/routes/api/cases/get_case.test.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/get_case.ts b/x-pack/plugins/cases/server/routes/api/cases/get_case.ts similarity index 93% rename from x-pack/plugins/case/server/routes/api/cases/get_case.ts rename to x-pack/plugins/cases/server/routes/api/cases/get_case.ts index 8a34e3a5b2431..f464f7e47fe7a 100644 --- a/x-pack/plugins/case/server/routes/api/cases/get_case.ts +++ b/x-pack/plugins/cases/server/routes/api/cases/get_case.ts @@ -27,11 +27,11 @@ export function initGetCaseApi({ router, logger }: RouteDeps) { }, async (context, request, response) => { try { - const caseClient = context.case.getCaseClient(); + const casesClient = context.cases.getCasesClient(); const id = request.params.case_id; return response.ok({ - body: await caseClient.get({ + body: await casesClient.get({ id, includeComments: request.query.includeComments, includeSubCaseComments: request.query.includeSubCaseComments, diff --git a/x-pack/plugins/case/server/routes/api/cases/helpers.test.ts b/x-pack/plugins/cases/server/routes/api/cases/helpers.test.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/cases/helpers.test.ts rename to x-pack/plugins/cases/server/routes/api/cases/helpers.test.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/helpers.ts b/x-pack/plugins/cases/server/routes/api/cases/helpers.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/cases/helpers.ts rename to x-pack/plugins/cases/server/routes/api/cases/helpers.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/patch_cases.test.ts b/x-pack/plugins/cases/server/routes/api/cases/patch_cases.test.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/cases/patch_cases.test.ts rename to x-pack/plugins/cases/server/routes/api/cases/patch_cases.test.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/patch_cases.ts b/x-pack/plugins/cases/server/routes/api/cases/patch_cases.ts similarity index 88% rename from x-pack/plugins/case/server/routes/api/cases/patch_cases.ts rename to x-pack/plugins/cases/server/routes/api/cases/patch_cases.ts index 2bff6000d5d6a..8e779087bcafe 100644 --- a/x-pack/plugins/case/server/routes/api/cases/patch_cases.ts +++ b/x-pack/plugins/cases/server/routes/api/cases/patch_cases.ts @@ -20,15 +20,15 @@ export function initPatchCasesApi({ router, logger }: RouteDeps) { }, async (context, request, response) => { try { - if (!context.case) { + if (!context.cases) { return response.badRequest({ body: 'RouteHandlerContext is not registered for cases' }); } - const caseClient = context.case.getCaseClient(); + const casesClient = context.cases.getCasesClient(); const cases = request.body as CasesPatchRequest; return response.ok({ - body: await caseClient.update(cases), + body: await casesClient.update(cases), }); } catch (error) { logger.error(`Failed to patch cases in route: ${error}`); diff --git a/x-pack/plugins/case/server/routes/api/cases/post_case.test.ts b/x-pack/plugins/cases/server/routes/api/cases/post_case.test.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/cases/post_case.test.ts rename to x-pack/plugins/cases/server/routes/api/cases/post_case.test.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/post_case.ts b/x-pack/plugins/cases/server/routes/api/cases/post_case.ts similarity index 87% rename from x-pack/plugins/case/server/routes/api/cases/post_case.ts rename to x-pack/plugins/cases/server/routes/api/cases/post_case.ts index 1328d95826130..e2d71c5837353 100644 --- a/x-pack/plugins/case/server/routes/api/cases/post_case.ts +++ b/x-pack/plugins/cases/server/routes/api/cases/post_case.ts @@ -21,14 +21,14 @@ export function initPostCaseApi({ router, logger }: RouteDeps) { }, async (context, request, response) => { try { - if (!context.case) { + if (!context.cases) { return response.badRequest({ body: 'RouteHandlerContext is not registered for cases' }); } - const caseClient = context.case.getCaseClient(); + const casesClient = context.cases.getCasesClient(); const theCase = request.body as CasePostRequest; return response.ok({ - body: await caseClient.create({ ...theCase }), + body: await casesClient.create({ ...theCase }), }); } catch (error) { logger.error(`Failed to post case in route: ${error}`); diff --git a/x-pack/plugins/case/server/routes/api/cases/push_case.test.ts b/x-pack/plugins/cases/server/routes/api/cases/push_case.test.ts similarity index 98% rename from x-pack/plugins/case/server/routes/api/cases/push_case.test.ts rename to x-pack/plugins/cases/server/routes/api/cases/push_case.test.ts index 0c3ebe67d227a..fb0ba5e3b5d9a 100644 --- a/x-pack/plugins/case/server/routes/api/cases/push_case.test.ts +++ b/x-pack/plugins/cases/server/routes/api/cases/push_case.test.ts @@ -126,12 +126,12 @@ describe('Push case', () => { }) ); - const caseClient = context.case.getCaseClient(); - caseClient.getAlerts = jest.fn().mockResolvedValue([]); + const casesClient = context.cases.getCasesClient(); + casesClient.getAlerts = jest.fn().mockResolvedValue([]); const response = await routeHandler(context, request, kibanaResponseFactory); expect(response.status).toEqual(200); - expect(caseClient.getAlerts).toHaveBeenCalledWith({ + expect(casesClient.getAlerts).toHaveBeenCalledWith({ alertsInfo: [{ id: 'test-id', index: 'test-index' }], }); }); @@ -426,7 +426,7 @@ describe('Push case', () => { const betterContext = ({ ...context, - case: null, + cases: null, } as unknown) as CasesRequestHandlerContext; const res = await routeHandler(betterContext, request, kibanaResponseFactory); diff --git a/x-pack/plugins/case/server/routes/api/cases/push_case.ts b/x-pack/plugins/cases/server/routes/api/cases/push_case.ts similarity index 92% rename from x-pack/plugins/case/server/routes/api/cases/push_case.ts rename to x-pack/plugins/cases/server/routes/api/cases/push_case.ts index cfd2f6b9a61ad..7395758210cf4 100644 --- a/x-pack/plugins/case/server/routes/api/cases/push_case.ts +++ b/x-pack/plugins/cases/server/routes/api/cases/push_case.ts @@ -27,11 +27,11 @@ export function initPushCaseApi({ router, logger }: RouteDeps) { }, async (context, request, response) => { try { - if (!context.case) { + if (!context.cases) { return response.badRequest({ body: 'RouteHandlerContext is not registered for cases' }); } - const caseClient = context.case.getCaseClient(); + const casesClient = context.cases.getCasesClient(); const actionsClient = context.actions?.getActionsClient(); if (actionsClient == null) { @@ -44,7 +44,7 @@ export function initPushCaseApi({ router, logger }: RouteDeps) { ); return response.ok({ - body: await caseClient.push({ + body: await casesClient.push({ actionsClient, caseId: params.case_id, connectorId: params.connector_id, diff --git a/x-pack/plugins/case/server/routes/api/cases/reporters/get_reporters.ts b/x-pack/plugins/cases/server/routes/api/cases/reporters/get_reporters.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/cases/reporters/get_reporters.ts rename to x-pack/plugins/cases/server/routes/api/cases/reporters/get_reporters.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/status/get_status.test.ts b/x-pack/plugins/cases/server/routes/api/cases/status/get_status.test.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/cases/status/get_status.test.ts rename to x-pack/plugins/cases/server/routes/api/cases/status/get_status.test.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/status/get_status.ts b/x-pack/plugins/cases/server/routes/api/cases/status/get_status.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/cases/status/get_status.ts rename to x-pack/plugins/cases/server/routes/api/cases/status/get_status.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/sub_case/delete_sub_cases.ts b/x-pack/plugins/cases/server/routes/api/cases/sub_case/delete_sub_cases.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/cases/sub_case/delete_sub_cases.ts rename to x-pack/plugins/cases/server/routes/api/cases/sub_case/delete_sub_cases.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/sub_case/find_sub_cases.ts b/x-pack/plugins/cases/server/routes/api/cases/sub_case/find_sub_cases.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/cases/sub_case/find_sub_cases.ts rename to x-pack/plugins/cases/server/routes/api/cases/sub_case/find_sub_cases.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/sub_case/get_sub_case.ts b/x-pack/plugins/cases/server/routes/api/cases/sub_case/get_sub_case.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/cases/sub_case/get_sub_case.ts rename to x-pack/plugins/cases/server/routes/api/cases/sub_case/get_sub_case.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/sub_case/patch_sub_cases.ts b/x-pack/plugins/cases/server/routes/api/cases/sub_case/patch_sub_cases.ts similarity index 97% rename from x-pack/plugins/case/server/routes/api/cases/sub_case/patch_sub_cases.ts rename to x-pack/plugins/cases/server/routes/api/cases/sub_case/patch_sub_cases.ts index da7ec956cad1d..08836615e1d39 100644 --- a/x-pack/plugins/case/server/routes/api/cases/sub_case/patch_sub_cases.ts +++ b/x-pack/plugins/cases/server/routes/api/cases/sub_case/patch_sub_cases.ts @@ -17,7 +17,7 @@ import { Logger, } from 'kibana/server'; -import { CaseClient } from '../../../../client'; +import { CasesClient } from '../../../../client'; import { CASE_COMMENT_SAVED_OBJECT, SUB_CASE_SAVED_OBJECT } from '../../../../saved_object_types'; import { CaseServiceSetup, CaseUserActionServiceSetup } from '../../../../services'; import { @@ -55,7 +55,7 @@ interface UpdateArgs { caseService: CaseServiceSetup; userActionService: CaseUserActionServiceSetup; request: KibanaRequest; - caseClient: CaseClient; + casesClient: CasesClient; subCases: SubCasesPatchRequest; logger: Logger; } @@ -218,13 +218,13 @@ async function updateAlerts({ subCasesToSync, caseService, client, - caseClient, + casesClient, logger, }: { subCasesToSync: SubCasePatchRequest[]; caseService: CaseServiceSetup; client: SavedObjectsClientContract; - caseClient: CaseClient; + casesClient: CasesClient; logger: Logger; }) { try { @@ -251,7 +251,7 @@ async function updateAlerts({ [] ); - await caseClient.updateAlertsStatus({ alerts: alertsToUpdate }); + await casesClient.updateAlertsStatus({ alerts: alertsToUpdate }); } catch (error) { throw createCaseError({ message: `Failed to update alert status while updating sub cases: ${JSON.stringify( @@ -268,7 +268,7 @@ async function update({ caseService, userActionService, request, - caseClient, + casesClient, subCases, logger, }: UpdateArgs): Promise { @@ -360,7 +360,7 @@ async function update({ await updateAlerts({ caseService, client, - caseClient, + casesClient, subCasesToSync: subCasesToSyncAlertsFor, logger, }); @@ -425,14 +425,14 @@ export function initPatchSubCasesApi({ }, async (context, request, response) => { try { - const caseClient = context.case.getCaseClient(); + const casesClient = context.cases.getCasesClient(); const subCases = request.body as SubCasesPatchRequest; return response.ok({ body: await update({ request, subCases, - caseClient, + casesClient, client: context.core.savedObjects.client, caseService, userActionService, diff --git a/x-pack/plugins/case/server/routes/api/cases/tags/get_tags.ts b/x-pack/plugins/cases/server/routes/api/cases/tags/get_tags.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/cases/tags/get_tags.ts rename to x-pack/plugins/cases/server/routes/api/cases/tags/get_tags.ts diff --git a/x-pack/plugins/case/server/routes/api/cases/user_actions/get_all_user_actions.ts b/x-pack/plugins/cases/server/routes/api/cases/user_actions/get_all_user_actions.ts similarity index 86% rename from x-pack/plugins/case/server/routes/api/cases/user_actions/get_all_user_actions.ts rename to x-pack/plugins/cases/server/routes/api/cases/user_actions/get_all_user_actions.ts index 2efef9ac67f80..b5c564648c185 100644 --- a/x-pack/plugins/case/server/routes/api/cases/user_actions/get_all_user_actions.ts +++ b/x-pack/plugins/cases/server/routes/api/cases/user_actions/get_all_user_actions.ts @@ -23,15 +23,15 @@ export function initGetAllCaseUserActionsApi({ router, logger }: RouteDeps) { }, async (context, request, response) => { try { - if (!context.case) { + if (!context.cases) { return response.badRequest({ body: 'RouteHandlerContext is not registered for cases' }); } - const caseClient = context.case.getCaseClient(); + const casesClient = context.cases.getCasesClient(); const caseId = request.params.case_id; return response.ok({ - body: await caseClient.getUserActions({ caseId }), + body: await casesClient.getUserActions({ caseId }), }); } catch (error) { logger.error( @@ -56,16 +56,16 @@ export function initGetAllSubCaseUserActionsApi({ router, logger }: RouteDeps) { }, async (context, request, response) => { try { - if (!context.case) { + if (!context.cases) { return response.badRequest({ body: 'RouteHandlerContext is not registered for cases' }); } - const caseClient = context.case.getCaseClient(); + const casesClient = context.cases.getCasesClient(); const caseId = request.params.case_id; const subCaseId = request.params.sub_case_id; return response.ok({ - body: await caseClient.getUserActions({ caseId, subCaseId }), + body: await casesClient.getUserActions({ caseId, subCaseId }), }); } catch (error) { logger.error( diff --git a/x-pack/plugins/case/server/routes/api/index.ts b/x-pack/plugins/cases/server/routes/api/index.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/index.ts rename to x-pack/plugins/cases/server/routes/api/index.ts diff --git a/x-pack/plugins/case/server/routes/api/types.ts b/x-pack/plugins/cases/server/routes/api/types.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/types.ts rename to x-pack/plugins/cases/server/routes/api/types.ts diff --git a/x-pack/plugins/case/server/routes/api/utils.test.ts b/x-pack/plugins/cases/server/routes/api/utils.test.ts similarity index 100% rename from x-pack/plugins/case/server/routes/api/utils.test.ts rename to x-pack/plugins/cases/server/routes/api/utils.test.ts diff --git a/x-pack/plugins/case/server/routes/api/utils.ts b/x-pack/plugins/cases/server/routes/api/utils.ts similarity index 99% rename from x-pack/plugins/case/server/routes/api/utils.ts rename to x-pack/plugins/cases/server/routes/api/utils.ts index 37bffafa4377d..8e8862f4157f1 100644 --- a/x-pack/plugins/case/server/routes/api/utils.ts +++ b/x-pack/plugins/cases/server/routes/api/utils.ts @@ -34,7 +34,7 @@ import { excess, throwErrors, CaseStatuses, - CaseClientPostRequest, + CasesClientPostRequest, AssociationType, SubCaseAttributes, SubCaseResponse, @@ -79,7 +79,7 @@ export const transformNewCase = ({ createdDate: string; email?: string | null; full_name?: string | null; - newCase: CaseClientPostRequest; + newCase: CasesClientPostRequest; username?: string | null; }): ESCaseAttributes => ({ ...newCase, diff --git a/x-pack/plugins/case/server/saved_object_types/cases.ts b/x-pack/plugins/cases/server/saved_object_types/cases.ts similarity index 100% rename from x-pack/plugins/case/server/saved_object_types/cases.ts rename to x-pack/plugins/cases/server/saved_object_types/cases.ts diff --git a/x-pack/plugins/case/server/saved_object_types/comments.ts b/x-pack/plugins/cases/server/saved_object_types/comments.ts similarity index 100% rename from x-pack/plugins/case/server/saved_object_types/comments.ts rename to x-pack/plugins/cases/server/saved_object_types/comments.ts diff --git a/x-pack/plugins/case/server/saved_object_types/configure.ts b/x-pack/plugins/cases/server/saved_object_types/configure.ts similarity index 100% rename from x-pack/plugins/case/server/saved_object_types/configure.ts rename to x-pack/plugins/cases/server/saved_object_types/configure.ts diff --git a/x-pack/plugins/case/server/saved_object_types/connector_mappings.ts b/x-pack/plugins/cases/server/saved_object_types/connector_mappings.ts similarity index 100% rename from x-pack/plugins/case/server/saved_object_types/connector_mappings.ts rename to x-pack/plugins/cases/server/saved_object_types/connector_mappings.ts diff --git a/x-pack/plugins/case/server/saved_object_types/index.ts b/x-pack/plugins/cases/server/saved_object_types/index.ts similarity index 100% rename from x-pack/plugins/case/server/saved_object_types/index.ts rename to x-pack/plugins/cases/server/saved_object_types/index.ts diff --git a/x-pack/plugins/case/server/saved_object_types/migrations.ts b/x-pack/plugins/cases/server/saved_object_types/migrations.ts similarity index 100% rename from x-pack/plugins/case/server/saved_object_types/migrations.ts rename to x-pack/plugins/cases/server/saved_object_types/migrations.ts diff --git a/x-pack/plugins/case/server/saved_object_types/sub_case.ts b/x-pack/plugins/cases/server/saved_object_types/sub_case.ts similarity index 100% rename from x-pack/plugins/case/server/saved_object_types/sub_case.ts rename to x-pack/plugins/cases/server/saved_object_types/sub_case.ts diff --git a/x-pack/plugins/case/server/saved_object_types/user_actions.ts b/x-pack/plugins/cases/server/saved_object_types/user_actions.ts similarity index 100% rename from x-pack/plugins/case/server/saved_object_types/user_actions.ts rename to x-pack/plugins/cases/server/saved_object_types/user_actions.ts diff --git a/x-pack/plugins/case/server/scripts/README.md b/x-pack/plugins/cases/server/scripts/README.md similarity index 96% rename from x-pack/plugins/case/server/scripts/README.md rename to x-pack/plugins/cases/server/scripts/README.md index 2c35eb305282a..08387a73870c6 100644 --- a/x-pack/plugins/case/server/scripts/README.md +++ b/x-pack/plugins/cases/server/scripts/README.md @@ -35,7 +35,7 @@ source ~/.zshrc Restart Kibana and ensure that you are using `--no-base-path` as changing the base path is a feature but will get in the way of the CURL scripts written as is. -Go to the scripts folder `cd kibana/x-pack/plugins/case/server/scripts` and run: +Go to the scripts folder `cd kibana/x-pack/plugins/cases/server/scripts` and run: ```sh ./hard_reset.sh diff --git a/x-pack/plugins/case/server/scripts/check_env_variables.sh b/x-pack/plugins/cases/server/scripts/check_env_variables.sh similarity index 100% rename from x-pack/plugins/case/server/scripts/check_env_variables.sh rename to x-pack/plugins/cases/server/scripts/check_env_variables.sh diff --git a/x-pack/plugins/case/server/scripts/delete_cases.sh b/x-pack/plugins/cases/server/scripts/delete_cases.sh similarity index 100% rename from x-pack/plugins/case/server/scripts/delete_cases.sh rename to x-pack/plugins/cases/server/scripts/delete_cases.sh diff --git a/x-pack/plugins/case/server/scripts/delete_comment.sh b/x-pack/plugins/cases/server/scripts/delete_comment.sh similarity index 100% rename from x-pack/plugins/case/server/scripts/delete_comment.sh rename to x-pack/plugins/cases/server/scripts/delete_comment.sh diff --git a/x-pack/plugins/case/server/scripts/find_cases.sh b/x-pack/plugins/cases/server/scripts/find_cases.sh similarity index 100% rename from x-pack/plugins/case/server/scripts/find_cases.sh rename to x-pack/plugins/cases/server/scripts/find_cases.sh diff --git a/x-pack/plugins/case/server/scripts/find_cases_by_filter.sh b/x-pack/plugins/cases/server/scripts/find_cases_by_filter.sh similarity index 100% rename from x-pack/plugins/case/server/scripts/find_cases_by_filter.sh rename to x-pack/plugins/cases/server/scripts/find_cases_by_filter.sh diff --git a/x-pack/plugins/case/server/scripts/find_cases_sort.sh b/x-pack/plugins/cases/server/scripts/find_cases_sort.sh similarity index 100% rename from x-pack/plugins/case/server/scripts/find_cases_sort.sh rename to x-pack/plugins/cases/server/scripts/find_cases_sort.sh diff --git a/x-pack/plugins/case/server/scripts/generate_case_and_comment_data.sh b/x-pack/plugins/cases/server/scripts/generate_case_and_comment_data.sh similarity index 100% rename from x-pack/plugins/case/server/scripts/generate_case_and_comment_data.sh rename to x-pack/plugins/cases/server/scripts/generate_case_and_comment_data.sh diff --git a/x-pack/plugins/case/server/scripts/generate_case_data.sh b/x-pack/plugins/cases/server/scripts/generate_case_data.sh similarity index 100% rename from x-pack/plugins/case/server/scripts/generate_case_data.sh rename to x-pack/plugins/cases/server/scripts/generate_case_data.sh diff --git a/x-pack/plugins/case/server/scripts/get_case.sh b/x-pack/plugins/cases/server/scripts/get_case.sh similarity index 100% rename from x-pack/plugins/case/server/scripts/get_case.sh rename to x-pack/plugins/cases/server/scripts/get_case.sh diff --git a/x-pack/plugins/case/server/scripts/get_case_comments.sh b/x-pack/plugins/cases/server/scripts/get_case_comments.sh similarity index 100% rename from x-pack/plugins/case/server/scripts/get_case_comments.sh rename to x-pack/plugins/cases/server/scripts/get_case_comments.sh diff --git a/x-pack/plugins/case/server/scripts/get_comment.sh b/x-pack/plugins/cases/server/scripts/get_comment.sh similarity index 100% rename from x-pack/plugins/case/server/scripts/get_comment.sh rename to x-pack/plugins/cases/server/scripts/get_comment.sh diff --git a/x-pack/plugins/case/server/scripts/get_reporters.sh b/x-pack/plugins/cases/server/scripts/get_reporters.sh similarity index 100% rename from x-pack/plugins/case/server/scripts/get_reporters.sh rename to x-pack/plugins/cases/server/scripts/get_reporters.sh diff --git a/x-pack/plugins/case/server/scripts/get_status.sh b/x-pack/plugins/cases/server/scripts/get_status.sh similarity index 100% rename from x-pack/plugins/case/server/scripts/get_status.sh rename to x-pack/plugins/cases/server/scripts/get_status.sh diff --git a/x-pack/plugins/case/server/scripts/get_tags.sh b/x-pack/plugins/cases/server/scripts/get_tags.sh similarity index 100% rename from x-pack/plugins/case/server/scripts/get_tags.sh rename to x-pack/plugins/cases/server/scripts/get_tags.sh diff --git a/x-pack/plugins/case/server/scripts/hard_reset.sh b/x-pack/plugins/cases/server/scripts/hard_reset.sh similarity index 100% rename from x-pack/plugins/case/server/scripts/hard_reset.sh rename to x-pack/plugins/cases/server/scripts/hard_reset.sh diff --git a/x-pack/plugins/case/server/scripts/mock/case/post_case.json b/x-pack/plugins/cases/server/scripts/mock/case/post_case.json similarity index 100% rename from x-pack/plugins/case/server/scripts/mock/case/post_case.json rename to x-pack/plugins/cases/server/scripts/mock/case/post_case.json diff --git a/x-pack/plugins/case/server/scripts/mock/case/post_case_v2.json b/x-pack/plugins/cases/server/scripts/mock/case/post_case_v2.json similarity index 100% rename from x-pack/plugins/case/server/scripts/mock/case/post_case_v2.json rename to x-pack/plugins/cases/server/scripts/mock/case/post_case_v2.json diff --git a/x-pack/plugins/case/server/scripts/mock/comment/post_comment.json b/x-pack/plugins/cases/server/scripts/mock/comment/post_comment.json similarity index 100% rename from x-pack/plugins/case/server/scripts/mock/comment/post_comment.json rename to x-pack/plugins/cases/server/scripts/mock/comment/post_comment.json diff --git a/x-pack/plugins/case/server/scripts/mock/comment/post_comment_v2.json b/x-pack/plugins/cases/server/scripts/mock/comment/post_comment_v2.json similarity index 100% rename from x-pack/plugins/case/server/scripts/mock/comment/post_comment_v2.json rename to x-pack/plugins/cases/server/scripts/mock/comment/post_comment_v2.json diff --git a/x-pack/plugins/case/server/scripts/patch_cases.sh b/x-pack/plugins/cases/server/scripts/patch_cases.sh similarity index 100% rename from x-pack/plugins/case/server/scripts/patch_cases.sh rename to x-pack/plugins/cases/server/scripts/patch_cases.sh diff --git a/x-pack/plugins/case/server/scripts/patch_comment.sh b/x-pack/plugins/cases/server/scripts/patch_comment.sh similarity index 100% rename from x-pack/plugins/case/server/scripts/patch_comment.sh rename to x-pack/plugins/cases/server/scripts/patch_comment.sh diff --git a/x-pack/plugins/case/server/scripts/post_case.sh b/x-pack/plugins/cases/server/scripts/post_case.sh similarity index 100% rename from x-pack/plugins/case/server/scripts/post_case.sh rename to x-pack/plugins/cases/server/scripts/post_case.sh diff --git a/x-pack/plugins/case/server/scripts/post_comment.sh b/x-pack/plugins/cases/server/scripts/post_comment.sh similarity index 100% rename from x-pack/plugins/case/server/scripts/post_comment.sh rename to x-pack/plugins/cases/server/scripts/post_comment.sh diff --git a/x-pack/plugins/case/server/scripts/sub_cases/README.md b/x-pack/plugins/cases/server/scripts/sub_cases/README.md similarity index 95% rename from x-pack/plugins/case/server/scripts/sub_cases/README.md rename to x-pack/plugins/cases/server/scripts/sub_cases/README.md index 92873b8f037f3..389fc53856db8 100644 --- a/x-pack/plugins/case/server/scripts/sub_cases/README.md +++ b/x-pack/plugins/cases/server/scripts/sub_cases/README.md @@ -2,7 +2,7 @@ This script makes interacting with sub cases easier (creating, deleting, retrieving, etc). -To run the script, first `cd x-pack/plugins/case/server/scripts` +To run the script, first `cd x-pack/plugins/cases/server/scripts` ## Showing the help diff --git a/x-pack/plugins/case/server/scripts/sub_cases/generator.js b/x-pack/plugins/cases/server/scripts/sub_cases/generator.js similarity index 100% rename from x-pack/plugins/case/server/scripts/sub_cases/generator.js rename to x-pack/plugins/cases/server/scripts/sub_cases/generator.js diff --git a/x-pack/plugins/case/server/scripts/sub_cases/index.ts b/x-pack/plugins/cases/server/scripts/sub_cases/index.ts similarity index 100% rename from x-pack/plugins/case/server/scripts/sub_cases/index.ts rename to x-pack/plugins/cases/server/scripts/sub_cases/index.ts diff --git a/x-pack/plugins/case/server/services/alerts/index.test.ts b/x-pack/plugins/cases/server/services/alerts/index.test.ts similarity index 100% rename from x-pack/plugins/case/server/services/alerts/index.test.ts rename to x-pack/plugins/cases/server/services/alerts/index.test.ts diff --git a/x-pack/plugins/case/server/services/alerts/index.ts b/x-pack/plugins/cases/server/services/alerts/index.ts similarity index 100% rename from x-pack/plugins/case/server/services/alerts/index.ts rename to x-pack/plugins/cases/server/services/alerts/index.ts diff --git a/x-pack/plugins/case/server/services/configure/index.ts b/x-pack/plugins/cases/server/services/configure/index.ts similarity index 100% rename from x-pack/plugins/case/server/services/configure/index.ts rename to x-pack/plugins/cases/server/services/configure/index.ts diff --git a/x-pack/plugins/case/server/services/connector_mappings/index.ts b/x-pack/plugins/cases/server/services/connector_mappings/index.ts similarity index 100% rename from x-pack/plugins/case/server/services/connector_mappings/index.ts rename to x-pack/plugins/cases/server/services/connector_mappings/index.ts diff --git a/x-pack/plugins/case/server/services/index.ts b/x-pack/plugins/cases/server/services/index.ts similarity index 100% rename from x-pack/plugins/case/server/services/index.ts rename to x-pack/plugins/cases/server/services/index.ts diff --git a/x-pack/plugins/case/server/services/mocks.ts b/x-pack/plugins/cases/server/services/mocks.ts similarity index 100% rename from x-pack/plugins/case/server/services/mocks.ts rename to x-pack/plugins/cases/server/services/mocks.ts diff --git a/x-pack/plugins/case/server/services/reporters/read_reporters.ts b/x-pack/plugins/cases/server/services/reporters/read_reporters.ts similarity index 100% rename from x-pack/plugins/case/server/services/reporters/read_reporters.ts rename to x-pack/plugins/cases/server/services/reporters/read_reporters.ts diff --git a/x-pack/plugins/case/server/services/tags/read_tags.ts b/x-pack/plugins/cases/server/services/tags/read_tags.ts similarity index 100% rename from x-pack/plugins/case/server/services/tags/read_tags.ts rename to x-pack/plugins/cases/server/services/tags/read_tags.ts diff --git a/x-pack/plugins/case/server/services/user_actions/helpers.ts b/x-pack/plugins/cases/server/services/user_actions/helpers.ts similarity index 100% rename from x-pack/plugins/case/server/services/user_actions/helpers.ts rename to x-pack/plugins/cases/server/services/user_actions/helpers.ts diff --git a/x-pack/plugins/case/server/services/user_actions/index.ts b/x-pack/plugins/cases/server/services/user_actions/index.ts similarity index 100% rename from x-pack/plugins/case/server/services/user_actions/index.ts rename to x-pack/plugins/cases/server/services/user_actions/index.ts diff --git a/x-pack/plugins/case/server/types.ts b/x-pack/plugins/cases/server/types.ts similarity index 89% rename from x-pack/plugins/case/server/types.ts rename to x-pack/plugins/cases/server/types.ts index d01aedeaaba4c..31d73ea999163 100644 --- a/x-pack/plugins/case/server/types.ts +++ b/x-pack/plugins/cases/server/types.ts @@ -8,17 +8,17 @@ import type { IRouter, RequestHandlerContext } from 'src/core/server'; import type { AppRequestContext } from '../../security_solution/server'; import type { ActionsApiRequestHandlerContext } from '../../actions/server'; -import { CaseClient } from './client'; +import { CasesClient } from './client'; export interface CaseRequestContext { - getCaseClient: () => CaseClient; + getCasesClient: () => CasesClient; } /** * @internal */ export interface CasesRequestHandlerContext extends RequestHandlerContext { - case: CaseRequestContext; + cases: CaseRequestContext; actions: ActionsApiRequestHandlerContext; // TODO: Remove when triggers_ui do not import case's types. // PR https://github.com/elastic/kibana/pull/84587. diff --git a/x-pack/plugins/security_solution/public/cases/components/add_comment/index.test.tsx b/x-pack/plugins/security_solution/public/cases/components/add_comment/index.test.tsx index d02f7e0ee0961..9c06fc032f819 100644 --- a/x-pack/plugins/security_solution/public/cases/components/add_comment/index.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/add_comment/index.test.tsx @@ -13,7 +13,7 @@ import { noop } from 'lodash/fp'; import { TestProviders } from '../../../common/mock'; import { Router, routeData, mockHistory, mockLocation } from '../__mock__/router'; -import { CommentRequest, CommentType } from '../../../../../case/common/api'; +import { CommentRequest, CommentType } from '../../../../../cases/common/api'; import { useInsertTimeline } from '../use_insert_timeline'; import { usePostComment } from '../../containers/use_post_comment'; import { AddComment, AddCommentRefObject } from '.'; diff --git a/x-pack/plugins/security_solution/public/cases/components/add_comment/index.tsx b/x-pack/plugins/security_solution/public/cases/components/add_comment/index.tsx index c94ef75523e2c..acd27e99a857f 100644 --- a/x-pack/plugins/security_solution/public/cases/components/add_comment/index.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/add_comment/index.tsx @@ -9,7 +9,7 @@ import { EuiButton, EuiLoadingSpinner } from '@elastic/eui'; import React, { useCallback, forwardRef, useImperativeHandle } from 'react'; import styled from 'styled-components'; -import { CommentType } from '../../../../../case/common/api'; +import { CommentType } from '../../../../../cases/common/api'; import { usePostComment } from '../../containers/use_post_comment'; import { Case } from '../../containers/types'; import { MarkdownEditorForm } from '../../../common/components/markdown_editor/eui_form'; diff --git a/x-pack/plugins/security_solution/public/cases/components/add_comment/schema.tsx b/x-pack/plugins/security_solution/public/cases/components/add_comment/schema.tsx index e22a709325261..2cf7d3c6c555b 100644 --- a/x-pack/plugins/security_solution/public/cases/components/add_comment/schema.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/add_comment/schema.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { CommentRequestUserType } from '../../../../../case/common/api'; +import { CommentRequestUserType } from '../../../../../cases/common/api'; import { FIELD_TYPES, fieldValidators, FormSchema } from '../../../shared_imports'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/cases/components/all_cases/actions.tsx b/x-pack/plugins/security_solution/public/cases/components/all_cases/actions.tsx index 046da5e833bf8..daa988641fbab 100644 --- a/x-pack/plugins/security_solution/public/cases/components/all_cases/actions.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/all_cases/actions.tsx @@ -8,7 +8,7 @@ import { Dispatch } from 'react'; import { DefaultItemIconButtonAction } from '@elastic/eui/src/components/basic_table/action_types'; -import { CaseStatuses } from '../../../../../case/common/api'; +import { CaseStatuses } from '../../../../../cases/common/api'; import { Case, SubCase } from '../../containers/types'; import { UpdateCase } from '../../containers/use_get_cases'; import { statuses } from '../status'; diff --git a/x-pack/plugins/security_solution/public/cases/components/all_cases/columns.tsx b/x-pack/plugins/security_solution/public/cases/components/all_cases/columns.tsx index e69f85c862962..86f854fd0a145 100644 --- a/x-pack/plugins/security_solution/public/cases/components/all_cases/columns.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/all_cases/columns.tsx @@ -19,7 +19,7 @@ import { RIGHT_ALIGNMENT } from '@elastic/eui/lib/services'; import styled from 'styled-components'; import { DefaultItemIconButtonAction } from '@elastic/eui/src/components/basic_table/action_types'; -import { CaseStatuses, CaseType } from '../../../../../case/common/api'; +import { CaseStatuses, CaseType } from '../../../../../cases/common/api'; import { getEmptyTagValue } from '../../../common/components/empty_value'; import { Case, SubCase } from '../../containers/types'; import { FormattedRelativePreferenceDate } from '../../../common/components/formatted_date'; diff --git a/x-pack/plugins/security_solution/public/cases/components/all_cases/expanded_row.tsx b/x-pack/plugins/security_solution/public/cases/components/all_cases/expanded_row.tsx index 1e1e925a20ada..43f0d9df49e94 100644 --- a/x-pack/plugins/security_solution/public/cases/components/all_cases/expanded_row.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/all_cases/expanded_row.tsx @@ -10,7 +10,7 @@ import { EuiBasicTable as _EuiBasicTable } from '@elastic/eui'; import styled from 'styled-components'; import { Case, SubCase } from '../../containers/types'; import { CasesColumns } from './columns'; -import { AssociationType } from '../../../../../case/common/api'; +import { AssociationType } from '../../../../../cases/common/api'; type ExpandedRowMap = Record | {}; diff --git a/x-pack/plugins/security_solution/public/cases/components/all_cases/helpers.ts b/x-pack/plugins/security_solution/public/cases/components/all_cases/helpers.ts index 519be95fcdfef..8962d67319371 100644 --- a/x-pack/plugins/security_solution/public/cases/components/all_cases/helpers.ts +++ b/x-pack/plugins/security_solution/public/cases/components/all_cases/helpers.ts @@ -6,7 +6,7 @@ */ import { filter } from 'lodash/fp'; -import { AssociationType, CaseStatuses, CaseType } from '../../../../../case/common/api'; +import { AssociationType, CaseStatuses, CaseType } from '../../../../../cases/common/api'; import { Case, SubCase } from '../../containers/types'; import { statuses } from '../status'; diff --git a/x-pack/plugins/security_solution/public/cases/components/all_cases/index.test.tsx b/x-pack/plugins/security_solution/public/cases/components/all_cases/index.test.tsx index 90b1143ca750d..0fafdaf81f095 100644 --- a/x-pack/plugins/security_solution/public/cases/components/all_cases/index.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/all_cases/index.test.tsx @@ -14,7 +14,7 @@ import { TestProviders } from '../../../common/mock'; import { casesStatus, useGetCasesMockState, collectionCase } from '../../containers/mock'; import * as i18n from './translations'; -import { CaseStatuses, CaseType } from '../../../../../case/common/api'; +import { CaseStatuses, CaseType } from '../../../../../cases/common/api'; import { useKibana } from '../../../common/lib/kibana'; import { getEmptyTagValue } from '../../../common/components/empty_value'; import { useDeleteCases } from '../../containers/use_delete_cases'; diff --git a/x-pack/plugins/security_solution/public/cases/components/all_cases/index.tsx b/x-pack/plugins/security_solution/public/cases/components/all_cases/index.tsx index 7b72a2e188903..c5748a321c19b 100644 --- a/x-pack/plugins/security_solution/public/cases/components/all_cases/index.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/all_cases/index.tsx @@ -22,7 +22,7 @@ import styled, { css } from 'styled-components'; import classnames from 'classnames'; import * as i18n from './translations'; -import { CaseStatuses, CaseType } from '../../../../../case/common/api'; +import { CaseStatuses, CaseType } from '../../../../../cases/common/api'; import { getCasesColumns } from './columns'; import { Case, DeleteCase, FilterOptions, SortFieldCase, SubCase } from '../../containers/types'; import { useGetCases, UpdateCase } from '../../containers/use_get_cases'; diff --git a/x-pack/plugins/security_solution/public/cases/components/all_cases/status_filter.test.tsx b/x-pack/plugins/security_solution/public/cases/components/all_cases/status_filter.test.tsx index 9d5b36515182d..5c9f11d1e3a83 100644 --- a/x-pack/plugins/security_solution/public/cases/components/all_cases/status_filter.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/all_cases/status_filter.test.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { mount } from 'enzyme'; import { waitFor } from '@testing-library/react'; -import { CaseStatuses } from '../../../../../case/common/api'; +import { CaseStatuses } from '../../../../../cases/common/api'; import { StatusFilter } from './status_filter'; import { StatusAll } from '../status'; diff --git a/x-pack/plugins/security_solution/public/cases/components/all_cases/table_filters.test.tsx b/x-pack/plugins/security_solution/public/cases/components/all_cases/table_filters.test.tsx index 0bf622a54f51a..48a642aaf51a9 100644 --- a/x-pack/plugins/security_solution/public/cases/components/all_cases/table_filters.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/all_cases/table_filters.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { mount } from 'enzyme'; -import { CaseStatuses } from '../../../../../case/common/api'; +import { CaseStatuses } from '../../../../../cases/common/api'; import { TestProviders } from '../../../common/mock'; import { useGetTags } from '../../containers/use_get_tags'; import { useGetReporters } from '../../containers/use_get_reporters'; diff --git a/x-pack/plugins/security_solution/public/cases/components/all_cases/table_filters.tsx b/x-pack/plugins/security_solution/public/cases/components/all_cases/table_filters.tsx index 84b032489f326..ff5b511ef9026 100644 --- a/x-pack/plugins/security_solution/public/cases/components/all_cases/table_filters.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/all_cases/table_filters.tsx @@ -10,7 +10,7 @@ import { isEqual } from 'lodash/fp'; import styled from 'styled-components'; import { EuiFlexGroup, EuiFlexItem, EuiFieldSearch, EuiFilterGroup } from '@elastic/eui'; -import { CaseStatuses } from '../../../../../case/common/api'; +import { CaseStatuses } from '../../../../../cases/common/api'; import { FilterOptions } from '../../containers/types'; import { useGetTags } from '../../containers/use_get_tags'; import { useGetReporters } from '../../containers/use_get_reporters'; diff --git a/x-pack/plugins/security_solution/public/cases/components/all_cases/translations.ts b/x-pack/plugins/security_solution/public/cases/components/all_cases/translations.ts index 3b27ef25eda14..ad44959ecb1dc 100644 --- a/x-pack/plugins/security_solution/public/cases/components/all_cases/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/components/all_cases/translations.ts @@ -9,101 +9,101 @@ import { i18n } from '@kbn/i18n'; export * from '../../translations'; -export const NO_CASES = i18n.translate('xpack.securitySolution.case.caseTable.noCases.title', { +export const NO_CASES = i18n.translate('xpack.securitySolution.cases.caseTable.noCases.title', { defaultMessage: 'No Cases', }); -export const NO_CASES_BODY = i18n.translate('xpack.securitySolution.case.caseTable.noCases.body', { +export const NO_CASES_BODY = i18n.translate('xpack.securitySolution.cases.caseTable.noCases.body', { defaultMessage: 'There are no cases to display. Please create a new case or change your filter settings above.', }); -export const ADD_NEW_CASE = i18n.translate('xpack.securitySolution.case.caseTable.addNewCase', { +export const ADD_NEW_CASE = i18n.translate('xpack.securitySolution.cases.caseTable.addNewCase', { defaultMessage: 'Add New Case', }); export const SHOWING_SELECTED_CASES = (totalRules: number) => - i18n.translate('xpack.securitySolution.case.caseTable.selectedCasesTitle', { + i18n.translate('xpack.securitySolution.cases.caseTable.selectedCasesTitle', { values: { totalRules }, defaultMessage: 'Selected {totalRules} {totalRules, plural, =1 {case} other {cases}}', }); export const SHOWING_CASES = (totalRules: number) => - i18n.translate('xpack.securitySolution.case.caseTable.showingCasesTitle', { + i18n.translate('xpack.securitySolution.cases.caseTable.showingCasesTitle', { values: { totalRules }, defaultMessage: 'Showing {totalRules} {totalRules, plural, =1 {case} other {cases}}', }); export const UNIT = (totalCount: number) => - i18n.translate('xpack.securitySolution.case.caseTable.unit', { + i18n.translate('xpack.securitySolution.cases.caseTable.unit', { values: { totalCount }, defaultMessage: `{totalCount, plural, =1 {case} other {cases}}`, }); export const SEARCH_CASES = i18n.translate( - 'xpack.securitySolution.case.caseTable.searchAriaLabel', + 'xpack.securitySolution.cases.caseTable.searchAriaLabel', { defaultMessage: 'Search cases', } ); -export const BULK_ACTIONS = i18n.translate('xpack.securitySolution.case.caseTable.bulkActions', { +export const BULK_ACTIONS = i18n.translate('xpack.securitySolution.cases.caseTable.bulkActions', { defaultMessage: 'Bulk actions', }); export const EXTERNAL_INCIDENT = i18n.translate( - 'xpack.securitySolution.case.caseTable.snIncident', + 'xpack.securitySolution.cases.caseTable.snIncident', { defaultMessage: 'External Incident', } ); export const INCIDENT_MANAGEMENT_SYSTEM = i18n.translate( - 'xpack.securitySolution.case.caseTable.incidentSystem', + 'xpack.securitySolution.cases.caseTable.incidentSystem', { defaultMessage: 'Incident Management System', } ); export const SEARCH_PLACEHOLDER = i18n.translate( - 'xpack.securitySolution.case.caseTable.searchPlaceholder', + 'xpack.securitySolution.cases.caseTable.searchPlaceholder', { defaultMessage: 'e.g. case name', } ); -export const CLOSED = i18n.translate('xpack.securitySolution.case.caseTable.closed', { +export const CLOSED = i18n.translate('xpack.securitySolution.cases.caseTable.closed', { defaultMessage: 'Closed', }); -export const DELETE = i18n.translate('xpack.securitySolution.case.caseTable.delete', { +export const DELETE = i18n.translate('xpack.securitySolution.cases.caseTable.delete', { defaultMessage: 'Delete', }); export const REQUIRES_UPDATE = i18n.translate( - 'xpack.securitySolution.case.caseTable.requiresUpdate', + 'xpack.securitySolution.cases.caseTable.requiresUpdate', { defaultMessage: ' requires update', } ); -export const UP_TO_DATE = i18n.translate('xpack.securitySolution.case.caseTable.upToDate', { +export const UP_TO_DATE = i18n.translate('xpack.securitySolution.cases.caseTable.upToDate', { defaultMessage: ' is up to date', }); -export const NOT_PUSHED = i18n.translate('xpack.securitySolution.case.caseTable.notPushed', { +export const NOT_PUSHED = i18n.translate('xpack.securitySolution.cases.caseTable.notPushed', { defaultMessage: 'Not pushed', }); -export const REFRESH = i18n.translate('xpack.securitySolution.case.caseTable.refreshTitle', { +export const REFRESH = i18n.translate('xpack.securitySolution.cases.caseTable.refreshTitle', { defaultMessage: 'Refresh', }); export const SERVICENOW_LINK_ARIA = i18n.translate( - 'xpack.securitySolution.case.caseTable.serviceNowLinkAria', + 'xpack.securitySolution.cases.caseTable.serviceNowLinkAria', { defaultMessage: 'click to view the incident on servicenow', } ); -export const STATUS = i18n.translate('xpack.securitySolution.case.caseTable.status', { +export const STATUS = i18n.translate('xpack.securitySolution.cases.caseTable.status', { defaultMessage: 'Status', }); diff --git a/x-pack/plugins/security_solution/public/cases/components/bulk_actions/index.tsx b/x-pack/plugins/security_solution/public/cases/components/bulk_actions/index.tsx index 3d2f81f5e5931..24897a14f0754 100644 --- a/x-pack/plugins/security_solution/public/cases/components/bulk_actions/index.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/bulk_actions/index.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { EuiContextMenuItem } from '@elastic/eui'; -import { CaseStatuses } from '../../../../../case/common/api'; +import { CaseStatuses } from '../../../../../cases/common/api'; import { statuses, CaseStatusWithAllStatus } from '../status'; import * as i18n from './translations'; import { Case } from '../../containers/types'; diff --git a/x-pack/plugins/security_solution/public/cases/components/bulk_actions/translations.ts b/x-pack/plugins/security_solution/public/cases/components/bulk_actions/translations.ts index 4b7da5221ccda..1171495f4a202 100644 --- a/x-pack/plugins/security_solution/public/cases/components/bulk_actions/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/components/bulk_actions/translations.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; export const BULK_ACTION_DELETE_SELECTED = i18n.translate( - 'xpack.securitySolution.case.caseTable.bulkActions.deleteSelectedTitle', + 'xpack.securitySolution.cases.caseTable.bulkActions.deleteSelectedTitle', { defaultMessage: 'Delete selected', } diff --git a/x-pack/plugins/security_solution/public/cases/components/callout/translations.ts b/x-pack/plugins/security_solution/public/cases/components/callout/translations.ts index 0be56791c9916..96c4d475c4308 100644 --- a/x-pack/plugins/security_solution/public/cases/components/callout/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/components/callout/translations.ts @@ -8,14 +8,14 @@ import { i18n } from '@kbn/i18n'; export const READ_ONLY_SAVED_OBJECT_TITLE = i18n.translate( - 'xpack.securitySolution.case.readOnlySavedObjectTitle', + 'xpack.securitySolution.cases.readOnlySavedObjectTitle', { defaultMessage: 'You cannot open new or update existing cases', } ); export const READ_ONLY_SAVED_OBJECT_MSG = i18n.translate( - 'xpack.securitySolution.case.readOnlySavedObjectDescription', + 'xpack.securitySolution.cases.readOnlySavedObjectDescription', { defaultMessage: 'You only have permissions to view cases. If you need to open and update cases, contact your Kibana administrator.', @@ -23,7 +23,7 @@ export const READ_ONLY_SAVED_OBJECT_MSG = i18n.translate( ); export const DISMISS_CALLOUT = i18n.translate( - 'xpack.securitySolution.case.dismissErrorsPushServiceCallOutTitle', + 'xpack.securitySolution.cases.dismissErrorsPushServiceCallOutTitle', { defaultMessage: 'Dismiss', } diff --git a/x-pack/plugins/security_solution/public/cases/components/case_action_bar/helpers.test.ts b/x-pack/plugins/security_solution/public/cases/components/case_action_bar/helpers.test.ts index b05924b5e27ff..8e26c0fd7a7ff 100644 --- a/x-pack/plugins/security_solution/public/cases/components/case_action_bar/helpers.test.ts +++ b/x-pack/plugins/security_solution/public/cases/components/case_action_bar/helpers.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { CaseStatuses } from '../../../../../case/common/api'; +import { CaseStatuses } from '../../../../../cases/common/api'; import { basicCase } from '../../containers/mock'; import { getStatusDate, getStatusTitle } from './helpers'; diff --git a/x-pack/plugins/security_solution/public/cases/components/case_action_bar/helpers.ts b/x-pack/plugins/security_solution/public/cases/components/case_action_bar/helpers.ts index 10f87981094fa..68a243040145a 100644 --- a/x-pack/plugins/security_solution/public/cases/components/case_action_bar/helpers.ts +++ b/x-pack/plugins/security_solution/public/cases/components/case_action_bar/helpers.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { CaseStatuses } from '../../../../../case/common/api'; +import { CaseStatuses } from '../../../../../cases/common/api'; import { Case } from '../../containers/types'; import { statuses } from '../status'; diff --git a/x-pack/plugins/security_solution/public/cases/components/case_action_bar/index.tsx b/x-pack/plugins/security_solution/public/cases/components/case_action_bar/index.tsx index 95c534f7c1ede..63ce441732251 100644 --- a/x-pack/plugins/security_solution/public/cases/components/case_action_bar/index.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/case_action_bar/index.tsx @@ -16,7 +16,7 @@ import { EuiFlexItem, EuiIconTip, } from '@elastic/eui'; -import { CaseStatuses, CaseType } from '../../../../../case/common/api'; +import { CaseStatuses, CaseType } from '../../../../../cases/common/api'; import * as i18n from '../case_view/translations'; import { FormattedRelativePreferenceDate } from '../../../common/components/formatted_date'; import { Actions } from './actions'; diff --git a/x-pack/plugins/security_solution/public/cases/components/case_action_bar/status_context_menu.test.tsx b/x-pack/plugins/security_solution/public/cases/components/case_action_bar/status_context_menu.test.tsx index 85b36d174977c..4e414706d1fd7 100644 --- a/x-pack/plugins/security_solution/public/cases/components/case_action_bar/status_context_menu.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/case_action_bar/status_context_menu.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { mount } from 'enzyme'; -import { CaseStatuses } from '../../../../../case/common/api'; +import { CaseStatuses } from '../../../../../cases/common/api'; import { StatusContextMenu } from './status_context_menu'; describe('SyncAlertsSwitch', () => { diff --git a/x-pack/plugins/security_solution/public/cases/components/case_action_bar/status_context_menu.tsx b/x-pack/plugins/security_solution/public/cases/components/case_action_bar/status_context_menu.tsx index 7f9ffbd8dc01d..92dcd16a86193 100644 --- a/x-pack/plugins/security_solution/public/cases/components/case_action_bar/status_context_menu.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/case_action_bar/status_context_menu.tsx @@ -8,7 +8,7 @@ import React, { memo, useCallback, useMemo, useState } from 'react'; import { memoize } from 'lodash/fp'; import { EuiPopover, EuiContextMenuPanel, EuiContextMenuItem } from '@elastic/eui'; -import { caseStatuses, CaseStatuses } from '../../../../../case/common/api'; +import { caseStatuses, CaseStatuses } from '../../../../../cases/common/api'; import { Status } from '../status'; interface Props { diff --git a/x-pack/plugins/security_solution/public/cases/components/case_view/helpers.test.tsx b/x-pack/plugins/security_solution/public/cases/components/case_view/helpers.test.tsx index 70e6636cc737f..18a76e2766d8d 100644 --- a/x-pack/plugins/security_solution/public/cases/components/case_view/helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/case_view/helpers.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { AssociationType, CommentType } from '../../../../../case/common/api'; +import { AssociationType, CommentType } from '../../../../../cases/common/api'; import { Comment } from '../../containers/types'; import { getManualAlertIdsWithNoRuleId, buildAlertsQuery } from './helpers'; diff --git a/x-pack/plugins/security_solution/public/cases/components/case_view/helpers.ts b/x-pack/plugins/security_solution/public/cases/components/case_view/helpers.ts index 3dece29e64ac5..7211f4bca6a37 100644 --- a/x-pack/plugins/security_solution/public/cases/components/case_view/helpers.ts +++ b/x-pack/plugins/security_solution/public/cases/components/case_view/helpers.ts @@ -6,7 +6,7 @@ */ import { isEmpty } from 'lodash'; -import { CommentType } from '../../../../../case/common/api'; +import { CommentType } from '../../../../../cases/common/api'; import { Comment } from '../../containers/types'; export const getManualAlertIdsWithNoRuleId = (comments: Comment[]): string[] => { diff --git a/x-pack/plugins/security_solution/public/cases/components/case_view/index.test.tsx b/x-pack/plugins/security_solution/public/cases/components/case_view/index.test.tsx index d1fa0a96a8eac..f28c7791d0110 100644 --- a/x-pack/plugins/security_solution/public/cases/components/case_view/index.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/case_view/index.test.tsx @@ -28,8 +28,8 @@ import { useConnectors } from '../../containers/configure/use_connectors'; import { connectorsMock } from '../../containers/configure/mock'; import { usePostPushToService } from '../../containers/use_post_push_to_service'; import { useQueryAlerts } from '../../../detections/containers/detection_engine/alerts/use_query'; -import { ConnectorTypes } from '../../../../../case/common/api/connectors'; -import { CaseType } from '../../../../../case/common/api'; +import { ConnectorTypes } from '../../../../../cases/common/api/connectors'; +import { CaseType } from '../../../../../cases/common/api'; const mockDispatch = jest.fn(); jest.mock('react-redux', () => { diff --git a/x-pack/plugins/security_solution/public/cases/components/case_view/index.tsx b/x-pack/plugins/security_solution/public/cases/components/case_view/index.tsx index 417dc9645df30..892663c783293 100644 --- a/x-pack/plugins/security_solution/public/cases/components/case_view/index.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/case_view/index.tsx @@ -17,7 +17,7 @@ import { EuiHorizontalRule, } from '@elastic/eui'; -import { CaseStatuses, CaseAttributes, CaseType } from '../../../../../case/common/api'; +import { CaseStatuses, CaseAttributes, CaseType } from '../../../../../cases/common/api'; import { Case, CaseConnector } from '../../containers/types'; import { getCaseDetailsUrl, getCaseUrl, useFormatUrl } from '../../../common/components/link_to'; import { gutterTimeline } from '../../../common/lib/helpers'; diff --git a/x-pack/plugins/security_solution/public/cases/components/case_view/translations.ts b/x-pack/plugins/security_solution/public/cases/components/case_view/translations.ts index 1fbcdd455b80a..f4403a43af697 100644 --- a/x-pack/plugins/security_solution/public/cases/components/case_view/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/components/case_view/translations.ts @@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n'; export * from '../../translations'; export const SHOWING_CASES = (actionDate: string, actionName: string, userName: string) => - i18n.translate('xpack.securitySolution.case.caseView.actionHeadline', { + i18n.translate('xpack.securitySolution.cases.caseView.actionHeadline', { values: { actionDate, actionName, @@ -20,21 +20,21 @@ export const SHOWING_CASES = (actionDate: string, actionName: string, userName: }); export const ADDED_FIELD = i18n.translate( - 'xpack.securitySolution.case.caseView.actionLabel.addedField', + 'xpack.securitySolution.cases.caseView.actionLabel.addedField', { defaultMessage: 'added', } ); export const CHANGED_FIELD = i18n.translate( - 'xpack.securitySolution.case.caseView.actionLabel.changededField', + 'xpack.securitySolution.cases.caseView.actionLabel.changededField', { defaultMessage: 'changed', } ); export const SELECTED_THIRD_PARTY = (thirdParty: string) => - i18n.translate('xpack.securitySolution.case.caseView.actionLabel.selectedThirdParty', { + i18n.translate('xpack.securitySolution.cases.caseView.actionLabel.selectedThirdParty', { values: { thirdParty, }, @@ -42,28 +42,28 @@ export const SELECTED_THIRD_PARTY = (thirdParty: string) => }); export const REMOVED_THIRD_PARTY = i18n.translate( - 'xpack.securitySolution.case.caseView.actionLabel.removedThirdParty', + 'xpack.securitySolution.cases.caseView.actionLabel.removedThirdParty', { defaultMessage: 'removed external incident management system', } ); export const EDITED_FIELD = i18n.translate( - 'xpack.securitySolution.case.caseView.actionLabel.editedField', + 'xpack.securitySolution.cases.caseView.actionLabel.editedField', { defaultMessage: 'edited', } ); export const REMOVED_FIELD = i18n.translate( - 'xpack.securitySolution.case.caseView.actionLabel.removedField', + 'xpack.securitySolution.cases.caseView.actionLabel.removedField', { defaultMessage: 'removed', } ); export const VIEW_INCIDENT = (incidentNumber: string) => - i18n.translate('xpack.securitySolution.case.caseView.actionLabel.viewIncident', { + i18n.translate('xpack.securitySolution.cases.caseView.actionLabel.viewIncident', { defaultMessage: 'View {incidentNumber}', values: { incidentNumber, @@ -71,87 +71,87 @@ export const VIEW_INCIDENT = (incidentNumber: string) => }); export const PUSHED_NEW_INCIDENT = i18n.translate( - 'xpack.securitySolution.case.caseView.actionLabel.pushedNewIncident', + 'xpack.securitySolution.cases.caseView.actionLabel.pushedNewIncident', { defaultMessage: 'pushed as new incident', } ); export const UPDATE_INCIDENT = i18n.translate( - 'xpack.securitySolution.case.caseView.actionLabel.updateIncident', + 'xpack.securitySolution.cases.caseView.actionLabel.updateIncident', { defaultMessage: 'updated incident', } ); export const ADDED_DESCRIPTION = i18n.translate( - 'xpack.securitySolution.case.caseView.actionLabel.addDescription', + 'xpack.securitySolution.cases.caseView.actionLabel.addDescription', { defaultMessage: 'added description', } ); export const EDIT_DESCRIPTION = i18n.translate( - 'xpack.securitySolution.case.caseView.edit.description', + 'xpack.securitySolution.cases.caseView.edit.description', { defaultMessage: 'Edit description', } ); -export const QUOTE = i18n.translate('xpack.securitySolution.case.caseView.edit.quote', { +export const QUOTE = i18n.translate('xpack.securitySolution.cases.caseView.edit.quote', { defaultMessage: 'Quote', }); -export const EDIT_COMMENT = i18n.translate('xpack.securitySolution.case.caseView.edit.comment', { +export const EDIT_COMMENT = i18n.translate('xpack.securitySolution.cases.caseView.edit.comment', { defaultMessage: 'Edit comment', }); -export const ON = i18n.translate('xpack.securitySolution.case.caseView.actionLabel.on', { +export const ON = i18n.translate('xpack.securitySolution.cases.caseView.actionLabel.on', { defaultMessage: 'on', }); export const ADDED_COMMENT = i18n.translate( - 'xpack.securitySolution.case.caseView.actionLabel.addComment', + 'xpack.securitySolution.cases.caseView.actionLabel.addComment', { defaultMessage: 'added comment', } ); -export const STATUS = i18n.translate('xpack.securitySolution.case.caseView.statusLabel', { +export const STATUS = i18n.translate('xpack.securitySolution.cases.caseView.statusLabel', { defaultMessage: 'Status', }); -export const CASE = i18n.translate('xpack.securitySolution.case.caseView.case', { +export const CASE = i18n.translate('xpack.securitySolution.cases.caseView.case', { defaultMessage: 'case', }); -export const COMMENT = i18n.translate('xpack.securitySolution.case.caseView.comment', { +export const COMMENT = i18n.translate('xpack.securitySolution.cases.caseView.comment', { defaultMessage: 'comment', }); -export const CASE_REFRESH = i18n.translate('xpack.securitySolution.case.caseView.caseRefresh', { +export const CASE_REFRESH = i18n.translate('xpack.securitySolution.cases.caseView.caseRefresh', { defaultMessage: 'Refresh case', }); export const EMAIL_SUBJECT = (caseTitle: string) => - i18n.translate('xpack.securitySolution.case.caseView.emailSubject', { + i18n.translate('xpack.securitySolution.cases.caseView.emailSubject', { values: { caseTitle }, defaultMessage: 'Security Case - {caseTitle}', }); export const EMAIL_BODY = (caseUrl: string) => - i18n.translate('xpack.securitySolution.case.caseView.emailBody', { + i18n.translate('xpack.securitySolution.cases.caseView.emailBody', { values: { caseUrl }, defaultMessage: 'Case reference: {caseUrl}', }); export const CHANGED_CONNECTOR_FIELD = i18n.translate( - 'xpack.securitySolution.case.caseView.fieldChanged', + 'xpack.securitySolution.cases.caseView.fieldChanged', { defaultMessage: `changed connector field`, } ); -export const SYNC_ALERTS = i18n.translate('xpack.securitySolution.case.caseView.syncAlertsLabel', { +export const SYNC_ALERTS = i18n.translate('xpack.securitySolution.cases.caseView.syncAlertsLabel', { defaultMessage: `Sync alerts`, }); diff --git a/x-pack/plugins/security_solution/public/cases/components/configure_cases/__mock__/index.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/__mock__/index.tsx index d64a52aa2a00d..ccc697a2ae84e 100644 --- a/x-pack/plugins/security_solution/public/cases/components/configure_cases/__mock__/index.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/configure_cases/__mock__/index.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { ConnectorTypes } from '../../../../../../case/common/api'; +import { ConnectorTypes } from '../../../../../../cases/common/api'; import { ActionConnector } from '../../../containers/configure/types'; import { UseConnectorsResponse } from '../../../containers/configure/use_connectors'; import { ReturnUseCaseConfigure } from '../../../containers/configure/use_configure'; diff --git a/x-pack/plugins/security_solution/public/cases/components/configure_cases/connectors.test.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/connectors.test.tsx index 371ff3528f4f0..c34651c3e1dc4 100644 --- a/x-pack/plugins/security_solution/public/cases/components/configure_cases/connectors.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/configure_cases/connectors.test.tsx @@ -12,7 +12,7 @@ import { Connectors, Props } from './connectors'; import { TestProviders } from '../../../common/mock'; import { ConnectorsDropdown } from './connectors_dropdown'; import { connectors } from './__mock__'; -import { ConnectorTypes } from '../../../../../case/common/api/connectors'; +import { ConnectorTypes } from '../../../../../cases/common/api/connectors'; describe('Connectors', () => { let wrapper: ReactWrapper; diff --git a/x-pack/plugins/security_solution/public/cases/components/configure_cases/connectors.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/connectors.tsx index 9f75216a0425e..1e0ae95ff901c 100644 --- a/x-pack/plugins/security_solution/public/cases/components/configure_cases/connectors.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/configure_cases/connectors.tsx @@ -21,7 +21,7 @@ import * as i18n from './translations'; import { ActionConnector, CaseConnectorMapping } from '../../containers/configure/types'; import { Mapping } from './mapping'; -import { ConnectorTypes } from '../../../../../case/common/api/connectors'; +import { ConnectorTypes } from '../../../../../cases/common/api/connectors'; const EuiFormRowExtended = styled(EuiFormRow)` .euiFormRow__labelWrapper { diff --git a/x-pack/plugins/security_solution/public/cases/components/configure_cases/connectors_dropdown.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/connectors_dropdown.tsx index b8eacb9dfdd91..01d975a445ab4 100644 --- a/x-pack/plugins/security_solution/public/cases/components/configure_cases/connectors_dropdown.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/configure_cases/connectors_dropdown.tsx @@ -9,7 +9,7 @@ import React, { useMemo } from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiSuperSelect } from '@elastic/eui'; import styled from 'styled-components'; -import { ConnectorTypes } from '../../../../../case/common/api'; +import { ConnectorTypes } from '../../../../../cases/common/api'; import { ActionConnector } from '../../containers/configure/types'; import { connectorsConfiguration } from '../connectors'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/cases/components/configure_cases/index.test.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/index.test.tsx index 8e317d57dd9ac..8dbefdb731141 100644 --- a/x-pack/plugins/security_solution/public/cases/components/configure_cases/index.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/configure_cases/index.test.tsx @@ -33,7 +33,7 @@ import { useConnectorsResponse, useActionTypesResponse, } from './__mock__'; -import { ConnectorTypes } from '../../../../../case/common/api/connectors'; +import { ConnectorTypes } from '../../../../../cases/common/api/connectors'; jest.mock('../../../common/lib/kibana'); jest.mock('../../containers/configure/use_connectors'); diff --git a/x-pack/plugins/security_solution/public/cases/components/configure_cases/index.tsx b/x-pack/plugins/security_solution/public/cases/components/configure_cases/index.tsx index 512a15db47d30..25155ff77c2d0 100644 --- a/x-pack/plugins/security_solution/public/cases/components/configure_cases/index.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/configure_cases/index.tsx @@ -10,7 +10,7 @@ import styled, { css } from 'styled-components'; import { EuiCallOut } from '@elastic/eui'; -import { SUPPORTED_CONNECTORS } from '../../../../../case/common/constants'; +import { SUPPORTED_CONNECTORS } from '../../../../../cases/common/constants'; import { useKibana } from '../../../common/lib/kibana'; import { useConnectors } from '../../containers/configure/use_connectors'; import { useActionTypes } from '../../containers/configure/use_action_types'; diff --git a/x-pack/plugins/security_solution/public/cases/components/configure_cases/translations.ts b/x-pack/plugins/security_solution/public/cases/components/configure_cases/translations.ts index 5a08ff47f0ef6..697d5e1a7adfa 100644 --- a/x-pack/plugins/security_solution/public/cases/components/configure_cases/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/components/configure_cases/translations.ts @@ -10,14 +10,14 @@ import { i18n } from '@kbn/i18n'; export * from '../../translations'; export const INCIDENT_MANAGEMENT_SYSTEM_TITLE = i18n.translate( - 'xpack.securitySolution.case.configureCases.incidentManagementSystemTitle', + 'xpack.securitySolution.cases.configureCases.incidentManagementSystemTitle', { defaultMessage: 'Connect to external incident management system', } ); export const INCIDENT_MANAGEMENT_SYSTEM_DESC = i18n.translate( - 'xpack.securitySolution.case.configureCases.incidentManagementSystemDesc', + 'xpack.securitySolution.cases.configureCases.incidentManagementSystemDesc', { defaultMessage: 'You may optionally connect Security cases to an external incident management system of your choosing. This will allow you to push case data as an incident in your chosen third-party system.', @@ -25,28 +25,28 @@ export const INCIDENT_MANAGEMENT_SYSTEM_DESC = i18n.translate( ); export const INCIDENT_MANAGEMENT_SYSTEM_LABEL = i18n.translate( - 'xpack.securitySolution.case.configureCases.incidentManagementSystemLabel', + 'xpack.securitySolution.cases.configureCases.incidentManagementSystemLabel', { defaultMessage: 'Incident management system', } ); export const ADD_NEW_CONNECTOR = i18n.translate( - 'xpack.securitySolution.case.configureCases.addNewConnector', + 'xpack.securitySolution.cases.configureCases.addNewConnector', { defaultMessage: 'Add new connector', } ); export const CASE_CLOSURE_OPTIONS_TITLE = i18n.translate( - 'xpack.securitySolution.case.configureCases.caseClosureOptionsTitle', + 'xpack.securitySolution.cases.configureCases.caseClosureOptionsTitle', { defaultMessage: 'Case Closures', } ); export const CASE_CLOSURE_OPTIONS_DESC = i18n.translate( - 'xpack.securitySolution.case.configureCases.caseClosureOptionsDesc', + 'xpack.securitySolution.cases.configureCases.caseClosureOptionsDesc', { defaultMessage: 'Define how you wish Security cases to be closed. Automated case closures require an established connection to an external incident management system.', @@ -54,28 +54,28 @@ export const CASE_CLOSURE_OPTIONS_DESC = i18n.translate( ); export const CASE_COLSURE_OPTIONS_SUB_CASES = i18n.translate( - 'xpack.securitySolution.case.configureCases.caseClosureOptionsSubCases', + 'xpack.securitySolution.cases.configureCases.caseClosureOptionsSubCases', { defaultMessage: 'Automated closures of sub-cases is not currently supported.', } ); export const CASE_CLOSURE_OPTIONS_LABEL = i18n.translate( - 'xpack.securitySolution.case.configureCases.caseClosureOptionsLabel', + 'xpack.securitySolution.cases.configureCases.caseClosureOptionsLabel', { defaultMessage: 'Case closure options', } ); export const CASE_CLOSURE_OPTIONS_MANUAL = i18n.translate( - 'xpack.securitySolution.case.configureCases.caseClosureOptionsManual', + 'xpack.securitySolution.cases.configureCases.caseClosureOptionsManual', { defaultMessage: 'Manually close Security cases', } ); export const CASE_CLOSURE_OPTIONS_NEW_INCIDENT = i18n.translate( - 'xpack.securitySolution.case.configureCases.caseClosureOptionsNewIncident', + 'xpack.securitySolution.cases.configureCases.caseClosureOptionsNewIncident', { defaultMessage: 'Automatically close Security cases when pushing new incident to external system', @@ -83,20 +83,20 @@ export const CASE_CLOSURE_OPTIONS_NEW_INCIDENT = i18n.translate( ); export const CASE_CLOSURE_OPTIONS_CLOSED_INCIDENT = i18n.translate( - 'xpack.securitySolution.case.configureCases.caseClosureOptionsClosedIncident', + 'xpack.securitySolution.cases.configureCases.caseClosureOptionsClosedIncident', { defaultMessage: 'Automatically close Security cases when incident is closed in external system', } ); export const FIELD_MAPPING_TITLE = (thirdPartyName: string): string => { - return i18n.translate('xpack.securitySolution.case.configureCases.fieldMappingTitle', { + return i18n.translate('xpack.securitySolution.cases.configureCases.fieldMappingTitle', { values: { thirdPartyName }, defaultMessage: '{ thirdPartyName } field mappings', }); }; export const FIELD_MAPPING_DESC = (thirdPartyName: string): string => { - return i18n.translate('xpack.securitySolution.case.configureCases.fieldMappingDesc', { + return i18n.translate('xpack.securitySolution.cases.configureCases.fieldMappingDesc', { values: { thirdPartyName }, defaultMessage: 'Map Security Case fields to { thirdPartyName } fields when pushing data to { thirdPartyName }. Field mappings require an established connection to { thirdPartyName }.', @@ -104,85 +104,85 @@ export const FIELD_MAPPING_DESC = (thirdPartyName: string): string => { }; export const FIELD_MAPPING_DESC_ERR = (thirdPartyName: string): string => { - return i18n.translate('xpack.securitySolution.case.configureCases.fieldMappingDescErr', { + return i18n.translate('xpack.securitySolution.cases.configureCases.fieldMappingDescErr', { values: { thirdPartyName }, defaultMessage: 'Field mappings require an established connection to { thirdPartyName }. Please check your connection credentials.', }); }; export const EDIT_FIELD_MAPPING_TITLE = (thirdPartyName: string): string => { - return i18n.translate('xpack.securitySolution.case.configureCases.editFieldMappingTitle', { + return i18n.translate('xpack.securitySolution.cases.configureCases.editFieldMappingTitle', { values: { thirdPartyName }, defaultMessage: 'Edit { thirdPartyName } field mappings', }); }; export const FIELD_MAPPING_FIRST_COL = i18n.translate( - 'xpack.securitySolution.case.configureCases.fieldMappingFirstCol', + 'xpack.securitySolution.cases.configureCases.fieldMappingFirstCol', { defaultMessage: 'Security case field', } ); export const FIELD_MAPPING_SECOND_COL = (thirdPartyName: string): string => { - return i18n.translate('xpack.securitySolution.case.configureCases.fieldMappingSecondCol', { + return i18n.translate('xpack.securitySolution.cases.configureCases.fieldMappingSecondCol', { values: { thirdPartyName }, defaultMessage: '{ thirdPartyName } field', }); }; export const FIELD_MAPPING_THIRD_COL = i18n.translate( - 'xpack.securitySolution.case.configureCases.fieldMappingThirdCol', + 'xpack.securitySolution.cases.configureCases.fieldMappingThirdCol', { defaultMessage: 'On edit and update', } ); export const FIELD_MAPPING_EDIT_NOTHING = i18n.translate( - 'xpack.securitySolution.case.configureCases.fieldMappingEditNothing', + 'xpack.securitySolution.cases.configureCases.fieldMappingEditNothing', { defaultMessage: 'Nothing', } ); export const FIELD_MAPPING_EDIT_OVERWRITE = i18n.translate( - 'xpack.securitySolution.case.configureCases.fieldMappingEditOverwrite', + 'xpack.securitySolution.cases.configureCases.fieldMappingEditOverwrite', { defaultMessage: 'Overwrite', } ); export const FIELD_MAPPING_EDIT_APPEND = i18n.translate( - 'xpack.securitySolution.case.configureCases.fieldMappingEditAppend', + 'xpack.securitySolution.cases.configureCases.fieldMappingEditAppend', { defaultMessage: 'Append', } ); -export const CANCEL = i18n.translate('xpack.securitySolution.case.configureCases.cancelButton', { +export const CANCEL = i18n.translate('xpack.securitySolution.cases.configureCases.cancelButton', { defaultMessage: 'Cancel', }); -export const SAVE = i18n.translate('xpack.securitySolution.case.configureCases.saveButton', { +export const SAVE = i18n.translate('xpack.securitySolution.cases.configureCases.saveButton', { defaultMessage: 'Save', }); export const SAVE_CLOSE = i18n.translate( - 'xpack.securitySolution.case.configureCases.saveAndCloseButton', + 'xpack.securitySolution.cases.configureCases.saveAndCloseButton', { defaultMessage: 'Save & close', } ); export const WARNING_NO_CONNECTOR_TITLE = i18n.translate( - 'xpack.securitySolution.case.configureCases.warningTitle', + 'xpack.securitySolution.cases.configureCases.warningTitle', { defaultMessage: 'Warning', } ); export const WARNING_NO_CONNECTOR_MESSAGE = i18n.translate( - 'xpack.securitySolution.case.configureCases.warningMessage', + 'xpack.securitySolution.cases.configureCases.warningMessage', { defaultMessage: 'The selected connector has been deleted. Either select a different connector or create a new one.', @@ -190,18 +190,21 @@ export const WARNING_NO_CONNECTOR_MESSAGE = i18n.translate( ); export const MAPPING_FIELD_NOT_MAPPED = i18n.translate( - 'xpack.securitySolution.case.configureCases.mappingFieldNotMapped', + 'xpack.securitySolution.cases.configureCases.mappingFieldNotMapped', { defaultMessage: 'Not mapped', } ); -export const COMMENT = i18n.translate('xpack.securitySolution.case.configureCases.commentMapping', { - defaultMessage: 'Comments', -}); +export const COMMENT = i18n.translate( + 'xpack.securitySolution.cases.configureCases.commentMapping', + { + defaultMessage: 'Comments', + } +); export const NO_FIELDS_ERROR = (connectorName: string): string => { - return i18n.translate('xpack.securitySolution.case.configureCases.noFieldsError', { + return i18n.translate('xpack.securitySolution.cases.configureCases.noFieldsError', { values: { connectorName }, defaultMessage: 'No { connectorName } fields found. Please check your { connectorName } connector settings or your { connectorName } instance settings to resolve.', @@ -209,28 +212,28 @@ export const NO_FIELDS_ERROR = (connectorName: string): string => { }; export const BLANK_MAPPINGS = (connectorName: string): string => { - return i18n.translate('xpack.securitySolution.case.configureCases.blankMappings', { + return i18n.translate('xpack.securitySolution.cases.configureCases.blankMappings', { values: { connectorName }, defaultMessage: 'At least one field needs to be mapped to { connectorName }', }); }; export const REQUIRED_MAPPINGS = (connectorName: string, fields: string): string => { - return i18n.translate('xpack.securitySolution.case.configureCases.requiredMappings', { + return i18n.translate('xpack.securitySolution.cases.configureCases.requiredMappings', { values: { connectorName, fields }, defaultMessage: 'At least one Case field needs to be mapped to the following required { connectorName } fields: { fields }', }); }; export const UPDATE_FIELD_MAPPINGS = i18n.translate( - 'xpack.securitySolution.case.configureCases.updateConnector', + 'xpack.securitySolution.cases.configureCases.updateConnector', { defaultMessage: 'Update field mappings', } ); export const UPDATE_SELECTED_CONNECTOR = (connectorName: string): string => { - return i18n.translate('xpack.securitySolution.case.configureCases.updateSelectedConnector', { + return i18n.translate('xpack.securitySolution.cases.configureCases.updateSelectedConnector', { values: { connectorName }, defaultMessage: 'Update { connectorName }', }); diff --git a/x-pack/plugins/security_solution/public/cases/components/configure_cases/utils.ts b/x-pack/plugins/security_solution/public/cases/components/configure_cases/utils.ts index 6f4bc06265bac..db14371b625d8 100644 --- a/x-pack/plugins/security_solution/public/cases/components/configure_cases/utils.ts +++ b/x-pack/plugins/security_solution/public/cases/components/configure_cases/utils.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ConnectorTypeFields, ConnectorTypes } from '../../../../../case/common/api'; +import { ConnectorTypeFields, ConnectorTypes } from '../../../../../cases/common/api'; import { CaseField, ActionType, diff --git a/x-pack/plugins/security_solution/public/cases/components/confirm_delete_case/translations.ts b/x-pack/plugins/security_solution/public/cases/components/confirm_delete_case/translations.ts index 0bd37fa18281a..07bf6966e953c 100644 --- a/x-pack/plugins/security_solution/public/cases/components/confirm_delete_case/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/components/confirm_delete_case/translations.ts @@ -9,32 +9,32 @@ import { i18n } from '@kbn/i18n'; export * from '../../translations'; export const DELETE_TITLE = (caseTitle: string) => - i18n.translate('xpack.securitySolution.case.confirmDeleteCase.deleteTitle', { + i18n.translate('xpack.securitySolution.cases.confirmDeleteCase.deleteTitle', { values: { caseTitle }, defaultMessage: 'Delete "{caseTitle}"', }); export const DELETE_THIS_CASE = (caseTitle: string) => - i18n.translate('xpack.securitySolution.case.confirmDeleteCase.deleteThisCase', { + i18n.translate('xpack.securitySolution.cases.confirmDeleteCase.deleteThisCase', { defaultMessage: 'Delete this case', }); export const CONFIRM_QUESTION = i18n.translate( - 'xpack.securitySolution.case.confirmDeleteCase.confirmQuestion', + 'xpack.securitySolution.cases.confirmDeleteCase.confirmQuestion', { defaultMessage: 'By deleting this case, all related case data will be permanently removed and you will no longer be able to push data to an external incident management system. Are you sure you wish to proceed?', } ); export const DELETE_SELECTED_CASES = i18n.translate( - 'xpack.securitySolution.case.confirmDeleteCase.selectedCases', + 'xpack.securitySolution.cases.confirmDeleteCase.selectedCases', { defaultMessage: 'Delete selected cases', } ); export const CONFIRM_QUESTION_PLURAL = i18n.translate( - 'xpack.securitySolution.case.confirmDeleteCase.confirmQuestionPlural', + 'xpack.securitySolution.cases.confirmDeleteCase.confirmQuestionPlural', { defaultMessage: 'By deleting these cases, all related case data will be permanently removed and you will no longer be able to push data to an external incident management system. Are you sure you wish to proceed?', diff --git a/x-pack/plugins/security_solution/public/cases/components/connector_selector/form.tsx b/x-pack/plugins/security_solution/public/cases/components/connector_selector/form.tsx index 586a7c19cc532..63c6f265b1ab2 100644 --- a/x-pack/plugins/security_solution/public/cases/components/connector_selector/form.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/connector_selector/form.tsx @@ -11,7 +11,7 @@ import { EuiFormRow } from '@elastic/eui'; import { FieldHook, getFieldValidityAndErrorMessage } from '../../../shared_imports'; import { ConnectorsDropdown } from '../configure_cases/connectors_dropdown'; -import { ActionConnector } from '../../../../../case/common/api'; +import { ActionConnector } from '../../../../../cases/common/api'; interface ConnectorSelectorProps { connectors: ActionConnector[]; diff --git a/x-pack/plugins/security_solution/public/cases/components/connectors/card.tsx b/x-pack/plugins/security_solution/public/cases/components/connectors/card.tsx index 03f909948370d..af9a86b0b711b 100644 --- a/x-pack/plugins/security_solution/public/cases/components/connectors/card.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/connectors/card.tsx @@ -10,7 +10,7 @@ import { EuiCard, EuiIcon, EuiLoadingSpinner } from '@elastic/eui'; import styled from 'styled-components'; import { connectorsConfiguration } from '.'; -import { ConnectorTypes } from '../../../../../case/common/api/connectors'; +import { ConnectorTypes } from '../../../../../cases/common/api/connectors'; interface ConnectorCardProps { connectorType: ConnectorTypes; diff --git a/x-pack/plugins/security_solution/public/cases/components/connectors/case/alert_fields.tsx b/x-pack/plugins/security_solution/public/cases/components/connectors/case/alert_fields.tsx index b829cefcacca6..05161456976c6 100644 --- a/x-pack/plugins/security_solution/public/cases/components/connectors/case/alert_fields.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/connectors/case/alert_fields.tsx @@ -12,7 +12,7 @@ import styled from 'styled-components'; import { EuiCallOut, EuiSpacer } from '@elastic/eui'; import { ActionParamsProps } from '../../../../../../triggers_actions_ui/public/types'; -import { CommentType } from '../../../../../../case/common/api'; +import { CommentType } from '../../../../../../cases/common/api'; import { CaseActionParams } from './types'; import { ExistingCase } from './existing_case'; diff --git a/x-pack/plugins/security_solution/public/cases/components/connectors/case/existing_case.tsx b/x-pack/plugins/security_solution/public/cases/components/connectors/case/existing_case.tsx index c1013718d5756..3c6c5f47c6d12 100644 --- a/x-pack/plugins/security_solution/public/cases/components/connectors/case/existing_case.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/connectors/case/existing_case.tsx @@ -6,7 +6,7 @@ */ import React, { memo, useMemo, useCallback } from 'react'; -import { CaseType } from '../../../../../../case/common/api'; +import { CaseType } from '../../../../../../cases/common/api'; import { useGetCases, DEFAULT_QUERY_PARAMS, diff --git a/x-pack/plugins/security_solution/public/cases/components/connectors/case/translations.ts b/x-pack/plugins/security_solution/public/cases/components/connectors/case/translations.ts index 6ce5316d0eb88..1d15a3da496a6 100644 --- a/x-pack/plugins/security_solution/public/cases/components/connectors/case/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/components/connectors/case/translations.ts @@ -10,77 +10,77 @@ import { i18n } from '@kbn/i18n'; export * from '../../../translations'; export const CASE_CONNECTOR_DESC = i18n.translate( - 'xpack.securitySolution.case.components.connectors.case.selectMessageText', + 'xpack.securitySolution.cases.components.connectors.cases.selectMessageText', { defaultMessage: 'Create or update a case.', } ); export const CASE_CONNECTOR_TITLE = i18n.translate( - 'xpack.securitySolution.case.components.connectors.case.actionTypeTitle', + 'xpack.securitySolution.cases.components.connectors.cases.actionTypeTitle', { defaultMessage: 'Cases', } ); export const CASE_CONNECTOR_COMMENT_LABEL = i18n.translate( - 'xpack.securitySolution.case.components.connectors.case.commentLabel', + 'xpack.securitySolution.cases.components.connectors.cases.commentLabel', { defaultMessage: 'Comment', } ); export const CASE_CONNECTOR_COMMENT_REQUIRED = i18n.translate( - 'xpack.securitySolution.case.components.connectors.case.commentRequired', + 'xpack.securitySolution.cases.components.connectors.cases.commentRequired', { defaultMessage: 'Comment is required.', } ); export const CASE_CONNECTOR_CASES_DROPDOWN_ROW_LABEL = i18n.translate( - 'xpack.securitySolution.case.components.connectors.case.casesDropdownRowLabel', + 'xpack.securitySolution.cases.components.connectors.cases.casesDropdownRowLabel', { defaultMessage: 'Case allowing sub-cases', } ); export const CASE_CONNECTOR_CASES_DROPDOWN_PLACEHOLDER = i18n.translate( - 'xpack.securitySolution.case.components.connectors.case.casesDropdownPlaceholder', + 'xpack.securitySolution.cases.components.connectors.cases.casesDropdownPlaceholder', { defaultMessage: 'Select case', } ); export const CASE_CONNECTOR_CASES_OPTION_NEW_CASE = i18n.translate( - 'xpack.securitySolution.case.components.connectors.case.optionAddNewCase', + 'xpack.securitySolution.cases.components.connectors.cases.optionAddNewCase', { defaultMessage: 'Add to a new case', } ); export const CASE_CONNECTOR_CASES_OPTION_EXISTING_CASE = i18n.translate( - 'xpack.securitySolution.case.components.connectors.case.optionAddToExistingCase', + 'xpack.securitySolution.cases.components.connectors.cases.optionAddToExistingCase', { defaultMessage: 'Add to existing case', } ); export const CASE_CONNECTOR_CASE_REQUIRED = i18n.translate( - 'xpack.securitySolution.case.components.connectors.case.caseRequired', + 'xpack.securitySolution.cases.components.connectors.cases.caseRequired', { defaultMessage: 'You must select a case.', } ); export const CASE_CONNECTOR_CALL_OUT_TITLE = i18n.translate( - 'xpack.securitySolution.case.components.connectors.case.callOutTitle', + 'xpack.securitySolution.cases.components.connectors.cases.callOutTitle', { defaultMessage: 'Generated alerts will be attached to sub-cases', } ); export const CASE_CONNECTOR_CALL_OUT_MSG = i18n.translate( - 'xpack.securitySolution.case.components.connectors.case.callOutMsg', + 'xpack.securitySolution.cases.components.connectors.cases.callOutMsg', { defaultMessage: 'A case can contain multiple sub-cases to allow grouping of generated alerts. Sub-cases will give more granular control over the status of these generated alerts and prevents having too many alerts attached to one case.', @@ -88,21 +88,21 @@ export const CASE_CONNECTOR_CALL_OUT_MSG = i18n.translate( ); export const CASE_CONNECTOR_ADD_NEW_CASE = i18n.translate( - 'xpack.securitySolution.case.components.connectors.case.addNewCaseOption', + 'xpack.securitySolution.cases.components.connectors.cases.addNewCaseOption', { defaultMessage: 'Add new case', } ); export const CREATE_CASE = i18n.translate( - 'xpack.securitySolution.case.components.connectors.case.createCaseLabel', + 'xpack.securitySolution.cases.components.connectors.cases.createCaseLabel', { defaultMessage: 'Create case', } ); export const CONNECTED_CASE = i18n.translate( - 'xpack.securitySolution.case.components.connectors.case.connectedCaseLabel', + 'xpack.securitySolution.cases.components.connectors.cases.connectedCaseLabel', { defaultMessage: 'Connected case', } diff --git a/x-pack/plugins/security_solution/public/cases/components/connectors/fields_form.tsx b/x-pack/plugins/security_solution/public/cases/components/connectors/fields_form.tsx index 41ed99e0f6768..841c2a9e38f6d 100644 --- a/x-pack/plugins/security_solution/public/cases/components/connectors/fields_form.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/connectors/fields_form.tsx @@ -10,7 +10,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner } from '@elastic/eui'; import { CaseActionConnector, ConnectorFieldsProps } from './types'; import { getCaseConnectors } from '.'; -import { ConnectorTypeFields } from '../../../../../case/common/api/connectors'; +import { ConnectorTypeFields } from '../../../../../cases/common/api/connectors'; interface Props extends Omit, 'connector'> { connector: CaseActionConnector | null; diff --git a/x-pack/plugins/security_solution/public/cases/components/connectors/index.ts b/x-pack/plugins/security_solution/public/cases/components/connectors/index.ts index 267126fc6ec8b..dad7070aad705 100644 --- a/x-pack/plugins/security_solution/public/cases/components/connectors/index.ts +++ b/x-pack/plugins/security_solution/public/cases/components/connectors/index.ts @@ -15,7 +15,7 @@ import { ServiceNowITSMFieldsType, ServiceNowSIRFieldsType, ResilientFieldsType, -} from '../../../../../case/common/api/connectors'; +} from '../../../../../cases/common/api/connectors'; export { getActionType as getCaseConnectorUI } from './case'; diff --git a/x-pack/plugins/security_solution/public/cases/components/connectors/jira/case_fields.tsx b/x-pack/plugins/security_solution/public/cases/components/connectors/jira/case_fields.tsx index d768b552b78b4..22e80d43f34e1 100644 --- a/x-pack/plugins/security_solution/public/cases/components/connectors/jira/case_fields.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/connectors/jira/case_fields.tsx @@ -10,7 +10,7 @@ import { map } from 'lodash/fp'; import { EuiFormRow, EuiSelect, EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; import * as i18n from './translations'; -import { ConnectorTypes, JiraFieldsType } from '../../../../../../case/common/api/connectors'; +import { ConnectorTypes, JiraFieldsType } from '../../../../../../cases/common/api/connectors'; import { useKibana } from '../../../../common/lib/kibana'; import { ConnectorFieldsProps } from '../types'; import { useGetIssueTypes } from './use_get_issue_types'; diff --git a/x-pack/plugins/security_solution/public/cases/components/connectors/jira/index.ts b/x-pack/plugins/security_solution/public/cases/components/connectors/jira/index.ts index d05040f7406e4..40e59a081a449 100644 --- a/x-pack/plugins/security_solution/public/cases/components/connectors/jira/index.ts +++ b/x-pack/plugins/security_solution/public/cases/components/connectors/jira/index.ts @@ -8,7 +8,7 @@ import { lazy } from 'react'; import { CaseConnector } from '../types'; -import { JiraFieldsType } from '../../../../../../case/common/api/connectors'; +import { JiraFieldsType } from '../../../../../../cases/common/api/connectors'; import * as i18n from './translations'; export * from './types'; diff --git a/x-pack/plugins/security_solution/public/cases/components/connectors/jira/translations.ts b/x-pack/plugins/security_solution/public/cases/components/connectors/jira/translations.ts index 07f8f5b984cdd..a4948d61f952c 100644 --- a/x-pack/plugins/security_solution/public/cases/components/connectors/jira/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/components/connectors/jira/translations.ts @@ -56,21 +56,21 @@ export const SEARCH_ISSUES_LOADING = i18n.translate( ); export const PRIORITY = i18n.translate( - 'xpack.securitySolution.case.connectors.jira.prioritySelectFieldLabel', + 'xpack.securitySolution.cases.connectors.jira.prioritySelectFieldLabel', { defaultMessage: 'Priority', } ); export const ISSUE_TYPE = i18n.translate( - 'xpack.securitySolution.case.connectors.jira.issueTypesSelectFieldLabel', + 'xpack.securitySolution.cases.connectors.jira.issueTypesSelectFieldLabel', { defaultMessage: 'Issue type', } ); export const PARENT_ISSUE = i18n.translate( - 'xpack.securitySolution.case.connectors.jira.parentIssueSearchLabel', + 'xpack.securitySolution.cases.connectors.jira.parentIssueSearchLabel', { defaultMessage: 'Parent issue', } diff --git a/x-pack/plugins/security_solution/public/cases/components/connectors/resilient/case_fields.tsx b/x-pack/plugins/security_solution/public/cases/components/connectors/resilient/case_fields.tsx index 8c62f5285c257..b1fbfb1169d08 100644 --- a/x-pack/plugins/security_solution/public/cases/components/connectors/resilient/case_fields.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/connectors/resilient/case_fields.tsx @@ -21,7 +21,7 @@ import { useGetIncidentTypes } from './use_get_incident_types'; import { useGetSeverity } from './use_get_severity'; import * as i18n from './translations'; -import { ConnectorTypes, ResilientFieldsType } from '../../../../../../case/common/api/connectors'; +import { ConnectorTypes, ResilientFieldsType } from '../../../../../../cases/common/api/connectors'; import { ConnectorCard } from '../card'; const ResilientFieldsComponent: React.FunctionComponent< diff --git a/x-pack/plugins/security_solution/public/cases/components/connectors/resilient/index.ts b/x-pack/plugins/security_solution/public/cases/components/connectors/resilient/index.ts index fd1ed428abcc4..8a2603f39e102 100644 --- a/x-pack/plugins/security_solution/public/cases/components/connectors/resilient/index.ts +++ b/x-pack/plugins/security_solution/public/cases/components/connectors/resilient/index.ts @@ -8,7 +8,7 @@ import { lazy } from 'react'; import { CaseConnector } from '../types'; -import { ResilientFieldsType } from '../../../../../../case/common/api/connectors'; +import { ResilientFieldsType } from '../../../../../../cases/common/api/connectors'; import * as i18n from './translations'; export * from './types'; diff --git a/x-pack/plugins/security_solution/public/cases/components/connectors/resilient/translations.ts b/x-pack/plugins/security_solution/public/cases/components/connectors/resilient/translations.ts index 32a72c3803708..4f8061f48aa68 100644 --- a/x-pack/plugins/security_solution/public/cases/components/connectors/resilient/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/components/connectors/resilient/translations.ts @@ -8,35 +8,35 @@ import { i18n } from '@kbn/i18n'; export const INCIDENT_TYPES_API_ERROR = i18n.translate( - 'xpack.securitySolution.case.connectors.resilient.unableToGetIncidentTypesMessage', + 'xpack.securitySolution.cases.connectors.resilient.unableToGetIncidentTypesMessage', { defaultMessage: 'Unable to get incident types', } ); export const SEVERITY_API_ERROR = i18n.translate( - 'xpack.securitySolution.case.connectors.resilient.unableToGetSeverityMessage', + 'xpack.securitySolution.cases.connectors.resilient.unableToGetSeverityMessage', { defaultMessage: 'Unable to get severity', } ); export const INCIDENT_TYPES_PLACEHOLDER = i18n.translate( - 'xpack.securitySolution.case.connectors.resilient.incidentTypesPlaceholder', + 'xpack.securitySolution.cases.connectors.resilient.incidentTypesPlaceholder', { defaultMessage: 'Choose types', } ); export const INCIDENT_TYPES_LABEL = i18n.translate( - 'xpack.securitySolution.case.connectors.resilient.incidentTypesLabel', + 'xpack.securitySolution.cases.connectors.resilient.incidentTypesLabel', { defaultMessage: 'Incident Types', } ); export const SEVERITY_LABEL = i18n.translate( - 'xpack.securitySolution.case.connectors.resilient.severityLabel', + 'xpack.securitySolution.cases.connectors.resilient.severityLabel', { defaultMessage: 'Severity', } diff --git a/x-pack/plugins/security_solution/public/cases/components/connectors/servicenow/index.ts b/x-pack/plugins/security_solution/public/cases/components/connectors/servicenow/index.ts index 81bd81124599f..b342095c39ff0 100644 --- a/x-pack/plugins/security_solution/public/cases/components/connectors/servicenow/index.ts +++ b/x-pack/plugins/security_solution/public/cases/components/connectors/servicenow/index.ts @@ -11,7 +11,7 @@ import { CaseConnector } from '../types'; import { ServiceNowITSMFieldsType, ServiceNowSIRFieldsType, -} from '../../../../../../case/common/api/connectors'; +} from '../../../../../../cases/common/api/connectors'; import * as i18n from './translations'; export const getServiceNowITSMCaseConnector = (): CaseConnector => { diff --git a/x-pack/plugins/security_solution/public/cases/components/connectors/servicenow/servicenow_itsm_case_fields.tsx b/x-pack/plugins/security_solution/public/cases/components/connectors/servicenow/servicenow_itsm_case_fields.tsx index 1fe592cfdebc4..accb8450802d4 100644 --- a/x-pack/plugins/security_solution/public/cases/components/connectors/servicenow/servicenow_itsm_case_fields.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/connectors/servicenow/servicenow_itsm_case_fields.tsx @@ -13,7 +13,7 @@ import { ConnectorFieldsProps } from '../types'; import { ConnectorTypes, ServiceNowITSMFieldsType, -} from '../../../../../../case/common/api/connectors'; +} from '../../../../../../cases/common/api/connectors'; import { useKibana } from '../../../../common/lib/kibana'; import { ConnectorCard } from '../card'; import { useGetChoices } from './use_get_choices'; diff --git a/x-pack/plugins/security_solution/public/cases/components/connectors/servicenow/servicenow_sir_case_fields.tsx b/x-pack/plugins/security_solution/public/cases/components/connectors/servicenow/servicenow_sir_case_fields.tsx index 066b44fd5bc02..63502e3454fcf 100644 --- a/x-pack/plugins/security_solution/public/cases/components/connectors/servicenow/servicenow_sir_case_fields.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/connectors/servicenow/servicenow_sir_case_fields.tsx @@ -11,7 +11,7 @@ import { EuiFormRow, EuiSelect, EuiFlexGroup, EuiFlexItem, EuiCheckbox } from '@ import { ConnectorTypes, ServiceNowSIRFieldsType, -} from '../../../../../../case/common/api/connectors'; +} from '../../../../../../cases/common/api/connectors'; import { useKibana } from '../../../../common/lib/kibana'; import { ConnectorFieldsProps } from '../types'; import { ConnectorCard } from '../card'; diff --git a/x-pack/plugins/security_solution/public/cases/components/connectors/types.ts b/x-pack/plugins/security_solution/public/cases/components/connectors/types.ts index 46c707197fdb4..11452b966670b 100644 --- a/x-pack/plugins/security_solution/public/cases/components/connectors/types.ts +++ b/x-pack/plugins/security_solution/public/cases/components/connectors/types.ts @@ -12,9 +12,9 @@ import { CaseField, ActionConnector, ConnectorTypeFields, -} from '../../../../../case/common/api'; +} from '../../../../../cases/common/api'; -export { ThirdPartyField as AllThirdPartyFields } from '../../../../../case/common/api'; +export { ThirdPartyField as AllThirdPartyFields } from '../../../../../cases/common/api'; export type CaseActionConnector = ActionConnector; export interface ThirdPartyField { diff --git a/x-pack/plugins/security_solution/public/cases/components/create/connector.tsx b/x-pack/plugins/security_solution/public/cases/components/create/connector.tsx index bfe0d8dd78e28..7912d97528cd2 100644 --- a/x-pack/plugins/security_solution/public/cases/components/create/connector.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/create/connector.tsx @@ -8,7 +8,7 @@ import React, { memo, useCallback } from 'react'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import { ConnectorTypes } from '../../../../../case/common/api'; +import { ConnectorTypes } from '../../../../../cases/common/api'; import { UseField, useFormData, FieldHook, useFormContext } from '../../../shared_imports'; import { useConnectors } from '../../containers/configure/use_connectors'; import { ConnectorSelector } from '../connector_selector/form'; diff --git a/x-pack/plugins/security_solution/public/cases/components/create/form_context.test.tsx b/x-pack/plugins/security_solution/public/cases/components/create/form_context.test.tsx index 1e512ef5ffabd..99626c4cfb797 100644 --- a/x-pack/plugins/security_solution/public/cases/components/create/form_context.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/create/form_context.test.tsx @@ -10,7 +10,7 @@ import { mount, ReactWrapper } from 'enzyme'; import { act, waitFor } from '@testing-library/react'; import { EuiComboBox, EuiComboBoxOptionOption } from '@elastic/eui'; -import { ConnectorTypes } from '../../../../../case/common/api'; +import { ConnectorTypes } from '../../../../../cases/common/api'; import { TestProviders } from '../../../common/mock'; import { usePostCase } from '../../containers/use_post_case'; import { useGetTags } from '../../containers/use_get_tags'; diff --git a/x-pack/plugins/security_solution/public/cases/components/create/form_context.tsx b/x-pack/plugins/security_solution/public/cases/components/create/form_context.tsx index f56dcafdc95e4..b575dfe42f074 100644 --- a/x-pack/plugins/security_solution/public/cases/components/create/form_context.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/create/form_context.tsx @@ -19,7 +19,7 @@ import { usePostPushToService } from '../../containers/use_post_push_to_service' import { useConnectors } from '../../containers/configure/use_connectors'; import { useCaseConfigure } from '../../containers/configure/use_configure'; import { Case } from '../../containers/types'; -import { CaseType, ConnectorTypes } from '../../../../../case/common/api'; +import { CaseType, ConnectorTypes } from '../../../../../cases/common/api'; const initialCaseValue: FormProps = { description: '', diff --git a/x-pack/plugins/security_solution/public/cases/components/create/mock.ts b/x-pack/plugins/security_solution/public/cases/components/create/mock.ts index 81a7fe9cd9387..6e17be8d53e5a 100644 --- a/x-pack/plugins/security_solution/public/cases/components/create/mock.ts +++ b/x-pack/plugins/security_solution/public/cases/components/create/mock.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { CasePostRequest, CaseType } from '../../../../../case/common/api'; -import { ConnectorTypes } from '../../../../../case/common/api/connectors'; +import { CasePostRequest, CaseType } from '../../../../../cases/common/api'; +import { ConnectorTypes } from '../../../../../cases/common/api/connectors'; import { choices } from '../connectors/mock'; export const sampleTags = ['coke', 'pepsi']; diff --git a/x-pack/plugins/security_solution/public/cases/components/create/schema.tsx b/x-pack/plugins/security_solution/public/cases/components/create/schema.tsx index d48c978dfebcb..b069a484d314c 100644 --- a/x-pack/plugins/security_solution/public/cases/components/create/schema.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/create/schema.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { CasePostRequest, ConnectorTypeFields } from '../../../../../case/common/api'; +import { CasePostRequest, ConnectorTypeFields } from '../../../../../cases/common/api'; import { FIELD_TYPES, fieldValidators, FormSchema } from '../../../shared_imports'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/cases/components/edit_connector/index.tsx b/x-pack/plugins/security_solution/public/cases/components/edit_connector/index.tsx index d0f478dc17f81..f76adfd2a840f 100644 --- a/x-pack/plugins/security_solution/public/cases/components/edit_connector/index.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/edit_connector/index.tsx @@ -21,9 +21,9 @@ import styled from 'styled-components'; import { noop } from 'lodash/fp'; import { Form, UseField, useForm } from '../../../shared_imports'; -import { ConnectorTypeFields } from '../../../../../case/common/api/connectors'; +import { ConnectorTypeFields } from '../../../../../cases/common/api/connectors'; import { ConnectorSelector } from '../connector_selector/form'; -import { ActionConnector } from '../../../../../case/common/api'; +import { ActionConnector } from '../../../../../cases/common/api'; import { ConnectorFieldsForm } from '../connectors/fields_form'; import { getConnectorById } from '../configure_cases/utils'; import { CaseUserActions } from '../../containers/types'; diff --git a/x-pack/plugins/security_solution/public/cases/components/edit_connector/translations.ts b/x-pack/plugins/security_solution/public/cases/components/edit_connector/translations.ts index b2d2c1c8420b9..12fa0d1855062 100644 --- a/x-pack/plugins/security_solution/public/cases/components/edit_connector/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/components/edit_connector/translations.ts @@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n'; export * from '../../translations'; export const EDIT_CONNECTOR_ARIA = i18n.translate( - 'xpack.securitySolution.case.editConnector.editConnectorLinkAria', + 'xpack.securitySolution.cases.editConnector.editConnectorLinkAria', { defaultMessage: 'click to edit connector', } diff --git a/x-pack/plugins/security_solution/public/cases/components/property_actions/translations.ts b/x-pack/plugins/security_solution/public/cases/components/property_actions/translations.ts index e2b9b321be321..c5c11e0637d7b 100644 --- a/x-pack/plugins/security_solution/public/cases/components/property_actions/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/components/property_actions/translations.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; export const ACTIONS_ARIA = i18n.translate( - 'xpack.securitySolution.case.caseView.editActionsLinkAria', + 'xpack.securitySolution.cases.caseView.editActionsLinkAria', { defaultMessage: 'click to see all actions', } diff --git a/x-pack/plugins/security_solution/public/cases/components/status/button.test.tsx b/x-pack/plugins/security_solution/public/cases/components/status/button.test.tsx index 22d72429836de..6bf4eb95bc049 100644 --- a/x-pack/plugins/security_solution/public/cases/components/status/button.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/status/button.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { mount } from 'enzyme'; -import { CaseStatuses } from '../../../../../case/common/api'; +import { CaseStatuses } from '../../../../../cases/common/api'; import { StatusActionButton } from './button'; describe('StatusActionButton', () => { diff --git a/x-pack/plugins/security_solution/public/cases/components/status/button.tsx b/x-pack/plugins/security_solution/public/cases/components/status/button.tsx index 4ee69766fe128..5a0d98fc8a11a 100644 --- a/x-pack/plugins/security_solution/public/cases/components/status/button.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/status/button.tsx @@ -8,7 +8,7 @@ import React, { memo, useCallback, useMemo } from 'react'; import { EuiButton } from '@elastic/eui'; -import { CaseStatuses, caseStatuses } from '../../../../../case/common/api'; +import { CaseStatuses, caseStatuses } from '../../../../../cases/common/api'; import { statuses } from './config'; interface Props { diff --git a/x-pack/plugins/security_solution/public/cases/components/status/config.ts b/x-pack/plugins/security_solution/public/cases/components/status/config.ts index eab4bebedf064..47a74549f03cc 100644 --- a/x-pack/plugins/security_solution/public/cases/components/status/config.ts +++ b/x-pack/plugins/security_solution/public/cases/components/status/config.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { CaseStatuses } from '../../../../../case/common/api'; +import { CaseStatuses } from '../../../../../cases/common/api'; import * as i18n from './translations'; import { AllCaseStatus, Statuses, StatusAll } from './types'; diff --git a/x-pack/plugins/security_solution/public/cases/components/status/stats.test.tsx b/x-pack/plugins/security_solution/public/cases/components/status/stats.test.tsx index 023b331b4db45..266ceb04e4335 100644 --- a/x-pack/plugins/security_solution/public/cases/components/status/stats.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/status/stats.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { mount } from 'enzyme'; -import { CaseStatuses } from '../../../../../case/common/api'; +import { CaseStatuses } from '../../../../../cases/common/api'; import { Stats } from './stats'; describe('Stats', () => { diff --git a/x-pack/plugins/security_solution/public/cases/components/status/stats.tsx b/x-pack/plugins/security_solution/public/cases/components/status/stats.tsx index 572a169f64cf6..43001c2cf5947 100644 --- a/x-pack/plugins/security_solution/public/cases/components/status/stats.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/status/stats.tsx @@ -7,7 +7,7 @@ import React, { memo, useMemo } from 'react'; import { EuiDescriptionList, EuiLoadingSpinner } from '@elastic/eui'; -import { CaseStatuses } from '../../../../../case/common/api'; +import { CaseStatuses } from '../../../../../cases/common/api'; import { statuses } from './config'; export interface Props { diff --git a/x-pack/plugins/security_solution/public/cases/components/status/status.test.tsx b/x-pack/plugins/security_solution/public/cases/components/status/status.test.tsx index 388ceadd532a3..eff9d73c2adf9 100644 --- a/x-pack/plugins/security_solution/public/cases/components/status/status.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/status/status.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { mount } from 'enzyme'; -import { CaseStatuses } from '../../../../../case/common/api'; +import { CaseStatuses } from '../../../../../cases/common/api'; import { Status } from './status'; describe('Stats', () => { diff --git a/x-pack/plugins/security_solution/public/cases/components/status/translations.ts b/x-pack/plugins/security_solution/public/cases/components/status/translations.ts index 00dc5d3333f15..6c26513785026 100644 --- a/x-pack/plugins/security_solution/public/cases/components/status/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/components/status/translations.ts @@ -8,64 +8,64 @@ import { i18n } from '@kbn/i18n'; export * from '../../translations'; -export const ALL = i18n.translate('xpack.securitySolution.case.status.all', { +export const ALL = i18n.translate('xpack.securitySolution.cases.status.all', { defaultMessage: 'All', }); -export const OPEN = i18n.translate('xpack.securitySolution.case.status.open', { +export const OPEN = i18n.translate('xpack.securitySolution.cases.status.open', { defaultMessage: 'Open', }); -export const IN_PROGRESS = i18n.translate('xpack.securitySolution.case.status.inProgress', { +export const IN_PROGRESS = i18n.translate('xpack.securitySolution.cases.status.inProgress', { defaultMessage: 'In progress', }); -export const CLOSED = i18n.translate('xpack.securitySolution.case.status.closed', { +export const CLOSED = i18n.translate('xpack.securitySolution.cases.status.closed', { defaultMessage: 'Closed', }); -export const STATUS_ICON_ARIA = i18n.translate('xpack.securitySolution.case.status.iconAria', { +export const STATUS_ICON_ARIA = i18n.translate('xpack.securitySolution.cases.status.iconAria', { defaultMessage: 'Change status', }); -export const CASE_OPENED = i18n.translate('xpack.securitySolution.case.caseView.caseOpened', { +export const CASE_OPENED = i18n.translate('xpack.securitySolution.cases.caseView.caseOpened', { defaultMessage: 'Case opened', }); export const CASE_IN_PROGRESS = i18n.translate( - 'xpack.securitySolution.case.caseView.caseInProgress', + 'xpack.securitySolution.cases.caseView.caseInProgress', { defaultMessage: 'Case in progress', } ); -export const CASE_CLOSED = i18n.translate('xpack.securitySolution.case.caseView.caseClosed', { +export const CASE_CLOSED = i18n.translate('xpack.securitySolution.cases.caseView.caseClosed', { defaultMessage: 'Case closed', }); export const BULK_ACTION_CLOSE_SELECTED = i18n.translate( - 'xpack.securitySolution.case.caseTable.bulkActions.closeSelectedTitle', + 'xpack.securitySolution.cases.caseTable.bulkActions.closeSelectedTitle', { defaultMessage: 'Close selected', } ); export const BULK_ACTION_OPEN_SELECTED = i18n.translate( - 'xpack.securitySolution.case.caseTable.bulkActions.openSelectedTitle', + 'xpack.securitySolution.cases.caseTable.bulkActions.openSelectedTitle', { defaultMessage: 'Open selected', } ); export const BULK_ACTION_DELETE_SELECTED = i18n.translate( - 'xpack.securitySolution.case.caseTable.bulkActions.deleteSelectedTitle', + 'xpack.securitySolution.cases.caseTable.bulkActions.deleteSelectedTitle', { defaultMessage: 'Delete selected', } ); export const BULK_ACTION_MARK_IN_PROGRESS = i18n.translate( - 'xpack.securitySolution.case.caseTable.bulkActions.markInProgressTitle', + 'xpack.securitySolution.cases.caseTable.bulkActions.markInProgressTitle', { defaultMessage: 'Mark in progress', } diff --git a/x-pack/plugins/security_solution/public/cases/components/status/types.ts b/x-pack/plugins/security_solution/public/cases/components/status/types.ts index 6f642b281419b..5618e7802579d 100644 --- a/x-pack/plugins/security_solution/public/cases/components/status/types.ts +++ b/x-pack/plugins/security_solution/public/cases/components/status/types.ts @@ -6,7 +6,7 @@ */ import { EuiIconType } from '@elastic/eui/src/components/icon/icon'; -import { CaseStatuses } from '../../../../../case/common/api'; +import { CaseStatuses } from '../../../../../cases/common/api'; export const StatusAll = 'all' as const; type StatusAllType = typeof StatusAll; diff --git a/x-pack/plugins/security_solution/public/cases/components/tag_list/translations.ts b/x-pack/plugins/security_solution/public/cases/components/tag_list/translations.ts index e01175c5fc8ac..4bddfbdbc1a85 100644 --- a/x-pack/plugins/security_solution/public/cases/components/tag_list/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/components/tag_list/translations.ts @@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n'; export * from '../../translations'; export const EDIT_TAGS_ARIA = i18n.translate( - 'xpack.securitySolution.case.caseView.editTagsLinkAria', + 'xpack.securitySolution.cases.caseView.editTagsLinkAria', { defaultMessage: 'click to edit tags', } diff --git a/x-pack/plugins/security_solution/public/cases/components/timeline_actions/add_to_case_action.tsx b/x-pack/plugins/security_solution/public/cases/components/timeline_actions/add_to_case_action.tsx index 4a4420a164d0c..decd37a7646e7 100644 --- a/x-pack/plugins/security_solution/public/cases/components/timeline_actions/add_to_case_action.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/timeline_actions/add_to_case_action.tsx @@ -16,7 +16,7 @@ import { EuiToolTip, } from '@elastic/eui'; -import { CommentType, CaseStatuses } from '../../../../../case/common/api'; +import { CommentType, CaseStatuses } from '../../../../../cases/common/api'; import { Ecs } from '../../../../common/ecs'; import { ActionIconItem } from '../../../timelines/components/timeline/body/actions/action_icon_item'; import { usePostComment } from '../../containers/use_post_comment'; diff --git a/x-pack/plugins/security_solution/public/cases/components/timeline_actions/translations.ts b/x-pack/plugins/security_solution/public/cases/components/timeline_actions/translations.ts index 7c1437ede9ce5..6e878d88357ab 100644 --- a/x-pack/plugins/security_solution/public/cases/components/timeline_actions/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/components/timeline_actions/translations.ts @@ -8,62 +8,62 @@ import { i18n } from '@kbn/i18n'; export const ACTION_ADD_CASE = i18n.translate( - 'xpack.securitySolution.case.timeline.actions.addCase', + 'xpack.securitySolution.cases.timeline.actions.addCase', { defaultMessage: 'Add to case', } ); export const ACTION_ADD_NEW_CASE = i18n.translate( - 'xpack.securitySolution.case.timeline.actions.addNewCase', + 'xpack.securitySolution.cases.timeline.actions.addNewCase', { defaultMessage: 'Add to new case', } ); export const ACTION_ADD_EXISTING_CASE = i18n.translate( - 'xpack.securitySolution.case.timeline.actions.addExistingCase', + 'xpack.securitySolution.cases.timeline.actions.addExistingCase', { defaultMessage: 'Add to existing case', } ); export const ACTION_ADD_TO_CASE_ARIA_LABEL = i18n.translate( - 'xpack.securitySolution.case.timeline.actions.addToCaseAriaLabel', + 'xpack.securitySolution.cases.timeline.actions.addToCaseAriaLabel', { defaultMessage: 'Attach alert to case', } ); export const ACTION_ADD_TO_CASE_TOOLTIP = i18n.translate( - 'xpack.securitySolution.case.timeline.actions.addToCaseTooltip', + 'xpack.securitySolution.cases.timeline.actions.addToCaseTooltip', { defaultMessage: 'Add to case', } ); export const CASE_CREATED_SUCCESS_TOAST = (title: string) => - i18n.translate('xpack.securitySolution.case.timeline.actions.caseCreatedSuccessToast', { + i18n.translate('xpack.securitySolution.cases.timeline.actions.caseCreatedSuccessToast', { values: { title }, defaultMessage: 'An alert has been added to "{title}"', }); export const CASE_CREATED_SUCCESS_TOAST_TEXT = i18n.translate( - 'xpack.securitySolution.case.timeline.actions.caseCreatedSuccessToastText', + 'xpack.securitySolution.cases.timeline.actions.caseCreatedSuccessToastText', { defaultMessage: 'Alerts in this case have their status synched with the case status', } ); export const VIEW_CASE = i18n.translate( - 'xpack.securitySolution.case.timeline.actions.caseCreatedSuccessToastViewCaseLink', + 'xpack.securitySolution.cases.timeline.actions.caseCreatedSuccessToastViewCaseLink', { defaultMessage: 'View Case', } ); export const PERMISSIONS_MSG = i18n.translate( - 'xpack.securitySolution.case.timeline.actions.permissionsMessage', + 'xpack.securitySolution.cases.timeline.actions.permissionsMessage', { defaultMessage: 'You are currently missing the required permissions to attach alerts to cases. Please contact your administrator for further assistance.', @@ -71,7 +71,7 @@ export const PERMISSIONS_MSG = i18n.translate( ); export const UNSUPPORTED_EVENTS_MSG = i18n.translate( - 'xpack.securitySolution.case.timeline.actions.unsupportedEventsMessage', + 'xpack.securitySolution.cases.timeline.actions.unsupportedEventsMessage', { defaultMessage: 'This event cannot be attached to a case', } diff --git a/x-pack/plugins/security_solution/public/cases/components/use_all_cases_modal/all_cases_modal.tsx b/x-pack/plugins/security_solution/public/cases/components/use_all_cases_modal/all_cases_modal.tsx index e1d6baa6e630a..10ad3d35004ba 100644 --- a/x-pack/plugins/security_solution/public/cases/components/use_all_cases_modal/all_cases_modal.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/use_all_cases_modal/all_cases_modal.tsx @@ -10,7 +10,7 @@ import styled from 'styled-components'; import { EuiModal, EuiModalBody, EuiModalHeader, EuiModalHeaderTitle } from '@elastic/eui'; import { useGetUserSavedObjectPermissions } from '../../../common/lib/kibana'; -import { CaseStatuses } from '../../../../../case/common/api'; +import { CaseStatuses } from '../../../../../cases/common/api'; import { Case, SubCase } from '../../containers/types'; import { AllCases } from '../all_cases'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/cases/components/use_all_cases_modal/index.tsx b/x-pack/plugins/security_solution/public/cases/components/use_all_cases_modal/index.tsx index 52b8ebe0210c0..0b30f6ac94e03 100644 --- a/x-pack/plugins/security_solution/public/cases/components/use_all_cases_modal/index.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/use_all_cases_modal/index.tsx @@ -6,7 +6,7 @@ */ import React, { useState, useCallback, useMemo } from 'react'; -import { CaseStatuses } from '../../../../../case/common/api'; +import { CaseStatuses } from '../../../../../cases/common/api'; import { Case, SubCase } from '../../containers/types'; import { AllCasesModal } from './all_cases_modal'; diff --git a/x-pack/plugins/security_solution/public/cases/components/use_all_cases_modal/translations.ts b/x-pack/plugins/security_solution/public/cases/components/use_all_cases_modal/translations.ts index ccf089540bb2d..36db3c631100f 100644 --- a/x-pack/plugins/security_solution/public/cases/components/use_all_cases_modal/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/components/use_all_cases_modal/translations.ts @@ -6,6 +6,6 @@ */ import { i18n } from '@kbn/i18n'; -export const SELECT_CASE_TITLE = i18n.translate('xpack.securitySolution.case.caseModal.title', { +export const SELECT_CASE_TITLE = i18n.translate('xpack.securitySolution.cases.caseModal.title', { defaultMessage: 'Select case', }); diff --git a/x-pack/plugins/security_solution/public/cases/components/use_create_case_modal/create_case_modal.tsx b/x-pack/plugins/security_solution/public/cases/components/use_create_case_modal/create_case_modal.tsx index b1edaa56cd348..4b5eb00d95a80 100644 --- a/x-pack/plugins/security_solution/public/cases/components/use_create_case_modal/create_case_modal.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/use_create_case_modal/create_case_modal.tsx @@ -14,7 +14,7 @@ import { CreateCaseForm } from '../create/form'; import { SubmitCaseButton } from '../create/submit_button'; import { Case } from '../../containers/types'; import * as i18n from '../../translations'; -import { CaseType } from '../../../../../case/common/api'; +import { CaseType } from '../../../../../cases/common/api'; export interface CreateCaseModalProps { isModalOpen: boolean; diff --git a/x-pack/plugins/security_solution/public/cases/components/use_create_case_modal/index.tsx b/x-pack/plugins/security_solution/public/cases/components/use_create_case_modal/index.tsx index 50887f08dee6e..5d2f54bd1f142 100644 --- a/x-pack/plugins/security_solution/public/cases/components/use_create_case_modal/index.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/use_create_case_modal/index.tsx @@ -6,7 +6,7 @@ */ import React, { useState, useCallback, useMemo } from 'react'; -import { CaseType } from '../../../../../case/common/api'; +import { CaseType } from '../../../../../cases/common/api'; import { Case } from '../../containers/types'; import { CreateCaseModal } from './create_case_modal'; diff --git a/x-pack/plugins/security_solution/public/cases/components/use_push_to_service/helpers.tsx b/x-pack/plugins/security_solution/public/cases/components/use_push_to_service/helpers.tsx index 9c34afb1349e4..30d2cb720c031 100644 --- a/x-pack/plugins/security_solution/public/cases/components/use_push_to_service/helpers.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/use_push_to_service/helpers.tsx @@ -19,7 +19,7 @@ export const getLicenseError = () => ({ description: ( @@ -42,7 +42,7 @@ export const getKibanaConfigError = () => ({ description: ( diff --git a/x-pack/plugins/security_solution/public/cases/components/use_push_to_service/index.test.tsx b/x-pack/plugins/security_solution/public/cases/components/use_push_to_service/index.test.tsx index b8048afb083f1..c058473bbfe3f 100644 --- a/x-pack/plugins/security_solution/public/cases/components/use_push_to_service/index.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/use_push_to_service/index.test.tsx @@ -13,12 +13,12 @@ import '../../../common/mock/match_media'; import { usePushToService, ReturnUsePushToService, UsePushToService } from '.'; import { TestProviders } from '../../../common/mock'; -import { CaseStatuses } from '../../../../../case/common/api'; +import { CaseStatuses } from '../../../../../cases/common/api'; import { usePostPushToService } from '../../containers/use_post_push_to_service'; import { basicPush, actionLicenses } from '../../containers/mock'; import { useGetActionLicense } from '../../containers/use_get_action_license'; import { connectorsMock } from '../../containers/configure/mock'; -import { ConnectorTypes } from '../../../../../case/common/api/connectors'; +import { ConnectorTypes } from '../../../../../cases/common/api/connectors'; jest.mock('react-router-dom', () => { const original = jest.requireActual('react-router-dom'); diff --git a/x-pack/plugins/security_solution/public/cases/components/use_push_to_service/index.tsx b/x-pack/plugins/security_solution/public/cases/components/use_push_to_service/index.tsx index 21067a3e69969..d83ddb08b51d2 100644 --- a/x-pack/plugins/security_solution/public/cases/components/use_push_to_service/index.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/use_push_to_service/index.tsx @@ -17,7 +17,7 @@ import { getConfigureCasesUrl, useFormatUrl } from '../../../common/components/l import { CaseCallOut } from '../callout'; import { getLicenseError, getKibanaConfigError } from './helpers'; import * as i18n from './translations'; -import { CaseConnector, ActionConnector, CaseStatuses } from '../../../../../case/common/api'; +import { CaseConnector, ActionConnector, CaseStatuses } from '../../../../../cases/common/api'; import { CaseServices } from '../../containers/use_get_case_user_actions'; import { LinkAnchor } from '../../../common/components/links'; import { SecurityPageName } from '../../../app/types'; @@ -90,7 +90,7 @@ export const usePushToService = ({ description: ( ), }, @@ -129,7 +129,7 @@ export const usePushToService = ({ description: ( ), errorType: 'danger', @@ -145,7 +145,7 @@ export const usePushToService = ({ description: ( ), }, diff --git a/x-pack/plugins/security_solution/public/cases/components/use_push_to_service/translations.ts b/x-pack/plugins/security_solution/public/cases/components/use_push_to_service/translations.ts index bb28700121f0d..28a7312328b78 100644 --- a/x-pack/plugins/security_solution/public/cases/components/use_push_to_service/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/components/use_push_to_service/translations.ts @@ -8,19 +8,19 @@ import { i18n } from '@kbn/i18n'; export const ERROR_PUSH_SERVICE_CALLOUT_TITLE = i18n.translate( - 'xpack.securitySolution.case.caseView.errorsPushServiceCallOutTitle', + 'xpack.securitySolution.cases.caseView.errorsPushServiceCallOutTitle', { defaultMessage: 'To send cases to external systems, you need to:', } ); export const PUSH_THIRD = (thirdParty: string) => { if (thirdParty === 'none') { - return i18n.translate('xpack.securitySolution.case.caseView.pushThirdPartyIncident', { + return i18n.translate('xpack.securitySolution.cases.caseView.pushThirdPartyIncident', { defaultMessage: 'Push as external incident', }); } - return i18n.translate('xpack.securitySolution.case.caseView.pushNamedIncident', { + return i18n.translate('xpack.securitySolution.cases.caseView.pushNamedIncident', { values: { thirdParty }, defaultMessage: 'Push as { thirdParty } incident', }); @@ -28,68 +28,68 @@ export const PUSH_THIRD = (thirdParty: string) => { export const UPDATE_THIRD = (thirdParty: string) => { if (thirdParty === 'none') { - return i18n.translate('xpack.securitySolution.case.caseView.updateThirdPartyIncident', { + return i18n.translate('xpack.securitySolution.cases.caseView.updateThirdPartyIncident', { defaultMessage: 'Update external incident', }); } - return i18n.translate('xpack.securitySolution.case.caseView.updateNamedIncident', { + return i18n.translate('xpack.securitySolution.cases.caseView.updateNamedIncident', { values: { thirdParty }, defaultMessage: 'Update { thirdParty } incident', }); }; export const PUSH_DISABLE_BY_NO_CONFIG_TITLE = i18n.translate( - 'xpack.securitySolution.case.caseView.pushToServiceDisableByNoConfigTitle', + 'xpack.securitySolution.cases.caseView.pushToServiceDisableByNoConfigTitle', { defaultMessage: 'Configure external connector', } ); export const PUSH_DISABLE_BY_NO_CASE_CONFIG_TITLE = i18n.translate( - 'xpack.securitySolution.case.caseView.pushToServiceDisableByNoCaseConfigTitle', + 'xpack.securitySolution.cases.caseView.pushToServiceDisableByNoCaseConfigTitle', { defaultMessage: 'Select external connector', } ); export const PUSH_DISABLE_BECAUSE_CASE_CLOSED_TITLE = i18n.translate( - 'xpack.securitySolution.case.caseView.pushToServiceDisableBecauseCaseClosedTitle', + 'xpack.securitySolution.cases.caseView.pushToServiceDisableBecauseCaseClosedTitle', { defaultMessage: 'Reopen the case', } ); export const PUSH_DISABLE_BY_KIBANA_CONFIG_TITLE = i18n.translate( - 'xpack.securitySolution.case.caseView.pushToServiceDisableByConfigTitle', + 'xpack.securitySolution.cases.caseView.pushToServiceDisableByConfigTitle', { defaultMessage: 'Enable external service in Kibana configuration file', } ); export const PUSH_DISABLE_BY_LICENSE_TITLE = i18n.translate( - 'xpack.securitySolution.case.caseView.pushToServiceDisableByLicenseTitle', + 'xpack.securitySolution.cases.caseView.pushToServiceDisableByLicenseTitle', { defaultMessage: 'Upgrade to an appropriate license', } ); export const LINK_CLOUD_DEPLOYMENT = i18n.translate( - 'xpack.securitySolution.case.caseView.cloudDeploymentLink', + 'xpack.securitySolution.cases.caseView.cloudDeploymentLink', { defaultMessage: 'cloud deployment', } ); export const LINK_APPROPRIATE_LICENSE = i18n.translate( - 'xpack.securitySolution.case.caseView.appropiateLicense', + 'xpack.securitySolution.cases.caseView.appropiateLicense', { defaultMessage: 'appropriate license', } ); export const LINK_CONNECTOR_CONFIGURE = i18n.translate( - 'xpack.securitySolution.case.caseView.connectorConfigureLink', + 'xpack.securitySolution.cases.caseView.connectorConfigureLink', { defaultMessage: 'connector', } diff --git a/x-pack/plugins/security_solution/public/cases/components/user_action_tree/helpers.test.tsx b/x-pack/plugins/security_solution/public/cases/components/user_action_tree/helpers.test.tsx index b861016944b8d..a62c6c0ef682d 100644 --- a/x-pack/plugins/security_solution/public/cases/components/user_action_tree/helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/user_action_tree/helpers.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { mount } from 'enzyme'; -import { CaseStatuses } from '../../../../../case/common/api'; +import { CaseStatuses } from '../../../../../cases/common/api'; import { basicPush, getUserAction } from '../../containers/mock'; import { getLabelTitle, getPushedServiceLabelTitle, getConnectorLabelTitle } from './helpers'; import { connectorsMock } from '../../containers/configure/mock'; diff --git a/x-pack/plugins/security_solution/public/cases/components/user_action_tree/helpers.tsx b/x-pack/plugins/security_solution/public/cases/components/user_action_tree/helpers.tsx index be32c1c5dd036..cc8d560f91b1f 100644 --- a/x-pack/plugins/security_solution/public/cases/components/user_action_tree/helpers.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/user_action_tree/helpers.tsx @@ -15,7 +15,7 @@ import { ActionConnector, CaseStatuses, CommentType, -} from '../../../../../case/common/api'; +} from '../../../../../cases/common/api'; import { CaseUserActions } from '../../containers/types'; import { CaseServices } from '../../containers/use_get_case_user_actions'; import { parseString } from '../../containers/utils'; diff --git a/x-pack/plugins/security_solution/public/cases/components/user_action_tree/index.tsx b/x-pack/plugins/security_solution/public/cases/components/user_action_tree/index.tsx index bc7961b75a30a..f8d6872a4b740 100644 --- a/x-pack/plugins/security_solution/public/cases/components/user_action_tree/index.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/user_action_tree/index.tsx @@ -30,7 +30,7 @@ import { AlertCommentRequestRt, CommentType, ContextTypeUserRt, -} from '../../../../../case/common/api'; +} from '../../../../../cases/common/api'; import { CaseServices } from '../../containers/use_get_case_user_actions'; import { parseString } from '../../containers/utils'; import { OnUpdateFields } from '../case_view'; diff --git a/x-pack/plugins/security_solution/public/cases/components/user_action_tree/translations.ts b/x-pack/plugins/security_solution/public/cases/components/user_action_tree/translations.ts index 46f36615b1a4e..8218712fb359f 100644 --- a/x-pack/plugins/security_solution/public/cases/components/user_action_tree/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/components/user_action_tree/translations.ts @@ -10,74 +10,74 @@ import { i18n } from '@kbn/i18n'; export * from '../case_view/translations'; export const ALREADY_PUSHED_TO_SERVICE = (externalService: string) => - i18n.translate('xpack.securitySolution.case.caseView.alreadyPushedToExternalService', { + i18n.translate('xpack.securitySolution.cases.caseView.alreadyPushedToExternalService', { values: { externalService }, defaultMessage: 'Already pushed to { externalService } incident', }); export const REQUIRED_UPDATE_TO_SERVICE = (externalService: string) => - i18n.translate('xpack.securitySolution.case.caseView.requiredUpdateToExternalService', { + i18n.translate('xpack.securitySolution.cases.caseView.requiredUpdateToExternalService', { values: { externalService }, defaultMessage: 'Requires update to { externalService } incident', }); export const COPY_REFERENCE_LINK = i18n.translate( - 'xpack.securitySolution.case.caseView.copyCommentLinkAria', + 'xpack.securitySolution.cases.caseView.copyCommentLinkAria', { defaultMessage: 'Copy reference link', } ); export const MOVE_TO_ORIGINAL_COMMENT = i18n.translate( - 'xpack.securitySolution.case.caseView.moveToCommentAria', + 'xpack.securitySolution.cases.caseView.moveToCommentAria', { defaultMessage: 'Highlight the referenced comment', } ); export const ALERT_COMMENT_LABEL_TITLE = i18n.translate( - 'xpack.securitySolution.case.caseView.alertCommentLabelTitle', + 'xpack.securitySolution.cases.caseView.alertCommentLabelTitle', { defaultMessage: 'added an alert from', } ); export const GENERATED_ALERT_COMMENT_LABEL_TITLE = i18n.translate( - 'xpack.securitySolution.case.caseView.generatedAlertCommentLabelTitle', + 'xpack.securitySolution.cases.caseView.generatedAlertCommentLabelTitle', { defaultMessage: 'were added from', } ); export const GENERATED_ALERT_COUNT_COMMENT_LABEL_TITLE = (totalCount: number) => - i18n.translate('xpack.securitySolution.case.caseView.generatedAlertCountCommentLabelTitle', { + i18n.translate('xpack.securitySolution.cases.caseView.generatedAlertCountCommentLabelTitle', { values: { totalCount }, defaultMessage: `{totalCount} {totalCount, plural, =1 {alert} other {alerts}}`, }); export const ALERT_RULE_DELETED_COMMENT_LABEL = i18n.translate( - 'xpack.securitySolution.case.caseView.alertRuleDeletedLabelTitle', + 'xpack.securitySolution.cases.caseView.alertRuleDeletedLabelTitle', { defaultMessage: 'added an alert', } ); export const SHOW_ALERT_TOOLTIP = i18n.translate( - 'xpack.securitySolution.case.caseView.showAlertTooltip', + 'xpack.securitySolution.cases.caseView.showAlertTooltip', { defaultMessage: 'Show alert details', } ); export const SEND_ALERT_TO_TIMELINE = i18n.translate( - 'xpack.securitySolution.case.caseView.sendAlertToTimelineTooltip', + 'xpack.securitySolution.cases.caseView.sendAlertToTimelineTooltip', { defaultMessage: 'Investigate in timeline', } ); export const UNKNOWN_RULE = i18n.translate( - 'xpack.securitySolution.case.caseView.unknownRule.label', + 'xpack.securitySolution.cases.caseView.unknownRule.label', { defaultMessage: 'Unknown rule', } diff --git a/x-pack/plugins/security_solution/public/cases/components/user_action_tree/user_action_alert_comment_event.test.tsx b/x-pack/plugins/security_solution/public/cases/components/user_action_tree/user_action_alert_comment_event.test.tsx index f4f610d07e2ff..3bfdf2d2c5e62 100644 --- a/x-pack/plugins/security_solution/public/cases/components/user_action_tree/user_action_alert_comment_event.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/user_action_tree/user_action_alert_comment_event.test.tsx @@ -11,7 +11,7 @@ import { mount } from 'enzyme'; import { TestProviders } from '../../../common/mock'; import { useKibana } from '../../../common/lib/kibana'; import { AlertCommentEvent } from './user_action_alert_comment_event'; -import { CommentType } from '../../../../../case/common/api'; +import { CommentType } from '../../../../../cases/common/api'; const props = { alertId: 'alert-id-1', diff --git a/x-pack/plugins/security_solution/public/cases/components/user_action_tree/user_action_alert_comment_event.tsx b/x-pack/plugins/security_solution/public/cases/components/user_action_tree/user_action_alert_comment_event.tsx index 57c366d412660..a72bebbaf0999 100644 --- a/x-pack/plugins/security_solution/public/cases/components/user_action_tree/user_action_alert_comment_event.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/user_action_tree/user_action_alert_comment_event.tsx @@ -15,7 +15,7 @@ import { getRuleDetailsUrl, useFormatUrl } from '../../../common/components/link import { SecurityPageName } from '../../../app/types'; import * as i18n from './translations'; -import { CommentType } from '../../../../../case/common/api'; +import { CommentType } from '../../../../../cases/common/api'; import { LinkAnchor } from '../../../common/components/links'; interface Props { diff --git a/x-pack/plugins/security_solution/public/cases/components/user_list/translations.ts b/x-pack/plugins/security_solution/public/cases/components/user_list/translations.ts index 8cea311e3b552..81d2c7d50e5d7 100644 --- a/x-pack/plugins/security_solution/public/cases/components/user_list/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/components/user_list/translations.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; export const SEND_EMAIL_ARIA = (user: string) => - i18n.translate('xpack.securitySolution.case.caseView.sendEmalLinkAria', { + i18n.translate('xpack.securitySolution.cases.caseView.sendEmalLinkAria', { values: { user }, defaultMessage: 'click to send an email to {user}', }); diff --git a/x-pack/plugins/security_solution/public/cases/containers/__mocks__/api.ts b/x-pack/plugins/security_solution/public/cases/containers/__mocks__/api.ts index ab761309fa6ad..11ae4fd6bf178 100644 --- a/x-pack/plugins/security_solution/public/cases/containers/__mocks__/api.ts +++ b/x-pack/plugins/security_solution/public/cases/containers/__mocks__/api.ts @@ -33,7 +33,7 @@ import { CommentRequest, User, CaseStatuses, -} from '../../../../../case/common/api'; +} from '../../../../../cases/common/api'; export const getCase = async ( caseId: string, diff --git a/x-pack/plugins/security_solution/public/cases/containers/api.test.tsx b/x-pack/plugins/security_solution/public/cases/containers/api.test.tsx index 01f1ba173d5be..e6ecf45097a1a 100644 --- a/x-pack/plugins/security_solution/public/cases/containers/api.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/containers/api.test.tsx @@ -7,8 +7,8 @@ import { KibanaServices } from '../../common/lib/kibana'; -import { ConnectorTypes, CommentType, CaseStatuses } from '../../../../case/common/api'; -import { CASES_URL } from '../../../../case/common/constants'; +import { ConnectorTypes, CommentType, CaseStatuses } from '../../../../cases/common/api'; +import { CASES_URL } from '../../../../cases/common/constants'; import { deleteCases, diff --git a/x-pack/plugins/security_solution/public/cases/containers/api.ts b/x-pack/plugins/security_solution/public/cases/containers/api.ts index a064189854879..644c7dbf716bf 100644 --- a/x-pack/plugins/security_solution/public/cases/containers/api.ts +++ b/x-pack/plugins/security_solution/public/cases/containers/api.ts @@ -22,7 +22,7 @@ import { SubCaseResponse, SubCasesResponse, User, -} from '../../../../case/common/api'; +} from '../../../../cases/common/api'; import { ACTION_TYPES_URL, @@ -32,7 +32,7 @@ import { CASES_URL, SUB_CASE_DETAILS_URL, SUB_CASES_PATCH_DEL_URL, -} from '../../../../case/common/constants'; +} from '../../../../cases/common/constants'; import { getCaseCommentsUrl, @@ -41,7 +41,7 @@ import { getCaseUserActionUrl, getSubCaseDetailsUrl, getSubCaseUserActionUrl, -} from '../../../../case/common/api/helpers'; +} from '../../../../cases/common/api/helpers'; import { KibanaServices } from '../../common/lib/kibana'; import { StatusAll } from '../components/status'; diff --git a/x-pack/plugins/security_solution/public/cases/containers/configure/__mocks__/api.ts b/x-pack/plugins/security_solution/public/cases/containers/configure/__mocks__/api.ts index a2c38c82b7756..d9cd81f143816 100644 --- a/x-pack/plugins/security_solution/public/cases/containers/configure/__mocks__/api.ts +++ b/x-pack/plugins/security_solution/public/cases/containers/configure/__mocks__/api.ts @@ -10,7 +10,7 @@ import { CasesConfigureRequest, ActionConnector, ActionTypeConnector, -} from '../../../../../../case/common/api'; +} from '../../../../../../cases/common/api'; import { ApiProps } from '../../types'; import { CaseConfigure } from '../types'; diff --git a/x-pack/plugins/security_solution/public/cases/containers/configure/api.test.ts b/x-pack/plugins/security_solution/public/cases/containers/configure/api.test.ts index 139b77119bb4f..0c7ae422be861 100644 --- a/x-pack/plugins/security_solution/public/cases/containers/configure/api.test.ts +++ b/x-pack/plugins/security_solution/public/cases/containers/configure/api.test.ts @@ -20,7 +20,7 @@ import { caseConfigurationResposeMock, caseConfigurationCamelCaseResponseMock, } from './mock'; -import { ConnectorTypes } from '../../../../../case/common/api/connectors'; +import { ConnectorTypes } from '../../../../../cases/common/api/connectors'; const abortCtrl = new AbortController(); const mockKibanaServices = KibanaServices.get as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/cases/containers/configure/api.ts b/x-pack/plugins/security_solution/public/cases/containers/configure/api.ts index cb132026c1873..943724ef08398 100644 --- a/x-pack/plugins/security_solution/public/cases/containers/configure/api.ts +++ b/x-pack/plugins/security_solution/public/cases/containers/configure/api.ts @@ -12,14 +12,14 @@ import { CasesConfigurePatch, CasesConfigureResponse, CasesConfigureRequest, -} from '../../../../../case/common/api'; +} from '../../../../../cases/common/api'; import { KibanaServices } from '../../../common/lib/kibana'; import { CASE_CONFIGURE_CONNECTORS_URL, CASE_CONFIGURE_URL, ACTION_TYPES_URL, -} from '../../../../../case/common/constants'; +} from '../../../../../cases/common/constants'; import { ApiProps } from '../types'; import { convertToCamelCase, decodeCaseConfigureResponse } from '../utils'; diff --git a/x-pack/plugins/security_solution/public/cases/containers/configure/mock.ts b/x-pack/plugins/security_solution/public/cases/containers/configure/mock.ts index c4ae60c7d1a73..4e71c9a990ece 100644 --- a/x-pack/plugins/security_solution/public/cases/containers/configure/mock.ts +++ b/x-pack/plugins/security_solution/public/cases/containers/configure/mock.ts @@ -11,7 +11,7 @@ import { CasesConfigureResponse, CasesConfigureRequest, ConnectorTypes, -} from '../../../../../case/common/api'; +} from '../../../../../cases/common/api'; import { CaseConfigure, CaseConnectorMapping } from './types'; export const mappings: CaseConnectorMapping[] = [ diff --git a/x-pack/plugins/security_solution/public/cases/containers/configure/translations.ts b/x-pack/plugins/security_solution/public/cases/containers/configure/translations.ts index 5650d51fd8c36..455293b217679 100644 --- a/x-pack/plugins/security_solution/public/cases/containers/configure/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/containers/configure/translations.ts @@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n'; export * from '../translations'; export const SUCCESS_CONFIGURE = i18n.translate( - 'xpack.securitySolution.case.configure.successSaveToast', + 'xpack.securitySolution.cases.configure.successSaveToast', { defaultMessage: 'Saved external connection settings', } diff --git a/x-pack/plugins/security_solution/public/cases/containers/configure/types.ts b/x-pack/plugins/security_solution/public/cases/containers/configure/types.ts index df3b1b39c1bb0..aa86d1bfdb0b1 100644 --- a/x-pack/plugins/security_solution/public/cases/containers/configure/types.ts +++ b/x-pack/plugins/security_solution/public/cases/containers/configure/types.ts @@ -15,7 +15,7 @@ import { CasesConfigure, ClosureType, ThirdPartyField, -} from '../../../../../case/common/api'; +} from '../../../../../cases/common/api'; export { ActionConnector, diff --git a/x-pack/plugins/security_solution/public/cases/containers/configure/use_configure.test.tsx b/x-pack/plugins/security_solution/public/cases/containers/configure/use_configure.test.tsx index adf7ee9e41517..44a503cd089ef 100644 --- a/x-pack/plugins/security_solution/public/cases/containers/configure/use_configure.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/containers/configure/use_configure.test.tsx @@ -14,7 +14,7 @@ import { } from './use_configure'; import { mappings, caseConfigurationCamelCaseResponseMock } from './mock'; import * as api from './api'; -import { ConnectorTypes } from '../../../../../case/common/api/connectors'; +import { ConnectorTypes } from '../../../../../cases/common/api/connectors'; jest.mock('./api'); const mockErrorToToaster = jest.fn(); diff --git a/x-pack/plugins/security_solution/public/cases/containers/configure/use_configure.tsx b/x-pack/plugins/security_solution/public/cases/containers/configure/use_configure.tsx index 21d1832796ba8..2ec2a73363bfe 100644 --- a/x-pack/plugins/security_solution/public/cases/containers/configure/use_configure.tsx +++ b/x-pack/plugins/security_solution/public/cases/containers/configure/use_configure.tsx @@ -15,7 +15,7 @@ import { } from '../../../common/components/toasters'; import * as i18n from './translations'; import { ClosureType, CaseConfigure, CaseConnector, CaseConnectorMapping } from './types'; -import { ConnectorTypes } from '../../../../../case/common/api/connectors'; +import { ConnectorTypes } from '../../../../../cases/common/api/connectors'; export type ConnectorConfiguration = { connector: CaseConnector } & { closureType: CaseConfigure['closureType']; diff --git a/x-pack/plugins/security_solution/public/cases/containers/mock.ts b/x-pack/plugins/security_solution/public/cases/containers/mock.ts index 719fe01579285..6e937fe7760cd 100644 --- a/x-pack/plugins/security_solution/public/cases/containers/mock.ts +++ b/x-pack/plugins/security_solution/public/cases/containers/mock.ts @@ -20,9 +20,9 @@ import { CommentType, AssociationType, CaseType, -} from '../../../../case/common/api'; +} from '../../../../cases/common/api'; import { UseGetCasesState, DEFAULT_FILTER_OPTIONS, DEFAULT_QUERY_PARAMS } from './use_get_cases'; -import { ConnectorTypes } from '../../../../case/common/api/connectors'; +import { ConnectorTypes } from '../../../../cases/common/api/connectors'; export { connectorsMock } from './configure/mock'; export const basicCaseId = 'basic-case-id'; diff --git a/x-pack/plugins/security_solution/public/cases/containers/translations.ts b/x-pack/plugins/security_solution/public/cases/containers/translations.ts index c79b897ba43a1..4c7afc9224445 100644 --- a/x-pack/plugins/security_solution/public/cases/containers/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/containers/translations.ts @@ -9,25 +9,25 @@ import { i18n } from '@kbn/i18n'; export * from '../translations'; -export const ERROR_TITLE = i18n.translate('xpack.securitySolution.containers.case.errorTitle', { +export const ERROR_TITLE = i18n.translate('xpack.securitySolution.containers.cases.errorTitle', { defaultMessage: 'Error fetching data', }); export const ERROR_DELETING = i18n.translate( - 'xpack.securitySolution.containers.case.errorDeletingTitle', + 'xpack.securitySolution.containers.cases.errorDeletingTitle', { defaultMessage: 'Error deleting data', } ); export const UPDATED_CASE = (caseTitle: string) => - i18n.translate('xpack.securitySolution.containers.case.updatedCase', { + i18n.translate('xpack.securitySolution.containers.cases.updatedCase', { values: { caseTitle }, defaultMessage: 'Updated "{caseTitle}"', }); export const DELETED_CASES = (totalCases: number, caseTitle?: string) => - i18n.translate('xpack.securitySolution.containers.case.deletedCases', { + i18n.translate('xpack.securitySolution.containers.cases.deletedCases', { values: { caseTitle, totalCases }, defaultMessage: 'Deleted {totalCases, plural, =1 {"{caseTitle}"} other {{totalCases} cases}}', }); @@ -39,7 +39,7 @@ export const CLOSED_CASES = ({ totalCases: number; caseTitle?: string; }) => - i18n.translate('xpack.securitySolution.containers.case.closedCases', { + i18n.translate('xpack.securitySolution.containers.cases.closedCases', { values: { caseTitle, totalCases }, defaultMessage: 'Closed {totalCases, plural, =1 {"{caseTitle}"} other {{totalCases} cases}}', }); @@ -51,7 +51,7 @@ export const REOPENED_CASES = ({ totalCases: number; caseTitle?: string; }) => - i18n.translate('xpack.securitySolution.containers.case.reopenedCases', { + i18n.translate('xpack.securitySolution.containers.cases.reopenedCases', { values: { caseTitle, totalCases }, defaultMessage: 'Opened {totalCases, plural, =1 {"{caseTitle}"} other {{totalCases} cases}}', }); @@ -63,33 +63,33 @@ export const MARK_IN_PROGRESS_CASES = ({ totalCases: number; caseTitle?: string; }) => - i18n.translate('xpack.securitySolution.containers.case.markInProgressCases', { + i18n.translate('xpack.securitySolution.containers.cases.markInProgressCases', { values: { caseTitle, totalCases }, defaultMessage: 'Marked {totalCases, plural, =1 {"{caseTitle}"} other {{totalCases} cases}} as in progress', }); export const SUCCESS_SEND_TO_EXTERNAL_SERVICE = (serviceName: string) => - i18n.translate('xpack.securitySolution.containers.case.pushToExternalService', { + i18n.translate('xpack.securitySolution.containers.cases.pushToExternalService', { values: { serviceName }, defaultMessage: 'Successfully sent to { serviceName }', }); export const ERROR_GET_FIELDS = i18n.translate( - 'xpack.securitySolution.case.configure.errorGetFields', + 'xpack.securitySolution.cases.configure.errorGetFields', { defaultMessage: 'Error getting fields from service', } ); export const SYNC_CASE = (caseTitle: string) => - i18n.translate('xpack.securitySolution.containers.case.syncCase', { + i18n.translate('xpack.securitySolution.containers.cases.syncCase', { values: { caseTitle }, defaultMessage: 'Alerts in "{caseTitle}" have been synced', }); export const STATUS_CHANGED_TOASTER_TEXT = i18n.translate( - 'xpack.securitySolution.case.containers.statusChangeToasterText', + 'xpack.securitySolution.cases.containers.statusChangeToasterText', { defaultMessage: 'Alerts in this case have been also had their status updated', } diff --git a/x-pack/plugins/security_solution/public/cases/containers/types.ts b/x-pack/plugins/security_solution/public/cases/containers/types.ts index a24a62345d67a..6feb5a1501a76 100644 --- a/x-pack/plugins/security_solution/public/cases/containers/types.ts +++ b/x-pack/plugins/security_solution/public/cases/containers/types.ts @@ -16,10 +16,10 @@ import { CasePatchRequest, CaseType, AssociationType, -} from '../../../../case/common/api'; +} from '../../../../cases/common/api'; import { CaseStatusWithAllStatus } from '../components/status'; -export { CaseConnector, ActionConnector, CaseStatuses } from '../../../../case/common/api'; +export { CaseConnector, ActionConnector, CaseStatuses } from '../../../../cases/common/api'; export type Comment = CommentRequest & { associationType: AssociationType; diff --git a/x-pack/plugins/security_solution/public/cases/containers/use_bulk_update_case.test.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_bulk_update_case.test.tsx index 7e3ed391c946c..d5562afec1d26 100644 --- a/x-pack/plugins/security_solution/public/cases/containers/use_bulk_update_case.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/containers/use_bulk_update_case.test.tsx @@ -6,7 +6,7 @@ */ import { renderHook, act } from '@testing-library/react-hooks'; -import { CaseStatuses } from '../../../../case/common/api'; +import { CaseStatuses } from '../../../../cases/common/api'; import { useUpdateCases, UseUpdateCases } from './use_bulk_update_case'; import { basicCase } from './mock'; import * as api from './api'; diff --git a/x-pack/plugins/security_solution/public/cases/containers/use_bulk_update_case.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_bulk_update_case.tsx index da069ee6f1075..d39da93a06a48 100644 --- a/x-pack/plugins/security_solution/public/cases/containers/use_bulk_update_case.tsx +++ b/x-pack/plugins/security_solution/public/cases/containers/use_bulk_update_case.tsx @@ -6,7 +6,7 @@ */ import { useCallback, useReducer, useRef, useEffect } from 'react'; -import { CaseStatuses } from '../../../../case/common/api'; +import { CaseStatuses } from '../../../../cases/common/api'; import { displaySuccessToast, errorToToaster, diff --git a/x-pack/plugins/security_solution/public/cases/containers/use_delete_cases.test.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_delete_cases.test.tsx index 422eb0c92cbd8..b4fa816412c68 100644 --- a/x-pack/plugins/security_solution/public/cases/containers/use_delete_cases.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/containers/use_delete_cases.test.tsx @@ -7,7 +7,7 @@ import { renderHook, act } from '@testing-library/react-hooks'; -import { CaseType } from '../../../../case/common/api'; +import { CaseType } from '../../../../cases/common/api'; import { useDeleteCases, UseDeleteCase } from './use_delete_cases'; import * as api from './api'; diff --git a/x-pack/plugins/security_solution/public/cases/containers/use_get_case_user_actions.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_get_case_user_actions.tsx index 60d3a8ad8215b..3b28c20d9a4df 100644 --- a/x-pack/plugins/security_solution/public/cases/containers/use_get_case_user_actions.tsx +++ b/x-pack/plugins/security_solution/public/cases/containers/use_get_case_user_actions.tsx @@ -10,7 +10,7 @@ import { useCallback, useEffect, useState, useRef } from 'react'; import deepEqual from 'fast-deep-equal'; import { errorToToaster, useStateToaster } from '../../common/components/toasters'; -import { CaseFullExternalService } from '../../../../case/common/api/cases'; +import { CaseFullExternalService } from '../../../../cases/common/api/cases'; import { getCaseUserActions, getSubCaseUserActions } from './api'; import * as i18n from './translations'; import { CaseConnector, CaseExternalService, CaseUserActions, ElasticUser } from './types'; diff --git a/x-pack/plugins/security_solution/public/cases/containers/use_get_cases.test.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_get_cases.test.tsx index 5b78cedeedf38..3a62ae70b82de 100644 --- a/x-pack/plugins/security_solution/public/cases/containers/use_get_cases.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/containers/use_get_cases.test.tsx @@ -6,7 +6,7 @@ */ import { renderHook, act } from '@testing-library/react-hooks'; -import { CaseStatuses } from '../../../../case/common/api'; +import { CaseStatuses } from '../../../../cases/common/api'; import { DEFAULT_FILTER_OPTIONS, DEFAULT_QUERY_PARAMS, diff --git a/x-pack/plugins/security_solution/public/cases/containers/use_get_reporters.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_get_reporters.tsx index f2c33ec4730fe..10c2d26d6b33d 100644 --- a/x-pack/plugins/security_solution/public/cases/containers/use_get_reporters.tsx +++ b/x-pack/plugins/security_solution/public/cases/containers/use_get_reporters.tsx @@ -8,7 +8,7 @@ import { useCallback, useEffect, useState, useRef } from 'react'; import { isEmpty } from 'lodash/fp'; -import { User } from '../../../../case/common/api'; +import { User } from '../../../../cases/common/api'; import { errorToToaster, useStateToaster } from '../../common/components/toasters'; import { getReporters } from './api'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/cases/containers/use_post_case.test.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_post_case.test.tsx index 6007ed002a4a8..3731af4d73db5 100644 --- a/x-pack/plugins/security_solution/public/cases/containers/use_post_case.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/containers/use_post_case.test.tsx @@ -8,7 +8,7 @@ import { renderHook, act } from '@testing-library/react-hooks'; import { usePostCase, UsePostCase } from './use_post_case'; import * as api from './api'; -import { ConnectorTypes } from '../../../../case/common/api/connectors'; +import { ConnectorTypes } from '../../../../cases/common/api/connectors'; import { basicCasePost } from './mock'; jest.mock('./api'); diff --git a/x-pack/plugins/security_solution/public/cases/containers/use_post_case.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_post_case.tsx index d890c050f5034..35c2b66156456 100644 --- a/x-pack/plugins/security_solution/public/cases/containers/use_post_case.tsx +++ b/x-pack/plugins/security_solution/public/cases/containers/use_post_case.tsx @@ -6,7 +6,7 @@ */ import { useReducer, useCallback, useRef, useEffect } from 'react'; -import { CasePostRequest } from '../../../../case/common/api'; +import { CasePostRequest } from '../../../../cases/common/api'; import { errorToToaster, useStateToaster } from '../../common/components/toasters'; import { postCase } from './api'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/cases/containers/use_post_comment.test.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_post_comment.test.tsx index 42cd0deafa048..4d4ac5d071fa5 100644 --- a/x-pack/plugins/security_solution/public/cases/containers/use_post_comment.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/containers/use_post_comment.test.tsx @@ -7,7 +7,7 @@ import { renderHook, act } from '@testing-library/react-hooks'; -import { CommentType } from '../../../../case/common/api'; +import { CommentType } from '../../../../cases/common/api'; import { usePostComment, UsePostComment } from './use_post_comment'; import { basicCaseId, basicSubCaseId } from './mock'; import * as api from './api'; diff --git a/x-pack/plugins/security_solution/public/cases/containers/use_post_comment.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_post_comment.tsx index 75d3047bc828e..252059514da8e 100644 --- a/x-pack/plugins/security_solution/public/cases/containers/use_post_comment.tsx +++ b/x-pack/plugins/security_solution/public/cases/containers/use_post_comment.tsx @@ -6,7 +6,7 @@ */ import { useReducer, useCallback, useRef, useEffect } from 'react'; -import { CommentRequest } from '../../../../case/common/api'; +import { CommentRequest } from '../../../../cases/common/api'; import { errorToToaster, useStateToaster } from '../../common/components/toasters'; import { postComment } from './api'; diff --git a/x-pack/plugins/security_solution/public/cases/containers/use_post_push_to_service.test.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_post_push_to_service.test.tsx index 5f09ac404ca64..e008927019987 100644 --- a/x-pack/plugins/security_solution/public/cases/containers/use_post_push_to_service.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/containers/use_post_push_to_service.test.tsx @@ -9,7 +9,7 @@ import { renderHook, act } from '@testing-library/react-hooks'; import { usePostPushToService, UsePostPushToService } from './use_post_push_to_service'; import { pushedCase } from './mock'; import * as api from './api'; -import { CaseConnector, ConnectorTypes } from '../../../../case/common/api'; +import { CaseConnector, ConnectorTypes } from '../../../../cases/common/api'; jest.mock('./api'); diff --git a/x-pack/plugins/security_solution/public/cases/containers/use_post_push_to_service.tsx b/x-pack/plugins/security_solution/public/cases/containers/use_post_push_to_service.tsx index 27a02d9300cc0..9fd0fda5c9723 100644 --- a/x-pack/plugins/security_solution/public/cases/containers/use_post_push_to_service.tsx +++ b/x-pack/plugins/security_solution/public/cases/containers/use_post_push_to_service.tsx @@ -6,7 +6,7 @@ */ import { useReducer, useCallback, useRef, useEffect } from 'react'; -import { CaseConnector } from '../../../../case/common/api'; +import { CaseConnector } from '../../../../cases/common/api'; import { errorToToaster, useStateToaster, diff --git a/x-pack/plugins/security_solution/public/cases/containers/utils.ts b/x-pack/plugins/security_solution/public/cases/containers/utils.ts index 297c7e35981ac..7c33e4481b2aa 100644 --- a/x-pack/plugins/security_solution/public/cases/containers/utils.ts +++ b/x-pack/plugins/security_solution/public/cases/containers/utils.ts @@ -28,7 +28,7 @@ import { CaseUserActionsResponseRt, CommentType, CasePatchRequest, -} from '../../../../case/common/api'; +} from '../../../../cases/common/api'; import { AppToast, ToasterError } from '../../common/components/toasters'; import { AllCases, Case, UpdateByKey } from './types'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/cases/pages/translations.ts b/x-pack/plugins/security_solution/public/cases/pages/translations.ts index 51e9fa8a246f0..0abf7461681cf 100644 --- a/x-pack/plugins/security_solution/public/cases/pages/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/pages/translations.ts @@ -8,218 +8,221 @@ import { i18n } from '@kbn/i18n'; export const SAVED_OBJECT_NO_PERMISSIONS_TITLE = i18n.translate( - 'xpack.securitySolution.case.caseSavedObjectNoPermissionsTitle', + 'xpack.securitySolution.cases.caseSavedObjectNoPermissionsTitle', { defaultMessage: 'Kibana feature privileges required', } ); export const SAVED_OBJECT_NO_PERMISSIONS_MSG = i18n.translate( - 'xpack.securitySolution.case.caseSavedObjectNoPermissionsMessage', + 'xpack.securitySolution.cases.caseSavedObjectNoPermissionsMessage', { defaultMessage: 'To view cases, you must have privileges for the Saved Object Management feature in the Kibana space. For more information, contact your Kibana administrator.', } ); -export const BACK_TO_ALL = i18n.translate('xpack.securitySolution.case.caseView.backLabel', { +export const BACK_TO_ALL = i18n.translate('xpack.securitySolution.cases.caseView.backLabel', { defaultMessage: 'Back to cases', }); -export const CANCEL = i18n.translate('xpack.securitySolution.case.caseView.cancel', { +export const CANCEL = i18n.translate('xpack.securitySolution.cases.caseView.cancel', { defaultMessage: 'Cancel', }); export const DELETE_CASE = i18n.translate( - 'xpack.securitySolution.case.confirmDeleteCase.deleteCase', + 'xpack.securitySolution.cases.confirmDeleteCase.deleteCase', { defaultMessage: 'Delete case', } ); export const DELETE_CASES = i18n.translate( - 'xpack.securitySolution.case.confirmDeleteCase.deleteCases', + 'xpack.securitySolution.cases.confirmDeleteCase.deleteCases', { defaultMessage: 'Delete cases', } ); -export const NAME = i18n.translate('xpack.securitySolution.case.caseView.name', { +export const NAME = i18n.translate('xpack.securitySolution.cases.caseView.name', { defaultMessage: 'Name', }); -export const OPENED_ON = i18n.translate('xpack.securitySolution.case.caseView.openedOn', { +export const OPENED_ON = i18n.translate('xpack.securitySolution.cases.caseView.openedOn', { defaultMessage: 'Opened on', }); -export const CLOSED_ON = i18n.translate('xpack.securitySolution.case.caseView.closedOn', { +export const CLOSED_ON = i18n.translate('xpack.securitySolution.cases.caseView.closedOn', { defaultMessage: 'Closed on', }); -export const REPORTER = i18n.translate('xpack.securitySolution.case.caseView.reporterLabel', { +export const REPORTER = i18n.translate('xpack.securitySolution.cases.caseView.reporterLabel', { defaultMessage: 'Reporter', }); export const PARTICIPANTS = i18n.translate( - 'xpack.securitySolution.case.caseView.particpantsLabel', + 'xpack.securitySolution.cases.caseView.particpantsLabel', { defaultMessage: 'Participants', } ); -export const CREATE_BC_TITLE = i18n.translate('xpack.securitySolution.case.caseView.breadcrumb', { +export const CREATE_BC_TITLE = i18n.translate('xpack.securitySolution.cases.caseView.breadcrumb', { defaultMessage: 'Create', }); -export const CREATE_TITLE = i18n.translate('xpack.securitySolution.case.caseView.create', { +export const CREATE_TITLE = i18n.translate('xpack.securitySolution.cases.caseView.create', { defaultMessage: 'Create new case', }); -export const DESCRIPTION = i18n.translate('xpack.securitySolution.case.caseView.description', { +export const DESCRIPTION = i18n.translate('xpack.securitySolution.cases.caseView.description', { defaultMessage: 'Description', }); export const DESCRIPTION_REQUIRED = i18n.translate( - 'xpack.securitySolution.case.createCase.descriptionFieldRequiredError', + 'xpack.securitySolution.cases.createCase.descriptionFieldRequiredError', { defaultMessage: 'A description is required.', } ); export const COMMENT_REQUIRED = i18n.translate( - 'xpack.securitySolution.case.caseView.commentFieldRequiredError', + 'xpack.securitySolution.cases.caseView.commentFieldRequiredError', { defaultMessage: 'A comment is required.', } ); export const REQUIRED_FIELD = i18n.translate( - 'xpack.securitySolution.case.caseView.fieldRequiredError', + 'xpack.securitySolution.cases.caseView.fieldRequiredError', { defaultMessage: 'Required field', } ); -export const EDIT = i18n.translate('xpack.securitySolution.case.caseView.edit', { +export const EDIT = i18n.translate('xpack.securitySolution.cases.caseView.edit', { defaultMessage: 'Edit', }); -export const OPTIONAL = i18n.translate('xpack.securitySolution.case.caseView.optional', { +export const OPTIONAL = i18n.translate('xpack.securitySolution.cases.caseView.optional', { defaultMessage: 'Optional', }); -export const PAGE_TITLE = i18n.translate('xpack.securitySolution.case.pageTitle', { +export const PAGE_TITLE = i18n.translate('xpack.securitySolution.cases.pageTitle', { defaultMessage: 'Cases', }); -export const CREATE_CASE = i18n.translate('xpack.securitySolution.case.caseView.createCase', { +export const CREATE_CASE = i18n.translate('xpack.securitySolution.cases.caseView.createCase', { defaultMessage: 'Create case', }); -export const CLOSE_CASE = i18n.translate('xpack.securitySolution.case.caseView.closeCase', { +export const CLOSE_CASE = i18n.translate('xpack.securitySolution.cases.caseView.closeCase', { defaultMessage: 'Close case', }); -export const REOPEN_CASE = i18n.translate('xpack.securitySolution.case.caseView.reopenCase', { +export const REOPEN_CASE = i18n.translate('xpack.securitySolution.cases.caseView.reopenCase', { defaultMessage: 'Reopen case', }); -export const CASE_NAME = i18n.translate('xpack.securitySolution.case.caseView.caseName', { +export const CASE_NAME = i18n.translate('xpack.securitySolution.cases.caseView.caseName', { defaultMessage: 'Case name', }); -export const TO = i18n.translate('xpack.securitySolution.case.caseView.to', { +export const TO = i18n.translate('xpack.securitySolution.cases.caseView.to', { defaultMessage: 'to', }); -export const TAGS = i18n.translate('xpack.securitySolution.case.caseView.tags', { +export const TAGS = i18n.translate('xpack.securitySolution.cases.caseView.tags', { defaultMessage: 'Tags', }); -export const ACTIONS = i18n.translate('xpack.securitySolution.case.allCases.actions', { +export const ACTIONS = i18n.translate('xpack.securitySolution.cases.allCases.actions', { defaultMessage: 'Actions', }); export const NO_TAGS_AVAILABLE = i18n.translate( - 'xpack.securitySolution.case.allCases.noTagsAvailable', + 'xpack.securitySolution.cases.allCases.noTagsAvailable', { defaultMessage: 'No tags available', } ); export const NO_REPORTERS_AVAILABLE = i18n.translate( - 'xpack.securitySolution.case.caseView.noReportersAvailable', + 'xpack.securitySolution.cases.caseView.noReportersAvailable', { defaultMessage: 'No reporters available.', } ); -export const COMMENTS = i18n.translate('xpack.securitySolution.case.allCases.comments', { +export const COMMENTS = i18n.translate('xpack.securitySolution.cases.allCases.comments', { defaultMessage: 'Comments', }); export const TAGS_HELP = i18n.translate( - 'xpack.securitySolution.case.createCase.fieldTagsHelpText', + 'xpack.securitySolution.cases.createCase.fieldTagsHelpText', { defaultMessage: 'Type one or more custom identifying tags for this case. Press enter after each tag to begin a new one.', } ); -export const NO_TAGS = i18n.translate('xpack.securitySolution.case.caseView.noTags', { +export const NO_TAGS = i18n.translate('xpack.securitySolution.cases.caseView.noTags', { defaultMessage: 'No tags are currently assigned to this case.', }); export const TITLE_REQUIRED = i18n.translate( - 'xpack.securitySolution.case.createCase.titleFieldRequiredError', + 'xpack.securitySolution.cases.createCase.titleFieldRequiredError', { defaultMessage: 'A title is required.', } ); export const CONFIGURE_CASES_PAGE_TITLE = i18n.translate( - 'xpack.securitySolution.case.configureCases.headerTitle', + 'xpack.securitySolution.cases.configureCases.headerTitle', { defaultMessage: 'Configure cases', } ); export const CONFIGURE_CASES_BUTTON = i18n.translate( - 'xpack.securitySolution.case.configureCasesButton', + 'xpack.securitySolution.cases.configureCasesButton', { defaultMessage: 'Edit external connection', } ); export const ADD_COMMENT = i18n.translate( - 'xpack.securitySolution.case.caseView.comment.addComment', + 'xpack.securitySolution.cases.caseView.comment.addComment', { defaultMessage: 'Add comment', } ); export const ADD_COMMENT_HELP_TEXT = i18n.translate( - 'xpack.securitySolution.case.caseView.comment.addCommentHelpText', + 'xpack.securitySolution.cases.caseView.comment.addCommentHelpText', { defaultMessage: 'Add a new comment...', } ); -export const SAVE = i18n.translate('xpack.securitySolution.case.caseView.description.save', { +export const SAVE = i18n.translate('xpack.securitySolution.cases.caseView.description.save', { defaultMessage: 'Save', }); export const GO_TO_DOCUMENTATION = i18n.translate( - 'xpack.securitySolution.case.caseView.goToDocumentationButton', + 'xpack.securitySolution.cases.caseView.goToDocumentationButton', { defaultMessage: 'View documentation', } ); -export const CONNECTORS = i18n.translate('xpack.securitySolution.case.caseView.connectors', { +export const CONNECTORS = i18n.translate('xpack.securitySolution.cases.caseView.connectors', { defaultMessage: 'External Incident Management System', }); -export const EDIT_CONNECTOR = i18n.translate('xpack.securitySolution.case.caseView.editConnector', { - defaultMessage: 'Change external incident management system', -}); +export const EDIT_CONNECTOR = i18n.translate( + 'xpack.securitySolution.cases.caseView.editConnector', + { + defaultMessage: 'Change external incident management system', + } +); diff --git a/x-pack/plugins/security_solution/public/cases/translations.ts b/x-pack/plugins/security_solution/public/cases/translations.ts index b7cfe11aafda0..e8e4f207f2d23 100644 --- a/x-pack/plugins/security_solution/public/cases/translations.ts +++ b/x-pack/plugins/security_solution/public/cases/translations.ts @@ -8,269 +8,272 @@ import { i18n } from '@kbn/i18n'; export const SAVED_OBJECT_NO_PERMISSIONS_TITLE = i18n.translate( - 'xpack.securitySolution.case.caseSavedObjectNoPermissionsTitle', + 'xpack.securitySolution.cases.caseSavedObjectNoPermissionsTitle', { defaultMessage: 'Kibana feature privileges required', } ); export const SAVED_OBJECT_NO_PERMISSIONS_MSG = i18n.translate( - 'xpack.securitySolution.case.caseSavedObjectNoPermissionsMessage', + 'xpack.securitySolution.cases.caseSavedObjectNoPermissionsMessage', { defaultMessage: 'To view cases, you must have privileges for the Saved Object Management feature in the Kibana space. For more information, contact your Kibana administrator.', } ); -export const BACK_TO_ALL = i18n.translate('xpack.securitySolution.case.caseView.backLabel', { +export const BACK_TO_ALL = i18n.translate('xpack.securitySolution.cases.caseView.backLabel', { defaultMessage: 'Back to cases', }); -export const CANCEL = i18n.translate('xpack.securitySolution.case.caseView.cancel', { +export const CANCEL = i18n.translate('xpack.securitySolution.cases.caseView.cancel', { defaultMessage: 'Cancel', }); export const DELETE_CASE = i18n.translate( - 'xpack.securitySolution.case.confirmDeleteCase.deleteCase', + 'xpack.securitySolution.cases.confirmDeleteCase.deleteCase', { defaultMessage: 'Delete case', } ); export const DELETE_CASES = i18n.translate( - 'xpack.securitySolution.case.confirmDeleteCase.deleteCases', + 'xpack.securitySolution.cases.confirmDeleteCase.deleteCases', { defaultMessage: 'Delete cases', } ); -export const NAME = i18n.translate('xpack.securitySolution.case.caseView.name', { +export const NAME = i18n.translate('xpack.securitySolution.cases.caseView.name', { defaultMessage: 'Name', }); -export const OPENED_ON = i18n.translate('xpack.securitySolution.case.caseView.openedOn', { +export const OPENED_ON = i18n.translate('xpack.securitySolution.cases.caseView.openedOn', { defaultMessage: 'Opened on', }); -export const CLOSED_ON = i18n.translate('xpack.securitySolution.case.caseView.closedOn', { +export const CLOSED_ON = i18n.translate('xpack.securitySolution.cases.caseView.closedOn', { defaultMessage: 'Closed on', }); -export const REPORTER = i18n.translate('xpack.securitySolution.case.caseView.reporterLabel', { +export const REPORTER = i18n.translate('xpack.securitySolution.cases.caseView.reporterLabel', { defaultMessage: 'Reporter', }); export const PARTICIPANTS = i18n.translate( - 'xpack.securitySolution.case.caseView.particpantsLabel', + 'xpack.securitySolution.cases.caseView.particpantsLabel', { defaultMessage: 'Participants', } ); -export const CREATE_BC_TITLE = i18n.translate('xpack.securitySolution.case.caseView.breadcrumb', { +export const CREATE_BC_TITLE = i18n.translate('xpack.securitySolution.cases.caseView.breadcrumb', { defaultMessage: 'Create', }); -export const CREATE_TITLE = i18n.translate('xpack.securitySolution.case.caseView.create', { +export const CREATE_TITLE = i18n.translate('xpack.securitySolution.cases.caseView.create', { defaultMessage: 'Create new case', }); -export const DESCRIPTION = i18n.translate('xpack.securitySolution.case.caseView.description', { +export const DESCRIPTION = i18n.translate('xpack.securitySolution.cases.caseView.description', { defaultMessage: 'Description', }); export const DESCRIPTION_REQUIRED = i18n.translate( - 'xpack.securitySolution.case.createCase.descriptionFieldRequiredError', + 'xpack.securitySolution.cases.createCase.descriptionFieldRequiredError', { defaultMessage: 'A description is required.', } ); export const COMMENT_REQUIRED = i18n.translate( - 'xpack.securitySolution.case.caseView.commentFieldRequiredError', + 'xpack.securitySolution.cases.caseView.commentFieldRequiredError', { defaultMessage: 'A comment is required.', } ); export const REQUIRED_FIELD = i18n.translate( - 'xpack.securitySolution.case.caseView.fieldRequiredError', + 'xpack.securitySolution.cases.caseView.fieldRequiredError', { defaultMessage: 'Required field', } ); -export const EDIT = i18n.translate('xpack.securitySolution.case.caseView.edit', { +export const EDIT = i18n.translate('xpack.securitySolution.cases.caseView.edit', { defaultMessage: 'Edit', }); -export const OPTIONAL = i18n.translate('xpack.securitySolution.case.caseView.optional', { +export const OPTIONAL = i18n.translate('xpack.securitySolution.cases.caseView.optional', { defaultMessage: 'Optional', }); -export const PAGE_TITLE = i18n.translate('xpack.securitySolution.case.pageTitle', { +export const PAGE_TITLE = i18n.translate('xpack.securitySolution.cases.pageTitle', { defaultMessage: 'Cases', }); -export const CREATE_CASE = i18n.translate('xpack.securitySolution.case.caseView.createCase', { +export const CREATE_CASE = i18n.translate('xpack.securitySolution.cases.caseView.createCase', { defaultMessage: 'Create case', }); -export const CLOSE_CASE = i18n.translate('xpack.securitySolution.case.caseView.closeCase', { +export const CLOSE_CASE = i18n.translate('xpack.securitySolution.cases.caseView.closeCase', { defaultMessage: 'Close case', }); export const MARK_CASE_IN_PROGRESS = i18n.translate( - 'xpack.securitySolution.case.caseView.markInProgress', + 'xpack.securitySolution.cases.caseView.markInProgress', { defaultMessage: 'Mark in progress', } ); -export const REOPEN_CASE = i18n.translate('xpack.securitySolution.case.caseView.reopenCase', { +export const REOPEN_CASE = i18n.translate('xpack.securitySolution.cases.caseView.reopenCase', { defaultMessage: 'Reopen case', }); -export const OPEN_CASE = i18n.translate('xpack.securitySolution.case.caseView.openCase', { +export const OPEN_CASE = i18n.translate('xpack.securitySolution.cases.caseView.openCase', { defaultMessage: 'Open case', }); -export const CASE_NAME = i18n.translate('xpack.securitySolution.case.caseView.caseName', { +export const CASE_NAME = i18n.translate('xpack.securitySolution.cases.caseView.caseName', { defaultMessage: 'Case name', }); -export const TO = i18n.translate('xpack.securitySolution.case.caseView.to', { +export const TO = i18n.translate('xpack.securitySolution.cases.caseView.to', { defaultMessage: 'to', }); -export const TAGS = i18n.translate('xpack.securitySolution.case.caseView.tags', { +export const TAGS = i18n.translate('xpack.securitySolution.cases.caseView.tags', { defaultMessage: 'Tags', }); -export const ACTIONS = i18n.translate('xpack.securitySolution.case.allCases.actions', { +export const ACTIONS = i18n.translate('xpack.securitySolution.cases.allCases.actions', { defaultMessage: 'Actions', }); export const NO_TAGS_AVAILABLE = i18n.translate( - 'xpack.securitySolution.case.allCases.noTagsAvailable', + 'xpack.securitySolution.cases.allCases.noTagsAvailable', { defaultMessage: 'No tags available', } ); export const NO_REPORTERS_AVAILABLE = i18n.translate( - 'xpack.securitySolution.case.caseView.noReportersAvailable', + 'xpack.securitySolution.cases.caseView.noReportersAvailable', { defaultMessage: 'No reporters available.', } ); -export const COMMENTS = i18n.translate('xpack.securitySolution.case.allCases.comments', { +export const COMMENTS = i18n.translate('xpack.securitySolution.cases.allCases.comments', { defaultMessage: 'Comments', }); export const TAGS_HELP = i18n.translate( - 'xpack.securitySolution.case.createCase.fieldTagsHelpText', + 'xpack.securitySolution.cases.createCase.fieldTagsHelpText', { defaultMessage: 'Type one or more custom identifying tags for this case. Press enter after each tag to begin a new one.', } ); -export const NO_TAGS = i18n.translate('xpack.securitySolution.case.caseView.noTags', { +export const NO_TAGS = i18n.translate('xpack.securitySolution.cases.caseView.noTags', { defaultMessage: 'No tags are currently assigned to this case.', }); export const TITLE_REQUIRED = i18n.translate( - 'xpack.securitySolution.case.createCase.titleFieldRequiredError', + 'xpack.securitySolution.cases.createCase.titleFieldRequiredError', { defaultMessage: 'A title is required.', } ); export const CONFIGURE_CASES_PAGE_TITLE = i18n.translate( - 'xpack.securitySolution.case.configureCases.headerTitle', + 'xpack.securitySolution.cases.configureCases.headerTitle', { defaultMessage: 'Configure cases', } ); export const CONFIGURE_CASES_BUTTON = i18n.translate( - 'xpack.securitySolution.case.configureCasesButton', + 'xpack.securitySolution.cases.configureCasesButton', { defaultMessage: 'Edit external connection', } ); export const ADD_COMMENT = i18n.translate( - 'xpack.securitySolution.case.caseView.comment.addComment', + 'xpack.securitySolution.cases.caseView.comment.addComment', { defaultMessage: 'Add comment', } ); export const ADD_COMMENT_HELP_TEXT = i18n.translate( - 'xpack.securitySolution.case.caseView.comment.addCommentHelpText', + 'xpack.securitySolution.cases.caseView.comment.addCommentHelpText', { defaultMessage: 'Add a new comment...', } ); -export const SAVE = i18n.translate('xpack.securitySolution.case.caseView.description.save', { +export const SAVE = i18n.translate('xpack.securitySolution.cases.caseView.description.save', { defaultMessage: 'Save', }); export const GO_TO_DOCUMENTATION = i18n.translate( - 'xpack.securitySolution.case.caseView.goToDocumentationButton', + 'xpack.securitySolution.cases.caseView.goToDocumentationButton', { defaultMessage: 'View documentation', } ); -export const CONNECTORS = i18n.translate('xpack.securitySolution.case.caseView.connectors', { +export const CONNECTORS = i18n.translate('xpack.securitySolution.cases.caseView.connectors', { defaultMessage: 'External Incident Management System', }); -export const EDIT_CONNECTOR = i18n.translate('xpack.securitySolution.case.caseView.editConnector', { - defaultMessage: 'Change external incident management system', -}); +export const EDIT_CONNECTOR = i18n.translate( + 'xpack.securitySolution.cases.caseView.editConnector', + { + defaultMessage: 'Change external incident management system', + } +); -export const NO_CONNECTOR = i18n.translate('xpack.securitySolution.case.common.noConnector', { +export const NO_CONNECTOR = i18n.translate('xpack.securitySolution.cases.common.noConnector', { defaultMessage: 'No connector selected', }); -export const UNKNOWN = i18n.translate('xpack.securitySolution.case.caseView.unknown', { +export const UNKNOWN = i18n.translate('xpack.securitySolution.cases.caseView.unknown', { defaultMessage: 'Unknown', }); -export const MARKED_CASE_AS = i18n.translate('xpack.securitySolution.case.caseView.markedCaseAs', { +export const MARKED_CASE_AS = i18n.translate('xpack.securitySolution.cases.caseView.markedCaseAs', { defaultMessage: 'marked case as', }); -export const OPEN_CASES = i18n.translate('xpack.securitySolution.case.caseTable.openCases', { +export const OPEN_CASES = i18n.translate('xpack.securitySolution.cases.caseTable.openCases', { defaultMessage: 'Open cases', }); -export const CLOSED_CASES = i18n.translate('xpack.securitySolution.case.caseTable.closedCases', { +export const CLOSED_CASES = i18n.translate('xpack.securitySolution.cases.caseTable.closedCases', { defaultMessage: 'Closed cases', }); export const IN_PROGRESS_CASES = i18n.translate( - 'xpack.securitySolution.case.caseTable.inProgressCases', + 'xpack.securitySolution.cases.caseTable.inProgressCases', { defaultMessage: 'In progress cases', } ); export const SYNC_ALERTS_SWITCH_LABEL_ON = i18n.translate( - 'xpack.securitySolution.case.settings.syncAlertsSwitchLabelOn', + 'xpack.securitySolution.cases.settings.syncAlertsSwitchLabelOn', { defaultMessage: 'On', } ); export const SYNC_ALERTS_SWITCH_LABEL_OFF = i18n.translate( - 'xpack.securitySolution.case.settings.syncAlertsSwitchLabelOff', + 'xpack.securitySolution.cases.settings.syncAlertsSwitchLabelOff', { defaultMessage: 'Off', } diff --git a/x-pack/plugins/security_solution/public/common/components/links/translations.ts b/x-pack/plugins/security_solution/public/common/components/links/translations.ts index a1941c2b5393f..9e2f99c17a677 100644 --- a/x-pack/plugins/security_solution/public/common/components/links/translations.ts +++ b/x-pack/plugins/security_solution/public/common/components/links/translations.ts @@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n'; export * from '../../../network/components/details/translations'; export const CASE_DETAILS_LINK_ARIA = (detailName: string) => - i18n.translate('xpack.securitySolution.case.caseTable.caseDetailsLinkAria', { + i18n.translate('xpack.securitySolution.cases.caseTable.caseDetailsLinkAria', { values: { detailName }, defaultMessage: 'click to visit case with title {detailName}', }); diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/use_manage_case_action.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/use_manage_case_action.tsx index 55b2aefe21310..875bc5e647077 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/use_manage_case_action.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/use_manage_case_action.tsx @@ -6,7 +6,7 @@ */ import { useEffect, useRef, useState } from 'react'; -import { ACTION_URL } from '../../../../../../case/common/constants'; +import { ACTION_URL } from '../../../../../../cases/common/constants'; import { KibanaServices } from '../../../../common/lib/kibana'; interface CaseAction { diff --git a/x-pack/plugins/security_solution/public/timelines/containers/api.ts b/x-pack/plugins/security_solution/public/timelines/containers/api.ts index b91ca8dcc25f9..01a85f6309c3f 100644 --- a/x-pack/plugins/security_solution/public/timelines/containers/api.ts +++ b/x-pack/plugins/security_solution/public/timelines/containers/api.ts @@ -12,7 +12,7 @@ import { pipe } from 'fp-ts/lib/pipeable'; // eslint-disable-next-line no-restricted-imports import isEmpty from 'lodash/isEmpty'; -import { throwErrors } from '../../../../case/common/api'; +import { throwErrors } from '../../../../cases/common/api'; import { TimelineResponse, TimelineResponseType, diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 92bbcc230662b..9e4ec1dff0e30 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -4909,8 +4909,8 @@ "xpack.actions.actionTypeRegistry.get.missingActionTypeErrorMessage": "アクションタイプ「{id}」は登録されていません。", "xpack.actions.actionTypeRegistry.register.duplicateActionTypeErrorMessage": "アクションタイプ「{id}」はすでに登録されています。", "xpack.actions.appName": "アクション", - "xpack.actions.builtin.case.jiraTitle": "Jira", - "xpack.actions.builtin.case.resilientTitle": "IBM Resilient", + "xpack.actions.builtin.cases.jiraTitle": "Jira", + "xpack.actions.builtin.cases.resilientTitle": "IBM Resilient", "xpack.actions.builtin.configuration.apiAllowedHostsError": "コネクターアクションの構成エラー:{message}", "xpack.actions.builtin.email.customViewInKibanaMessage": "このメッセージは Kibana によって送信されました。[{kibanaFooterLinkText}] ({link}) 。", "xpack.actions.builtin.email.errorSendingErrorMessage": "エラー送信メールアドレス", @@ -6103,9 +6103,6 @@ "xpack.canvas.functions.axisConfig.invalidMinDateStringErrorMessage": "無効なデータ文字列:「{min}」。「min」は数字、ms での日付、または ISO8601 データ文字列でなければなりません", "xpack.canvas.functions.axisConfig.invalidPositionErrorMessage": "無効なポジション:「{position}」", "xpack.canvas.functions.axisConfigHelpText": "ビジュアライゼーションの軸を構成します。{plotFn} でのみ使用されます。", - "xpack.canvas.functions.case.args.ifHelpText": "この値は、条件が満たされているかどうかを示します。両方が入力された場合、{IF_ARG}引数が{WHEN_ARG}引数を上書きします。", - "xpack.canvas.functions.case.args.thenHelpText": "条件が満たされた際に返される値です。", - "xpack.canvas.functions.case.args.whenHelpText": "等しいかを確認するために {CONTEXT} と比較される値です。{IF_ARG} 引数も指定されている場合、{WHEN_ARG} 引数は無視されます。", "xpack.canvas.functions.caseHelpText": "{switchFn} 関数に渡すため、条件と結果を含めて {case} を作成します。", "xpack.canvas.functions.clearHelpText": "{CONTEXT} を消去し、{TYPE_NULL} を返します。", "xpack.canvas.functions.columns.args.excludeHelpText": "{DATATABLE} から削除する列名のコンマ区切りのリストです。", @@ -6985,11 +6982,11 @@ "xpack.canvas.workpadTemplates.table.descriptionColumnTitle": "説明", "xpack.canvas.workpadTemplates.table.nameColumnTitle": "テンプレート名", "xpack.canvas.workpadTemplates.table.tagsColumnTitle": "タグ", - "xpack.case.connectors.case.externalIncidentAdded": " ({date}に{user}が追加) ", - "xpack.case.connectors.case.externalIncidentCreated": " ({date}に{user}が作成) ", - "xpack.case.connectors.case.externalIncidentDefault": " ({date}に{user}が作成) ", - "xpack.case.connectors.case.externalIncidentUpdated": " ({date}に{user}が更新) ", - "xpack.case.connectors.case.title": "ケース", + "xpack.cases.connectors.cases.externalIncidentAdded": " ({date}に{user}が追加) ", + "xpack.cases.connectors.cases.externalIncidentCreated": " ({date}に{user}が作成) ", + "xpack.cases.connectors.cases.externalIncidentDefault": " ({date}に{user}が作成) ", + "xpack.cases.connectors.cases.externalIncidentUpdated": " ({date}に{user}が更新) ", + "xpack.cases.connectors.cases.title": "ケース", "xpack.cloud.deploymentLinkLabel": "このデプロイの管理", "xpack.cloud.userMenuLinks.accountLinkText": "会計・請求", "xpack.cloud.userMenuLinks.profileLinkText": "クラウドプロファイル", @@ -18167,212 +18164,212 @@ "xpack.securitySolution.beatFields.errorSearchDescription": "Beatフィールドの取得でエラーが発生しました", "xpack.securitySolution.beatFields.failSearchDescription": "Beat フィールドで検索を実行できませんでした", "xpack.securitySolution.callouts.dismissButton": "閉じる", - "xpack.securitySolution.case.allCases.actions": "アクション", - "xpack.securitySolution.case.allCases.comments": "コメント", - "xpack.securitySolution.case.allCases.noTagsAvailable": "利用可能なタグがありません", - "xpack.securitySolution.case.caseModal.title": "ケースを選択", - "xpack.securitySolution.case.caseSavedObjectNoPermissionsMessage": "ケースを表示するには、Kibana スペースで保存されたオブジェクト管理機能の権限が必要です。詳細については、Kibana管理者に連絡してください。", - "xpack.securitySolution.case.caseSavedObjectNoPermissionsTitle": "Kibana機能権限が必要です", - "xpack.securitySolution.case.caseTable.addNewCase": "新規ケースの追加", - "xpack.securitySolution.case.caseTable.bulkActions": "一斉アクション", - "xpack.securitySolution.case.caseTable.bulkActions.closeSelectedTitle": "選択した項目を閉じる", - "xpack.securitySolution.case.caseTable.bulkActions.deleteSelectedTitle": "選択した項目を削除", - "xpack.securitySolution.case.caseTable.bulkActions.openSelectedTitle": "選択した項目を再開", - "xpack.securitySolution.case.caseTable.caseDetailsLinkAria": "クリックすると、タイトル{detailName}のケースを表示します", - "xpack.securitySolution.case.caseTable.closed": "終了", - "xpack.securitySolution.case.caseTable.closedCases": "終了したケース", - "xpack.securitySolution.case.caseTable.delete": "削除", - "xpack.securitySolution.case.caseTable.incidentSystem": "インシデント管理システム", - "xpack.securitySolution.case.caseTable.inProgressCases": "進行中のケース", - "xpack.securitySolution.case.caseTable.noCases.body": "表示するケースがありません。新しいケースを作成するか、または上記のフィルター設定を変更してください。", - "xpack.securitySolution.case.caseTable.noCases.title": "ケースなし", - "xpack.securitySolution.case.caseTable.notPushed": "プッシュされません", - "xpack.securitySolution.case.caseTable.openCases": "ケースを開く", - "xpack.securitySolution.case.caseTable.refreshTitle": "更新", - "xpack.securitySolution.case.caseTable.requiresUpdate": " 更新が必要", - "xpack.securitySolution.case.caseTable.searchAriaLabel": "ケースの検索", - "xpack.securitySolution.case.caseTable.searchPlaceholder": "例:ケース名", - "xpack.securitySolution.case.caseTable.serviceNowLinkAria": "クリックすると、servicenowでインシデントを表示します", - "xpack.securitySolution.case.caseTable.snIncident": "外部インシデント", - "xpack.securitySolution.case.caseTable.status": "ステータス", - "xpack.securitySolution.case.caseTable.upToDate": " は最新です", - "xpack.securitySolution.case.caseView.actionHeadline": "{actionDate} の {userName} {actionName}", - "xpack.securitySolution.case.caseView.actionLabel.addComment": "コメントを追加しました", - "xpack.securitySolution.case.caseView.actionLabel.addDescription": "説明を追加しました", - "xpack.securitySolution.case.caseView.actionLabel.addedField": "追加しました", - "xpack.securitySolution.case.caseView.actionLabel.changededField": "変更しました", - "xpack.securitySolution.case.caseView.actionLabel.editedField": "編集しました", - "xpack.securitySolution.case.caseView.actionLabel.on": "日付", - "xpack.securitySolution.case.caseView.actionLabel.pushedNewIncident": "新しいインシデントとしてプッシュしました", - "xpack.securitySolution.case.caseView.actionLabel.removedField": "削除しました", - "xpack.securitySolution.case.caseView.actionLabel.removedThirdParty": "外部のインシデント管理システムを削除しました", - "xpack.securitySolution.case.caseView.actionLabel.selectedThirdParty": "インシデント管理システムとして{ thirdParty }を選択しました", - "xpack.securitySolution.case.caseView.actionLabel.updateIncident": "インシデントを更新しました", - "xpack.securitySolution.case.caseView.actionLabel.viewIncident": "{incidentNumber}を表示", - "xpack.securitySolution.case.caseView.alertCommentLabelTitle": "アラートを追加しました", - "xpack.securitySolution.case.caseView.alertRuleDeletedLabelTitle": "アラートを追加しました", - "xpack.securitySolution.case.caseView.alreadyPushedToExternalService": "すでに{ externalService }インシデントにプッシュしました", - "xpack.securitySolution.case.caseView.appropiateLicense": "適切なライセンス", - "xpack.securitySolution.case.caseView.backLabel": "ケースに戻る", - "xpack.securitySolution.case.caseView.breadcrumb": "作成", - "xpack.securitySolution.case.caseView.cancel": "キャンセル", - "xpack.securitySolution.case.caseView.case": "ケース", - "xpack.securitySolution.case.caseView.caseClosed": "ケースを閉じました", - "xpack.securitySolution.case.caseView.caseInProgress": "進行中のケース", - "xpack.securitySolution.case.caseView.caseName": "ケース名", - "xpack.securitySolution.case.caseView.caseOpened": "ケースを開きました", - "xpack.securitySolution.case.caseView.caseRefresh": "ケースを更新", - "xpack.securitySolution.case.caseView.closeCase": "ケースを閉じる", - "xpack.securitySolution.case.caseView.closedOn": "終了日", - "xpack.securitySolution.case.caseView.cloudDeploymentLink": "クラウド展開", - "xpack.securitySolution.case.caseView.comment": "コメント", - "xpack.securitySolution.case.caseView.comment.addComment": "コメントを追加", - "xpack.securitySolution.case.caseView.comment.addCommentHelpText": "新しいコメントを追加...", - "xpack.securitySolution.case.caseView.commentFieldRequiredError": "コメントが必要です。", - "xpack.securitySolution.case.caseView.connectorConfigureLink": "コネクター", - "xpack.securitySolution.case.caseView.connectors": "外部インシデント管理システム", - "xpack.securitySolution.case.caseView.copyCommentLinkAria": "参照リンクをコピー", - "xpack.securitySolution.case.caseView.create": "新規ケースを作成", - "xpack.securitySolution.case.caseView.createCase": "ケースを作成", - "xpack.securitySolution.case.caseView.description": "説明", - "xpack.securitySolution.case.caseView.description.save": "保存", - "xpack.securitySolution.case.caseView.edit": "編集", - "xpack.securitySolution.case.caseView.edit.comment": "コメントを編集", - "xpack.securitySolution.case.caseView.edit.description": "説明を編集", - "xpack.securitySolution.case.caseView.edit.quote": "お客様の声", - "xpack.securitySolution.case.caseView.editActionsLinkAria": "クリックすると、すべてのアクションを表示します", - "xpack.securitySolution.case.caseView.editConnector": "外部インシデント管理システムを変更", - "xpack.securitySolution.case.caseView.editTagsLinkAria": "クリックすると、タグを編集します", - "xpack.securitySolution.case.caseView.emailBody": "ケースリファレンス:{caseUrl}", - "xpack.securitySolution.case.caseView.emailSubject": "セキュリティケース - {caseTitle}", - "xpack.securitySolution.case.caseView.errorsPushServiceCallOutTitle": "ケースを外部システムにプッシュするには、以下が必要です。", - "xpack.securitySolution.case.caseView.fieldChanged": "変更されたコネクターフィールド", - "xpack.securitySolution.case.caseView.fieldRequiredError": "必須フィールド", - "xpack.securitySolution.case.caseView.generatedAlertCommentLabelTitle": "から追加されました", - "xpack.securitySolution.case.caseView.goToDocumentationButton": "ドキュメンテーションを表示", - "xpack.securitySolution.case.caseView.markedCaseAs": "ケースを設定", - "xpack.securitySolution.case.caseView.markInProgress": "実行中に設定", - "xpack.securitySolution.case.caseView.moveToCommentAria": "参照されたコメントをハイライト", - "xpack.securitySolution.case.caseView.name": "名前", - "xpack.securitySolution.case.caseView.noReportersAvailable": "利用可能なレポートがありません。", - "xpack.securitySolution.case.caseView.noTags": "現在、このケースにタグは割り当てられていません。", - "xpack.securitySolution.case.caseView.openedOn": "開始日", - "xpack.securitySolution.case.caseView.optional": "オプション", - "xpack.securitySolution.case.caseView.particpantsLabel": "参加者", - "xpack.securitySolution.case.caseView.pushNamedIncident": "{ thirdParty }インシデントとしてプッシュ", - "xpack.securitySolution.case.caseView.pushThirdPartyIncident": "外部インシデントとしてプッシュ", - "xpack.securitySolution.case.caseView.pushToServiceDisableBecauseCaseClosedDescription": "終了したケースは外部システムに送信できません。外部システムでケースを開始または更新したい場合にはケースを再開します。", - "xpack.securitySolution.case.caseView.pushToServiceDisableBecauseCaseClosedTitle": "ケースを再開する", - "xpack.securitySolution.case.caseView.pushToServiceDisableByConfigDescription": "kibana.ymlファイルは、特定のコネクターのみを許可するように構成されています。外部システムでケースを開けるようにするには、xpack.actions.enabledActiontypes設定に.[actionTypeId] (例:.servicenow | .jira) を追加します。詳細は{link}をご覧ください。", - "xpack.securitySolution.case.caseView.pushToServiceDisableByConfigTitle": "Kibanaの構成ファイルで外部サービスを有効にする", - "xpack.securitySolution.case.caseView.pushToServiceDisableByInvalidConnector": "外部サービスに更新を送信するために使用されるコネクターが削除されました。外部システムでケースを更新するには、別のコネクターを選択するか、新しいコネクターを作成してください。", - "xpack.securitySolution.case.caseView.pushToServiceDisableByLicenseDescription": "{appropriateLicense}があるか、{cloud}を使用しているか、無償試用版をテストしているときには、外部システムでケースを開くことができます。", - "xpack.securitySolution.case.caseView.pushToServiceDisableByLicenseTitle": "適切なライセンスにアップグレード", - "xpack.securitySolution.case.caseView.pushToServiceDisableByNoCaseConfigDescription": "外部システムでケースを開いて更新するには、このケースの外部インシデント管理システムを選択する必要があります。", - "xpack.securitySolution.case.caseView.pushToServiceDisableByNoCaseConfigTitle": "外部コネクターを選択", - "xpack.securitySolution.case.caseView.pushToServiceDisableByNoConfigTitle": "外部コネクターを構成", - "xpack.securitySolution.case.caseView.pushToServiceDisableByNoConnectors": "外部システムでケースを開いて更新するには、{link}を設定する必要があります。", - "xpack.securitySolution.case.caseView.reopenCase": "ケースを再開", - "xpack.securitySolution.case.caseView.reporterLabel": "報告者", - "xpack.securitySolution.case.caseView.requiredUpdateToExternalService": "{ externalService }インシデントの更新が必要です", - "xpack.securitySolution.case.caseView.sendAlertToTimelineTooltip": "タイムラインで調査", - "xpack.securitySolution.case.caseView.sendEmalLinkAria": "クリックすると、{user}に電子メールを送信します", - "xpack.securitySolution.case.caseView.showAlertTooltip": "アラートの詳細を表示", - "xpack.securitySolution.case.caseView.statusLabel": "ステータス", - "xpack.securitySolution.case.caseView.syncAlertsLabel": "アラートの同期", - "xpack.securitySolution.case.caseView.tags": "タグ", - "xpack.securitySolution.case.caseView.to": "に", - "xpack.securitySolution.case.caseView.unknown": "不明", - "xpack.securitySolution.case.caseView.unknownRule.label": "不明なルール", - "xpack.securitySolution.case.caseView.updateNamedIncident": "{ thirdParty }インシデントを更新", - "xpack.securitySolution.case.caseView.updateThirdPartyIncident": "外部インシデントを更新", - "xpack.securitySolution.case.common.noConnector": "コネクターを選択していません", - "xpack.securitySolution.case.components.connectors.case.actionTypeTitle": "ケース", - "xpack.securitySolution.case.components.connectors.case.addNewCaseOption": "新規ケースの追加", - "xpack.securitySolution.case.components.connectors.case.caseRequired": "ケースの選択が必要です。", - "xpack.securitySolution.case.components.connectors.case.casesDropdownPlaceholder": "ケースを選択", - "xpack.securitySolution.case.components.connectors.case.casesDropdownRowLabel": "ケース", - "xpack.securitySolution.case.components.connectors.case.commentLabel": "コメント", - "xpack.securitySolution.case.components.connectors.case.commentRequired": "コメントが必要です。", - "xpack.securitySolution.case.components.connectors.case.connectedCaseLabel": "接続されたケース", - "xpack.securitySolution.case.components.connectors.case.createCaseLabel": "ケースを作成", - "xpack.securitySolution.case.components.connectors.case.optionAddNewCase": "新しいケースに追加", - "xpack.securitySolution.case.components.connectors.case.optionAddToExistingCase": "既存のケースに追加", - "xpack.securitySolution.case.components.connectors.case.selectMessageText": "ケースを作成または更新します。", - "xpack.securitySolution.case.configure.errorGetFields": "サービスからのフィールドの取得中にエラーが発生しました", - "xpack.securitySolution.case.configure.successSaveToast": "保存された外部接続設定", - "xpack.securitySolution.case.configureCases.addNewConnector": "新しいコネクターを追加", - "xpack.securitySolution.case.configureCases.blankMappings": "1 つ以上のフィールドを { connectorName } にマッピングする必要があります", - "xpack.securitySolution.case.configureCases.cancelButton": "キャンセル", - "xpack.securitySolution.case.configureCases.caseClosureOptionsClosedIncident": "新しいインシデントが外部システムで閉じたときにセキュリティケースを自動的に閉じる", - "xpack.securitySolution.case.configureCases.caseClosureOptionsDesc": "セキュリティケースの終了のしかたを定義します。自動ケース終了のためには、外部のインシデント管理システムへの接続を確立する必要がいります。", - "xpack.securitySolution.case.configureCases.caseClosureOptionsLabel": "ケース終了オプション", - "xpack.securitySolution.case.configureCases.caseClosureOptionsManual": "セキュリティケースを手動で閉じる", - "xpack.securitySolution.case.configureCases.caseClosureOptionsNewIncident": "新しいインシデントを外部システムにプッシュするときにセキュリティケースを自動的に閉じる", - "xpack.securitySolution.case.configureCases.caseClosureOptionsTitle": "ケースのクローズ", - "xpack.securitySolution.case.configureCases.commentMapping": "コメント", - "xpack.securitySolution.case.configureCases.editFieldMappingTitle": "{ thirdPartyName } フィールドマッピングを編集", - "xpack.securitySolution.case.configureCases.fieldMappingDesc": "データを { thirdPartyName } にプッシュするときに、セキュリティケースフィールドを { thirdPartyName } フィールドにマッピングします。フィールドマッピングでは、{ thirdPartyName } への接続を確立する必要があります。", - "xpack.securitySolution.case.configureCases.fieldMappingDescErr": "フィールドマッピングでは、{ thirdPartyName } への接続を確立する必要があります。接続資格情報を確認してください。", - "xpack.securitySolution.case.configureCases.fieldMappingEditAppend": "末尾に追加", - "xpack.securitySolution.case.configureCases.fieldMappingEditNothing": "何もしない", - "xpack.securitySolution.case.configureCases.fieldMappingEditOverwrite": "上書き", - "xpack.securitySolution.case.configureCases.fieldMappingFirstCol": "セキュリティケースフィールド", - "xpack.securitySolution.case.configureCases.fieldMappingSecondCol": "{ thirdPartyName } フィールド", - "xpack.securitySolution.case.configureCases.fieldMappingThirdCol": "編集時と更新時", - "xpack.securitySolution.case.configureCases.fieldMappingTitle": "{ thirdPartyName } フィールドマッピング", - "xpack.securitySolution.case.configureCases.headerTitle": "ケースを構成", - "xpack.securitySolution.case.configureCases.incidentManagementSystemDesc": "オプションとして、セキュリティケースを選択した外部のインシデント管理システムに接続できます。そうすると、選択したサードパーティシステム内でケースデータをインシデントとしてプッシュできます。", - "xpack.securitySolution.case.configureCases.incidentManagementSystemLabel": "インシデント管理システム", - "xpack.securitySolution.case.configureCases.incidentManagementSystemTitle": "外部のインシデント管理システムに接続", - "xpack.securitySolution.case.configureCases.mappingFieldNotMapped": "マップされません", - "xpack.securitySolution.case.configureCases.noFieldsError": "{ connectorName } フィールドが見つかりません。解決する { connectorName } コネクター設定または { connectorName } インスタンス設定を確認してください。", - "xpack.securitySolution.case.configureCases.requiredMappings": "1 つ以上のケースフィールドを次の { connectorName } フィールドにマッピングする必要があります:{ fields }", - "xpack.securitySolution.case.configureCases.saveAndCloseButton": "保存して閉じる", - "xpack.securitySolution.case.configureCases.saveButton": "保存", - "xpack.securitySolution.case.configureCases.updateConnector": "フィールドマッピングを更新", - "xpack.securitySolution.case.configureCases.updateSelectedConnector": "{ connectorName }を更新", - "xpack.securitySolution.case.configureCases.warningMessage": "選択したコネクターが削除されました。別のコネクターを選択するか、新しいコネクターを作成してください。", - "xpack.securitySolution.case.configureCases.warningTitle": "警告", - "xpack.securitySolution.case.configureCasesButton": "外部接続を編集", - "xpack.securitySolution.case.confirmDeleteCase.confirmQuestion": "このケースを削除すると、関連するすべてのケースデータが完全に削除され、外部インシデント管理システムにデータをプッシュできなくなります。続行していいですか?", - "xpack.securitySolution.case.confirmDeleteCase.confirmQuestionPlural": "これらのケースを削除すると、関連するすべてのケースデータが完全に削除され、外部インシデント管理システムにデータをプッシュできなくなります。続行していいですか?", - "xpack.securitySolution.case.confirmDeleteCase.deleteCase": "ケースを削除", - "xpack.securitySolution.case.confirmDeleteCase.deleteCases": "ケースを削除", - "xpack.securitySolution.case.confirmDeleteCase.deleteThisCase": "このケースを削除", - "xpack.securitySolution.case.confirmDeleteCase.deleteTitle": "「{caseTitle}」を削除", - "xpack.securitySolution.case.confirmDeleteCase.selectedCases": "選択したケースを削除", - "xpack.securitySolution.case.connectors.jira.issueTypesSelectFieldLabel": "問題タイプ", - "xpack.securitySolution.case.connectors.jira.parentIssueSearchLabel": "親問題", - "xpack.securitySolution.case.connectors.jira.prioritySelectFieldLabel": "優先度", - "xpack.securitySolution.case.connectors.resilient.incidentTypesLabel": "インシデントタイプ", - "xpack.securitySolution.case.connectors.resilient.incidentTypesPlaceholder": "タイプを選択", - "xpack.securitySolution.case.connectors.resilient.severityLabel": "深刻度", - "xpack.securitySolution.case.connectors.resilient.unableToGetIncidentTypesMessage": "インシデントタイプを取得できません", - "xpack.securitySolution.case.connectors.resilient.unableToGetSeverityMessage": "深刻度を取得できません", - "xpack.securitySolution.case.containers.statusChangeToasterText": "このケースのアラートはステータスが更新されました", - "xpack.securitySolution.case.createCase.descriptionFieldRequiredError": "説明が必要です。", - "xpack.securitySolution.case.createCase.fieldTagsHelpText": "このケースの1つ以上のカスタム識別タグを入力します。新しいタグを開始するには、各タグの後でEnterを押します。", - "xpack.securitySolution.case.createCase.titleFieldRequiredError": "タイトルが必要です。", - "xpack.securitySolution.case.dismissErrorsPushServiceCallOutTitle": "閉じる", - "xpack.securitySolution.case.editConnector.editConnectorLinkAria": "クリックしてコネクターを編集", - "xpack.securitySolution.case.pageTitle": "ケース", - "xpack.securitySolution.case.readOnlySavedObjectDescription": "ケースを表示する権限のみが付与されています。ケースを開いて更新する必要がある場合は、Kibana管理者に連絡してください。", - "xpack.securitySolution.case.readOnlySavedObjectTitle": "新しいケースを開いたり、既存のケースを更新したりすることはできません", - "xpack.securitySolution.case.settings.syncAlertsSwitchLabelOff": "オフ", - "xpack.securitySolution.case.settings.syncAlertsSwitchLabelOn": "オン", - "xpack.securitySolution.case.status.closed": "終了", - "xpack.securitySolution.case.status.iconAria": "ステータスの変更", - "xpack.securitySolution.case.status.inProgress": "進行中", - "xpack.securitySolution.case.status.open": "開く", - "xpack.securitySolution.case.timeline.actions.addCase": "ケースに追加", - "xpack.securitySolution.case.timeline.actions.addExistingCase": "既存のケースに追加", - "xpack.securitySolution.case.timeline.actions.addNewCase": "新しいケースに追加", - "xpack.securitySolution.case.timeline.actions.addToCaseAriaLabel": "アラートをケースに関連付ける", - "xpack.securitySolution.case.timeline.actions.addToCaseTooltip": "ケースに追加", - "xpack.securitySolution.case.timeline.actions.caseCreatedSuccessToast": "アラートが「{title}」に追加されました", - "xpack.securitySolution.case.timeline.actions.caseCreatedSuccessToastText": "このケースのアラートはステータスがケースステータスと同期されました", - "xpack.securitySolution.case.timeline.actions.caseCreatedSuccessToastViewCaseLink": "ケースの表示", + "xpack.securitySolution.cases.allCases.actions": "アクション", + "xpack.securitySolution.cases.allCases.comments": "コメント", + "xpack.securitySolution.cases.allCases.noTagsAvailable": "利用可能なタグがありません", + "xpack.securitySolution.cases.caseModal.title": "ケースを選択", + "xpack.securitySolution.cases.caseSavedObjectNoPermissionsMessage": "ケースを表示するには、Kibana スペースで保存されたオブジェクト管理機能の権限が必要です。詳細については、Kibana管理者に連絡してください。", + "xpack.securitySolution.cases.caseSavedObjectNoPermissionsTitle": "Kibana機能権限が必要です", + "xpack.securitySolution.cases.caseTable.addNewCase": "新規ケースの追加", + "xpack.securitySolution.cases.caseTable.bulkActions": "一斉アクション", + "xpack.securitySolution.cases.caseTable.bulkActions.closeSelectedTitle": "選択した項目を閉じる", + "xpack.securitySolution.cases.caseTable.bulkActions.deleteSelectedTitle": "選択した項目を削除", + "xpack.securitySolution.cases.caseTable.bulkActions.openSelectedTitle": "選択した項目を再開", + "xpack.securitySolution.cases.caseTable.caseDetailsLinkAria": "クリックすると、タイトル{detailName}のケースを表示します", + "xpack.securitySolution.cases.caseTable.closed": "終了", + "xpack.securitySolution.cases.caseTable.closedCases": "終了したケース", + "xpack.securitySolution.cases.caseTable.delete": "削除", + "xpack.securitySolution.cases.caseTable.incidentSystem": "インシデント管理システム", + "xpack.securitySolution.cases.caseTable.inProgressCases": "進行中のケース", + "xpack.securitySolution.cases.caseTable.noCases.body": "表示するケースがありません。新しいケースを作成するか、または上記のフィルター設定を変更してください。", + "xpack.securitySolution.cases.caseTable.noCases.title": "ケースなし", + "xpack.securitySolution.cases.caseTable.notPushed": "プッシュされません", + "xpack.securitySolution.cases.caseTable.openCases": "ケースを開く", + "xpack.securitySolution.cases.caseTable.refreshTitle": "更新", + "xpack.securitySolution.cases.caseTable.requiresUpdate": " 更新が必要", + "xpack.securitySolution.cases.caseTable.searchAriaLabel": "ケースの検索", + "xpack.securitySolution.cases.caseTable.searchPlaceholder": "例:ケース名", + "xpack.securitySolution.cases.caseTable.serviceNowLinkAria": "クリックすると、servicenowでインシデントを表示します", + "xpack.securitySolution.cases.caseTable.snIncident": "外部インシデント", + "xpack.securitySolution.cases.caseTable.status": "ステータス", + "xpack.securitySolution.cases.caseTable.upToDate": " は最新です", + "xpack.securitySolution.cases.caseView.actionHeadline": "{actionDate} の {userName} {actionName}", + "xpack.securitySolution.cases.caseView.actionLabel.addComment": "コメントを追加しました", + "xpack.securitySolution.cases.caseView.actionLabel.addDescription": "説明を追加しました", + "xpack.securitySolution.cases.caseView.actionLabel.addedField": "追加しました", + "xpack.securitySolution.cases.caseView.actionLabel.changededField": "変更しました", + "xpack.securitySolution.cases.caseView.actionLabel.editedField": "編集しました", + "xpack.securitySolution.cases.caseView.actionLabel.on": "日付", + "xpack.securitySolution.cases.caseView.actionLabel.pushedNewIncident": "新しいインシデントとしてプッシュしました", + "xpack.securitySolution.cases.caseView.actionLabel.removedField": "削除しました", + "xpack.securitySolution.cases.caseView.actionLabel.removedThirdParty": "外部のインシデント管理システムを削除しました", + "xpack.securitySolution.cases.caseView.actionLabel.selectedThirdParty": "インシデント管理システムとして{ thirdParty }を選択しました", + "xpack.securitySolution.cases.caseView.actionLabel.updateIncident": "インシデントを更新しました", + "xpack.securitySolution.cases.caseView.actionLabel.viewIncident": "{incidentNumber}を表示", + "xpack.securitySolution.cases.caseView.alertCommentLabelTitle": "アラートを追加しました", + "xpack.securitySolution.cases.caseView.alertRuleDeletedLabelTitle": "アラートを追加しました", + "xpack.securitySolution.cases.caseView.alreadyPushedToExternalService": "すでに{ externalService }インシデントにプッシュしました", + "xpack.securitySolution.cases.caseView.appropiateLicense": "適切なライセンス", + "xpack.securitySolution.cases.caseView.backLabel": "ケースに戻る", + "xpack.securitySolution.cases.caseView.breadcrumb": "作成", + "xpack.securitySolution.cases.caseView.cancel": "キャンセル", + "xpack.securitySolution.cases.caseView.case": "ケース", + "xpack.securitySolution.cases.caseView.caseClosed": "ケースを閉じました", + "xpack.securitySolution.cases.caseView.caseInProgress": "進行中のケース", + "xpack.securitySolution.cases.caseView.caseName": "ケース名", + "xpack.securitySolution.cases.caseView.caseOpened": "ケースを開きました", + "xpack.securitySolution.cases.caseView.caseRefresh": "ケースを更新", + "xpack.securitySolution.cases.caseView.closeCase": "ケースを閉じる", + "xpack.securitySolution.cases.caseView.closedOn": "終了日", + "xpack.securitySolution.cases.caseView.cloudDeploymentLink": "クラウド展開", + "xpack.securitySolution.cases.caseView.comment": "コメント", + "xpack.securitySolution.cases.caseView.comment.addComment": "コメントを追加", + "xpack.securitySolution.cases.caseView.comment.addCommentHelpText": "新しいコメントを追加...", + "xpack.securitySolution.cases.caseView.commentFieldRequiredError": "コメントが必要です。", + "xpack.securitySolution.cases.caseView.connectorConfigureLink": "コネクター", + "xpack.securitySolution.cases.caseView.connectors": "外部インシデント管理システム", + "xpack.securitySolution.cases.caseView.copyCommentLinkAria": "参照リンクをコピー", + "xpack.securitySolution.cases.caseView.create": "新規ケースを作成", + "xpack.securitySolution.cases.caseView.createCase": "ケースを作成", + "xpack.securitySolution.cases.caseView.description": "説明", + "xpack.securitySolution.cases.caseView.description.save": "保存", + "xpack.securitySolution.cases.caseView.edit": "編集", + "xpack.securitySolution.cases.caseView.edit.comment": "コメントを編集", + "xpack.securitySolution.cases.caseView.edit.description": "説明を編集", + "xpack.securitySolution.cases.caseView.edit.quote": "お客様の声", + "xpack.securitySolution.cases.caseView.editActionsLinkAria": "クリックすると、すべてのアクションを表示します", + "xpack.securitySolution.cases.caseView.editConnector": "外部インシデント管理システムを変更", + "xpack.securitySolution.cases.caseView.editTagsLinkAria": "クリックすると、タグを編集します", + "xpack.securitySolution.cases.caseView.emailBody": "ケースリファレンス:{caseUrl}", + "xpack.securitySolution.cases.caseView.emailSubject": "セキュリティケース - {caseTitle}", + "xpack.securitySolution.cases.caseView.errorsPushServiceCallOutTitle": "ケースを外部システムにプッシュするには、以下が必要です。", + "xpack.securitySolution.cases.caseView.fieldChanged": "変更されたコネクターフィールド", + "xpack.securitySolution.cases.caseView.fieldRequiredError": "必須フィールド", + "xpack.securitySolution.cases.caseView.generatedAlertCommentLabelTitle": "から追加されました", + "xpack.securitySolution.cases.caseView.goToDocumentationButton": "ドキュメンテーションを表示", + "xpack.securitySolution.cases.caseView.markedCaseAs": "ケースを設定", + "xpack.securitySolution.cases.caseView.markInProgress": "実行中に設定", + "xpack.securitySolution.cases.caseView.moveToCommentAria": "参照されたコメントをハイライト", + "xpack.securitySolution.cases.caseView.name": "名前", + "xpack.securitySolution.cases.caseView.noReportersAvailable": "利用可能なレポートがありません。", + "xpack.securitySolution.cases.caseView.noTags": "現在、このケースにタグは割り当てられていません。", + "xpack.securitySolution.cases.caseView.openedOn": "開始日", + "xpack.securitySolution.cases.caseView.optional": "オプション", + "xpack.securitySolution.cases.caseView.particpantsLabel": "参加者", + "xpack.securitySolution.cases.caseView.pushNamedIncident": "{ thirdParty }インシデントとしてプッシュ", + "xpack.securitySolution.cases.caseView.pushThirdPartyIncident": "外部インシデントとしてプッシュ", + "xpack.securitySolution.cases.caseView.pushToServiceDisableBecauseCaseClosedDescription": "終了したケースは外部システムに送信できません。外部システムでケースを開始または更新したい場合にはケースを再開します。", + "xpack.securitySolution.cases.caseView.pushToServiceDisableBecauseCaseClosedTitle": "ケースを再開する", + "xpack.securitySolution.cases.caseView.pushToServiceDisableByConfigDescription": "kibana.ymlファイルは、特定のコネクターのみを許可するように構成されています。外部システムでケースを開けるようにするには、xpack.actions.enabledActiontypes設定に.[actionTypeId] (例:.servicenow | .jira) を追加します。詳細は{link}をご覧ください。", + "xpack.securitySolution.cases.caseView.pushToServiceDisableByConfigTitle": "Kibanaの構成ファイルで外部サービスを有効にする", + "xpack.securitySolution.cases.caseView.pushToServiceDisableByInvalidConnector": "外部サービスに更新を送信するために使用されるコネクターが削除されました。外部システムでケースを更新するには、別のコネクターを選択するか、新しいコネクターを作成してください。", + "xpack.securitySolution.cases.caseView.pushToServiceDisableByLicenseDescription": "{appropriateLicense}があるか、{cloud}を使用しているか、無償試用版をテストしているときには、外部システムでケースを開くことができます。", + "xpack.securitySolution.cases.caseView.pushToServiceDisableByLicenseTitle": "適切なライセンスにアップグレード", + "xpack.securitySolution.cases.caseView.pushToServiceDisableByNoCaseConfigDescription": "外部システムでケースを開いて更新するには、このケースの外部インシデント管理システムを選択する必要があります。", + "xpack.securitySolution.cases.caseView.pushToServiceDisableByNoCaseConfigTitle": "外部コネクターを選択", + "xpack.securitySolution.cases.caseView.pushToServiceDisableByNoConfigTitle": "外部コネクターを構成", + "xpack.securitySolution.cases.caseView.pushToServiceDisableByNoConnectors": "外部システムでケースを開いて更新するには、{link}を設定する必要があります。", + "xpack.securitySolution.cases.caseView.reopenCase": "ケースを再開", + "xpack.securitySolution.cases.caseView.reporterLabel": "報告者", + "xpack.securitySolution.cases.caseView.requiredUpdateToExternalService": "{ externalService }インシデントの更新が必要です", + "xpack.securitySolution.cases.caseView.sendAlertToTimelineTooltip": "タイムラインで調査", + "xpack.securitySolution.cases.caseView.sendEmalLinkAria": "クリックすると、{user}に電子メールを送信します", + "xpack.securitySolution.cases.caseView.showAlertTooltip": "アラートの詳細を表示", + "xpack.securitySolution.cases.caseView.statusLabel": "ステータス", + "xpack.securitySolution.cases.caseView.syncAlertsLabel": "アラートの同期", + "xpack.securitySolution.cases.caseView.tags": "タグ", + "xpack.securitySolution.cases.caseView.to": "に", + "xpack.securitySolution.cases.caseView.unknown": "不明", + "xpack.securitySolution.cases.caseView.unknownRule.label": "不明なルール", + "xpack.securitySolution.cases.caseView.updateNamedIncident": "{ thirdParty }インシデントを更新", + "xpack.securitySolution.cases.caseView.updateThirdPartyIncident": "外部インシデントを更新", + "xpack.securitySolution.cases.common.noConnector": "コネクターを選択していません", + "xpack.securitySolution.cases.components.connectors.cases.actionTypeTitle": "ケース", + "xpack.securitySolution.cases.components.connectors.cases.addNewCaseOption": "新規ケースの追加", + "xpack.securitySolution.cases.components.connectors.cases.caseRequired": "ケースの選択が必要です。", + "xpack.securitySolution.cases.components.connectors.cases.casesDropdownPlaceholder": "ケースを選択", + "xpack.securitySolution.cases.components.connectors.cases.casesDropdownRowLabel": "ケース", + "xpack.securitySolution.cases.components.connectors.cases.commentLabel": "コメント", + "xpack.securitySolution.cases.components.connectors.cases.commentRequired": "コメントが必要です。", + "xpack.securitySolution.cases.components.connectors.cases.connectedCaseLabel": "接続されたケース", + "xpack.securitySolution.cases.components.connectors.cases.createCaseLabel": "ケースを作成", + "xpack.securitySolution.cases.components.connectors.cases.optionAddNewCase": "新しいケースに追加", + "xpack.securitySolution.cases.components.connectors.cases.optionAddToExistingCase": "既存のケースに追加", + "xpack.securitySolution.cases.components.connectors.cases.selectMessageText": "ケースを作成または更新します。", + "xpack.securitySolution.cases.configure.errorGetFields": "サービスからのフィールドの取得中にエラーが発生しました", + "xpack.securitySolution.cases.configure.successSaveToast": "保存された外部接続設定", + "xpack.securitySolution.cases.configureCases.addNewConnector": "新しいコネクターを追加", + "xpack.securitySolution.cases.configureCases.blankMappings": "1 つ以上のフィールドを { connectorName } にマッピングする必要があります", + "xpack.securitySolution.cases.configureCases.cancelButton": "キャンセル", + "xpack.securitySolution.cases.configureCases.caseClosureOptionsClosedIncident": "新しいインシデントが外部システムで閉じたときにセキュリティケースを自動的に閉じる", + "xpack.securitySolution.cases.configureCases.caseClosureOptionsDesc": "セキュリティケースの終了のしかたを定義します。自動ケース終了のためには、外部のインシデント管理システムへの接続を確立する必要がいります。", + "xpack.securitySolution.cases.configureCases.caseClosureOptionsLabel": "ケース終了オプション", + "xpack.securitySolution.cases.configureCases.caseClosureOptionsManual": "セキュリティケースを手動で閉じる", + "xpack.securitySolution.cases.configureCases.caseClosureOptionsNewIncident": "新しいインシデントを外部システムにプッシュするときにセキュリティケースを自動的に閉じる", + "xpack.securitySolution.cases.configureCases.caseClosureOptionsTitle": "ケースのクローズ", + "xpack.securitySolution.cases.configureCases.commentMapping": "コメント", + "xpack.securitySolution.cases.configureCases.editFieldMappingTitle": "{ thirdPartyName } フィールドマッピングを編集", + "xpack.securitySolution.cases.configureCases.fieldMappingDesc": "データを { thirdPartyName } にプッシュするときに、セキュリティケースフィールドを { thirdPartyName } フィールドにマッピングします。フィールドマッピングでは、{ thirdPartyName } への接続を確立する必要があります。", + "xpack.securitySolution.cases.configureCases.fieldMappingDescErr": "フィールドマッピングでは、{ thirdPartyName } への接続を確立する必要があります。接続資格情報を確認してください。", + "xpack.securitySolution.cases.configureCases.fieldMappingEditAppend": "末尾に追加", + "xpack.securitySolution.cases.configureCases.fieldMappingEditNothing": "何もしない", + "xpack.securitySolution.cases.configureCases.fieldMappingEditOverwrite": "上書き", + "xpack.securitySolution.cases.configureCases.fieldMappingFirstCol": "セキュリティケースフィールド", + "xpack.securitySolution.cases.configureCases.fieldMappingSecondCol": "{ thirdPartyName } フィールド", + "xpack.securitySolution.cases.configureCases.fieldMappingThirdCol": "編集時と更新時", + "xpack.securitySolution.cases.configureCases.fieldMappingTitle": "{ thirdPartyName } フィールドマッピング", + "xpack.securitySolution.cases.configureCases.headerTitle": "ケースを構成", + "xpack.securitySolution.cases.configureCases.incidentManagementSystemDesc": "オプションとして、セキュリティケースを選択した外部のインシデント管理システムに接続できます。そうすると、選択したサードパーティシステム内でケースデータをインシデントとしてプッシュできます。", + "xpack.securitySolution.cases.configureCases.incidentManagementSystemLabel": "インシデント管理システム", + "xpack.securitySolution.cases.configureCases.incidentManagementSystemTitle": "外部のインシデント管理システムに接続", + "xpack.securitySolution.cases.configureCases.mappingFieldNotMapped": "マップされません", + "xpack.securitySolution.cases.configureCases.noFieldsError": "{ connectorName } フィールドが見つかりません。解決する { connectorName } コネクター設定または { connectorName } インスタンス設定を確認してください。", + "xpack.securitySolution.cases.configureCases.requiredMappings": "1 つ以上のケースフィールドを次の { connectorName } フィールドにマッピングする必要があります:{ fields }", + "xpack.securitySolution.cases.configureCases.saveAndCloseButton": "保存して閉じる", + "xpack.securitySolution.cases.configureCases.saveButton": "保存", + "xpack.securitySolution.cases.configureCases.updateConnector": "フィールドマッピングを更新", + "xpack.securitySolution.cases.configureCases.updateSelectedConnector": "{ connectorName }を更新", + "xpack.securitySolution.cases.configureCases.warningMessage": "選択したコネクターが削除されました。別のコネクターを選択するか、新しいコネクターを作成してください。", + "xpack.securitySolution.cases.configureCases.warningTitle": "警告", + "xpack.securitySolution.cases.configureCasesButton": "外部接続を編集", + "xpack.securitySolution.cases.confirmDeleteCase.confirmQuestion": "このケースを削除すると、関連するすべてのケースデータが完全に削除され、外部インシデント管理システムにデータをプッシュできなくなります。続行していいですか?", + "xpack.securitySolution.cases.confirmDeleteCase.confirmQuestionPlural": "これらのケースを削除すると、関連するすべてのケースデータが完全に削除され、外部インシデント管理システムにデータをプッシュできなくなります。続行していいですか?", + "xpack.securitySolution.cases.confirmDeleteCase.deleteCase": "ケースを削除", + "xpack.securitySolution.cases.confirmDeleteCase.deleteCases": "ケースを削除", + "xpack.securitySolution.cases.confirmDeleteCase.deleteThisCase": "このケースを削除", + "xpack.securitySolution.cases.confirmDeleteCase.deleteTitle": "「{caseTitle}」を削除", + "xpack.securitySolution.cases.confirmDeleteCase.selectedCases": "選択したケースを削除", + "xpack.securitySolution.cases.connectors.jira.issueTypesSelectFieldLabel": "問題タイプ", + "xpack.securitySolution.cases.connectors.jira.parentIssueSearchLabel": "親問題", + "xpack.securitySolution.cases.connectors.jira.prioritySelectFieldLabel": "優先度", + "xpack.securitySolution.cases.connectors.resilient.incidentTypesLabel": "インシデントタイプ", + "xpack.securitySolution.cases.connectors.resilient.incidentTypesPlaceholder": "タイプを選択", + "xpack.securitySolution.cases.connectors.resilient.severityLabel": "深刻度", + "xpack.securitySolution.cases.connectors.resilient.unableToGetIncidentTypesMessage": "インシデントタイプを取得できません", + "xpack.securitySolution.cases.connectors.resilient.unableToGetSeverityMessage": "深刻度を取得できません", + "xpack.securitySolution.cases.containers.statusChangeToasterText": "このケースのアラートはステータスが更新されました", + "xpack.securitySolution.cases.createCase.descriptionFieldRequiredError": "説明が必要です。", + "xpack.securitySolution.cases.createCase.fieldTagsHelpText": "このケースの1つ以上のカスタム識別タグを入力します。新しいタグを開始するには、各タグの後でEnterを押します。", + "xpack.securitySolution.cases.createCase.titleFieldRequiredError": "タイトルが必要です。", + "xpack.securitySolution.cases.dismissErrorsPushServiceCallOutTitle": "閉じる", + "xpack.securitySolution.cases.editConnector.editConnectorLinkAria": "クリックしてコネクターを編集", + "xpack.securitySolution.cases.pageTitle": "ケース", + "xpack.securitySolution.cases.readOnlySavedObjectDescription": "ケースを表示する権限のみが付与されています。ケースを開いて更新する必要がある場合は、Kibana管理者に連絡してください。", + "xpack.securitySolution.cases.readOnlySavedObjectTitle": "新しいケースを開いたり、既存のケースを更新したりすることはできません", + "xpack.securitySolution.cases.settings.syncAlertsSwitchLabelOff": "オフ", + "xpack.securitySolution.cases.settings.syncAlertsSwitchLabelOn": "オン", + "xpack.securitySolution.cases.status.closed": "終了", + "xpack.securitySolution.cases.status.iconAria": "ステータスの変更", + "xpack.securitySolution.cases.status.inProgress": "進行中", + "xpack.securitySolution.cases.status.open": "開く", + "xpack.securitySolution.cases.timeline.actions.addCase": "ケースに追加", + "xpack.securitySolution.cases.timeline.actions.addExistingCase": "既存のケースに追加", + "xpack.securitySolution.cases.timeline.actions.addNewCase": "新しいケースに追加", + "xpack.securitySolution.cases.timeline.actions.addToCaseAriaLabel": "アラートをケースに関連付ける", + "xpack.securitySolution.cases.timeline.actions.addToCaseTooltip": "ケースに追加", + "xpack.securitySolution.cases.timeline.actions.caseCreatedSuccessToast": "アラートが「{title}」に追加されました", + "xpack.securitySolution.cases.timeline.actions.caseCreatedSuccessToastText": "このケースのアラートはステータスがケースステータスと同期されました", + "xpack.securitySolution.cases.timeline.actions.caseCreatedSuccessToastViewCaseLink": "ケースの表示", "xpack.securitySolution.caseConnectorsRegistry.get.missingCaseConnectorErrorMessage": "オブジェクトタイプ「{id}」は登録されていません。", "xpack.securitySolution.caseConnectorsRegistry.register.duplicateCaseConnectorErrorMessage": "オブジェクトタイプ「{id}」はすでに登録されています。", "xpack.securitySolution.certificate.fingerprint.clientCertLabel": "クライアント証明書", @@ -18485,14 +18482,14 @@ "xpack.securitySolution.containers.anomalies.errorFetchingAnomaliesData": "異常データをクエリできませんでした", "xpack.securitySolution.containers.anomalies.stackByJobId": "ジョブ", "xpack.securitySolution.containers.anomalies.title": "異常", - "xpack.securitySolution.containers.case.closedCases": "{totalCases, plural, =1 {\"{caseTitle}\"} other {{totalCases}件のケース}}をクローズしました", - "xpack.securitySolution.containers.case.deletedCases": "{totalCases, plural, =1 {\"{caseTitle}\"} other {{totalCases}件のケース}}を削除しました", - "xpack.securitySolution.containers.case.errorDeletingTitle": "データの削除エラー", - "xpack.securitySolution.containers.case.errorTitle": "データの取得中にエラーが発生", - "xpack.securitySolution.containers.case.pushToExternalService": "{ serviceName }への送信が正常に完了しました", - "xpack.securitySolution.containers.case.reopenedCases": "{totalCases, plural, =1 {\"{caseTitle}\"} other {{totalCases}件のケース}}を再オープンしました", - "xpack.securitySolution.containers.case.syncCase": "\"{caseTitle}\"のアラートが同期されました", - "xpack.securitySolution.containers.case.updatedCase": "\"{caseTitle}\"を更新しました", + "xpack.securitySolution.containers.cases.closedCases": "{totalCases, plural, =1 {\"{caseTitle}\"} other {{totalCases}件のケース}}をクローズしました", + "xpack.securitySolution.containers.cases.deletedCases": "{totalCases, plural, =1 {\"{caseTitle}\"} other {{totalCases}件のケース}}を削除しました", + "xpack.securitySolution.containers.cases.errorDeletingTitle": "データの削除エラー", + "xpack.securitySolution.containers.cases.errorTitle": "データの取得中にエラーが発生", + "xpack.securitySolution.containers.cases.pushToExternalService": "{ serviceName }への送信が正常に完了しました", + "xpack.securitySolution.containers.cases.reopenedCases": "{totalCases, plural, =1 {\"{caseTitle}\"} other {{totalCases}件のケース}}を再オープンしました", + "xpack.securitySolution.containers.cases.syncCase": "\"{caseTitle}\"のアラートが同期されました", + "xpack.securitySolution.containers.cases.updatedCase": "\"{caseTitle}\"を更新しました", "xpack.securitySolution.containers.detectionEngine.addRuleFailDescription": "ルールを追加できませんでした", "xpack.securitySolution.containers.detectionEngine.alerts.createListsIndex.errorDescription": "リストインデックスを作成できませんでした", "xpack.securitySolution.containers.detectionEngine.alerts.errorFetchingAlertsDescription": "アラートをクエリできませんでした", @@ -22209,7 +22206,7 @@ "xpack.triggersActionsUI.actionVariables.dateLabel": "アラートがアクションをスケジュールした日付。", "xpack.triggersActionsUI.alerts.breadcrumbTitle": "アラート", "xpack.triggersActionsUI.appName": "アラートとアクション", - "xpack.triggersActionsUI.case.configureCases.mappingFieldSummary": "まとめ", + "xpack.triggersActionsUI.cases.configureCases.mappingFieldSummary": "まとめ", "xpack.triggersActionsUI.checkActionTypeEnabled.actionTypeDisabledByConfigMessage": "このコネクターは Kibana の構成で無効になっています。", "xpack.triggersActionsUI.checkActionTypeEnabled.actionTypeDisabledByLicenseMessage": "このコネクターには {minimumLicenseRequired} ライセンスが必要です。", "xpack.triggersActionsUI.checkAlertTypeEnabled.alertTypeDisabledByLicenseMessage": "このアラートタイプには {minimumLicenseRequired} ライセンスが必要です。", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index e189c53adf8c3..e1f700ae2a556 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -4936,8 +4936,8 @@ "xpack.actions.actionTypeRegistry.get.missingActionTypeErrorMessage": "操作类型“{id}”未注册。", "xpack.actions.actionTypeRegistry.register.duplicateActionTypeErrorMessage": "操作类型“{id}”已注册。", "xpack.actions.appName": "操作", - "xpack.actions.builtin.case.jiraTitle": "Jira", - "xpack.actions.builtin.case.resilientTitle": "IBM Resilient", + "xpack.actions.builtin.cases.jiraTitle": "Jira", + "xpack.actions.builtin.cases.resilientTitle": "IBM Resilient", "xpack.actions.builtin.configuration.apiAllowedHostsError": "配置连接器操作时出错:{message}", "xpack.actions.builtin.email.customViewInKibanaMessage": "此消息由 Kibana 发送。[{kibanaFooterLinkText}]({link})。", "xpack.actions.builtin.email.errorSendingErrorMessage": "发送电子邮件时出错", @@ -6144,9 +6144,6 @@ "xpack.canvas.functions.axisConfig.invalidMinDateStringErrorMessage": "日期字符串无效:“{min}”。“min”必须是数值、以毫秒为单位的日期或 ISO8601 日期字符串", "xpack.canvas.functions.axisConfig.invalidPositionErrorMessage": "无效的位置:“{position}”", "xpack.canvas.functions.axisConfigHelpText": "配置可视化的轴。仅用于 {plotFn}。", - "xpack.canvas.functions.case.args.ifHelpText": "此值指示是否符合条件。当 {IF_ARG} 和 {WHEN_ARG} 参数都提供时,前者将覆盖后者。", - "xpack.canvas.functions.case.args.thenHelpText": "条件得到满足时返回的值。", - "xpack.canvas.functions.case.args.whenHelpText": "与 {CONTEXT} 比较以确定与其是否相等的值。同时指定 {WHEN_ARG} 时,将忽略 {IF_ARG}。", "xpack.canvas.functions.caseHelpText": "构建要传递给 {switchFn} 函数的 {case},包括条件/结果。", "xpack.canvas.functions.clearHelpText": "清除 {CONTEXT},然后返回 {TYPE_NULL}。", "xpack.canvas.functions.columns.args.excludeHelpText": "要从 {DATATABLE} 中移除的列名称逗号分隔列表。", @@ -7035,11 +7032,11 @@ "xpack.canvas.workpadTemplates.table.descriptionColumnTitle": "描述", "xpack.canvas.workpadTemplates.table.nameColumnTitle": "模板名称", "xpack.canvas.workpadTemplates.table.tagsColumnTitle": "标签", - "xpack.case.connectors.case.externalIncidentAdded": " (由 {user} 于 {date}添加) ", - "xpack.case.connectors.case.externalIncidentCreated": " (由 {user} 于 {date}创建) ", - "xpack.case.connectors.case.externalIncidentDefault": " (由 {user} 于 {date}创建) ", - "xpack.case.connectors.case.externalIncidentUpdated": " (由 {user} 于 {date}更新) ", - "xpack.case.connectors.case.title": "案例", + "xpack.cases.connectors.cases.externalIncidentAdded": " (由 {user} 于 {date}添加) ", + "xpack.cases.connectors.cases.externalIncidentCreated": " (由 {user} 于 {date}创建) ", + "xpack.cases.connectors.cases.externalIncidentDefault": " (由 {user} 于 {date}创建) ", + "xpack.cases.connectors.cases.externalIncidentUpdated": " (由 {user} 于 {date}更新) ", + "xpack.cases.connectors.cases.title": "案例", "xpack.cloud.deploymentLinkLabel": "管理此部署", "xpack.cloud.userMenuLinks.accountLinkText": "帐户和帐单", "xpack.cloud.userMenuLinks.profileLinkText": "云配置文件", @@ -18421,216 +18418,216 @@ "xpack.securitySolution.beatFields.errorSearchDescription": "获取 Beat 字段时发生错误", "xpack.securitySolution.beatFields.failSearchDescription": "无法对 Beat 字段执行搜索", "xpack.securitySolution.callouts.dismissButton": "关闭", - "xpack.securitySolution.case.allCases.actions": "操作", - "xpack.securitySolution.case.allCases.comments": "注释", - "xpack.securitySolution.case.allCases.noTagsAvailable": "没有可用标签", - "xpack.securitySolution.case.caseModal.title": "选择案例", - "xpack.securitySolution.case.caseSavedObjectNoPermissionsMessage": "要查看案例,必须对 Kibana 工作区中的已保存对象管理功能有权限。有关详细信息,请联系您的 Kibana 管理员。", - "xpack.securitySolution.case.caseSavedObjectNoPermissionsTitle": "需要 Kibana 功能权限", - "xpack.securitySolution.case.caseTable.addNewCase": "添加新案例", - "xpack.securitySolution.case.caseTable.bulkActions": "批处理操作", - "xpack.securitySolution.case.caseTable.bulkActions.closeSelectedTitle": "关闭所选", - "xpack.securitySolution.case.caseTable.bulkActions.deleteSelectedTitle": "删除所选", - "xpack.securitySolution.case.caseTable.bulkActions.openSelectedTitle": "重新打开所选", - "xpack.securitySolution.case.caseTable.caseDetailsLinkAria": "单击以访问标题为 {detailName} 的案例", - "xpack.securitySolution.case.caseTable.closed": "已关闭", - "xpack.securitySolution.case.caseTable.closedCases": "已关闭案例", - "xpack.securitySolution.case.caseTable.delete": "删除", - "xpack.securitySolution.case.caseTable.incidentSystem": "事件管理系统", - "xpack.securitySolution.case.caseTable.inProgressCases": "进行中的案例", - "xpack.securitySolution.case.caseTable.noCases.body": "没有可显示的案例。请创建新案例或在上面更改您的筛选设置。", - "xpack.securitySolution.case.caseTable.noCases.title": "无案例", - "xpack.securitySolution.case.caseTable.notPushed": "未推送", - "xpack.securitySolution.case.caseTable.openCases": "未结案例", - "xpack.securitySolution.case.caseTable.refreshTitle": "刷新", - "xpack.securitySolution.case.caseTable.requiresUpdate": " 需要更新", - "xpack.securitySolution.case.caseTable.searchAriaLabel": "搜索案例", - "xpack.securitySolution.case.caseTable.searchPlaceholder": "例如案例名", - "xpack.securitySolution.case.caseTable.selectedCasesTitle": "已选择 {totalRules} 个{totalRules, plural, other {案例}}", - "xpack.securitySolution.case.caseTable.serviceNowLinkAria": "单击可在 servicenow 上查看该事件", - "xpack.securitySolution.case.caseTable.showingCasesTitle": "正在显示 {totalRules} 个{totalRules, plural, other {案例}}", - "xpack.securitySolution.case.caseTable.snIncident": "外部事件", - "xpack.securitySolution.case.caseTable.status": "状态", - "xpack.securitySolution.case.caseTable.unit": "{totalCount, plural, other {案例}}", - "xpack.securitySolution.case.caseTable.upToDate": " 是最新的", - "xpack.securitySolution.case.caseView.actionHeadline": "{userName} 在 {actionDate}{actionName}", - "xpack.securitySolution.case.caseView.actionLabel.addComment": "添加了注释", - "xpack.securitySolution.case.caseView.actionLabel.addDescription": "添加了描述", - "xpack.securitySolution.case.caseView.actionLabel.addedField": "添加了", - "xpack.securitySolution.case.caseView.actionLabel.changededField": "更改了", - "xpack.securitySolution.case.caseView.actionLabel.editedField": "编辑了", - "xpack.securitySolution.case.caseView.actionLabel.on": "在", - "xpack.securitySolution.case.caseView.actionLabel.pushedNewIncident": "已推送为新事件", - "xpack.securitySolution.case.caseView.actionLabel.removedField": "移除了", - "xpack.securitySolution.case.caseView.actionLabel.removedThirdParty": "已移除外部事件管理系统", - "xpack.securitySolution.case.caseView.actionLabel.selectedThirdParty": "已选择 { thirdParty } 作为事件管理系统", - "xpack.securitySolution.case.caseView.actionLabel.updateIncident": "更新了事件", - "xpack.securitySolution.case.caseView.actionLabel.viewIncident": "查看 {incidentNumber}", - "xpack.securitySolution.case.caseView.alertCommentLabelTitle": "添加了告警,从", - "xpack.securitySolution.case.caseView.alertRuleDeletedLabelTitle": "添加了告警", - "xpack.securitySolution.case.caseView.alreadyPushedToExternalService": "已推送到 { externalService } 事件", - "xpack.securitySolution.case.caseView.appropiateLicense": "适当的许可证", - "xpack.securitySolution.case.caseView.backLabel": "返回到案例", - "xpack.securitySolution.case.caseView.breadcrumb": "创建", - "xpack.securitySolution.case.caseView.cancel": "取消", - "xpack.securitySolution.case.caseView.case": "案例", - "xpack.securitySolution.case.caseView.caseClosed": "案例已关闭", - "xpack.securitySolution.case.caseView.caseInProgress": "案例进行中", - "xpack.securitySolution.case.caseView.caseName": "案例名称", - "xpack.securitySolution.case.caseView.caseOpened": "案例已打开", - "xpack.securitySolution.case.caseView.caseRefresh": "刷新案例", - "xpack.securitySolution.case.caseView.closeCase": "关闭案例", - "xpack.securitySolution.case.caseView.closedOn": "关闭日期", - "xpack.securitySolution.case.caseView.cloudDeploymentLink": "云部署", - "xpack.securitySolution.case.caseView.comment": "注释", - "xpack.securitySolution.case.caseView.comment.addComment": "添加注释", - "xpack.securitySolution.case.caseView.comment.addCommentHelpText": "添加新注释......", - "xpack.securitySolution.case.caseView.commentFieldRequiredError": "注释必填。", - "xpack.securitySolution.case.caseView.connectorConfigureLink": "连接器", - "xpack.securitySolution.case.caseView.connectors": "外部事件管理系统", - "xpack.securitySolution.case.caseView.copyCommentLinkAria": "复制引用链接", - "xpack.securitySolution.case.caseView.create": "创建新案例", - "xpack.securitySolution.case.caseView.createCase": "创建案例", - "xpack.securitySolution.case.caseView.description": "描述", - "xpack.securitySolution.case.caseView.description.save": "保存", - "xpack.securitySolution.case.caseView.edit": "编辑", - "xpack.securitySolution.case.caseView.edit.comment": "编辑注释", - "xpack.securitySolution.case.caseView.edit.description": "编辑描述", - "xpack.securitySolution.case.caseView.edit.quote": "引述", - "xpack.securitySolution.case.caseView.editActionsLinkAria": "单击可查看所有操作", - "xpack.securitySolution.case.caseView.editConnector": "更改外部事件管理系统", - "xpack.securitySolution.case.caseView.editTagsLinkAria": "单击可编辑标签", - "xpack.securitySolution.case.caseView.emailBody": "案例参考:{caseUrl}", - "xpack.securitySolution.case.caseView.emailSubject": "Security 案例 - {caseTitle}", - "xpack.securitySolution.case.caseView.errorsPushServiceCallOutTitle": "要将案例发送到外部系统,您需要:", - "xpack.securitySolution.case.caseView.fieldChanged": "已更改连接器字段", - "xpack.securitySolution.case.caseView.fieldRequiredError": "必填字段", - "xpack.securitySolution.case.caseView.generatedAlertCommentLabelTitle": "添加自", - "xpack.securitySolution.case.caseView.generatedAlertCountCommentLabelTitle": "{totalCount} 个{totalCount, plural, other {告警}}", - "xpack.securitySolution.case.caseView.goToDocumentationButton": "查看文档", - "xpack.securitySolution.case.caseView.markedCaseAs": "将案例标记为", - "xpack.securitySolution.case.caseView.markInProgress": "标记为进行中", - "xpack.securitySolution.case.caseView.moveToCommentAria": "高亮显示引用的注释", - "xpack.securitySolution.case.caseView.name": "名称", - "xpack.securitySolution.case.caseView.noReportersAvailable": "没有报告者。", - "xpack.securitySolution.case.caseView.noTags": "当前没有为此案例分配标签。", - "xpack.securitySolution.case.caseView.openedOn": "打开时间", - "xpack.securitySolution.case.caseView.optional": "可选", - "xpack.securitySolution.case.caseView.particpantsLabel": "参与者", - "xpack.securitySolution.case.caseView.pushNamedIncident": "推送为 { thirdParty } 事件", - "xpack.securitySolution.case.caseView.pushThirdPartyIncident": "推送为外部事件", - "xpack.securitySolution.case.caseView.pushToServiceDisableBecauseCaseClosedDescription": "关闭的案例无法发送到外部系统。如果希望在外部系统中打开或更新案例,请重新打开案例。", - "xpack.securitySolution.case.caseView.pushToServiceDisableBecauseCaseClosedTitle": "重新打开案例", - "xpack.securitySolution.case.caseView.pushToServiceDisableByConfigDescription": "kibana.yml 文件已配置为仅允许特定连接器。要在外部系统中打开案例,请将 .[actionTypeId] (例如:.servicenow | .jira) 添加到 xpack.actions.enabledActiontypes 设置。有关更多信息,请参阅{link}。", - "xpack.securitySolution.case.caseView.pushToServiceDisableByConfigTitle": "在 Kibana 配置文件中启用外部服务", - "xpack.securitySolution.case.caseView.pushToServiceDisableByInvalidConnector": "用于将更新发送到外部服务的连接器已删除。要在外部系统中更新案例,请选择不同的连接器或创建新的连接器。", - "xpack.securitySolution.case.caseView.pushToServiceDisableByLicenseDescription": "有{appropriateLicense}、正使用{cloud}或正在免费试用时,可在外部系统中创建案例。", - "xpack.securitySolution.case.caseView.pushToServiceDisableByLicenseTitle": "升级适当的许可", - "xpack.securitySolution.case.caseView.pushToServiceDisableByNoCaseConfigDescription": "要在外部系统中打开和更新案例,必须为此案例选择外部事件管理系统。", - "xpack.securitySolution.case.caseView.pushToServiceDisableByNoCaseConfigTitle": "选择外部连接器", - "xpack.securitySolution.case.caseView.pushToServiceDisableByNoConfigTitle": "配置外部连接器", - "xpack.securitySolution.case.caseView.pushToServiceDisableByNoConnectors": "要在外部系统上打开和更新案例,必须配置{link}。", - "xpack.securitySolution.case.caseView.reopenCase": "重新打开案例", - "xpack.securitySolution.case.caseView.reporterLabel": "报告者", - "xpack.securitySolution.case.caseView.requiredUpdateToExternalService": "需要更新 { externalService } 事件", - "xpack.securitySolution.case.caseView.sendAlertToTimelineTooltip": "在时间线中调查", - "xpack.securitySolution.case.caseView.sendEmalLinkAria": "单击可向 {user} 发送电子邮件", - "xpack.securitySolution.case.caseView.showAlertTooltip": "显示告警详情", - "xpack.securitySolution.case.caseView.statusLabel": "状态", - "xpack.securitySolution.case.caseView.syncAlertsLabel": "同步告警", - "xpack.securitySolution.case.caseView.tags": "标签", - "xpack.securitySolution.case.caseView.to": "到", - "xpack.securitySolution.case.caseView.unknown": "未知", - "xpack.securitySolution.case.caseView.unknownRule.label": "未知规则", - "xpack.securitySolution.case.caseView.updateNamedIncident": "更新 { thirdParty } 事件", - "xpack.securitySolution.case.caseView.updateThirdPartyIncident": "更新外部事件", - "xpack.securitySolution.case.common.noConnector": "未选择任何连接器", - "xpack.securitySolution.case.components.connectors.case.actionTypeTitle": "案例", - "xpack.securitySolution.case.components.connectors.case.addNewCaseOption": "添加新案例", - "xpack.securitySolution.case.components.connectors.case.caseRequired": "必须选择策略。", - "xpack.securitySolution.case.components.connectors.case.casesDropdownPlaceholder": "选择案例", - "xpack.securitySolution.case.components.connectors.case.casesDropdownRowLabel": "案例", - "xpack.securitySolution.case.components.connectors.case.commentLabel": "注释", - "xpack.securitySolution.case.components.connectors.case.commentRequired": "“注释”必填。", - "xpack.securitySolution.case.components.connectors.case.connectedCaseLabel": "已连接案例", - "xpack.securitySolution.case.components.connectors.case.createCaseLabel": "创建案例", - "xpack.securitySolution.case.components.connectors.case.optionAddNewCase": "添加到新案例", - "xpack.securitySolution.case.components.connectors.case.optionAddToExistingCase": "添加到现有案例", - "xpack.securitySolution.case.components.connectors.case.selectMessageText": "创建或更新案例。", - "xpack.securitySolution.case.configure.errorGetFields": "从服务中获取字段时出错", - "xpack.securitySolution.case.configure.successSaveToast": "已保存外部连接设置", - "xpack.securitySolution.case.configureCases.addNewConnector": "添加新连接器", - "xpack.securitySolution.case.configureCases.blankMappings": "至少一个字段需映射到 { connectorName }", - "xpack.securitySolution.case.configureCases.cancelButton": "取消", - "xpack.securitySolution.case.configureCases.caseClosureOptionsClosedIncident": "在外部系统中关闭事件时自动关闭 Security 案例", - "xpack.securitySolution.case.configureCases.caseClosureOptionsDesc": "定义关闭 Security 案例的方式。要自动关闭案例,需要与外部事件管理系统建立连接。", - "xpack.securitySolution.case.configureCases.caseClosureOptionsLabel": "案例关闭选项", - "xpack.securitySolution.case.configureCases.caseClosureOptionsManual": "手动关闭 Security 案例", - "xpack.securitySolution.case.configureCases.caseClosureOptionsNewIncident": "将新事件推送到外部系统时自动关闭 Security 案例", - "xpack.securitySolution.case.configureCases.caseClosureOptionsTitle": "案例关闭", - "xpack.securitySolution.case.configureCases.commentMapping": "注释", - "xpack.securitySolution.case.configureCases.editFieldMappingTitle": "编辑 { thirdPartyName } 字段映射", - "xpack.securitySolution.case.configureCases.fieldMappingDesc": "将数据推送到 { thirdPartyName } 时,将 Security 案例字段映射到 { thirdPartyName } 字段。字段映射需要与 { thirdPartyName } 建立连接。", - "xpack.securitySolution.case.configureCases.fieldMappingDescErr": "字段映射需要与 { thirdPartyName } 建立连接。请检查您的连接凭据。", - "xpack.securitySolution.case.configureCases.fieldMappingEditAppend": "追加", - "xpack.securitySolution.case.configureCases.fieldMappingEditNothing": "无内容", - "xpack.securitySolution.case.configureCases.fieldMappingEditOverwrite": "覆盖", - "xpack.securitySolution.case.configureCases.fieldMappingFirstCol": "Security 案例字段", - "xpack.securitySolution.case.configureCases.fieldMappingSecondCol": "{ thirdPartyName } 字段", - "xpack.securitySolution.case.configureCases.fieldMappingThirdCol": "编辑和更新时", - "xpack.securitySolution.case.configureCases.fieldMappingTitle": "{ thirdPartyName } 字段映射", - "xpack.securitySolution.case.configureCases.headerTitle": "配置案例", - "xpack.securitySolution.case.configureCases.incidentManagementSystemDesc": "您可能会根据需要将 Security 案例连接到选择的外部事件管理系统。这将允许您将案例数据作为事件推送到所选第三方系统。", - "xpack.securitySolution.case.configureCases.incidentManagementSystemLabel": "事件管理系统", - "xpack.securitySolution.case.configureCases.incidentManagementSystemTitle": "连接到外部事件管理系统", - "xpack.securitySolution.case.configureCases.mappingFieldNotMapped": "未映射", - "xpack.securitySolution.case.configureCases.noFieldsError": "未找到任何 { connectorName } 字段。请检查您的 { connectorName } 连接器设置或 { connectorName } 实例设置以解决问题。", - "xpack.securitySolution.case.configureCases.requiredMappings": "至少有一个案例字段需要映射到以下所需的 { connectorName } 字段:{ fields }", - "xpack.securitySolution.case.configureCases.saveAndCloseButton": "保存并关闭", - "xpack.securitySolution.case.configureCases.saveButton": "保存", - "xpack.securitySolution.case.configureCases.updateConnector": "更新字段映射", - "xpack.securitySolution.case.configureCases.updateSelectedConnector": "更新 { connectorName }", - "xpack.securitySolution.case.configureCases.warningMessage": "选定的连接器已删除。选择不同的连接器或创建新的连接器。", - "xpack.securitySolution.case.configureCases.warningTitle": "警告", - "xpack.securitySolution.case.configureCasesButton": "编辑外部连接", - "xpack.securitySolution.case.confirmDeleteCase.confirmQuestion": "删除此案例即会永久移除所有相关案例数据,而且您将无法再将数据推送到外部事件管理系统。是否确定要继续?", - "xpack.securitySolution.case.confirmDeleteCase.confirmQuestionPlural": "删除这些案例即会永久移除所有相关案例数据,而且您将无法再将数据推送到外部事件管理系统。是否确定要继续?", - "xpack.securitySolution.case.confirmDeleteCase.deleteCase": "删除案例", - "xpack.securitySolution.case.confirmDeleteCase.deleteCases": "删除案例", - "xpack.securitySolution.case.confirmDeleteCase.deleteThisCase": "删除此案例", - "xpack.securitySolution.case.confirmDeleteCase.deleteTitle": "删除“{caseTitle}”", - "xpack.securitySolution.case.confirmDeleteCase.selectedCases": "删除选定案例", - "xpack.securitySolution.case.connectors.jira.issueTypesSelectFieldLabel": "问题类型", - "xpack.securitySolution.case.connectors.jira.parentIssueSearchLabel": "父问题", - "xpack.securitySolution.case.connectors.jira.prioritySelectFieldLabel": "优先级", - "xpack.securitySolution.case.connectors.resilient.incidentTypesLabel": "事件类型", - "xpack.securitySolution.case.connectors.resilient.incidentTypesPlaceholder": "选择类型", - "xpack.securitySolution.case.connectors.resilient.severityLabel": "严重性", - "xpack.securitySolution.case.connectors.resilient.unableToGetIncidentTypesMessage": "无法获取事件类型", - "xpack.securitySolution.case.connectors.resilient.unableToGetSeverityMessage": "无法获取严重性", - "xpack.securitySolution.case.containers.statusChangeToasterText": "此案例中的告警也更新了状态", - "xpack.securitySolution.case.createCase.descriptionFieldRequiredError": "描述必填。", - "xpack.securitySolution.case.createCase.fieldTagsHelpText": "为此案例键入一个或多个定制识别标签。在每个标签后按 Enter 键可开始新的标签。", - "xpack.securitySolution.case.createCase.titleFieldRequiredError": "标题必填。", - "xpack.securitySolution.case.dismissErrorsPushServiceCallOutTitle": "关闭", - "xpack.securitySolution.case.editConnector.editConnectorLinkAria": "单击以编辑连接器", - "xpack.securitySolution.case.pageTitle": "案例", - "xpack.securitySolution.case.readOnlySavedObjectDescription": "您仅有权查看案例。如果需要创建和更新案例,请联系您的 Kibana 管理员。", - "xpack.securitySolution.case.readOnlySavedObjectTitle": "您无法创建新案例或更新现有案例", - "xpack.securitySolution.case.settings.syncAlertsSwitchLabelOff": "关闭", - "xpack.securitySolution.case.settings.syncAlertsSwitchLabelOn": "开启", - "xpack.securitySolution.case.status.closed": "已关闭", - "xpack.securitySolution.case.status.iconAria": "更改状态", - "xpack.securitySolution.case.status.inProgress": "进行中", - "xpack.securitySolution.case.status.open": "未结", - "xpack.securitySolution.case.timeline.actions.addCase": "添加到案例", - "xpack.securitySolution.case.timeline.actions.addExistingCase": "添加到现有案例", - "xpack.securitySolution.case.timeline.actions.addNewCase": "添加到新案例", - "xpack.securitySolution.case.timeline.actions.addToCaseAriaLabel": "将告警附加到案例", - "xpack.securitySolution.case.timeline.actions.addToCaseTooltip": "添加到案例", - "xpack.securitySolution.case.timeline.actions.caseCreatedSuccessToast": "告警已添加到“{title}”", - "xpack.securitySolution.case.timeline.actions.caseCreatedSuccessToastText": "此案例中的告警的状态已经与案例状态同步", - "xpack.securitySolution.case.timeline.actions.caseCreatedSuccessToastViewCaseLink": "查看案例", + "xpack.securitySolution.cases.allCases.actions": "操作", + "xpack.securitySolution.cases.allCases.comments": "注释", + "xpack.securitySolution.cases.allCases.noTagsAvailable": "没有可用标签", + "xpack.securitySolution.cases.caseModal.title": "选择案例", + "xpack.securitySolution.cases.caseSavedObjectNoPermissionsMessage": "要查看案例,必须对 Kibana 工作区中的已保存对象管理功能有权限。有关详细信息,请联系您的 Kibana 管理员。", + "xpack.securitySolution.cases.caseSavedObjectNoPermissionsTitle": "需要 Kibana 功能权限", + "xpack.securitySolution.cases.caseTable.addNewCase": "添加新案例", + "xpack.securitySolution.cases.caseTable.bulkActions": "批处理操作", + "xpack.securitySolution.cases.caseTable.bulkActions.closeSelectedTitle": "关闭所选", + "xpack.securitySolution.cases.caseTable.bulkActions.deleteSelectedTitle": "删除所选", + "xpack.securitySolution.cases.caseTable.bulkActions.openSelectedTitle": "重新打开所选", + "xpack.securitySolution.cases.caseTable.caseDetailsLinkAria": "单击以访问标题为 {detailName} 的案例", + "xpack.securitySolution.cases.caseTable.closed": "已关闭", + "xpack.securitySolution.cases.caseTable.closedCases": "已关闭案例", + "xpack.securitySolution.cases.caseTable.delete": "删除", + "xpack.securitySolution.cases.caseTable.incidentSystem": "事件管理系统", + "xpack.securitySolution.cases.caseTable.inProgressCases": "进行中的案例", + "xpack.securitySolution.cases.caseTable.noCases.body": "没有可显示的案例。请创建新案例或在上面更改您的筛选设置。", + "xpack.securitySolution.cases.caseTable.noCases.title": "无案例", + "xpack.securitySolution.cases.caseTable.notPushed": "未推送", + "xpack.securitySolution.cases.caseTable.openCases": "未结案例", + "xpack.securitySolution.cases.caseTable.refreshTitle": "刷新", + "xpack.securitySolution.cases.caseTable.requiresUpdate": " 需要更新", + "xpack.securitySolution.cases.caseTable.searchAriaLabel": "搜索案例", + "xpack.securitySolution.cases.caseTable.searchPlaceholder": "例如案例名", + "xpack.securitySolution.cases.caseTable.selectedCasesTitle": "已选择 {totalRules} 个{totalRules, plural, other {案例}}", + "xpack.securitySolution.cases.caseTable.serviceNowLinkAria": "单击可在 servicenow 上查看该事件", + "xpack.securitySolution.cases.caseTable.showingCasesTitle": "正在显示 {totalRules} 个{totalRules, plural, other {案例}}", + "xpack.securitySolution.cases.caseTable.snIncident": "外部事件", + "xpack.securitySolution.cases.caseTable.status": "状态", + "xpack.securitySolution.cases.caseTable.unit": "{totalCount, plural, other {案例}}", + "xpack.securitySolution.cases.caseTable.upToDate": " 是最新的", + "xpack.securitySolution.cases.caseView.actionHeadline": "{userName} 在 {actionDate}{actionName}", + "xpack.securitySolution.cases.caseView.actionLabel.addComment": "添加了注释", + "xpack.securitySolution.cases.caseView.actionLabel.addDescription": "添加了描述", + "xpack.securitySolution.cases.caseView.actionLabel.addedField": "添加了", + "xpack.securitySolution.cases.caseView.actionLabel.changededField": "更改了", + "xpack.securitySolution.cases.caseView.actionLabel.editedField": "编辑了", + "xpack.securitySolution.cases.caseView.actionLabel.on": "在", + "xpack.securitySolution.cases.caseView.actionLabel.pushedNewIncident": "已推送为新事件", + "xpack.securitySolution.cases.caseView.actionLabel.removedField": "移除了", + "xpack.securitySolution.cases.caseView.actionLabel.removedThirdParty": "已移除外部事件管理系统", + "xpack.securitySolution.cases.caseView.actionLabel.selectedThirdParty": "已选择 { thirdParty } 作为事件管理系统", + "xpack.securitySolution.cases.caseView.actionLabel.updateIncident": "更新了事件", + "xpack.securitySolution.cases.caseView.actionLabel.viewIncident": "查看 {incidentNumber}", + "xpack.securitySolution.cases.caseView.alertCommentLabelTitle": "添加了告警,从", + "xpack.securitySolution.cases.caseView.alertRuleDeletedLabelTitle": "添加了告警", + "xpack.securitySolution.cases.caseView.alreadyPushedToExternalService": "已推送到 { externalService } 事件", + "xpack.securitySolution.cases.caseView.appropiateLicense": "适当的许可证", + "xpack.securitySolution.cases.caseView.backLabel": "返回到案例", + "xpack.securitySolution.cases.caseView.breadcrumb": "创建", + "xpack.securitySolution.cases.caseView.cancel": "取消", + "xpack.securitySolution.cases.caseView.case": "案例", + "xpack.securitySolution.cases.caseView.caseClosed": "案例已关闭", + "xpack.securitySolution.cases.caseView.caseInProgress": "案例进行中", + "xpack.securitySolution.cases.caseView.caseName": "案例名称", + "xpack.securitySolution.cases.caseView.caseOpened": "案例已打开", + "xpack.securitySolution.cases.caseView.caseRefresh": "刷新案例", + "xpack.securitySolution.cases.caseView.closeCase": "关闭案例", + "xpack.securitySolution.cases.caseView.closedOn": "关闭日期", + "xpack.securitySolution.cases.caseView.cloudDeploymentLink": "云部署", + "xpack.securitySolution.cases.caseView.comment": "注释", + "xpack.securitySolution.cases.caseView.comment.addComment": "添加注释", + "xpack.securitySolution.cases.caseView.comment.addCommentHelpText": "添加新注释......", + "xpack.securitySolution.cases.caseView.commentFieldRequiredError": "注释必填。", + "xpack.securitySolution.cases.caseView.connectorConfigureLink": "连接器", + "xpack.securitySolution.cases.caseView.connectors": "外部事件管理系统", + "xpack.securitySolution.cases.caseView.copyCommentLinkAria": "复制引用链接", + "xpack.securitySolution.cases.caseView.create": "创建新案例", + "xpack.securitySolution.cases.caseView.createCase": "创建案例", + "xpack.securitySolution.cases.caseView.description": "描述", + "xpack.securitySolution.cases.caseView.description.save": "保存", + "xpack.securitySolution.cases.caseView.edit": "编辑", + "xpack.securitySolution.cases.caseView.edit.comment": "编辑注释", + "xpack.securitySolution.cases.caseView.edit.description": "编辑描述", + "xpack.securitySolution.cases.caseView.edit.quote": "引述", + "xpack.securitySolution.cases.caseView.editActionsLinkAria": "单击可查看所有操作", + "xpack.securitySolution.cases.caseView.editConnector": "更改外部事件管理系统", + "xpack.securitySolution.cases.caseView.editTagsLinkAria": "单击可编辑标签", + "xpack.securitySolution.cases.caseView.emailBody": "案例参考:{caseUrl}", + "xpack.securitySolution.cases.caseView.emailSubject": "Security 案例 - {caseTitle}", + "xpack.securitySolution.cases.caseView.errorsPushServiceCallOutTitle": "要将案例发送到外部系统,您需要:", + "xpack.securitySolution.cases.caseView.fieldChanged": "已更改连接器字段", + "xpack.securitySolution.cases.caseView.fieldRequiredError": "必填字段", + "xpack.securitySolution.cases.caseView.generatedAlertCommentLabelTitle": "添加自", + "xpack.securitySolution.cases.caseView.generatedAlertCountCommentLabelTitle": "{totalCount} 个{totalCount, plural, other {告警}}", + "xpack.securitySolution.cases.caseView.goToDocumentationButton": "查看文档", + "xpack.securitySolution.cases.caseView.markedCaseAs": "将案例标记为", + "xpack.securitySolution.cases.caseView.markInProgress": "标记为进行中", + "xpack.securitySolution.cases.caseView.moveToCommentAria": "高亮显示引用的注释", + "xpack.securitySolution.cases.caseView.name": "名称", + "xpack.securitySolution.cases.caseView.noReportersAvailable": "没有报告者。", + "xpack.securitySolution.cases.caseView.noTags": "当前没有为此案例分配标签。", + "xpack.securitySolution.cases.caseView.openedOn": "打开时间", + "xpack.securitySolution.cases.caseView.optional": "可选", + "xpack.securitySolution.cases.caseView.particpantsLabel": "参与者", + "xpack.securitySolution.cases.caseView.pushNamedIncident": "推送为 { thirdParty } 事件", + "xpack.securitySolution.cases.caseView.pushThirdPartyIncident": "推送为外部事件", + "xpack.securitySolution.cases.caseView.pushToServiceDisableBecauseCaseClosedDescription": "关闭的案例无法发送到外部系统。如果希望在外部系统中打开或更新案例,请重新打开案例。", + "xpack.securitySolution.cases.caseView.pushToServiceDisableBecauseCaseClosedTitle": "重新打开案例", + "xpack.securitySolution.cases.caseView.pushToServiceDisableByConfigDescription": "kibana.yml 文件已配置为仅允许特定连接器。要在外部系统中打开案例,请将 .[actionTypeId] (例如:.servicenow | .jira) 添加到 xpack.actions.enabledActiontypes 设置。有关更多信息,请参阅{link}。", + "xpack.securitySolution.cases.caseView.pushToServiceDisableByConfigTitle": "在 Kibana 配置文件中启用外部服务", + "xpack.securitySolution.cases.caseView.pushToServiceDisableByInvalidConnector": "用于将更新发送到外部服务的连接器已删除。要在外部系统中更新案例,请选择不同的连接器或创建新的连接器。", + "xpack.securitySolution.cases.caseView.pushToServiceDisableByLicenseDescription": "有{appropriateLicense}、正使用{cloud}或正在免费试用时,可在外部系统中创建案例。", + "xpack.securitySolution.cases.caseView.pushToServiceDisableByLicenseTitle": "升级适当的许可", + "xpack.securitySolution.cases.caseView.pushToServiceDisableByNoCaseConfigDescription": "要在外部系统中打开和更新案例,必须为此案例选择外部事件管理系统。", + "xpack.securitySolution.cases.caseView.pushToServiceDisableByNoCaseConfigTitle": "选择外部连接器", + "xpack.securitySolution.cases.caseView.pushToServiceDisableByNoConfigTitle": "配置外部连接器", + "xpack.securitySolution.cases.caseView.pushToServiceDisableByNoConnectors": "要在外部系统上打开和更新案例,必须配置{link}。", + "xpack.securitySolution.cases.caseView.reopenCase": "重新打开案例", + "xpack.securitySolution.cases.caseView.reporterLabel": "报告者", + "xpack.securitySolution.cases.caseView.requiredUpdateToExternalService": "需要更新 { externalService } 事件", + "xpack.securitySolution.cases.caseView.sendAlertToTimelineTooltip": "在时间线中调查", + "xpack.securitySolution.cases.caseView.sendEmalLinkAria": "单击可向 {user} 发送电子邮件", + "xpack.securitySolution.cases.caseView.showAlertTooltip": "显示告警详情", + "xpack.securitySolution.cases.caseView.statusLabel": "状态", + "xpack.securitySolution.cases.caseView.syncAlertsLabel": "同步告警", + "xpack.securitySolution.cases.caseView.tags": "标签", + "xpack.securitySolution.cases.caseView.to": "到", + "xpack.securitySolution.cases.caseView.unknown": "未知", + "xpack.securitySolution.cases.caseView.unknownRule.label": "未知规则", + "xpack.securitySolution.cases.caseView.updateNamedIncident": "更新 { thirdParty } 事件", + "xpack.securitySolution.cases.caseView.updateThirdPartyIncident": "更新外部事件", + "xpack.securitySolution.cases.common.noConnector": "未选择任何连接器", + "xpack.securitySolution.cases.components.connectors.cases.actionTypeTitle": "案例", + "xpack.securitySolution.cases.components.connectors.cases.addNewCaseOption": "添加新案例", + "xpack.securitySolution.cases.components.connectors.cases.caseRequired": "必须选择策略。", + "xpack.securitySolution.cases.components.connectors.cases.casesDropdownPlaceholder": "选择案例", + "xpack.securitySolution.cases.components.connectors.cases.casesDropdownRowLabel": "案例", + "xpack.securitySolution.cases.components.connectors.cases.commentLabel": "注释", + "xpack.securitySolution.cases.components.connectors.cases.commentRequired": "“注释”必填。", + "xpack.securitySolution.cases.components.connectors.cases.connectedCaseLabel": "已连接案例", + "xpack.securitySolution.cases.components.connectors.cases.createCaseLabel": "创建案例", + "xpack.securitySolution.cases.components.connectors.cases.optionAddNewCase": "添加到新案例", + "xpack.securitySolution.cases.components.connectors.cases.optionAddToExistingCase": "添加到现有案例", + "xpack.securitySolution.cases.components.connectors.cases.selectMessageText": "创建或更新案例。", + "xpack.securitySolution.cases.configure.errorGetFields": "从服务中获取字段时出错", + "xpack.securitySolution.cases.configure.successSaveToast": "已保存外部连接设置", + "xpack.securitySolution.cases.configureCases.addNewConnector": "添加新连接器", + "xpack.securitySolution.cases.configureCases.blankMappings": "至少一个字段需映射到 { connectorName }", + "xpack.securitySolution.cases.configureCases.cancelButton": "取消", + "xpack.securitySolution.cases.configureCases.caseClosureOptionsClosedIncident": "在外部系统中关闭事件时自动关闭 Security 案例", + "xpack.securitySolution.cases.configureCases.caseClosureOptionsDesc": "定义关闭 Security 案例的方式。要自动关闭案例,需要与外部事件管理系统建立连接。", + "xpack.securitySolution.cases.configureCases.caseClosureOptionsLabel": "案例关闭选项", + "xpack.securitySolution.cases.configureCases.caseClosureOptionsManual": "手动关闭 Security 案例", + "xpack.securitySolution.cases.configureCases.caseClosureOptionsNewIncident": "将新事件推送到外部系统时自动关闭 Security 案例", + "xpack.securitySolution.cases.configureCases.caseClosureOptionsTitle": "案例关闭", + "xpack.securitySolution.cases.configureCases.commentMapping": "注释", + "xpack.securitySolution.cases.configureCases.editFieldMappingTitle": "编辑 { thirdPartyName } 字段映射", + "xpack.securitySolution.cases.configureCases.fieldMappingDesc": "将数据推送到 { thirdPartyName } 时,将 Security 案例字段映射到 { thirdPartyName } 字段。字段映射需要与 { thirdPartyName } 建立连接。", + "xpack.securitySolution.cases.configureCases.fieldMappingDescErr": "字段映射需要与 { thirdPartyName } 建立连接。请检查您的连接凭据。", + "xpack.securitySolution.cases.configureCases.fieldMappingEditAppend": "追加", + "xpack.securitySolution.cases.configureCases.fieldMappingEditNothing": "无内容", + "xpack.securitySolution.cases.configureCases.fieldMappingEditOverwrite": "覆盖", + "xpack.securitySolution.cases.configureCases.fieldMappingFirstCol": "Security 案例字段", + "xpack.securitySolution.cases.configureCases.fieldMappingSecondCol": "{ thirdPartyName } 字段", + "xpack.securitySolution.cases.configureCases.fieldMappingThirdCol": "编辑和更新时", + "xpack.securitySolution.cases.configureCases.fieldMappingTitle": "{ thirdPartyName } 字段映射", + "xpack.securitySolution.cases.configureCases.headerTitle": "配置案例", + "xpack.securitySolution.cases.configureCases.incidentManagementSystemDesc": "您可能会根据需要将 Security 案例连接到选择的外部事件管理系统。这将允许您将案例数据作为事件推送到所选第三方系统。", + "xpack.securitySolution.cases.configureCases.incidentManagementSystemLabel": "事件管理系统", + "xpack.securitySolution.cases.configureCases.incidentManagementSystemTitle": "连接到外部事件管理系统", + "xpack.securitySolution.cases.configureCases.mappingFieldNotMapped": "未映射", + "xpack.securitySolution.cases.configureCases.noFieldsError": "未找到任何 { connectorName } 字段。请检查您的 { connectorName } 连接器设置或 { connectorName } 实例设置以解决问题。", + "xpack.securitySolution.cases.configureCases.requiredMappings": "至少有一个案例字段需要映射到以下所需的 { connectorName } 字段:{ fields }", + "xpack.securitySolution.cases.configureCases.saveAndCloseButton": "保存并关闭", + "xpack.securitySolution.cases.configureCases.saveButton": "保存", + "xpack.securitySolution.cases.configureCases.updateConnector": "更新字段映射", + "xpack.securitySolution.cases.configureCases.updateSelectedConnector": "更新 { connectorName }", + "xpack.securitySolution.cases.configureCases.warningMessage": "选定的连接器已删除。选择不同的连接器或创建新的连接器。", + "xpack.securitySolution.cases.configureCases.warningTitle": "警告", + "xpack.securitySolution.cases.configureCasesButton": "编辑外部连接", + "xpack.securitySolution.cases.confirmDeleteCase.confirmQuestion": "删除此案例即会永久移除所有相关案例数据,而且您将无法再将数据推送到外部事件管理系统。是否确定要继续?", + "xpack.securitySolution.cases.confirmDeleteCase.confirmQuestionPlural": "删除这些案例即会永久移除所有相关案例数据,而且您将无法再将数据推送到外部事件管理系统。是否确定要继续?", + "xpack.securitySolution.cases.confirmDeleteCase.deleteCase": "删除案例", + "xpack.securitySolution.cases.confirmDeleteCase.deleteCases": "删除案例", + "xpack.securitySolution.cases.confirmDeleteCase.deleteThisCase": "删除此案例", + "xpack.securitySolution.cases.confirmDeleteCase.deleteTitle": "删除“{caseTitle}”", + "xpack.securitySolution.cases.confirmDeleteCase.selectedCases": "删除选定案例", + "xpack.securitySolution.cases.connectors.jira.issueTypesSelectFieldLabel": "问题类型", + "xpack.securitySolution.cases.connectors.jira.parentIssueSearchLabel": "父问题", + "xpack.securitySolution.cases.connectors.jira.prioritySelectFieldLabel": "优先级", + "xpack.securitySolution.cases.connectors.resilient.incidentTypesLabel": "事件类型", + "xpack.securitySolution.cases.connectors.resilient.incidentTypesPlaceholder": "选择类型", + "xpack.securitySolution.cases.connectors.resilient.severityLabel": "严重性", + "xpack.securitySolution.cases.connectors.resilient.unableToGetIncidentTypesMessage": "无法获取事件类型", + "xpack.securitySolution.cases.connectors.resilient.unableToGetSeverityMessage": "无法获取严重性", + "xpack.securitySolution.cases.containers.statusChangeToasterText": "此案例中的告警也更新了状态", + "xpack.securitySolution.cases.createCase.descriptionFieldRequiredError": "描述必填。", + "xpack.securitySolution.cases.createCase.fieldTagsHelpText": "为此案例键入一个或多个定制识别标签。在每个标签后按 Enter 键可开始新的标签。", + "xpack.securitySolution.cases.createCase.titleFieldRequiredError": "标题必填。", + "xpack.securitySolution.cases.dismissErrorsPushServiceCallOutTitle": "关闭", + "xpack.securitySolution.cases.editConnector.editConnectorLinkAria": "单击以编辑连接器", + "xpack.securitySolution.cases.pageTitle": "案例", + "xpack.securitySolution.cases.readOnlySavedObjectDescription": "您仅有权查看案例。如果需要创建和更新案例,请联系您的 Kibana 管理员。", + "xpack.securitySolution.cases.readOnlySavedObjectTitle": "您无法创建新案例或更新现有案例", + "xpack.securitySolution.cases.settings.syncAlertsSwitchLabelOff": "关闭", + "xpack.securitySolution.cases.settings.syncAlertsSwitchLabelOn": "开启", + "xpack.securitySolution.cases.status.closed": "已关闭", + "xpack.securitySolution.cases.status.iconAria": "更改状态", + "xpack.securitySolution.cases.status.inProgress": "进行中", + "xpack.securitySolution.cases.status.open": "未结", + "xpack.securitySolution.cases.timeline.actions.addCase": "添加到案例", + "xpack.securitySolution.cases.timeline.actions.addExistingCase": "添加到现有案例", + "xpack.securitySolution.cases.timeline.actions.addNewCase": "添加到新案例", + "xpack.securitySolution.cases.timeline.actions.addToCaseAriaLabel": "将告警附加到案例", + "xpack.securitySolution.cases.timeline.actions.addToCaseTooltip": "添加到案例", + "xpack.securitySolution.cases.timeline.actions.caseCreatedSuccessToast": "告警已添加到“{title}”", + "xpack.securitySolution.cases.timeline.actions.caseCreatedSuccessToastText": "此案例中的告警的状态已经与案例状态同步", + "xpack.securitySolution.cases.timeline.actions.caseCreatedSuccessToastViewCaseLink": "查看案例", "xpack.securitySolution.caseConnectorsRegistry.get.missingCaseConnectorErrorMessage": "对象类型“{id}”未注册。", "xpack.securitySolution.caseConnectorsRegistry.register.duplicateCaseConnectorErrorMessage": "已注册对象类型“{id}”。", "xpack.securitySolution.certificate.fingerprint.clientCertLabel": "客户端证书", @@ -18746,14 +18743,14 @@ "xpack.securitySolution.containers.anomalies.errorFetchingAnomaliesData": "无法查询异常数据", "xpack.securitySolution.containers.anomalies.stackByJobId": "作业", "xpack.securitySolution.containers.anomalies.title": "异常", - "xpack.securitySolution.containers.case.closedCases": "已关闭{totalCases, plural, =1 {“{caseTitle}”} other { {totalCases} 个案例}}", - "xpack.securitySolution.containers.case.deletedCases": "已删除{totalCases, plural, =1 {“{caseTitle}”} other { {totalCases} 个案例}}", - "xpack.securitySolution.containers.case.errorDeletingTitle": "删除数据时出错", - "xpack.securitySolution.containers.case.errorTitle": "提取数据时出错", - "xpack.securitySolution.containers.case.pushToExternalService": "已成功发送到 { serviceName }", - "xpack.securitySolution.containers.case.reopenedCases": "已重新打开{totalCases, plural, =1 {“{caseTitle}”} other { {totalCases} 个案例}}", - "xpack.securitySolution.containers.case.syncCase": "“{caseTitle}”中的告警已同步", - "xpack.securitySolution.containers.case.updatedCase": "已更新“{caseTitle}”", + "xpack.securitySolution.containers.cases.closedCases": "已关闭{totalCases, plural, =1 {“{caseTitle}”} other { {totalCases} 个案例}}", + "xpack.securitySolution.containers.cases.deletedCases": "已删除{totalCases, plural, =1 {“{caseTitle}”} other { {totalCases} 个案例}}", + "xpack.securitySolution.containers.cases.errorDeletingTitle": "删除数据时出错", + "xpack.securitySolution.containers.cases.errorTitle": "提取数据时出错", + "xpack.securitySolution.containers.cases.pushToExternalService": "已成功发送到 { serviceName }", + "xpack.securitySolution.containers.cases.reopenedCases": "已重新打开{totalCases, plural, =1 {“{caseTitle}”} other { {totalCases} 个案例}}", + "xpack.securitySolution.containers.cases.syncCase": "“{caseTitle}”中的告警已同步", + "xpack.securitySolution.containers.cases.updatedCase": "已更新“{caseTitle}”", "xpack.securitySolution.containers.detectionEngine.addRuleFailDescription": "无法添加规则", "xpack.securitySolution.containers.detectionEngine.alerts.createListsIndex.errorDescription": "无法创建列表索引", "xpack.securitySolution.containers.detectionEngine.alerts.errorFetchingAlertsDescription": "无法查询告警", @@ -22561,7 +22558,7 @@ "xpack.triggersActionsUI.actionVariables.dateLabel": "告警计划操作的日期。", "xpack.triggersActionsUI.alerts.breadcrumbTitle": "告警", "xpack.triggersActionsUI.appName": "告警和操作", - "xpack.triggersActionsUI.case.configureCases.mappingFieldSummary": "摘要", + "xpack.triggersActionsUI.cases.configureCases.mappingFieldSummary": "摘要", "xpack.triggersActionsUI.checkActionTypeEnabled.actionTypeDisabledByConfigMessage": "连接器已由 Kibana 配置禁用。", "xpack.triggersActionsUI.checkActionTypeEnabled.actionTypeDisabledByLicenseMessage": "此连接器需要{minimumLicenseRequired}许可证。", "xpack.triggersActionsUI.checkAlertTypeEnabled.alertTypeDisabledByLicenseMessage": "此告警类型需要{minimumLicenseRequired}许可证。", diff --git a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/jira/translations.ts b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/jira/translations.ts index fe7ea61e68193..76dbe96f44f71 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/jira/translations.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/jira/translations.ts @@ -115,7 +115,7 @@ export const JIRA_API_TOKEN_REQUIRED = i18n.translate( ); export const MAPPING_FIELD_SUMMARY = i18n.translate( - 'xpack.triggersActionsUI.case.configureCases.mappingFieldSummary', + 'xpack.triggersActionsUI.cases.configureCases.mappingFieldSummary', { defaultMessage: 'Summary', } diff --git a/x-pack/test/case_api_integration/basic/tests/cases/comments/delete_comment.ts b/x-pack/test/case_api_integration/basic/tests/cases/comments/delete_comment.ts index c58ca0242a5b5..7cb66b6815b98 100644 --- a/x-pack/test/case_api_integration/basic/tests/cases/comments/delete_comment.ts +++ b/x-pack/test/case_api_integration/basic/tests/cases/comments/delete_comment.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../../common/ftr_provider_context'; -import { CASES_URL } from '../../../../../../plugins/case/common/constants'; +import { CASES_URL } from '../../../../../../plugins/cases/common/constants'; import { postCaseReq, postCommentUserReq } from '../../../../common/lib/mock'; import { createCaseAction, diff --git a/x-pack/test/case_api_integration/basic/tests/cases/comments/find_comments.ts b/x-pack/test/case_api_integration/basic/tests/cases/comments/find_comments.ts index 2d8e4c44e023e..7bbc8e344ee23 100644 --- a/x-pack/test/case_api_integration/basic/tests/cases/comments/find_comments.ts +++ b/x-pack/test/case_api_integration/basic/tests/cases/comments/find_comments.ts @@ -8,8 +8,8 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../../common/ftr_provider_context'; -import { CASES_URL } from '../../../../../../plugins/case/common/constants'; -import { CommentsResponse, CommentType } from '../../../../../../plugins/case/common/api'; +import { CASES_URL } from '../../../../../../plugins/cases/common/constants'; +import { CommentsResponse, CommentType } from '../../../../../../plugins/cases/common/api'; import { postCaseReq, postCommentUserReq } from '../../../../common/lib/mock'; import { createCaseAction, diff --git a/x-pack/test/case_api_integration/basic/tests/cases/comments/get_all_comments.ts b/x-pack/test/case_api_integration/basic/tests/cases/comments/get_all_comments.ts index 264103a2052e5..723c9eba33beb 100644 --- a/x-pack/test/case_api_integration/basic/tests/cases/comments/get_all_comments.ts +++ b/x-pack/test/case_api_integration/basic/tests/cases/comments/get_all_comments.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../../common/ftr_provider_context'; -import { CASES_URL } from '../../../../../../plugins/case/common/constants'; +import { CASES_URL } from '../../../../../../plugins/cases/common/constants'; import { postCaseReq, postCommentUserReq } from '../../../../common/lib/mock'; import { createCaseAction, @@ -16,7 +16,7 @@ import { deleteAllCaseItems, deleteCaseAction, } from '../../../../common/lib/utils'; -import { CommentType } from '../../../../../../plugins/case/common/api'; +import { CommentType } from '../../../../../../plugins/cases/common/api'; // eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext): void => { diff --git a/x-pack/test/case_api_integration/basic/tests/cases/comments/get_comment.ts b/x-pack/test/case_api_integration/basic/tests/cases/comments/get_comment.ts index bf63c55938dfe..1a1bb727bd429 100644 --- a/x-pack/test/case_api_integration/basic/tests/cases/comments/get_comment.ts +++ b/x-pack/test/case_api_integration/basic/tests/cases/comments/get_comment.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../../common/ftr_provider_context'; -import { CASES_URL } from '../../../../../../plugins/case/common/constants'; +import { CASES_URL } from '../../../../../../plugins/cases/common/constants'; import { postCaseReq, postCommentUserReq } from '../../../../common/lib/mock'; import { createCaseAction, @@ -16,7 +16,7 @@ import { deleteAllCaseItems, deleteCaseAction, } from '../../../../common/lib/utils'; -import { CommentResponse, CommentType } from '../../../../../../plugins/case/common/api'; +import { CommentResponse, CommentType } from '../../../../../../plugins/cases/common/api'; // eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext): void => { diff --git a/x-pack/test/case_api_integration/basic/tests/cases/comments/migrations.ts b/x-pack/test/case_api_integration/basic/tests/cases/comments/migrations.ts index ba677602ac570..264ac2a0898e0 100644 --- a/x-pack/test/case_api_integration/basic/tests/cases/comments/migrations.ts +++ b/x-pack/test/case_api_integration/basic/tests/cases/comments/migrations.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../../common/ftr_provider_context'; -import { CASES_URL } from '../../../../../../plugins/case/common/constants'; +import { CASES_URL } from '../../../../../../plugins/cases/common/constants'; // eslint-disable-next-line import/no-default-export export default function createGetTests({ getService }: FtrProviderContext) { diff --git a/x-pack/test/case_api_integration/basic/tests/cases/comments/patch_comment.ts b/x-pack/test/case_api_integration/basic/tests/cases/comments/patch_comment.ts index 6d9962e938249..bddc620535dda 100644 --- a/x-pack/test/case_api_integration/basic/tests/cases/comments/patch_comment.ts +++ b/x-pack/test/case_api_integration/basic/tests/cases/comments/patch_comment.ts @@ -9,8 +9,8 @@ import { omit } from 'lodash/fp'; import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../../common/ftr_provider_context'; -import { CASES_URL } from '../../../../../../plugins/case/common/constants'; -import { CaseResponse, CommentType } from '../../../../../../plugins/case/common/api'; +import { CASES_URL } from '../../../../../../plugins/cases/common/constants'; +import { CaseResponse, CommentType } from '../../../../../../plugins/cases/common/api'; import { defaultUser, postCaseReq, diff --git a/x-pack/test/case_api_integration/basic/tests/cases/comments/post_comment.ts b/x-pack/test/case_api_integration/basic/tests/cases/comments/post_comment.ts index 9447f7ad3613c..5e48e39164e6b 100644 --- a/x-pack/test/case_api_integration/basic/tests/cases/comments/post_comment.ts +++ b/x-pack/test/case_api_integration/basic/tests/cases/comments/post_comment.ts @@ -9,9 +9,9 @@ import { omit } from 'lodash/fp'; import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../../common/ftr_provider_context'; -import { CASES_URL } from '../../../../../../plugins/case/common/constants'; +import { CASES_URL } from '../../../../../../plugins/cases/common/constants'; import { DETECTION_ENGINE_QUERY_SIGNALS_URL } from '../../../../../../plugins/security_solution/common/constants'; -import { CommentsResponse, CommentType } from '../../../../../../plugins/case/common/api'; +import { CommentsResponse, CommentType } from '../../../../../../plugins/cases/common/api'; import { defaultUser, postCaseReq, diff --git a/x-pack/test/case_api_integration/basic/tests/cases/delete_cases.ts b/x-pack/test/case_api_integration/basic/tests/cases/delete_cases.ts index 5e761e4d7e33a..b5187931a9f01 100644 --- a/x-pack/test/case_api_integration/basic/tests/cases/delete_cases.ts +++ b/x-pack/test/case_api_integration/basic/tests/cases/delete_cases.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../common/ftr_provider_context'; -import { CASES_URL } from '../../../../../plugins/case/common/constants'; +import { CASES_URL } from '../../../../../plugins/cases/common/constants'; import { postCaseReq, postCommentUserReq } from '../../../common/lib/mock'; import { createCaseAction, @@ -19,8 +19,8 @@ import { deleteCasesUserActions, deleteComments, } from '../../../common/lib/utils'; -import { getSubCaseDetailsUrl } from '../../../../../plugins/case/common/api/helpers'; -import { CaseResponse } from '../../../../../plugins/case/common/api'; +import { getSubCaseDetailsUrl } from '../../../../../plugins/cases/common/api/helpers'; +import { CaseResponse } from '../../../../../plugins/cases/common/api'; // eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext): void => { diff --git a/x-pack/test/case_api_integration/basic/tests/cases/find_cases.ts b/x-pack/test/case_api_integration/basic/tests/cases/find_cases.ts index 6791c9d1c9e71..b808ff4ccdf35 100644 --- a/x-pack/test/case_api_integration/basic/tests/cases/find_cases.ts +++ b/x-pack/test/case_api_integration/basic/tests/cases/find_cases.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../common/ftr_provider_context'; -import { CASES_URL, SUB_CASES_PATCH_DEL_URL } from '../../../../../plugins/case/common/constants'; +import { CASES_URL, SUB_CASES_PATCH_DEL_URL } from '../../../../../plugins/cases/common/constants'; import { postCaseReq, postCommentUserReq, findCasesResp } from '../../../common/lib/mock'; import { deleteAllCaseItems, @@ -18,7 +18,7 @@ import { createCaseAction, deleteCaseAction, } from '../../../common/lib/utils'; -import { CasesFindResponse, CaseStatuses, CaseType } from '../../../../../plugins/case/common/api'; +import { CasesFindResponse, CaseStatuses, CaseType } from '../../../../../plugins/cases/common/api'; // eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext): void => { diff --git a/x-pack/test/case_api_integration/basic/tests/cases/get_case.ts b/x-pack/test/case_api_integration/basic/tests/cases/get_case.ts index c0d937f53d6c3..fb4ab2c86469a 100644 --- a/x-pack/test/case_api_integration/basic/tests/cases/get_case.ts +++ b/x-pack/test/case_api_integration/basic/tests/cases/get_case.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../common/ftr_provider_context'; -import { CASES_URL } from '../../../../../plugins/case/common/constants'; +import { CASES_URL } from '../../../../../plugins/cases/common/constants'; import { postCaseReq, postCaseResp, diff --git a/x-pack/test/case_api_integration/basic/tests/cases/migrations.ts b/x-pack/test/case_api_integration/basic/tests/cases/migrations.ts index e66b623138e60..abbb749a2aaca 100644 --- a/x-pack/test/case_api_integration/basic/tests/cases/migrations.ts +++ b/x-pack/test/case_api_integration/basic/tests/cases/migrations.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../common/ftr_provider_context'; -import { CASES_URL } from '../../../../../plugins/case/common/constants'; +import { CASES_URL } from '../../../../../plugins/cases/common/constants'; // eslint-disable-next-line import/no-default-export export default function createGetTests({ getService }: FtrProviderContext) { diff --git a/x-pack/test/case_api_integration/basic/tests/cases/patch_cases.ts b/x-pack/test/case_api_integration/basic/tests/cases/patch_cases.ts index b41f77fc42e05..950fde37e3078 100644 --- a/x-pack/test/case_api_integration/basic/tests/cases/patch_cases.ts +++ b/x-pack/test/case_api_integration/basic/tests/cases/patch_cases.ts @@ -8,14 +8,14 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../common/ftr_provider_context'; -import { CASES_URL } from '../../../../../plugins/case/common/constants'; +import { CASES_URL } from '../../../../../plugins/cases/common/constants'; import { DETECTION_ENGINE_QUERY_SIGNALS_URL } from '../../../../../plugins/security_solution/common/constants'; import { CasesResponse, CaseStatuses, CaseType, CommentType, -} from '../../../../../plugins/case/common/api'; +} from '../../../../../plugins/cases/common/api'; import { defaultUser, postCaseReq, diff --git a/x-pack/test/case_api_integration/basic/tests/cases/post_case.ts b/x-pack/test/case_api_integration/basic/tests/cases/post_case.ts index 20574ffbc2f4a..5de5644ccf68a 100644 --- a/x-pack/test/case_api_integration/basic/tests/cases/post_case.ts +++ b/x-pack/test/case_api_integration/basic/tests/cases/post_case.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../common/ftr_provider_context'; -import { CASES_URL } from '../../../../../plugins/case/common/constants'; +import { CASES_URL } from '../../../../../plugins/cases/common/constants'; import { postCaseReq, postCaseResp, diff --git a/x-pack/test/case_api_integration/basic/tests/cases/push_case.ts b/x-pack/test/case_api_integration/basic/tests/cases/push_case.ts index ea5cd9c7c5020..2db15eb603f7c 100644 --- a/x-pack/test/case_api_integration/basic/tests/cases/push_case.ts +++ b/x-pack/test/case_api_integration/basic/tests/cases/push_case.ts @@ -9,7 +9,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../common/ftr_provider_context'; import { ObjectRemover as ActionsRemover } from '../../../../alerting_api_integration/common/lib'; -import { CASE_CONFIGURE_URL, CASES_URL } from '../../../../../plugins/case/common/constants'; +import { CASE_CONFIGURE_URL, CASES_URL } from '../../../../../plugins/cases/common/constants'; import { postCaseReq, defaultUser, @@ -28,7 +28,7 @@ import { ExternalServiceSimulator, getExternalServiceSimulatorPath, } from '../../../../alerting_api_integration/common/fixtures/plugins/actions_simulators/server/plugin'; -import { CaseStatuses } from '../../../../../plugins/case/common/api'; +import { CaseStatuses } from '../../../../../plugins/cases/common/api'; // eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext): void => { diff --git a/x-pack/test/case_api_integration/basic/tests/cases/reporters/get_reporters.ts b/x-pack/test/case_api_integration/basic/tests/cases/reporters/get_reporters.ts index c9981115f5dd9..c51bfda5bd8b0 100644 --- a/x-pack/test/case_api_integration/basic/tests/cases/reporters/get_reporters.ts +++ b/x-pack/test/case_api_integration/basic/tests/cases/reporters/get_reporters.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../../common/ftr_provider_context'; -import { CASES_URL, CASE_REPORTERS_URL } from '../../../../../../plugins/case/common/constants'; +import { CASES_URL, CASE_REPORTERS_URL } from '../../../../../../plugins/cases/common/constants'; import { defaultUser, postCaseReq } from '../../../../common/lib/mock'; import { deleteCases } from '../../../../common/lib/utils'; diff --git a/x-pack/test/case_api_integration/basic/tests/cases/status/get_status.ts b/x-pack/test/case_api_integration/basic/tests/cases/status/get_status.ts index 5312649860275..1657293953246 100644 --- a/x-pack/test/case_api_integration/basic/tests/cases/status/get_status.ts +++ b/x-pack/test/case_api_integration/basic/tests/cases/status/get_status.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../../common/ftr_provider_context'; -import { CASES_URL, CASE_STATUS_URL } from '../../../../../../plugins/case/common/constants'; +import { CASES_URL, CASE_STATUS_URL } from '../../../../../../plugins/cases/common/constants'; import { postCaseReq } from '../../../../common/lib/mock'; import { deleteCases } from '../../../../common/lib/utils'; diff --git a/x-pack/test/case_api_integration/basic/tests/cases/sub_cases/delete_sub_cases.ts b/x-pack/test/case_api_integration/basic/tests/cases/sub_cases/delete_sub_cases.ts index 1d8216ded8b7c..d179120cd3d85 100644 --- a/x-pack/test/case_api_integration/basic/tests/cases/sub_cases/delete_sub_cases.ts +++ b/x-pack/test/case_api_integration/basic/tests/cases/sub_cases/delete_sub_cases.ts @@ -10,7 +10,7 @@ import { FtrProviderContext } from '../../../../common/ftr_provider_context'; import { CASES_URL, SUB_CASES_PATCH_DEL_URL, -} from '../../../../../../plugins/case/common/constants'; +} from '../../../../../../plugins/cases/common/constants'; import { postCommentUserReq } from '../../../../common/lib/mock'; import { createCaseAction, @@ -18,8 +18,8 @@ import { deleteAllCaseItems, deleteCaseAction, } from '../../../../common/lib/utils'; -import { getSubCaseDetailsUrl } from '../../../../../../plugins/case/common/api/helpers'; -import { CaseResponse } from '../../../../../../plugins/case/common/api'; +import { getSubCaseDetailsUrl } from '../../../../../../plugins/cases/common/api/helpers'; +import { CaseResponse } from '../../../../../../plugins/cases/common/api'; // eslint-disable-next-line import/no-default-export export default function ({ getService }: FtrProviderContext) { diff --git a/x-pack/test/case_api_integration/basic/tests/cases/sub_cases/find_sub_cases.ts b/x-pack/test/case_api_integration/basic/tests/cases/sub_cases/find_sub_cases.ts index 4fd4cd6ec7542..2c1bd9c7bd883 100644 --- a/x-pack/test/case_api_integration/basic/tests/cases/sub_cases/find_sub_cases.ts +++ b/x-pack/test/case_api_integration/basic/tests/cases/sub_cases/find_sub_cases.ts @@ -16,13 +16,13 @@ import { deleteCaseAction, setStatus, } from '../../../../common/lib/utils'; -import { getSubCasesUrl } from '../../../../../../plugins/case/common/api/helpers'; +import { getSubCasesUrl } from '../../../../../../plugins/cases/common/api/helpers'; import { CaseResponse, CaseStatuses, SubCasesFindResponse, -} from '../../../../../../plugins/case/common/api'; -import { CASES_URL } from '../../../../../../plugins/case/common/constants'; +} from '../../../../../../plugins/cases/common/api'; +import { CASES_URL } from '../../../../../../plugins/cases/common/constants'; // eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext): void => { diff --git a/x-pack/test/case_api_integration/basic/tests/cases/sub_cases/get_sub_case.ts b/x-pack/test/case_api_integration/basic/tests/cases/sub_cases/get_sub_case.ts index dff462d78ba82..440731cd07fe7 100644 --- a/x-pack/test/case_api_integration/basic/tests/cases/sub_cases/get_sub_case.ts +++ b/x-pack/test/case_api_integration/basic/tests/cases/sub_cases/get_sub_case.ts @@ -25,12 +25,12 @@ import { import { getCaseCommentsUrl, getSubCaseDetailsUrl, -} from '../../../../../../plugins/case/common/api/helpers'; +} from '../../../../../../plugins/cases/common/api/helpers'; import { AssociationType, CaseResponse, SubCaseResponse, -} from '../../../../../../plugins/case/common/api'; +} from '../../../../../../plugins/cases/common/api'; // eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext): void => { diff --git a/x-pack/test/case_api_integration/basic/tests/cases/sub_cases/patch_sub_cases.ts b/x-pack/test/case_api_integration/basic/tests/cases/sub_cases/patch_sub_cases.ts index 746d8a601bed6..d647bb09f804a 100644 --- a/x-pack/test/case_api_integration/basic/tests/cases/sub_cases/patch_sub_cases.ts +++ b/x-pack/test/case_api_integration/basic/tests/cases/sub_cases/patch_sub_cases.ts @@ -10,7 +10,7 @@ import { FtrProviderContext } from '../../../../common/ftr_provider_context'; import { CASES_URL, SUB_CASES_PATCH_DEL_URL, -} from '../../../../../../plugins/case/common/constants'; +} from '../../../../../../plugins/cases/common/constants'; import { createCaseAction, createSubCase, @@ -19,13 +19,13 @@ import { getSignalsWithES, setStatus, } from '../../../../common/lib/utils'; -import { getSubCaseDetailsUrl } from '../../../../../../plugins/case/common/api/helpers'; +import { getSubCaseDetailsUrl } from '../../../../../../plugins/cases/common/api/helpers'; import { CaseStatuses, CommentType, SubCaseResponse, -} from '../../../../../../plugins/case/common/api'; -import { createAlertsString } from '../../../../../../plugins/case/server/connectors'; +} from '../../../../../../plugins/cases/common/api'; +import { createAlertsString } from '../../../../../../plugins/cases/server/connectors'; import { postCaseReq, postCollectionReq } from '../../../../common/lib/mock'; const defaultSignalsIndex = '.siem-signals-default-000001'; diff --git a/x-pack/test/case_api_integration/basic/tests/cases/tags/get_tags.ts b/x-pack/test/case_api_integration/basic/tests/cases/tags/get_tags.ts index d0f62dbd73da0..f5cbb7c7f0eb0 100644 --- a/x-pack/test/case_api_integration/basic/tests/cases/tags/get_tags.ts +++ b/x-pack/test/case_api_integration/basic/tests/cases/tags/get_tags.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../../common/ftr_provider_context'; -import { CASES_URL, CASE_TAGS_URL } from '../../../../../../plugins/case/common/constants'; +import { CASES_URL, CASE_TAGS_URL } from '../../../../../../plugins/cases/common/constants'; import { postCaseReq } from '../../../../common/lib/mock'; import { deleteCases } from '../../../../common/lib/utils'; diff --git a/x-pack/test/case_api_integration/basic/tests/cases/user_actions/get_all_user_actions.ts b/x-pack/test/case_api_integration/basic/tests/cases/user_actions/get_all_user_actions.ts index b771da84d4360..a3bc2a4399db2 100644 --- a/x-pack/test/case_api_integration/basic/tests/cases/user_actions/get_all_user_actions.ts +++ b/x-pack/test/case_api_integration/basic/tests/cases/user_actions/get_all_user_actions.ts @@ -8,8 +8,8 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../../common/ftr_provider_context'; -import { CASE_CONFIGURE_URL, CASES_URL } from '../../../../../../plugins/case/common/constants'; -import { CommentType } from '../../../../../../plugins/case/common/api'; +import { CASE_CONFIGURE_URL, CASES_URL } from '../../../../../../plugins/cases/common/constants'; +import { CommentType } from '../../../../../../plugins/cases/common/api'; import { userActionPostResp, defaultUser, diff --git a/x-pack/test/case_api_integration/basic/tests/cases/user_actions/migrations.ts b/x-pack/test/case_api_integration/basic/tests/cases/user_actions/migrations.ts index a3fb1003f3dc7..d0f852b3f57e7 100644 --- a/x-pack/test/case_api_integration/basic/tests/cases/user_actions/migrations.ts +++ b/x-pack/test/case_api_integration/basic/tests/cases/user_actions/migrations.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../../common/ftr_provider_context'; -import { CASES_URL } from '../../../../../../plugins/case/common/constants'; +import { CASES_URL } from '../../../../../../plugins/cases/common/constants'; // eslint-disable-next-line import/no-default-export export default function createGetTests({ getService }: FtrProviderContext) { diff --git a/x-pack/test/case_api_integration/basic/tests/configure/get_configure.ts b/x-pack/test/case_api_integration/basic/tests/configure/get_configure.ts index bdeb2f30b4481..c892edff2d458 100644 --- a/x-pack/test/case_api_integration/basic/tests/configure/get_configure.ts +++ b/x-pack/test/case_api_integration/basic/tests/configure/get_configure.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../common/ftr_provider_context'; -import { CASE_CONFIGURE_URL } from '../../../../../plugins/case/common/constants'; +import { CASE_CONFIGURE_URL } from '../../../../../plugins/cases/common/constants'; import { getConfiguration, removeServerGeneratedPropertiesFromConfigure, diff --git a/x-pack/test/case_api_integration/basic/tests/configure/get_connectors.ts b/x-pack/test/case_api_integration/basic/tests/configure/get_connectors.ts index 7e2cfc6c1781b..1789fa719ec9f 100644 --- a/x-pack/test/case_api_integration/basic/tests/configure/get_connectors.ts +++ b/x-pack/test/case_api_integration/basic/tests/configure/get_connectors.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../common/ftr_provider_context'; -import { CASE_CONFIGURE_CONNECTORS_URL } from '../../../../../plugins/case/common/constants'; +import { CASE_CONFIGURE_CONNECTORS_URL } from '../../../../../plugins/cases/common/constants'; import { ObjectRemover as ActionsRemover } from '../../../../alerting_api_integration/common/lib'; import { getServiceNowConnector, diff --git a/x-pack/test/case_api_integration/basic/tests/configure/migrations.ts b/x-pack/test/case_api_integration/basic/tests/configure/migrations.ts index 6214ed77557da..4ee2021399fae 100644 --- a/x-pack/test/case_api_integration/basic/tests/configure/migrations.ts +++ b/x-pack/test/case_api_integration/basic/tests/configure/migrations.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../common/ftr_provider_context'; -import { CASE_CONFIGURE_URL } from '../../../../../plugins/case/common/constants'; +import { CASE_CONFIGURE_URL } from '../../../../../plugins/cases/common/constants'; // eslint-disable-next-line import/no-default-export export default function createGetTests({ getService }: FtrProviderContext) { diff --git a/x-pack/test/case_api_integration/basic/tests/configure/patch_configure.ts b/x-pack/test/case_api_integration/basic/tests/configure/patch_configure.ts index 070170fad8537..ea4982a8f04ad 100644 --- a/x-pack/test/case_api_integration/basic/tests/configure/patch_configure.ts +++ b/x-pack/test/case_api_integration/basic/tests/configure/patch_configure.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../common/ftr_provider_context'; -import { CASE_CONFIGURE_URL } from '../../../../../plugins/case/common/constants'; +import { CASE_CONFIGURE_URL } from '../../../../../plugins/cases/common/constants'; import { getConfiguration, removeServerGeneratedPropertiesFromConfigure, diff --git a/x-pack/test/case_api_integration/basic/tests/configure/post_configure.ts b/x-pack/test/case_api_integration/basic/tests/configure/post_configure.ts index c3341521fc023..7ab98a07cf046 100644 --- a/x-pack/test/case_api_integration/basic/tests/configure/post_configure.ts +++ b/x-pack/test/case_api_integration/basic/tests/configure/post_configure.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../common/ftr_provider_context'; -import { CASE_CONFIGURE_URL } from '../../../../../plugins/case/common/constants'; +import { CASE_CONFIGURE_URL } from '../../../../../plugins/cases/common/constants'; import { getConfiguration, removeServerGeneratedPropertiesFromConfigure, diff --git a/x-pack/test/case_api_integration/basic/tests/connectors/case.ts b/x-pack/test/case_api_integration/basic/tests/connectors/case.ts index 62a5df7643337..ee4d671f7880f 100644 --- a/x-pack/test/case_api_integration/basic/tests/connectors/case.ts +++ b/x-pack/test/case_api_integration/basic/tests/connectors/case.ts @@ -9,8 +9,8 @@ import { omit } from 'lodash/fp'; import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../common/ftr_provider_context'; -import { CASES_URL } from '../../../../../plugins/case/common/constants'; -import { CommentType } from '../../../../../plugins/case/common/api'; +import { CASES_URL } from '../../../../../plugins/cases/common/constants'; +import { CommentType } from '../../../../../plugins/cases/common/api'; import { postCaseReq, postCaseResp, diff --git a/x-pack/test/case_api_integration/common/lib/mock.ts b/x-pack/test/case_api_integration/common/lib/mock.ts index c3c37bd20f140..53dd6440a47df 100644 --- a/x-pack/test/case_api_integration/common/lib/mock.ts +++ b/x-pack/test/case_api_integration/common/lib/mock.ts @@ -11,7 +11,7 @@ import { createAlertsString, isCommentGeneratedAlert, transformConnectorComment, -} from '../../../../plugins/case/server/connectors'; +} from '../../../../plugins/cases/server/connectors'; import { CasePostRequest, CaseResponse, @@ -23,12 +23,12 @@ import { CommentType, CaseStatuses, CaseType, - CaseClientPostRequest, + CasesClientPostRequest, SubCaseResponse, AssociationType, SubCasesFindResponse, CommentRequest, -} from '../../../../plugins/case/common/api'; +} from '../../../../plugins/cases/common/api'; export const defaultUser = { email: null, full_name: null, username: 'elastic' }; export const postCaseReq: CasePostRequest = { @@ -57,7 +57,7 @@ export const postCollectionReq: CasePostRequest = { /** * This is needed because the post api does not allow specifying the case type. But the response will include the type. */ -export const userActionPostResp: CaseClientPostRequest = { +export const userActionPostResp: CasesClientPostRequest = { ...postCaseReq, type: CaseType.individual, }; diff --git a/x-pack/test/case_api_integration/common/lib/utils.ts b/x-pack/test/case_api_integration/common/lib/utils.ts index 169f85080f4eb..96806af37e2c1 100644 --- a/x-pack/test/case_api_integration/common/lib/utils.ts +++ b/x-pack/test/case_api_integration/common/lib/utils.ts @@ -10,7 +10,7 @@ import { Client } from '@elastic/elasticsearch'; import * as st from 'supertest'; import supertestAsPromised from 'supertest-as-promised'; import { Explanation, SearchResponse } from 'elasticsearch'; -import { CASES_URL, SUB_CASES_PATCH_DEL_URL } from '../../../../plugins/case/common/constants'; +import { CASES_URL, SUB_CASES_PATCH_DEL_URL } from '../../../../plugins/cases/common/constants'; import { CasesConfigureRequest, CasesConfigureResponse, @@ -22,10 +22,10 @@ import { CaseStatuses, SubCasesResponse, CasesResponse, -} from '../../../../plugins/case/common/api'; +} from '../../../../plugins/cases/common/api'; import { postCollectionReq, postCommentGenAlertReq } from './mock'; -import { getSubCasesUrl } from '../../../../plugins/case/common/api/helpers'; -import { ContextTypeGeneratedAlertType } from '../../../../plugins/case/server/connectors'; +import { getSubCasesUrl } from '../../../../plugins/cases/common/api/helpers'; +import { ContextTypeGeneratedAlertType } from '../../../../plugins/cases/server/connectors'; import { SignalHit } from '../../../../plugins/security_solution/server/lib/detection_engine/signals/types'; interface Hit { diff --git a/x-pack/tsconfig.json b/x-pack/tsconfig.json index 671e99e3246be..aaf014ea6165c 100644 --- a/x-pack/tsconfig.json +++ b/x-pack/tsconfig.json @@ -4,9 +4,9 @@ "mocks.ts", "typings/**/*", "tasks/**/*", - "plugins/case/**/*", + "plugins/cases/**/*", "plugins/lists/**/*", - "plugins/security_solution/**/*", + "plugins/security_solution/**/*" ], "exclude": [ "test/**/*",