From 348ea81b1e85e846c855635c51e4e7fc3136bda1 Mon Sep 17 00:00:00 2001 From: Nicolas Chaulet Date: Tue, 17 Dec 2024 10:39:08 -0500 Subject: [PATCH 01/60] =?UTF-8?q?[Fleet]=20Bump=20install=20version=20afte?= =?UTF-8?q?r=20removal=20of=20deprecated=20=5Fsource.mode=E2=80=A6=20(#204?= =?UTF-8?q?471)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- x-pack/plugins/fleet/server/constants/fleet_es_assets.ts | 2 +- .../steps/step_save_system_object.test.ts | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/x-pack/plugins/fleet/server/constants/fleet_es_assets.ts b/x-pack/plugins/fleet/server/constants/fleet_es_assets.ts index 621adc5b3b81..384a77afd112 100644 --- a/x-pack/plugins/fleet/server/constants/fleet_es_assets.ts +++ b/x-pack/plugins/fleet/server/constants/fleet_es_assets.ts @@ -11,7 +11,7 @@ import { getESAssetMetadata } from '../services/epm/elasticsearch/meta'; const meta = getESAssetMetadata(); -export const FLEET_INSTALL_FORMAT_VERSION = '1.3.0'; +export const FLEET_INSTALL_FORMAT_VERSION = '1.4.0'; export const FLEET_AGENT_POLICIES_SCHEMA_VERSION = '1.1.1'; diff --git a/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/step_save_system_object.test.ts b/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/step_save_system_object.test.ts index 8d80c236aefb..c4ae211c58fc 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/step_save_system_object.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/step_save_system_object.test.ts @@ -13,14 +13,12 @@ import { } from '@kbn/core/server/mocks'; import { DEFAULT_SPACE_ID } from '@kbn/spaces-plugin/common/constants'; +import { FLEET_INSTALL_FORMAT_VERSION } from '../../../../../constants'; import { PACKAGES_SAVED_OBJECT_TYPE } from '../../../../../../common/constants'; - import { appContextService } from '../../../../app_context'; import { createAppContextStartContractMock } from '../../../../../mocks'; - import { auditLoggingService } from '../../../../audit_logging'; import { packagePolicyService } from '../../../../package_policy'; - import { createArchiveIteratorFromMap } from '../../../archive/archive_iterator'; import { stepSaveSystemObject } from './step_save_system_object'; @@ -94,7 +92,7 @@ describe('updateLatestExecutedState', () => { 'epm-packages', 'test-integration', { - install_format_schema_version: '1.3.0', + install_format_schema_version: FLEET_INSTALL_FORMAT_VERSION, install_status: 'installed', install_version: '1.0.0', latest_install_failed_attempts: [], @@ -161,7 +159,7 @@ describe('updateLatestExecutedState', () => { 'epm-packages', 'test-integration', { - install_format_schema_version: '1.3.0', + install_format_schema_version: FLEET_INSTALL_FORMAT_VERSION, install_status: 'installed', install_version: '1.0.0', latest_install_failed_attempts: [], From 59826ccdb55775261d2255d1483c40b3fbf60a21 Mon Sep 17 00:00:00 2001 From: Arturo Castillo Delgado Date: Tue, 17 Dec 2024 16:49:36 +0100 Subject: [PATCH 02/60] [Discover] Fix console warning for invalid DOM property (#204417) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes one of the errors described in #202287 — namely a console warning due to invalid DOM property. --- .../public/components/doc_viewer_flyout/use_flyout_a11y.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/unified_doc_viewer/public/components/doc_viewer_flyout/use_flyout_a11y.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_flyout/use_flyout_a11y.tsx index 84c47cc4bd06..18cc98fb94b8 100644 --- a/src/plugins/unified_doc_viewer/public/components/doc_viewer_flyout/use_flyout_a11y.tsx +++ b/src/plugins/unified_doc_viewer/public/components/doc_viewer_flyout/use_flyout_a11y.tsx @@ -37,7 +37,7 @@ export const useFlyoutA11y = ({ isXlScreen }: { isXlScreen: boolean }) => { a11yProps: { ref: setFlyoutEl, role: isXlScreen ? 'dialog' : undefined, - tabindex: isXlScreen ? 0 : undefined, + tabIndex: isXlScreen ? 0 : undefined, 'aria-describedby': isXlScreen ? descriptionId : undefined, 'data-no-focus-lock': isXlScreen || undefined, }, From a7addbadd394b33fa3212e57f55be251c1a3a371 Mon Sep 17 00:00:00 2001 From: Tomasz Ciecierski Date: Tue, 17 Dec 2024 16:53:03 +0100 Subject: [PATCH 03/60] [EDR Workflows] CrowdStrike RunScript: Log Actions and UI Output (#204044) --- .../common/crowdstrike/schema.ts | 28 +++-- .../common/crowdstrike/types.ts | 5 +- .../crowdstrike/crowdstrike.ts | 12 +- .../actions/common/response_actions.ts | 2 + .../response_actions/run_script/run_script.ts | 12 +- .../service/response_actions/type_guards.ts | 11 ++ .../common/endpoint/types/actions.ts | 3 +- .../public/management/common/translations.ts | 2 +- .../execute_action_host_response.tsx | 33 ++++-- .../execute_action_host_response_output.tsx | 23 ++-- .../run_script_action.tsx | 96 ++++++++++++++++ .../lib/console_commands_definition.ts | 5 +- .../components/action_log_expanded_tray.tsx | 25 +++++ ...e_send_run_script_endpoint_request.test.ts | 81 ++++++++++++++ .../use_send_run_script_endpoint_request.ts | 40 +++++++ .../mocks/response_actions_http_mocks.ts | 24 ++++ .../endpoint/common/response_actions.ts | 10 ++ .../crowdstrike/crowdstrike_actions_client.ts | 103 ++++++++++++++++-- .../actions/clients/crowdstrike/utils.test.ts | 51 +++++++++ .../actions/clients/crowdstrike/utils.ts | 43 ++++++++ .../services/actions/clients/mocks.ts | 2 +- 21 files changed, 546 insertions(+), 65 deletions(-) create mode 100644 x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/run_script_action.tsx create mode 100644 x-pack/solutions/security/plugins/security_solution/public/management/hooks/response_actions/use_send_run_script_endpoint_request.test.ts create mode 100644 x-pack/solutions/security/plugins/security_solution/public/management/hooks/response_actions/use_send_run_script_endpoint_request.ts create mode 100644 x-pack/solutions/security/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/utils.test.ts create mode 100644 x-pack/solutions/security/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/utils.ts diff --git a/x-pack/plugins/stack_connectors/common/crowdstrike/schema.ts b/x-pack/plugins/stack_connectors/common/crowdstrike/schema.ts index d5d4154f985e..40e58613c69e 100644 --- a/x-pack/plugins/stack_connectors/common/crowdstrike/schema.ts +++ b/x-pack/plugins/stack_connectors/common/crowdstrike/schema.ts @@ -318,16 +318,16 @@ export const CrowdstrikeExecuteRTRResponseSchema = schema.object( schema.string(), schema.object( { - session_id: schema.maybe(schema.string()), - task_id: schema.maybe(schema.string()), - complete: schema.maybe(schema.boolean()), - stdout: schema.maybe(schema.string()), - stderr: schema.maybe(schema.string()), - base_command: schema.maybe(schema.string()), - aid: schema.maybe(schema.string()), - errors: schema.maybe(schema.arrayOf(schema.any())), - query_time: schema.maybe(schema.number()), - offline_queued: schema.maybe(schema.boolean()), + session_id: schema.string(), + task_id: schema.string(), + complete: schema.boolean(), + stdout: schema.string(), + stderr: schema.string(), + base_command: schema.string(), + aid: schema.string(), + errors: schema.arrayOf(schema.any()), + query_time: schema.number(), + offline_queued: schema.boolean(), }, { unknowns: 'allow' } ) @@ -337,9 +337,9 @@ export const CrowdstrikeExecuteRTRResponseSchema = schema.object( ), meta: schema.object( { - query_time: schema.maybe(schema.number()), - powered_by: schema.maybe(schema.string()), - trace_id: schema.maybe(schema.string()), + query_time: schema.number(), + powered_by: schema.string(), + trace_id: schema.string(), }, { unknowns: 'allow' } ), @@ -348,7 +348,5 @@ export const CrowdstrikeExecuteRTRResponseSchema = schema.object( { unknowns: 'allow' } ); -export type CrowdStrikeExecuteRTRResponse = typeof CrowdstrikeExecuteRTRResponseSchema; - // TODO: will be part of a next PR export const CrowdstrikeGetScriptsParamsSchema = schema.any({}); diff --git a/x-pack/plugins/stack_connectors/common/crowdstrike/types.ts b/x-pack/plugins/stack_connectors/common/crowdstrike/types.ts index 3c9cc15ea167..68f8275d7143 100644 --- a/x-pack/plugins/stack_connectors/common/crowdstrike/types.ts +++ b/x-pack/plugins/stack_connectors/common/crowdstrike/types.ts @@ -17,8 +17,8 @@ import { CrowdstrikeGetTokenResponseSchema, CrowdstrikeGetAgentsResponseSchema, RelaxedCrowdstrikeBaseApiResponseSchema, - CrowdstrikeInitRTRResponseSchema, CrowdstrikeInitRTRParamsSchema, + CrowdstrikeExecuteRTRResponseSchema, } from './schema'; export type CrowdstrikeConfig = TypeOf; @@ -35,9 +35,10 @@ export type CrowdstrikeGetAgentOnlineStatusResponse = TypeOf< typeof CrowdstrikeGetAgentOnlineStatusResponseSchema >; export type CrowdstrikeGetTokenResponse = TypeOf; -export type CrowdstrikeInitRTRResponse = TypeOf; export type CrowdstrikeHostActionsParams = TypeOf; export type CrowdstrikeActionParams = TypeOf; export type CrowdstrikeInitRTRParams = TypeOf; + +export type CrowdStrikeExecuteRTRResponse = TypeOf; diff --git a/x-pack/plugins/stack_connectors/server/connector_types/crowdstrike/crowdstrike.ts b/x-pack/plugins/stack_connectors/server/connector_types/crowdstrike/crowdstrike.ts index 14b38b414eb3..9bc53c58aa19 100644 --- a/x-pack/plugins/stack_connectors/server/connector_types/crowdstrike/crowdstrike.ts +++ b/x-pack/plugins/stack_connectors/server/connector_types/crowdstrike/crowdstrike.ts @@ -22,6 +22,7 @@ import type { CrowdstrikeGetTokenResponse, CrowdstrikeGetAgentOnlineStatusResponse, RelaxedCrowdstrikeBaseApiResponse, + CrowdStrikeExecuteRTRResponse, } from '../../../common/crowdstrike/types'; import { CrowdstrikeHostActionsParamsSchema, @@ -31,7 +32,6 @@ import { CrowdstrikeRTRCommandParamsSchema, CrowdstrikeExecuteRTRResponseSchema, CrowdstrikeGetScriptsParamsSchema, - CrowdStrikeExecuteRTRResponse, CrowdstrikeApiDoNotValidateResponsesSchema, CrowdstrikeGetTokenResponseSchema, } from '../../../common/crowdstrike/schema'; @@ -292,15 +292,9 @@ export class CrowdstrikeConnector extends SubActionConnector< payload: { command: string; endpoint_ids: string[]; - overwriteUrl?: 'batchExecuteRTR' | 'batchActiveResponderExecuteRTR' | 'batchAdminExecuteRTR'; }, connectorUsageCollector: ConnectorUsageCollector ): Promise => { - // Some commands are only available in specific API endpoints, however there's an additional requirement check for the command's argument - // Eg. runscript command is available with the batchExecuteRTR endpoint, but if it goes with --Raw parameter, it should go to batchAdminExecuteRTR endpoint - // This overwrite value will be coming from kibana response actions api - const csUrl = payload.overwriteUrl ? this.urls[payload.overwriteUrl] : url; - const batchId = await this.crowdStrikeSessionManager.initializeSession( { endpoint_ids: payload.endpoint_ids }, connectorUsageCollector @@ -313,7 +307,7 @@ export class CrowdstrikeConnector extends SubActionConnector< } return await this.crowdstrikeApiRequest( { - url: csUrl, + url, method: 'post', data: { base_command: baseCommand, @@ -335,7 +329,6 @@ export class CrowdstrikeConnector extends SubActionConnector< payload: { command: string; endpoint_ids: string[]; - overwriteUrl?: 'batchActiveResponderExecuteRTR' | 'batchAdminExecuteRTR'; }, connectorUsageCollector: ConnectorUsageCollector ): Promise { @@ -351,7 +344,6 @@ export class CrowdstrikeConnector extends SubActionConnector< payload: { command: string; endpoint_ids: string[]; - overwriteUrl?: 'batchAdminExecuteRTR'; }, connectorUsageCollector: ConnectorUsageCollector ): Promise { diff --git a/x-pack/solutions/security/plugins/security_solution/common/api/endpoint/actions/common/response_actions.ts b/x-pack/solutions/security/plugins/security_solution/common/api/endpoint/actions/common/response_actions.ts index 56b1fafdb5a7..3a765e0c8313 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/api/endpoint/actions/common/response_actions.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/api/endpoint/actions/common/response_actions.ts @@ -17,6 +17,7 @@ import { GetProcessesRouteRequestSchema } from '../response_actions/running_proc import { KillProcessRouteRequestSchema } from '../response_actions/kill_process'; import { SuspendProcessRouteRequestSchema } from '../response_actions/suspend_process'; import { UploadActionRequestSchema } from '../response_actions/upload'; +import { RunScriptActionRequestSchema } from '../response_actions/run_script'; export const ResponseActionBodySchema = schema.oneOf([ IsolateRouteRequestSchema.body, @@ -28,6 +29,7 @@ export const ResponseActionBodySchema = schema.oneOf([ ExecuteActionRequestSchema.body, UploadActionRequestSchema.body, ScanActionRequestSchema.body, + RunScriptActionRequestSchema.body, ]); export type ResponseActionsRequestBody = TypeOf; diff --git a/x-pack/solutions/security/plugins/security_solution/common/api/endpoint/actions/response_actions/run_script/run_script.ts b/x-pack/solutions/security/plugins/security_solution/common/api/endpoint/actions/response_actions/run_script/run_script.ts index dfa88941b34e..95c035e86688 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/api/endpoint/actions/response_actions/run_script/run_script.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/api/endpoint/actions/response_actions/run_script/run_script.ts @@ -26,27 +26,27 @@ export const RunScriptActionRequestSchema = { /** * The script to run */ - Raw: schema.maybe(NonEmptyString), + raw: schema.maybe(NonEmptyString), /** * The path to the script on the host to run */ - HostPath: schema.maybe(NonEmptyString), + hostPath: schema.maybe(NonEmptyString), /** * The path to the script in the cloud to run */ - CloudFile: schema.maybe(NonEmptyString), + cloudFile: schema.maybe(NonEmptyString), /** * The command line to run */ - CommandLine: schema.maybe(NonEmptyString), + commandLine: schema.maybe(NonEmptyString), /** * The max timeout value before the command is killed. Number represents milliseconds */ - Timeout: schema.maybe(schema.number({ min: 1 })), + timeout: schema.maybe(schema.number({ min: 1 })), }, { validate: (params) => { - if (!params.Raw && !params.HostPath && !params.CloudFile) { + if (!params.raw && !params.hostPath && !params.cloudFile) { return 'At least one of Raw, HostPath, or CloudFile must be provided'; } }, diff --git a/x-pack/solutions/security/plugins/security_solution/common/endpoint/service/response_actions/type_guards.ts b/x-pack/solutions/security/plugins/security_solution/common/endpoint/service/response_actions/type_guards.ts index 707be0a4d1e6..ece0a9501e3f 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/endpoint/service/response_actions/type_guards.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/endpoint/service/response_actions/type_guards.ts @@ -15,6 +15,8 @@ import type { ResponseActionUploadOutputContent, ResponseActionUploadParameters, GetProcessesActionOutputContent, + ResponseActionRunScriptOutputContent, + ResponseActionRunScriptParameters, } from '../../types'; import { RESPONSE_ACTION_AGENT_TYPE, RESPONSE_ACTION_TYPE } from './constants'; @@ -47,6 +49,15 @@ export const isProcessesAction = ( return action.command === 'running-processes'; }; +export const isRunScriptAction = ( + action: MaybeImmutable +): action is ActionDetails< + ResponseActionRunScriptOutputContent, + ResponseActionRunScriptParameters +> => { + return action.command === 'runscript'; +}; + // type guards to ensure only the matching string values are attached to the types filter type export const isAgentType = (type: string): type is (typeof RESPONSE_ACTION_AGENT_TYPE)[number] => RESPONSE_ACTION_AGENT_TYPE.includes(type as (typeof RESPONSE_ACTION_AGENT_TYPE)[number]); diff --git a/x-pack/solutions/security/plugins/security_solution/common/endpoint/types/actions.ts b/x-pack/solutions/security/plugins/security_solution/common/endpoint/types/actions.ts index 131a8d0c6df5..e3c47102ce71 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/endpoint/types/actions.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/endpoint/types/actions.ts @@ -97,7 +97,8 @@ export interface ResponseActionScanOutputContent { } export interface ResponseActionRunScriptOutputContent { - output: string; + stdout: string; + stderr: string; code: string; } diff --git a/x-pack/solutions/security/plugins/security_solution/public/management/common/translations.ts b/x-pack/solutions/security/plugins/security_solution/public/management/common/translations.ts index 6929452e5d9e..50885a9db6b6 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/management/common/translations.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/management/common/translations.ts @@ -279,7 +279,7 @@ Command Examples for Running Scripts: 3. Executes a raw script provided entirely within the "--Raw" flag. - runscript --Raw="Get-ChildItem." + runscript --Raw=\`\`\`Get-ChildItem.\`\`\` 4. Executes a script located on the remote host at the specified path with the provided command-line arguments. diff --git a/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_execute_action/execute_action_host_response.tsx b/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_execute_action/execute_action_host_response.tsx index 43ff3ffca5a6..09d1e45f24c4 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_execute_action/execute_action_host_response.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_execute_action/execute_action_host_response.tsx @@ -10,6 +10,8 @@ import type { ActionDetails, MaybeImmutable, ResponseActionExecuteOutputContent, + ResponseActionRunScriptOutputContent, + ResponseActionRunScriptParameters, ResponseActionsExecuteParameters, } from '../../../../common/endpoint/types'; import { EXECUTE_FILE_LINK_TITLE } from '../endpoint_response_actions_list/translations'; @@ -18,14 +20,18 @@ import { ExecuteActionHostResponseOutput } from './execute_action_host_response_ export interface ExecuteActionHostResponseProps { action: MaybeImmutable< - ActionDetails + | ActionDetails + | ActionDetails >; agentId?: string; canAccessFileDownloadLink: boolean; 'data-test-subj'?: string; textSize?: 'xs' | 's'; + hideFile?: boolean; + hideContext?: boolean; } +// Note: also used for RunScript command export const ExecuteActionHostResponse = memo( ({ action, @@ -33,6 +39,8 @@ export const ExecuteActionHostResponse = memo( canAccessFileDownloadLink, textSize = 's', 'data-test-subj': dataTestSubj, + hideFile, + hideContext, }) => { const outputContent = useMemo( () => @@ -44,21 +52,24 @@ export const ExecuteActionHostResponse = memo( return ( <> - - - - + {!hideFile && ( + + + + + )} {outputContent && ( )} diff --git a/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_execute_action/execute_action_host_response_output.tsx b/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_execute_action/execute_action_host_response_output.tsx index f24f18e14939..4e6161b8767d 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_execute_action/execute_action_host_response_output.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_execute_action/execute_action_host_response_output.tsx @@ -98,6 +98,7 @@ interface ShellInfoContentProps { textSize?: 's' | 'xs'; title: string; } + const ShellInfoContent = memo(({ content, textSize, title }) => ( @@ -178,10 +179,12 @@ export interface ExecuteActionHostResponseOutputProps { outputContent: ResponseActionExecuteOutputContent; 'data-test-subj'?: string; textSize?: 's' | 'xs'; + hideContext?: boolean; } +// Note: also used for RunScript command export const ExecuteActionHostResponseOutput = memo( - ({ outputContent, 'data-test-subj': dataTestSubj, textSize = 'xs' }) => { + ({ outputContent, 'data-test-subj': dataTestSubj, textSize = 'xs', hideContext }) => { const contextContent = useMemo( () => ( <> @@ -216,14 +219,16 @@ export const ExecuteActionHostResponseOutput = memo - - - + {!hideContext && ( + + + + )} {outputContent.stderr.length > 0 && ( <> diff --git a/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/run_script_action.tsx b/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/run_script_action.tsx new file mode 100644 index 000000000000..e2ed35845502 --- /dev/null +++ b/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/run_script_action.tsx @@ -0,0 +1,96 @@ +/* + * 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 React, { memo, useMemo } from 'react'; + +import { i18n } from '@kbn/i18n'; +import { ExecuteActionHostResponse } from '../../endpoint_execute_action'; +import { useSendRunScriptEndpoint } from '../../../hooks/response_actions/use_send_run_script_endpoint_request'; +import type { RunScriptActionRequestBody } from '../../../../../common/api/endpoint'; +import { useConsoleActionSubmitter } from '../hooks/use_console_action_submitter'; +import type { + ResponseActionRunScriptOutputContent, + ResponseActionRunScriptParameters, +} from '../../../../../common/endpoint/types'; +import type { ActionRequestComponentProps } from '../types'; + +export const RunScriptActionResult = memo< + ActionRequestComponentProps< + { + Raw?: string; + HostPath?: string; + CloudFile?: string; + CommandLine?: string; + Timeout?: number; + comment?: string; + }, + ResponseActionRunScriptOutputContent, + ResponseActionRunScriptParameters + > +>(({ command, setStore, store, status, setStatus, ResultComponent }) => { + const actionCreator = useSendRunScriptEndpoint(); + const actionRequestBody = useMemo(() => { + const { endpointId, agentType } = command.commandDefinition?.meta ?? {}; + + if (!endpointId) { + return; + } + return { + agent_type: agentType, + endpoint_ids: [endpointId], + parameters: { + raw: command.args.args.Raw?.[0], + hostPath: command.args.args.HostPath?.[0], + cloudFile: command.args.args.CloudFile?.[0], + commandLine: command.args.args.CommandLine?.[0], + timeout: command.args.args.Timeout?.[0], + }, + comment: command.args.args?.comment?.[0], + }; + }, [command]); + + const { result, actionDetails: completedActionDetails } = useConsoleActionSubmitter< + RunScriptActionRequestBody, + ResponseActionRunScriptOutputContent, + ResponseActionRunScriptParameters + >({ + ResultComponent, + setStore, + store, + status, + setStatus, + actionCreator, + actionRequestBody, + dataTestSubj: 'runscript', + }); + + if (!completedActionDetails || !completedActionDetails.wasSuccessful) { + return result; + } + + return ( + + + + ); +}); +RunScriptActionResult.displayName = 'RunScriptActionResult'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_responder/lib/console_commands_definition.ts b/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_responder/lib/console_commands_definition.ts index 8c99186f69d9..22d138dea358 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_responder/lib/console_commands_definition.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_responder/lib/console_commands_definition.ts @@ -6,6 +6,7 @@ */ import { i18n } from '@kbn/i18n'; +import { RunScriptActionResult } from '../command_render_components/run_script_action'; import type { CommandArgDefinition } from '../../console/types'; import { isAgentTypeAndActionSupported } from '../../../../common/lib/endpoint'; import { getRbacControl } from '../../../../../common/endpoint/service/response_actions/utils'; @@ -531,14 +532,14 @@ export const getEndpointConsoleCommands = ({ aboutInfo: CROWDSTRIKE_CONSOLE_COMMANDS.runscript.about, isSupported: doesEndpointSupportCommand('runscript'), }), - RenderComponent: () => null, + RenderComponent: RunScriptActionResult, meta: { agentType, endpointId: endpointAgentId, capabilities: endpointCapabilities, privileges: endpointPrivileges, }, - exampleUsage: `runscript --Raw="Get-ChildItem ." --CommandLine=""`, + exampleUsage: `runscript --Raw=\`\`\`Get-ChildItem .\`\`\` --CommandLine=""`, helpUsage: CROWDSTRIKE_CONSOLE_COMMANDS.runscript.helpUsage, exampleInstruction: CROWDSTRIKE_CONSOLE_COMMANDS.runscript.about, validate: capabilitiesAndPrivilegesValidator(agentType), diff --git a/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/action_log_expanded_tray.tsx b/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/action_log_expanded_tray.tsx index cba1d0aee41b..53f2c89ac84f 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/action_log_expanded_tray.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/action_log_expanded_tray.tsx @@ -23,6 +23,7 @@ import { isExecuteAction, isGetFileAction, isProcessesAction, + isRunScriptAction, isUploadAction, } from '../../../../../common/endpoint/service/response_actions/type_guards'; import { EndpointUploadActionResult } from '../../endpoint_upload_action_result'; @@ -209,6 +210,30 @@ const OutputContent = memo<{ ); } + if (isRunScriptAction(action)) { + return ( + + {action.agents.map((agentId) => ( +
+ {OUTPUT_MESSAGES.wasSuccessful(command)} + +
+ ))} +
+ ); + } + + // CrowdStrike Isolate/Release actions if (action.agentType === 'crowdstrike') { return <>{OUTPUT_MESSAGES.submittedSuccessfully(command)}; } diff --git a/x-pack/solutions/security/plugins/security_solution/public/management/hooks/response_actions/use_send_run_script_endpoint_request.test.ts b/x-pack/solutions/security/plugins/security_solution/public/management/hooks/response_actions/use_send_run_script_endpoint_request.test.ts new file mode 100644 index 000000000000..39eb3728162d --- /dev/null +++ b/x-pack/solutions/security/plugins/security_solution/public/management/hooks/response_actions/use_send_run_script_endpoint_request.test.ts @@ -0,0 +1,81 @@ +/* + * 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 { useMutation as _useMutation } from '@tanstack/react-query'; +import type { AppContextTestRender } from '../../../common/mock/endpoint'; +import type { RenderHookResult } from '@testing-library/react'; +import { createAppRootMockRenderer } from '../../../common/mock/endpoint'; +import { responseActionsHttpMocks } from '../../mocks/response_actions_http_mocks'; +import { RUN_SCRIPT_ROUTE } from '../../../../common/endpoint/constants'; +import type { RunScriptActionRequestBody } from '../../../../common/api/endpoint'; +import type { + RunScriptRequestCustomOptions, + UseSendRunScriptRequestResult, +} from './use_send_run_script_endpoint_request'; +import { useSendRunScriptEndpoint } from './use_send_run_script_endpoint_request'; + +const useMutationMock = _useMutation as jest.Mock; + +jest.mock('@tanstack/react-query', () => { + const actualReactQueryModule = jest.requireActual('@tanstack/react-query'); + + return { + ...actualReactQueryModule, + useMutation: jest.fn((...args) => actualReactQueryModule.useMutation(...args)), + }; +}); + +const runScriptPayload: RunScriptActionRequestBody = { + endpoint_ids: ['test-endpoint-id'], + agent_type: 'crowdstrike', + parameters: { raw: 'ls' }, +}; + +describe('When using the `useSendRunScriptRequest()` hook', () => { + let customOptions: RunScriptRequestCustomOptions; + let http: AppContextTestRender['coreStart']['http']; + let apiMocks: ReturnType; + let renderHook: () => RenderHookResult< + UseSendRunScriptRequestResult, + RunScriptRequestCustomOptions + >; + + beforeEach(() => { + const testContext = createAppRootMockRenderer(); + + http = testContext.coreStart.http; + apiMocks = responseActionsHttpMocks(http); + customOptions = {}; + + renderHook = () => { + return testContext.renderHook(() => useSendRunScriptEndpoint(customOptions)); + }; + }); + + it('should call the `runScript` API with correct payload', async () => { + const { + result: { + current: { mutateAsync }, + }, + } = renderHook(); + await mutateAsync(runScriptPayload); + + expect(apiMocks.responseProvider.runscript).toHaveBeenCalledWith({ + body: JSON.stringify(runScriptPayload), + path: RUN_SCRIPT_ROUTE, + version: '2023-10-31', + }); + }); + + it('should allow custom options to be passed to ReactQuery', async () => { + customOptions.mutationKey = ['pqr-abc']; + customOptions.cacheTime = 10; + renderHook(); + + expect(useMutationMock).toHaveBeenCalledWith(expect.any(Function), customOptions); + }); +}); diff --git a/x-pack/solutions/security/plugins/security_solution/public/management/hooks/response_actions/use_send_run_script_endpoint_request.ts b/x-pack/solutions/security/plugins/security_solution/public/management/hooks/response_actions/use_send_run_script_endpoint_request.ts new file mode 100644 index 000000000000..f4dd937fe300 --- /dev/null +++ b/x-pack/solutions/security/plugins/security_solution/public/management/hooks/response_actions/use_send_run_script_endpoint_request.ts @@ -0,0 +1,40 @@ +/* + * 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 type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import type { IHttpFetchError } from '@kbn/core-http-browser'; +import { useMutation } from '@tanstack/react-query'; +import type { RunScriptActionRequestBody } from '../../../../common/api/endpoint'; +import { KibanaServices } from '../../../common/lib/kibana'; +import { RUN_SCRIPT_ROUTE } from '../../../../common/endpoint/constants'; +import type { ResponseActionApiResponse } from '../../../../common/endpoint/types'; + +export type RunScriptRequestCustomOptions = UseMutationOptions< + ResponseActionApiResponse, + IHttpFetchError, + RunScriptActionRequestBody +>; + +export type UseSendRunScriptRequestResult = UseMutationResult< + ResponseActionApiResponse, + IHttpFetchError, + RunScriptActionRequestBody +>; + +export const useSendRunScriptEndpoint = ( + options?: RunScriptRequestCustomOptions +): UseSendRunScriptRequestResult => { + return useMutation( + (runScriptActionReqBody) => { + return KibanaServices.get().http.post(RUN_SCRIPT_ROUTE, { + body: JSON.stringify(runScriptActionReqBody), + version: '2023-10-31', + }); + }, + options + ); +}; diff --git a/x-pack/solutions/security/plugins/security_solution/public/management/mocks/response_actions_http_mocks.ts b/x-pack/solutions/security/plugins/security_solution/public/management/mocks/response_actions_http_mocks.ts index 256484f8d0e9..e8307895c3c4 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/management/mocks/response_actions_http_mocks.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/management/mocks/response_actions_http_mocks.ts @@ -17,6 +17,7 @@ import { GET_PROCESSES_ROUTE, ISOLATE_HOST_ROUTE_V2, KILL_PROCESS_ROUTE, + RUN_SCRIPT_ROUTE, SCAN_ROUTE, SUSPEND_PROCESS_ROUTE, UNISOLATE_HOST_ROUTE_V2, @@ -42,6 +43,8 @@ import type { ResponseActionScanParameters, ResponseActionUploadOutputContent, ResponseActionUploadParameters, + ResponseActionRunScriptOutputContent, + ResponseActionRunScriptParameters, } from '../../../common/endpoint/types'; export type ResponseActionsHttpMocksInterface = ResponseProvidersInterface<{ @@ -73,6 +76,8 @@ export type ResponseActionsHttpMocksInterface = ResponseProvidersInterface<{ >; scan: () => ActionDetailsApiResponse; + + runscript: () => ActionDetailsApiResponse; }>; export const responseActionsHttpMocks = httpHandlerMockFactory([ @@ -273,6 +278,25 @@ export const responseActionsHttpMocks = httpHandlerMockFactory => { + const generator = new EndpointActionGenerator('seed'); + const response = generator.generateActionDetails< + ResponseActionRunScriptOutputContent, + ResponseActionRunScriptParameters + >({ + command: 'runscript', + }); + return { data: response }; }, }, diff --git a/x-pack/solutions/security/plugins/security_solution/scripts/endpoint/common/response_actions.ts b/x-pack/solutions/security/plugins/security_solution/scripts/endpoint/common/response_actions.ts index 1987a019f888..d54df140b3b4 100644 --- a/x-pack/solutions/security/plugins/security_solution/scripts/endpoint/common/response_actions.ts +++ b/x-pack/solutions/security/plugins/security_solution/scripts/endpoint/common/response_actions.ts @@ -27,6 +27,7 @@ import type { ResponseActionGetFileParameters, EndpointActionResponseDataOutput, ResponseActionScanOutputContent, + ResponseActionRunScriptOutputContent, } from '../../../common/endpoint/types'; import { getFileDownloadId } from '../../../common/endpoint/service/response_actions/get_file_download_id'; import { @@ -138,6 +139,15 @@ export const sendEndpointActionResponse = async ( .content as unknown as ResponseActionExecuteOutputContent ).stderr = 'execute command timed out'; } + if ( + endpointResponse.EndpointActions.data.command === 'runscript' && + endpointResponse.EndpointActions.data.output + ) { + ( + endpointResponse.EndpointActions.data.output + .content as unknown as ResponseActionRunScriptOutputContent + ).stderr = 'runscript command timed out'; + } } await esClient.index({ diff --git a/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/crowdstrike_actions_client.ts b/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/crowdstrike_actions_client.ts index 0c505b12c129..25fcb30be494 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/crowdstrike_actions_client.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/crowdstrike_actions_client.ts @@ -11,8 +11,13 @@ import { CROWDSTRIKE_CONNECTOR_ID, } from '@kbn/stack-connectors-plugin/common/crowdstrike/constants'; import type { SearchResponse } from '@elastic/elasticsearch/lib/api/types'; -import type { CrowdstrikeBaseApiResponse } from '@kbn/stack-connectors-plugin/common/crowdstrike/types'; +import type { + CrowdstrikeBaseApiResponse, + CrowdStrikeExecuteRTRResponse, +} from '@kbn/stack-connectors-plugin/common/crowdstrike/types'; import { v4 as uuidv4 } from 'uuid'; + +import { mapParametersToCrowdStrikeArguments } from './utils'; import type { CrowdstrikeActionRequestCommonMeta } from '../../../../../../common/endpoint/types/crowdstrike'; import type { CommonResponseActionMethodOptions, @@ -305,15 +310,99 @@ export class CrowdstrikeActionsClient extends ResponseActionsClientImpl { ): Promise< ActionDetails > { - // TODO: just a placeholder for now - return Promise.resolve({ output: 'runscript', code: 200 }) as never as ActionDetails< - ResponseActionRunScriptOutputContent, - ResponseActionRunScriptParameters - >; + const reqIndexOptions: ResponseActionsClientWriteActionRequestToEndpointIndexOptions = { + ...actionRequest, + ...this.getMethodOptions(options), + command: 'runscript', + }; + + let actionResponse: ActionTypeExecutorResult | undefined; + if (!reqIndexOptions.error) { + let error = (await this.validateRequest(reqIndexOptions)).error; + if (!error) { + if (!reqIndexOptions.actionId) { + reqIndexOptions.actionId = uuidv4(); + } + + try { + actionResponse = (await this.sendAction(SUB_ACTION.EXECUTE_ADMIN_RTR, { + actionParameters: { comment: this.buildExternalComment(reqIndexOptions) }, + command: mapParametersToCrowdStrikeArguments('runscript', actionRequest.parameters), + endpoint_ids: actionRequest.endpoint_ids, + })) as ActionTypeExecutorResult; + } catch (err) { + error = err; + } + } + + reqIndexOptions.error = error?.message; + + if (!this.options.isAutomated && error) { + throw error; + } + } + + const actionRequestDoc = await this.writeActionRequestToEndpointIndex(reqIndexOptions); + + // Ensure actionResponse is assigned before using it + if (actionResponse) { + await this.completeCrowdstrikeBatchAction(actionResponse, actionRequestDoc); + } + + await this.updateCases({ + command: reqIndexOptions.command, + caseIds: reqIndexOptions.case_ids, + alertIds: reqIndexOptions.alert_ids, + actionId: actionRequestDoc.EndpointActions.action_id, + hosts: actionRequest.endpoint_ids.map((agentId) => { + return { + hostId: agentId, + hostname: actionRequestDoc.EndpointActions.data.hosts?.[agentId].name ?? '', + }; + }), + comment: reqIndexOptions.comment, + }); + + return this.fetchActionDetails(actionRequestDoc.EndpointActions.action_id); + } + + private async completeCrowdstrikeBatchAction( + actionResponse: ActionTypeExecutorResult, + doc: LogsEndpointAction + ): Promise { + const agentId = doc.agent.id as string; + const stdout = actionResponse.data?.combined.resources[agentId].stdout || ''; + const stderr = actionResponse.data?.combined.resources[agentId].stderr || ''; + const error = actionResponse.data?.combined.resources[agentId].errors?.[0]; + const options = { + actionId: doc.EndpointActions.action_id, + agentId, + data: { + ...doc.EndpointActions.data, + output: { + content: { + stdout, + stderr, + code: '200', + }, + type: 'text' as const, + }, + }, + ...(error + ? { + error: { + code: error.code, + message: `Crowdstrike action failed: ${error.message}`, + }, + } + : {}), + }; + + await this.writeActionResponseToEndpointIndex(options); } private async completeCrowdstrikeAction( - actionResponse: ActionTypeExecutorResult | undefined, + actionResponse: ActionTypeExecutorResult, doc: LogsEndpointAction ): Promise { const options = { diff --git a/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/utils.test.ts b/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/utils.test.ts new file mode 100644 index 000000000000..f961c7a3d1d6 --- /dev/null +++ b/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/utils.test.ts @@ -0,0 +1,51 @@ +/* + * 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 { mapParametersToCrowdStrikeArguments } from './utils'; + +describe('mapParametersToCrowdStrikeArguments', () => { + it('returns command with single word parameter as is', () => { + const result = mapParametersToCrowdStrikeArguments('runscript', { raw: 'echo Hello' }); + expect(result).toBe('runscript --Raw=```echo Hello```'); + }); + + it('wraps multi-word parameter in triple backticks', () => { + const result = mapParametersToCrowdStrikeArguments('runscript', { + commandLine: 'echo Hello World', + }); + expect(result).toBe('runscript --CommandLine=```echo Hello World```'); + }); + + it('leaves parameter already wrapped in triple backticks unchanged', () => { + const result = mapParametersToCrowdStrikeArguments('runscript', { + commandLine: '```echo Hello World```', + }); + expect(result).toBe('runscript --CommandLine=```echo Hello World```'); + }); + + it('trims spaces from parameter values', () => { + const result = mapParametersToCrowdStrikeArguments('runscript', { raw: ' echo Hello ' }); + expect(result).toBe('runscript --Raw=```echo Hello```'); + }); + + it('handles multiple parameters correctly', () => { + const result = mapParametersToCrowdStrikeArguments('runscript', { + raw: 'echo Hello', + commandLine: 'echo Hello World', + hostPath: '/home/user', + cloudFile: 'file.txt', + }); + expect(result).toBe( + 'runscript --Raw=```echo Hello``` --CommandLine=```echo Hello World``` --HostPath=/home/user --CloudFile=file.txt' + ); + }); + + it('returns command with no parameters correctly', () => { + const result = mapParametersToCrowdStrikeArguments('runscript', {}); + expect(result).toBe('runscript '); + }); +}); diff --git a/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/utils.ts b/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/utils.ts new file mode 100644 index 000000000000..2ec2ec2bb0cf --- /dev/null +++ b/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/actions/clients/crowdstrike/utils.ts @@ -0,0 +1,43 @@ +/* + * 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 { upperFirst } from 'lodash'; +import type { RunScriptActionRequestBody } from '../../../../../../common/api/endpoint'; + +export const mapParametersToCrowdStrikeArguments = ( + commandName: string, + parameters: RunScriptActionRequestBody['parameters'] +): string => { + // Map each parameter to the required syntax and join them with spaces + // In short: this function has to transform the parameters object into a string that can be used as a CS command + // One word commands eg. 'ls' can go as it is, but if there are more elements eg. 'ls -l', they have to be wrapped in triple backticks + const commandParts = Object.entries(parameters).map(([key, value]) => { + // Check and process the parameter value + let sanitizedValue; + if (typeof value === 'string') { + if (/^```.*```$/.test(value)) { + // If already wrapped in triple backticks, leave unchanged + sanitizedValue = value; + } else { + const strippedValue = value.trim(); // Remove spaces at the beginning and end + if (strippedValue.split(/\s+/).length === 1) { + // If it's a single element (no spaces), use it as-is + sanitizedValue = strippedValue; + } else { + // If it contains multiple elements (spaces), wrap in ``` + sanitizedValue = `\`\`\`${strippedValue}\`\`\``; + } + } + } else { + sanitizedValue = value; + } + return `--${upperFirst(key)}=${sanitizedValue}`; + }); + + // Combine the base command with the constructed parameters + return `${commandName} ${commandParts.join(' ')}`; +}; diff --git a/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/actions/clients/mocks.ts b/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/actions/clients/mocks.ts index 6360ceba71ce..00b4774d9489 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/actions/clients/mocks.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/endpoint/services/actions/clients/mocks.ts @@ -248,7 +248,7 @@ const createRunScriptOptionsMock = ( const options: RunScriptActionRequestBody = { ...createNoParamsResponseActionOptionsMock(), parameters: { - Raw: 'ls', + raw: 'ls', }, }; return merge(options, overrides); From 3e06d6a08842d1ce493e87692de5e9932b751146 Mon Sep 17 00:00:00 2001 From: Sergi Romeu Date: Tue, 17 Dec 2024 16:55:55 +0100 Subject: [PATCH 04/60] [ECO][Inventory] Temporary skip Cypress tests (#204578) ## Summary Related to #204558 Skipping cypress Inventory tests to avoid having the pipeline broken while we adapt them --- .../inventory/e2e/cypress/e2e/alert_count/alert_count.cy.ts | 3 ++- .../inventory/e2e/cypress/e2e/home.cy.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/observability_solution/inventory/e2e/cypress/e2e/alert_count/alert_count.cy.ts b/x-pack/plugins/observability_solution/inventory/e2e/cypress/e2e/alert_count/alert_count.cy.ts index ac5fa17ecb08..b303adc21d1f 100644 --- a/x-pack/plugins/observability_solution/inventory/e2e/cypress/e2e/alert_count/alert_count.cy.ts +++ b/x-pack/plugins/observability_solution/inventory/e2e/cypress/e2e/alert_count/alert_count.cy.ts @@ -33,7 +33,8 @@ const verifyAlertsTableCount = (alertsCount: string) => { verifyNumber(cy.getByTestSubj('toolbar-alerts-count'), alertsCount); }; -describe('Alert count', () => { +// Temporary skipping those test, will be enabled in the future once we fix them https://github.com/elastic/kibana/issues/204558 +describe.skip('Alert count', () => { beforeEach(() => { cy.loginAsSuperUser(); diff --git a/x-pack/plugins/observability_solution/inventory/e2e/cypress/e2e/home.cy.ts b/x-pack/plugins/observability_solution/inventory/e2e/cypress/e2e/home.cy.ts index c2e7f1232e6a..57ca19e429a1 100644 --- a/x-pack/plugins/observability_solution/inventory/e2e/cypress/e2e/home.cy.ts +++ b/x-pack/plugins/observability_solution/inventory/e2e/cypress/e2e/home.cy.ts @@ -11,7 +11,8 @@ import { generateEntities, generateLogs, generateTraces } from './generate_data' const start = '2024-10-16T00:00:00.000Z'; const end = '2024-10-16T00:15:00.000Z'; -describe('Home page', () => { +// Temporary skipping those test, will be enabled in the future once we fix them https://github.com/elastic/kibana/issues/204558 +describe.skip('Home page', () => { beforeEach(() => { cy.loginAsSuperUser(); }); From c1bda1d50145f764956de9ed8557bd21f6ba136f Mon Sep 17 00:00:00 2001 From: Jean-Louis Leysens Date: Tue, 17 Dec 2024 17:10:34 +0100 Subject: [PATCH 05/60] [HTTP] Default to `oldest` in dev (#203225) ## Summary Changes the default HTTP version resolution in dev to `oldest` (matches non-dev). The original intention was to guide developers to always sending a versioned header when interacting with Kibana. In practice, however, developers just set-and-forget the following configuration to get around this annoyance: ```yaml server.versioned.versionResolution: 'oldest' ``` ...undoing the original intention. Having this guidance does not justify the confusion/annoyance that this dev-only default creates and so this proposal simply removes it. To better guide developers we can consider other options like: make `version` required in core's HTTP client interface (lots of updates...), doing something in tests, adding docs, something else or any combo of these. Given the fact that developers generally discover this workaround and undo the originally intended guidance, I'm proposing not blocking on first having another approach in place. --- .../http/core-http-server-internal/src/http_config.test.ts | 4 ++-- .../core/http/core-http-server-internal/src/http_config.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/core/http/core-http-server-internal/src/http_config.test.ts b/packages/core/http/core-http-server-internal/src/http_config.test.ts index 4ba13489552b..fa2fbe7ad9f3 100644 --- a/packages/core/http/core-http-server-internal/src/http_config.test.ts +++ b/packages/core/http/core-http-server-internal/src/http_config.test.ts @@ -517,9 +517,9 @@ describe('versioned', () => { ).toThrow(/failed validation/); }); - it('defaults version resolution "none" when in dev', () => { + it('defaults version resolution "oldest" when in dev', () => { expect(config.schema.validate({}, { dev: true })).toMatchObject({ - versioned: { versionResolution: 'none' }, + versioned: { versionResolution: 'oldest' }, }); }); }); diff --git a/packages/core/http/core-http-server-internal/src/http_config.ts b/packages/core/http/core-http-server-internal/src/http_config.ts index 11c1afc41033..4ba9bcb9e88b 100644 --- a/packages/core/http/core-http-server-internal/src/http_config.ts +++ b/packages/core/http/core-http-server-internal/src/http_config.ts @@ -213,7 +213,7 @@ const configSchema = schema.object( * Which handler resolution algo to use for public routes: "newest" or "oldest". * * @note Internal routes always require a version to be specified. - * @note in development we have an additional option "none" which is also the default in dev. + * @note in development we have an additional option "none". * This prevents any fallbacks and requires that a version specified. * Useful for ensuring that a given client always specifies a version. */ @@ -221,7 +221,7 @@ const configSchema = schema.object( schema.contextRef('dev'), true, schema.oneOf([schema.literal('newest'), schema.literal('oldest'), schema.literal('none')], { - defaultValue: 'none', + defaultValue: 'oldest', }), schema.oneOf([schema.literal('newest'), schema.literal('oldest')], { defaultValue: 'oldest', From 2c5544cfc87cfa11800e4ab687ab39ec445b2d74 Mon Sep 17 00:00:00 2001 From: Kfir Peled <61654899+kfirpeled@users.noreply.github.com> Date: Tue, 17 Dec 2024 16:17:05 +0000 Subject: [PATCH 06/60] [Cloud Security] Bug fix - show origin event's with primary color instead of danger (#204425) ## Summary Bug description: **Actual:** The node's color is red when exploring events through Explore or Timeline. **The expected** color of events is blue. Before: ![385007418-f0a6bd7e-dbc9-43ad-99b8-a07bcad85075](https://github.com/user-attachments/assets/7bf198f3-9a32-4d27-84db-3e97b5bf312b) After: https://github.com/user-attachments/assets/f1a10deb-65f5-43be-a351-6fca34f855cb https://github.com/user-attachments/assets/223534f4-09a2-4b41-85bc-c2195dd153ba **How to test this PR:** - Enable the feature flag `kibana.dev.yml`: ```yaml uiSettings.overrides.securitySolution:enableVisualizationsInFlyout: true xpack.securitySolution.enableExperimental: ['graphVisualizationInFlyoutEnabled'] ``` - Load mocked data: ```bash node scripts/es_archiver load x-pack/test/cloud_security_posture_functional/es_archives/logs_gcp_audit \ --es-url http://elastic:changeme@localhost:9200 \ --kibana-url http://elastic:changeme@localhost:5601 node scripts/es_archiver load x-pack/test/cloud_security_posture_functional/es_archives/security_alerts \ --es-url http://elastic:changeme@localhost:9200 \ --kibana-url http://elastic:changeme@localhost:5601 ``` - Make sure you include data from Oct 13 2024. (in the video I use Last year) ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed --- .../common/schema/graph/v1.ts | 4 +- .../graph_investigation.tsx | 45 ++- .../src/hooks/use_fetch_graph_data.test.tsx | 8 +- .../graph/src/hooks/use_fetch_graph_data.ts | 6 +- .../server/routes/graph/route.ts | 4 +- .../server/routes/graph/v1.ts | 53 ++-- .../left/components/graph_visualization.tsx | 23 +- .../left/tabs/visualize_tab.tsx | 4 +- .../graph_preview_container.test.tsx | 117 +++++++- .../components/graph_preview_container.tsx | 5 +- .../visualizations_section.test.tsx | 1 + .../components/visualizations_section.tsx | 4 +- .../shared/hooks/use_graph_preview.test.tsx | 259 ++++++++++++------ .../shared/hooks/use_graph_preview.ts | 16 +- .../apis/cloud_security_posture/graph.ts | 2 +- .../test/cloud_security_posture_api/config.ts | 10 +- .../routes/graph.ts | 63 ++++- .../security/cloud_security_posture/graph.ts | 4 +- 18 files changed, 483 insertions(+), 145 deletions(-) diff --git a/x-pack/platform/packages/shared/kbn-cloud-security-posture/common/schema/graph/v1.ts b/x-pack/platform/packages/shared/kbn-cloud-security-posture/common/schema/graph/v1.ts index 076c685aca5b..5b1a48cf940b 100644 --- a/x-pack/platform/packages/shared/kbn-cloud-security-posture/common/schema/graph/v1.ts +++ b/x-pack/platform/packages/shared/kbn-cloud-security-posture/common/schema/graph/v1.ts @@ -12,7 +12,9 @@ export const graphRequestSchema = schema.object({ nodesLimit: schema.maybe(schema.number()), showUnknownTarget: schema.maybe(schema.boolean()), query: schema.object({ - eventIds: schema.arrayOf(schema.string()), + originEventIds: schema.arrayOf( + schema.object({ id: schema.string(), isAlert: schema.boolean() }) + ), // TODO: use zod for range validation instead of config schema start: schema.oneOf([schema.number(), schema.string()]), end: schema.oneOf([schema.number(), schema.string()]), diff --git a/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/src/components/graph_investigation/graph_investigation.tsx b/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/src/components/graph_investigation/graph_investigation.tsx index 081b4ec28c6a..bd57082ba4cb 100644 --- a/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/src/components/graph_investigation/graph_investigation.tsx +++ b/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/src/components/graph_investigation/graph_investigation.tsx @@ -126,21 +126,46 @@ const useGraphPopovers = ( }; interface GraphInvestigationProps { - dataView: DataView; - eventIds: string[]; - timestamp: string | null; + /** + * The initial state to use for the graph investigation view. + */ + initialState: { + /** + * The data view to use for the graph investigation view. + */ + dataView: DataView; + + /** + * The origin events for the graph investigation view. + */ + originEventIds: Array<{ + /** + * The ID of the origin event. + */ + id: string; + + /** + * A flag indicating whether the origin event is an alert or not. + */ + isAlert: boolean; + }>; + + /** + * The initial timerange for the graph investigation view. + */ + timeRange: TimeRange; + }; } /** * Graph investigation view allows the user to expand nodes and view related entities. */ export const GraphInvestigation: React.FC = memo( - ({ dataView, eventIds, timestamp = new Date().toISOString() }: GraphInvestigationProps) => { + ({ + initialState: { dataView, originEventIds, timeRange: initialTimeRange }, + }: GraphInvestigationProps) => { const [searchFilters, setSearchFilters] = useState(() => []); - const [timeRange, setTimeRange] = useState({ - from: `${timestamp}||-30m`, - to: `${timestamp}||+30m`, - }); + const [timeRange, setTimeRange] = useState(initialTimeRange); const { services: { uiSettings }, @@ -153,7 +178,7 @@ export const GraphInvestigation: React.FC = memo( [...searchFilters], getEsQueryConfig(uiSettings as Parameters[0]) ), - [searchFilters, dataView, uiSettings] + [dataView, searchFilters, uiSettings] ); const { nodeExpandPopover, openPopoverCallback } = useGraphPopovers( @@ -166,7 +191,7 @@ export const GraphInvestigation: React.FC = memo( const { data, refresh, isFetching } = useFetchGraphData({ req: { query: { - eventIds, + originEventIds, esQuery: query, start: timeRange.from, end: timeRange.to, diff --git a/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/src/hooks/use_fetch_graph_data.test.tsx b/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/src/hooks/use_fetch_graph_data.test.tsx index e494ff0957ec..da5eaee9bfbf 100644 --- a/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/src/hooks/use_fetch_graph_data.test.tsx +++ b/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/src/hooks/use_fetch_graph_data.test.tsx @@ -33,7 +33,7 @@ describe('useFetchGraphData', () => { return useFetchGraphData({ req: { query: { - eventIds: [], + originEventIds: [], start: '2021-09-01T00:00:00.000Z', end: '2021-09-01T23:59:59.999Z', }, @@ -52,7 +52,7 @@ describe('useFetchGraphData', () => { return useFetchGraphData({ req: { query: { - eventIds: [], + originEventIds: [], start: '2021-09-01T00:00:00.000Z', end: '2021-09-01T23:59:59.999Z', }, @@ -75,7 +75,7 @@ describe('useFetchGraphData', () => { return useFetchGraphData({ req: { query: { - eventIds: [], + originEventIds: [], start: '2021-09-01T00:00:00.000Z', end: '2021-09-01T23:59:59.999Z', }, @@ -98,7 +98,7 @@ describe('useFetchGraphData', () => { return useFetchGraphData({ req: { query: { - eventIds: [], + originEventIds: [], start: '2021-09-01T00:00:00.000Z', end: '2021-09-01T23:59:59.999Z', }, diff --git a/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/src/hooks/use_fetch_graph_data.ts b/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/src/hooks/use_fetch_graph_data.ts index 74cca4693e80..477492a3bbb7 100644 --- a/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/src/hooks/use_fetch_graph_data.ts +++ b/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/src/hooks/use_fetch_graph_data.ts @@ -81,13 +81,13 @@ export const useFetchGraphData = ({ options, }: UseFetchGraphDataParams): UseFetchGraphDataResult => { const queryClient = useQueryClient(); - const { esQuery, eventIds, start, end } = req.query; + const { esQuery, originEventIds, start, end } = req.query; const { services: { http }, } = useKibana(); const QUERY_KEY = useMemo( - () => ['useFetchGraphData', eventIds, start, end, esQuery], - [end, esQuery, eventIds, start] + () => ['useFetchGraphData', originEventIds, start, end, esQuery], + [end, esQuery, originEventIds, start] ); const { isLoading, isError, data, isFetching } = useQuery( diff --git a/x-pack/solutions/security/plugins/cloud_security_posture/server/routes/graph/route.ts b/x-pack/solutions/security/plugins/cloud_security_posture/server/routes/graph/route.ts index f9544b656f92..f65574781585 100644 --- a/x-pack/solutions/security/plugins/cloud_security_posture/server/routes/graph/route.ts +++ b/x-pack/solutions/security/plugins/cloud_security_posture/server/routes/graph/route.ts @@ -43,7 +43,7 @@ export const defineGraphRoute = (router: CspRouter) => const cspContext = await context.csp; const { nodesLimit, showUnknownTarget = false } = request.body; - const { eventIds, start, end, esQuery } = request.body.query as GraphRequest['query']; + const { originEventIds, start, end, esQuery } = request.body.query as GraphRequest['query']; const spaceId = (await cspContext.spaces?.spacesService?.getActiveSpace(request))?.id; try { @@ -53,7 +53,7 @@ export const defineGraphRoute = (router: CspRouter) => esClient: cspContext.esClient, }, query: { - eventIds, + originEventIds, spaceId, start, end, diff --git a/x-pack/solutions/security/plugins/cloud_security_posture/server/routes/graph/v1.ts b/x-pack/solutions/security/plugins/cloud_security_posture/server/routes/graph/v1.ts index b14a2ba3e06a..d506bb856e76 100644 --- a/x-pack/solutions/security/plugins/cloud_security_posture/server/routes/graph/v1.ts +++ b/x-pack/solutions/security/plugins/cloud_security_posture/server/routes/graph/v1.ts @@ -33,7 +33,8 @@ interface GraphEdge { action: string; targetIds: string[] | string; eventOutcome: string; - isAlert: boolean; + isOrigin: boolean; + isOriginAlert: boolean; } interface LabelEdges { @@ -46,10 +47,15 @@ interface GraphContextServices { esClient: IScopedClusterClient; } +interface OriginEventId { + id: string; + isAlert: boolean; +} + interface GetGraphParams { services: GraphContextServices; query: { - eventIds: string[]; + originEventIds: OriginEventId[]; spaceId?: string; start: string | number; end: string | number; @@ -61,11 +67,13 @@ interface GetGraphParams { export const getGraph = async ({ services: { esClient, logger }, - query: { eventIds, spaceId = 'default', start, end, esQuery }, + query: { originEventIds, spaceId = 'default', start, end, esQuery }, showUnknownTarget, nodesLimit, }: GetGraphParams): Promise> => { - logger.trace(`Fetching graph for [eventIds: ${eventIds.join(', ')}] in [spaceId: ${spaceId}]`); + logger.trace( + `Fetching graph for [originEventIds: ${originEventIds.join(', ')}] in [spaceId: ${spaceId}]` + ); const results = await fetchGraph({ esClient, @@ -73,7 +81,7 @@ export const getGraph = async ({ logger, start, end, - eventIds, + originEventIds, esQuery, }); @@ -132,7 +140,7 @@ const fetchGraph = async ({ logger, start, end, - eventIds, + originEventIds, showUnknownTarget, esQuery, }: { @@ -140,15 +148,21 @@ const fetchGraph = async ({ logger: Logger; start: string | number; end: string | number; - eventIds: string[]; + originEventIds: OriginEventId[]; showUnknownTarget: boolean; esQuery?: EsQuery; }): Promise> => { + const originAlertIds = originEventIds.filter((originEventId) => originEventId.isAlert); const query = `from logs-* | WHERE event.action IS NOT NULL AND actor.entity.id IS NOT NULL -| EVAL isAlert = ${ - eventIds.length > 0 - ? `event.id in (${eventIds.map((_id, idx) => `?al_id${idx}`).join(', ')})` +| EVAL isOrigin = ${ + originEventIds.length > 0 + ? `event.id in (${originEventIds.map((_id, idx) => `?og_id${idx}`).join(', ')})` + : 'false' + } +| EVAL isOriginAlert = isOrigin AND ${ + originAlertIds.length > 0 + ? `event.id in (${originAlertIds.map((_id, idx) => `?og_alrt_id${idx}`).join(', ')})` : 'false' } | STATS badge = COUNT(*), @@ -159,19 +173,26 @@ const fetchGraph = async ({ action = event.action, targetIds = target.entity.id, eventOutcome = event.outcome, - isAlert + isOrigin, + isOriginAlert | LIMIT 1000 -| SORT isAlert DESC`; +| SORT isOrigin DESC`; logger.trace(`Executing query [${query}]`); + const eventIds = originEventIds.map((originEventId) => originEventId.id); return await esClient.asCurrentUser.helpers .esql({ columnar: false, filter: buildDslFilter(eventIds, showUnknownTarget, start, end, esQuery), query, // @ts-ignore - types are not up to date - params: [...eventIds.map((id, idx) => ({ [`al_id${idx}`]: id }))], + params: [ + ...originEventIds.map((originEventId, idx) => ({ [`og_id${idx}`]: originEventId.id })), + ...originEventIds + .filter((originEventId) => originEventId.isAlert) + .map((originEventId, idx) => ({ [`og_alrt_id${idx}`]: originEventId.id })), + ], }) .toRecords(); }; @@ -238,7 +259,7 @@ const createNodes = (records: GraphEdge[], context: Omit { const dataView = useGetScopedSourcererDataView({ sourcererScope: SourcererScopeName.default, }); - const { getFieldsData, dataAsNestedObject } = useDocumentDetailsContext(); - const { eventIds, timestamp } = useGraphPreview({ + const { getFieldsData, dataAsNestedObject, dataFormattedForFieldBrowser } = + useDocumentDetailsContext(); + const { + eventIds, + timestamp = new Date().toISOString(), + isAlert, + } = useGraphPreview({ getFieldsData, ecsData: dataAsNestedObject, + dataFormattedForFieldBrowser, }); + const originEventIds = eventIds.map((id) => ({ id, isAlert })); + return (
{ > {dataView && ( }> - + )}
diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/tabs/visualize_tab.tsx b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/tabs/visualize_tab.tsx index 89e00e06e3a4..1a8e5906e247 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/tabs/visualize_tab.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/tabs/visualize_tab.tsx @@ -88,7 +88,8 @@ const graphVisualizationButton: EuiButtonGroupOptionProps = { * Visualize view displayed in the document details expandable flyout left section */ export const VisualizeTab = memo(() => { - const { scopeId, getFieldsData, dataAsNestedObject } = useDocumentDetailsContext(); + const { scopeId, getFieldsData, dataAsNestedObject, dataFormattedForFieldBrowser } = + useDocumentDetailsContext(); const { openPreviewPanel } = useExpandableFlyoutApi(); const panels = useExpandableFlyoutState(); const [activeVisualizationId, setActiveVisualizationId] = useState( @@ -123,6 +124,7 @@ export const VisualizeTab = memo(() => { const { hasGraphRepresentation } = useGraphPreview({ getFieldsData, ecsData: dataAsNestedObject, + dataFormattedForFieldBrowser, }); const isGraphFeatureEnabled = useIsExperimentalFeatureEnabled( diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/graph_preview_container.test.tsx b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/graph_preview_container.test.tsx index c805f2a3c67a..9965c5300e71 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/graph_preview_container.test.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/graph_preview_container.test.tsx @@ -86,6 +86,7 @@ describe('', () => { timestamp, eventIds: [], hasGraphRepresentation: true, + isAlert: true, }); const { getByTestId, queryByTestId, findByTestId } = renderGraphPreview(); @@ -111,7 +112,109 @@ describe('', () => { expect(mockUseFetchGraphData.mock.calls[0][0]).toEqual({ req: { query: { - eventIds: [], + originEventIds: [], + start: `${timestamp}||-30m`, + end: `${timestamp}||+30m`, + }, + }, + options: { + enabled: true, + refetchOnWindowFocus: false, + }, + }); + }); + + it('should render component for alert', async () => { + mockUseFetchGraphData.mockReturnValue({ + isLoading: false, + isError: false, + data: { nodes: DEFAULT_NODES, edges: [] }, + }); + + const timestamp = new Date().toISOString(); + + (useGraphPreview as jest.Mock).mockReturnValue({ + timestamp, + eventIds: ['eventId'], + isAlert: true, + hasGraphRepresentation: true, + }); + + const { getByTestId, queryByTestId, findByTestId } = renderGraphPreview(); + + // Using findByTestId to wait for the component to be rendered because it is a lazy loaded component + expect(await findByTestId(GRAPH_PREVIEW_TEST_ID)).toBeInTheDocument(); + expect( + getByTestId(EXPANDABLE_PANEL_HEADER_TITLE_LINK_TEST_ID(GRAPH_PREVIEW_TEST_ID)) + ).toBeInTheDocument(); + expect( + queryByTestId(EXPANDABLE_PANEL_TOGGLE_ICON_TEST_ID(GRAPH_PREVIEW_TEST_ID)) + ).not.toBeInTheDocument(); + expect( + getByTestId(EXPANDABLE_PANEL_HEADER_TITLE_ICON_TEST_ID(GRAPH_PREVIEW_TEST_ID)) + ).toBeInTheDocument(); + expect( + getByTestId(EXPANDABLE_PANEL_CONTENT_TEST_ID(GRAPH_PREVIEW_TEST_ID)) + ).toBeInTheDocument(); + expect( + queryByTestId(EXPANDABLE_PANEL_HEADER_TITLE_TEXT_TEST_ID(GRAPH_PREVIEW_TEST_ID)) + ).not.toBeInTheDocument(); + expect(mockUseFetchGraphData).toHaveBeenCalled(); + expect(mockUseFetchGraphData.mock.calls[0][0]).toEqual({ + req: { + query: { + originEventIds: [{ id: 'eventId', isAlert: true }], + start: `${timestamp}||-30m`, + end: `${timestamp}||+30m`, + }, + }, + options: { + enabled: true, + refetchOnWindowFocus: false, + }, + }); + }); + + it('should render component for event', async () => { + mockUseFetchGraphData.mockReturnValue({ + isLoading: false, + isError: false, + data: { nodes: DEFAULT_NODES, edges: [] }, + }); + + const timestamp = new Date().toISOString(); + + (useGraphPreview as jest.Mock).mockReturnValue({ + timestamp, + eventIds: ['eventId'], + isAlert: false, + hasGraphRepresentation: true, + }); + + const { getByTestId, queryByTestId, findByTestId } = renderGraphPreview(); + + // Using findByTestId to wait for the component to be rendered because it is a lazy loaded component + expect(await findByTestId(GRAPH_PREVIEW_TEST_ID)).toBeInTheDocument(); + expect( + getByTestId(EXPANDABLE_PANEL_HEADER_TITLE_LINK_TEST_ID(GRAPH_PREVIEW_TEST_ID)) + ).toBeInTheDocument(); + expect( + queryByTestId(EXPANDABLE_PANEL_TOGGLE_ICON_TEST_ID(GRAPH_PREVIEW_TEST_ID)) + ).not.toBeInTheDocument(); + expect( + getByTestId(EXPANDABLE_PANEL_HEADER_TITLE_ICON_TEST_ID(GRAPH_PREVIEW_TEST_ID)) + ).toBeInTheDocument(); + expect( + getByTestId(EXPANDABLE_PANEL_CONTENT_TEST_ID(GRAPH_PREVIEW_TEST_ID)) + ).toBeInTheDocument(); + expect( + queryByTestId(EXPANDABLE_PANEL_HEADER_TITLE_TEXT_TEST_ID(GRAPH_PREVIEW_TEST_ID)) + ).not.toBeInTheDocument(); + expect(mockUseFetchGraphData).toHaveBeenCalled(); + expect(mockUseFetchGraphData.mock.calls[0][0]).toEqual({ + req: { + query: { + originEventIds: [{ id: 'eventId', isAlert: false }], start: `${timestamp}||-30m`, end: `${timestamp}||+30m`, }, @@ -136,6 +239,7 @@ describe('', () => { timestamp, eventIds: [], hasGraphRepresentation: true, + isAlert: true, }); const { getByTestId, queryByTestId, findByTestId } = renderGraphPreview({ @@ -164,7 +268,7 @@ describe('', () => { expect(mockUseFetchGraphData.mock.calls[0][0]).toEqual({ req: { query: { - eventIds: [], + originEventIds: [], start: `${timestamp}||-30m`, end: `${timestamp}||+30m`, }, @@ -189,6 +293,7 @@ describe('', () => { timestamp, eventIds: [], hasGraphRepresentation: true, + isAlert: true, }); const { getByTestId, queryByTestId, findByTestId } = renderGraphPreview({ @@ -217,7 +322,7 @@ describe('', () => { expect(mockUseFetchGraphData.mock.calls[0][0]).toEqual({ req: { query: { - eventIds: [], + originEventIds: [], start: `${timestamp}||-30m`, end: `${timestamp}||+30m`, }, @@ -243,6 +348,7 @@ describe('', () => { timestamp, eventIds: [], hasGraphRepresentation: true, + isAlert: true, }); const { getByTestId, queryByTestId, findByTestId } = renderGraphPreview(); @@ -268,7 +374,7 @@ describe('', () => { expect(mockUseFetchGraphData.mock.calls[0][0]).toEqual({ req: { query: { - eventIds: [], + originEventIds: [], start: `${timestamp}||-30m`, end: `${timestamp}||+30m`, }, @@ -293,6 +399,7 @@ describe('', () => { timestamp, eventIds: [], hasGraphRepresentation: false, + isAlert: true, }); const { getByTestId, queryByTestId, findByTestId } = renderGraphPreview(); @@ -320,7 +427,7 @@ describe('', () => { expect(mockUseFetchGraphData.mock.calls[0][0]).toEqual({ req: { query: { - eventIds: [], + originEventIds: [], start: `${timestamp}||-30m`, end: `${timestamp}||+30m`, }, diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/graph_preview_container.tsx b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/graph_preview_container.tsx index 90a021877854..b4626f93e823 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/graph_preview_container.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/graph_preview_container.tsx @@ -31,6 +31,7 @@ export const GraphPreviewContainer: React.FC = () => { scopeId, isPreview, isPreviewMode, + dataFormattedForFieldBrowser, } = useDocumentDetailsContext(); const [visualizationInFlyoutEnabled] = useUiSetting$( @@ -49,16 +50,18 @@ export const GraphPreviewContainer: React.FC = () => { eventIds, timestamp = new Date().toISOString(), hasGraphRepresentation, + isAlert, } = useGraphPreview({ getFieldsData, ecsData: dataAsNestedObject, + dataFormattedForFieldBrowser, }); // TODO: default start and end might not capture the original event const { isLoading, isError, data } = useFetchGraphData({ req: { query: { - eventIds, + originEventIds: eventIds.map((id) => ({ id, isAlert })), start: `${timestamp}||-30m`, end: `${timestamp}||+30m`, }, diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/visualizations_section.test.tsx b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/visualizations_section.test.tsx index 6fb4d5d30b89..dc3b1f00e0d5 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/visualizations_section.test.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/visualizations_section.test.tsx @@ -106,6 +106,7 @@ describe('', () => { }); mockUseGraphPreview.mockReturnValue({ hasGraphRepresentation: true, + eventIds: [], }); mockUseFetchGraphData.mockReturnValue({ isLoading: false, diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/visualizations_section.tsx b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/visualizations_section.tsx index 23bea1f8fecd..467171cd49f2 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/visualizations_section.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/visualizations_section.tsx @@ -28,7 +28,8 @@ const KEY = 'visualizations'; */ export const VisualizationsSection = memo(() => { const expanded = useExpandSection({ title: KEY, defaultValue: false }); - const { dataAsNestedObject, getFieldsData } = useDocumentDetailsContext(); + const { dataAsNestedObject, getFieldsData, dataFormattedForFieldBrowser } = + useDocumentDetailsContext(); const [visualizationInFlyoutEnabled] = useUiSetting$( ENABLE_VISUALIZATIONS_IN_FLYOUT_SETTING @@ -42,6 +43,7 @@ export const VisualizationsSection = memo(() => { const { hasGraphRepresentation } = useGraphPreview({ getFieldsData, ecsData: dataAsNestedObject, + dataFormattedForFieldBrowser, }); const shouldShowGraphPreview = diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/shared/hooks/use_graph_preview.test.tsx b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/shared/hooks/use_graph_preview.test.tsx index 453f897d4e18..cf1ee8207839 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/shared/hooks/use_graph_preview.test.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/shared/hooks/use_graph_preview.test.tsx @@ -5,15 +5,18 @@ * 2.0. */ -import type { RenderHookResult } from '@testing-library/react'; +import type { TimelineEventsDetailsItem } from '@kbn/timelines-plugin/common'; import { renderHook } from '@testing-library/react'; -import type { UseGraphPreviewParams, UseGraphPreviewResult } from './use_graph_preview'; +import type { UseGraphPreviewParams } from './use_graph_preview'; import { useGraphPreview } from './use_graph_preview'; import type { GetFieldsData } from './use_get_fields_data'; import { mockFieldData } from '../mocks/mock_get_fields_data'; +import { mockDataFormattedForFieldBrowser } from '../mocks/mock_data_formatted_for_field_browser'; -const mockGetFieldsData: GetFieldsData = (field: string) => { - if (field === 'kibana.alert.original_event.id') { +const alertMockGetFieldsData: GetFieldsData = (field: string) => { + if (field === 'kibana.alert.uuid') { + return 'alertId'; + } else if (field === 'kibana.alert.original_event.id') { return 'eventId'; } else if (field === 'actor.entity.id') { return 'actorId'; @@ -24,18 +27,36 @@ const mockGetFieldsData: GetFieldsData = (field: string) => { return mockFieldData[field]; }; -describe('useGraphPreview', () => { - let hookResult: RenderHookResult; +const alertMockDataFormattedForFieldBrowser = mockDataFormattedForFieldBrowser; + +const eventMockGetFieldsData: GetFieldsData = (field: string) => { + if (field === 'kibana.alert.uuid') { + return; + } else if (field === 'kibana.alert.original_event.id') { + return; + } else if (field === 'event.id') { + return 'eventId'; + } else if (field === 'actor.entity.id') { + return 'actorId'; + } else if (field === 'target.entity.id') { + return 'targetId'; + } + return mockFieldData[field]; +}; + +const eventMockDataFormattedForFieldBrowser: TimelineEventsDetailsItem[] = []; + +describe('useGraphPreview', () => { it(`should return false when missing actor`, () => { const getFieldsData: GetFieldsData = (field: string) => { if (field === 'actor.entity.id') { return; } - return mockGetFieldsData(field); + return alertMockGetFieldsData(field); }; - hookResult = renderHook((props: UseGraphPreviewParams) => useGraphPreview(props), { + const hookResult = renderHook((props: UseGraphPreviewParams) => useGraphPreview(props), { initialProps: { getFieldsData, ecsData: { @@ -44,37 +65,41 @@ describe('useGraphPreview', () => { action: ['action'], }, }, + dataFormattedForFieldBrowser: alertMockDataFormattedForFieldBrowser, }, }); - const { hasGraphRepresentation, timestamp, eventIds, actorIds, action, targetIds } = - hookResult.result.current; - expect(hasGraphRepresentation).toEqual(false); - expect(timestamp).toEqual(mockFieldData['@timestamp'][0]); - expect(eventIds).toEqual(['eventId']); - expect(actorIds).toEqual([]); - expect(targetIds).toEqual(['targetId']); - expect(action).toEqual(['action']); + expect(hookResult.result.current).toStrictEqual({ + hasGraphRepresentation: false, + timestamp: mockFieldData['@timestamp'][0], + eventIds: ['eventId'], + actorIds: [], + action: ['action'], + targetIds: ['targetId'], + isAlert: true, + }); }); it(`should return false when missing event.action`, () => { - hookResult = renderHook((props: UseGraphPreviewParams) => useGraphPreview(props), { + const hookResult = renderHook((props: UseGraphPreviewParams) => useGraphPreview(props), { initialProps: { - getFieldsData: mockGetFieldsData, + getFieldsData: alertMockGetFieldsData, ecsData: { _id: 'id', }, + dataFormattedForFieldBrowser: alertMockDataFormattedForFieldBrowser, }, }); - const { hasGraphRepresentation, timestamp, eventIds, actorIds, action, targetIds } = - hookResult.result.current; - expect(hasGraphRepresentation).toEqual(false); - expect(timestamp).toEqual(mockFieldData['@timestamp'][0]); - expect(eventIds).toEqual(['eventId']); - expect(actorIds).toEqual(['actorId']); - expect(targetIds).toEqual(['targetId']); - expect(action).toEqual(undefined); + expect(hookResult.result.current).toStrictEqual({ + hasGraphRepresentation: false, + timestamp: mockFieldData['@timestamp'][0], + eventIds: ['eventId'], + actorIds: ['actorId'], + action: undefined, + targetIds: ['targetId'], + isAlert: true, + }); }); it(`should return false when missing target`, () => { @@ -82,26 +107,28 @@ describe('useGraphPreview', () => { if (field === 'target.entity.id') { return; } - return mockGetFieldsData(field); + return alertMockGetFieldsData(field); }; - hookResult = renderHook((props: UseGraphPreviewParams) => useGraphPreview(props), { + const hookResult = renderHook((props: UseGraphPreviewParams) => useGraphPreview(props), { initialProps: { getFieldsData, ecsData: { _id: 'id', }, + dataFormattedForFieldBrowser: alertMockDataFormattedForFieldBrowser, }, }); - const { hasGraphRepresentation, timestamp, eventIds, actorIds, action, targetIds } = - hookResult.result.current; - expect(hasGraphRepresentation).toEqual(false); - expect(timestamp).toEqual(mockFieldData['@timestamp'][0]); - expect(eventIds).toEqual(['eventId']); - expect(actorIds).toEqual(['actorId']); - expect(targetIds).toEqual([]); - expect(action).toEqual(undefined); + expect(hookResult.result.current).toStrictEqual({ + hasGraphRepresentation: false, + timestamp: mockFieldData['@timestamp'][0], + eventIds: ['eventId'], + actorIds: ['actorId'], + action: undefined, + targetIds: [], + isAlert: true, + }); }); it(`should return false when missing original_event.id`, () => { @@ -110,10 +137,10 @@ describe('useGraphPreview', () => { return; } - return mockGetFieldsData(field); + return alertMockGetFieldsData(field); }; - hookResult = renderHook((props: UseGraphPreviewParams) => useGraphPreview(props), { + const hookResult = renderHook((props: UseGraphPreviewParams) => useGraphPreview(props), { initialProps: { getFieldsData, ecsData: { @@ -122,17 +149,19 @@ describe('useGraphPreview', () => { action: ['action'], }, }, + dataFormattedForFieldBrowser: alertMockDataFormattedForFieldBrowser, }, }); - const { hasGraphRepresentation, timestamp, eventIds, actorIds, action, targetIds } = - hookResult.result.current; - expect(hasGraphRepresentation).toEqual(false); - expect(timestamp).toEqual(mockFieldData['@timestamp'][0]); - expect(eventIds).toEqual([]); - expect(actorIds).toEqual(['actorId']); - expect(targetIds).toEqual(['targetId']); - expect(action).toEqual(['action']); + expect(hookResult.result.current).toStrictEqual({ + hasGraphRepresentation: false, + timestamp: mockFieldData['@timestamp'][0], + eventIds: [], + actorIds: ['actorId'], + action: ['action'], + targetIds: ['targetId'], + isAlert: true, + }); }); it(`should return false when timestamp is missing`, () => { @@ -141,10 +170,10 @@ describe('useGraphPreview', () => { return; } - return mockGetFieldsData(field); + return alertMockGetFieldsData(field); }; - hookResult = renderHook((props: UseGraphPreviewParams) => useGraphPreview(props), { + const hookResult = renderHook((props: UseGraphPreviewParams) => useGraphPreview(props), { initialProps: { getFieldsData, ecsData: { @@ -153,45 +182,53 @@ describe('useGraphPreview', () => { action: ['action'], }, }, + dataFormattedForFieldBrowser: alertMockDataFormattedForFieldBrowser, }, }); - const { hasGraphRepresentation, timestamp, eventIds, actorIds, action, targetIds } = - hookResult.result.current; - expect(hasGraphRepresentation).toEqual(false); - expect(timestamp).toEqual(null); - expect(eventIds).toEqual(['eventId']); - expect(actorIds).toEqual(['actorId']); - expect(targetIds).toEqual(['targetId']); - expect(action).toEqual(['action']); + expect(hookResult.result.current).toStrictEqual({ + hasGraphRepresentation: false, + timestamp: null, + eventIds: ['eventId'], + actorIds: ['actorId'], + action: ['action'], + targetIds: ['targetId'], + isAlert: true, + }); }); - it(`should return true when alert is has graph preview`, () => { - hookResult = renderHook((props: UseGraphPreviewParams) => useGraphPreview(props), { + it(`should return true when event has graph graph preview`, () => { + const hookResult = renderHook((props: UseGraphPreviewParams) => useGraphPreview(props), { initialProps: { - getFieldsData: mockGetFieldsData, + getFieldsData: eventMockGetFieldsData, ecsData: { _id: 'id', event: { action: ['action'], }, }, + dataFormattedForFieldBrowser: eventMockDataFormattedForFieldBrowser, }, }); - const { hasGraphRepresentation, timestamp, eventIds, actorIds, action, targetIds } = - hookResult.result.current; - expect(hasGraphRepresentation).toEqual(true); - expect(timestamp).toEqual(mockFieldData['@timestamp'][0]); - expect(eventIds).toEqual(['eventId']); - expect(actorIds).toEqual(['actorId']); - expect(targetIds).toEqual(['targetId']); - expect(action).toEqual(['action']); + expect(hookResult.result.current).toStrictEqual({ + hasGraphRepresentation: true, + timestamp: mockFieldData['@timestamp'][0], + eventIds: ['eventId'], + actorIds: ['actorId'], + action: ['action'], + targetIds: ['targetId'], + isAlert: false, + }); }); - it(`should return true when alert is has graph preview with multiple values`, () => { + it(`should return true when event has graph preview with multiple values`, () => { const getFieldsData: GetFieldsData = (field: string) => { - if (field === 'kibana.alert.original_event.id') { + if (field === 'kibana.alert.uuid') { + return; + } else if (field === 'kibana.alert.original_event.id') { + return; + } else if (field === 'event.id') { return ['id1', 'id2']; } else if (field === 'actor.entity.id') { return ['actorId1', 'actorId2']; @@ -202,7 +239,7 @@ describe('useGraphPreview', () => { return mockFieldData[field]; }; - hookResult = renderHook((props: UseGraphPreviewParams) => useGraphPreview(props), { + const hookResult = renderHook((props: UseGraphPreviewParams) => useGraphPreview(props), { initialProps: { getFieldsData, ecsData: { @@ -211,16 +248,82 @@ describe('useGraphPreview', () => { action: ['action1', 'action2'], }, }, + dataFormattedForFieldBrowser: eventMockDataFormattedForFieldBrowser, }, }); - const { hasGraphRepresentation, timestamp, eventIds, actorIds, action, targetIds } = - hookResult.result.current; - expect(hasGraphRepresentation).toEqual(true); - expect(timestamp).toEqual(mockFieldData['@timestamp'][0]); - expect(eventIds).toEqual(['id1', 'id2']); - expect(actorIds).toEqual(['actorId1', 'actorId2']); - expect(action).toEqual(['action1', 'action2']); - expect(targetIds).toEqual(['targetId1', 'targetId2']); + expect(hookResult.result.current).toStrictEqual({ + hasGraphRepresentation: true, + timestamp: mockFieldData['@timestamp'][0], + eventIds: ['id1', 'id2'], + actorIds: ['actorId1', 'actorId2'], + action: ['action1', 'action2'], + targetIds: ['targetId1', 'targetId2'], + isAlert: false, + }); + }); + + it(`should return true when alert has graph preview`, () => { + const hookResult = renderHook((props: UseGraphPreviewParams) => useGraphPreview(props), { + initialProps: { + getFieldsData: alertMockGetFieldsData, + ecsData: { + _id: 'id', + event: { + action: ['action'], + }, + }, + dataFormattedForFieldBrowser: alertMockDataFormattedForFieldBrowser, + }, + }); + + expect(hookResult.result.current).toStrictEqual({ + hasGraphRepresentation: true, + timestamp: mockFieldData['@timestamp'][0], + eventIds: ['eventId'], + actorIds: ['actorId'], + action: ['action'], + targetIds: ['targetId'], + isAlert: true, + }); + }); + + it(`should return true when alert has graph preview with multiple values`, () => { + const getFieldsData: GetFieldsData = (field: string) => { + if (field === 'kibana.alert.uuid') { + return 'alertId'; + } else if (field === 'kibana.alert.original_event.id') { + return ['id1', 'id2']; + } else if (field === 'actor.entity.id') { + return ['actorId1', 'actorId2']; + } else if (field === 'target.entity.id') { + return ['targetId1', 'targetId2']; + } + + return mockFieldData[field]; + }; + + const hookResult = renderHook((props: UseGraphPreviewParams) => useGraphPreview(props), { + initialProps: { + getFieldsData, + ecsData: { + _id: 'id', + event: { + action: ['action1', 'action2'], + }, + }, + dataFormattedForFieldBrowser: alertMockDataFormattedForFieldBrowser, + }, + }); + + expect(hookResult.result.current).toStrictEqual({ + hasGraphRepresentation: true, + timestamp: mockFieldData['@timestamp'][0], + eventIds: ['id1', 'id2'], + actorIds: ['actorId1', 'actorId2'], + action: ['action1', 'action2'], + targetIds: ['targetId1', 'targetId2'], + isAlert: true, + }); }); }); diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/shared/hooks/use_graph_preview.ts b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/shared/hooks/use_graph_preview.ts index 48233afab02d..8f05b87844fb 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/shared/hooks/use_graph_preview.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/shared/hooks/use_graph_preview.ts @@ -5,10 +5,12 @@ * 2.0. */ +import type { TimelineEventsDetailsItem } from '@kbn/timelines-plugin/common'; import type { EcsSecurityExtension as Ecs } from '@kbn/securitysolution-ecs'; import { get } from 'lodash/fp'; import type { GetFieldsData } from './use_get_fields_data'; import { getField, getFieldArray } from '../utils'; +import { useBasicDataFromDetailsData } from './use_basic_data_from_details_data'; export interface UseGraphPreviewParams { /** @@ -20,6 +22,11 @@ export interface UseGraphPreviewParams { * An object with top level fields from the ECS object */ ecsData: Ecs; + + /** + * An array of field objects with category and value + */ + dataFormattedForFieldBrowser: TimelineEventsDetailsItem[]; } /** * Interface for the result of the useGraphPreview hook @@ -54,6 +61,11 @@ export interface UseGraphPreviewResult { * Boolean indicating if the event is has a graph representation (contains event ids, actor ids and action) */ hasGraphRepresentation: boolean; + + /** + * Boolean indicating if the event is an alert or not + */ + isAlert: boolean; } /** @@ -62,6 +74,7 @@ export interface UseGraphPreviewResult { export const useGraphPreview = ({ getFieldsData, ecsData, + dataFormattedForFieldBrowser, }: UseGraphPreviewParams): UseGraphPreviewResult => { const timestamp = getField(getFieldsData('@timestamp')); const originalEventId = getFieldsData('kibana.alert.original_event.id'); @@ -77,6 +90,7 @@ export const useGraphPreview = ({ actorIds.length > 0 && eventIds.length > 0 && targetIds.length > 0; + const { isAlert } = useBasicDataFromDetailsData(dataFormattedForFieldBrowser); - return { timestamp, eventIds, actorIds, action, targetIds, hasGraphRepresentation }; + return { timestamp, eventIds, actorIds, action, targetIds, hasGraphRepresentation, isAlert }; }; diff --git a/x-pack/test/api_integration/apis/cloud_security_posture/graph.ts b/x-pack/test/api_integration/apis/cloud_security_posture/graph.ts index 4ff483bff343..4823c500a358 100644 --- a/x-pack/test/api_integration/apis/cloud_security_posture/graph.ts +++ b/x-pack/test/api_integration/apis/cloud_security_posture/graph.ts @@ -40,7 +40,7 @@ export default function (providerContext: FtrProviderContext) { it('should return 404 when feature flag is not toggled', async () => { await postGraph(supertest, { query: { - eventIds: [], + originEventIds: [], start: 'now-1d/d', end: 'now/d', }, diff --git a/x-pack/test/cloud_security_posture_api/config.ts b/x-pack/test/cloud_security_posture_api/config.ts index 4e0ecd1f26e4..212abc50fc9a 100644 --- a/x-pack/test/cloud_security_posture_api/config.ts +++ b/x-pack/test/cloud_security_posture_api/config.ts @@ -5,7 +5,7 @@ * 2.0. */ import { resolve } from 'path'; -import type { FtrConfigProviderContext } from '@kbn/test'; +import { getKibanaCliLoggers, type FtrConfigProviderContext } from '@kbn/test'; import { CLOUD_SECURITY_PLUGIN_VERSION } from '@kbn/cloud-security-posture-plugin/common/constants'; export default async function ({ readConfigFile }: FtrConfigProviderContext) { @@ -21,6 +21,14 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { ...xPackAPITestsConfig.get('kbnTestServer'), serverArgs: [ ...xPackAPITestsConfig.get('kbnTestServer.serverArgs'), + `--logging.loggers=${JSON.stringify([ + ...getKibanaCliLoggers(xPackAPITestsConfig.get('kbnTestServer.serverArgs')), + { + name: 'plugins.cloudSecurityPosture', + level: 'all', + appenders: ['default'], + }, + ])}`, /** * Package version is fixed (not latest) so FTR won't suddenly break when package is changed. * diff --git a/x-pack/test/cloud_security_posture_api/routes/graph.ts b/x-pack/test/cloud_security_posture_api/routes/graph.ts index 08adf73839ea..e2be81a7d40e 100644 --- a/x-pack/test/cloud_security_posture_api/routes/graph.ts +++ b/x-pack/test/cloud_security_posture_api/routes/graph.ts @@ -48,7 +48,7 @@ export default function (providerContext: FtrProviderContext) { supertestWithoutAuth, { query: { - eventIds: [], + originEventIds: [], start: 'now-1d/d', end: 'now/d', }, @@ -88,7 +88,7 @@ export default function (providerContext: FtrProviderContext) { it('should return 400 when missing `esQuery` field is not of type bool', async () => { await postGraph(supertest, { query: { - eventIds: [], + originEventIds: [], start: 'now-1d/d', end: 'now/d', esQuery: { @@ -102,7 +102,7 @@ export default function (providerContext: FtrProviderContext) { it('should return 400 with unsupported `esQuery`', async () => { await postGraph(supertest, { query: { - eventIds: [], + originEventIds: [], start: 'now-1d/d', end: 'now/d', esQuery: { @@ -122,7 +122,7 @@ export default function (providerContext: FtrProviderContext) { it('should return an empty graph / should return 200 when missing `esQuery` field', async () => { const response = await postGraph(supertest, { query: { - eventIds: [], + originEventIds: [], start: 'now-1d/d', end: 'now/d', }, @@ -136,7 +136,7 @@ export default function (providerContext: FtrProviderContext) { it('should return a graph with nodes and edges by actor', async () => { const response = await postGraph(supertest, { query: { - eventIds: [], + originEventIds: [], start: '2024-09-01T00:00:00Z', end: '2024-09-02T00:00:00Z', esQuery: { @@ -177,7 +177,7 @@ export default function (providerContext: FtrProviderContext) { it('should return a graph with nodes and edges by alert', async () => { const response = await postGraph(supertest, { query: { - eventIds: ['kabcd1234efgh5678'], + originEventIds: [{ id: 'kabcd1234efgh5678', isAlert: true }], start: '2024-09-01T00:00:00Z', end: '2024-09-02T00:00:00Z', }, @@ -204,10 +204,40 @@ export default function (providerContext: FtrProviderContext) { }); }); + it('should return a graph with nodes and edges by origin event', async () => { + const response = await postGraph(supertest, { + query: { + originEventIds: [{ id: 'kabcd1234efgh5678', isAlert: false }], + start: '2024-09-01T00:00:00Z', + end: '2024-09-02T00:00:00Z', + }, + }).expect(result(200)); + + expect(response.body).to.have.property('nodes').length(3); + expect(response.body).to.have.property('edges').length(2); + expect(response.body).not.to.have.property('messages'); + + response.body.nodes.forEach((node: any) => { + expect(node).to.have.property('color'); + expect(node.color).equal( + 'primary', + `node color mismatched [node: ${node.id}] [actual: ${node.color}]` + ); + }); + + response.body.edges.forEach((edge: any) => { + expect(edge).to.have.property('color'); + expect(edge.color).equal( + 'primary', + `edge color mismatched [edge: ${edge.id}] [actual: ${edge.color}]` + ); + }); + }); + it('color of alert of failed event should be danger', async () => { const response = await postGraph(supertest, { query: { - eventIds: ['failed-event'], + originEventIds: [{ id: 'failed-event', isAlert: true }], start: '2024-09-01T00:00:00Z', end: '2024-09-02T00:00:00Z', }, @@ -237,7 +267,7 @@ export default function (providerContext: FtrProviderContext) { it('color of event of failed event should be warning', async () => { const response = await postGraph(supertest, { query: { - eventIds: [], + originEventIds: [], start: '2024-09-01T00:00:00Z', end: '2024-09-02T00:00:00Z', esQuery: { @@ -279,7 +309,7 @@ export default function (providerContext: FtrProviderContext) { it('2 grouped events, 1 failed, 1 success', async () => { const response = await postGraph(supertest, { query: { - eventIds: [], + originEventIds: [], start: '2024-09-01T00:00:00Z', end: '2024-09-02T00:00:00Z', esQuery: { @@ -327,7 +357,10 @@ export default function (providerContext: FtrProviderContext) { it('should support more than 1 eventIds', async () => { const response = await postGraph(supertest, { query: { - eventIds: ['kabcd1234efgh5678', 'failed-event'], + originEventIds: [ + { id: 'kabcd1234efgh5678', isAlert: true }, + { id: 'failed-event', isAlert: true }, + ], start: '2024-09-01T00:00:00Z', end: '2024-09-02T00:00:00Z', }, @@ -357,7 +390,7 @@ export default function (providerContext: FtrProviderContext) { it('should return a graph with nodes and edges by alert and actor', async () => { const response = await postGraph(supertest, { query: { - eventIds: ['kabcd1234efgh5678'], + originEventIds: [{ id: 'kabcd1234efgh5678', isAlert: true }], start: '2024-09-01T00:00:00Z', end: '2024-09-02T00:00:00Z', esQuery: { @@ -402,7 +435,7 @@ export default function (providerContext: FtrProviderContext) { it('should filter unknown targets', async () => { const response = await postGraph(supertest, { query: { - eventIds: [], + originEventIds: [], start: '2024-09-01T00:00:00Z', end: '2024-09-02T00:00:00Z', esQuery: { @@ -428,7 +461,7 @@ export default function (providerContext: FtrProviderContext) { const response = await postGraph(supertest, { showUnknownTarget: true, query: { - eventIds: [], + originEventIds: [], start: '2024-09-01T00:00:00Z', end: '2024-09-02T00:00:00Z', esQuery: { @@ -454,7 +487,7 @@ export default function (providerContext: FtrProviderContext) { const response = await postGraph(supertest, { nodesLimit: 1, query: { - eventIds: [], + originEventIds: [], start: '2024-09-01T00:00:00Z', end: '2024-09-02T00:00:00Z', esQuery: { @@ -480,7 +513,7 @@ export default function (providerContext: FtrProviderContext) { it('should support date math', async () => { const response = await postGraph(supertest, { query: { - eventIds: ['kabcd1234efgh5678'], + originEventIds: [{ id: 'kabcd1234efgh5678', isAlert: true }], start: '2024-09-01T12:30:00.000Z||-30m', end: '2024-09-01T12:30:00.000Z||+30m', }, diff --git a/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/graph.ts b/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/graph.ts index aaccdd0e9a41..2cbe40e94549 100644 --- a/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/graph.ts +++ b/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/graph.ts @@ -49,7 +49,7 @@ export default function ({ getService }: FtrProviderContext) { it('should return an empty graph', async () => { const response = await postGraph(supertestViewer, { query: { - eventIds: [], + originEventIds: [], start: 'now-1d/d', end: 'now/d', }, @@ -63,7 +63,7 @@ export default function ({ getService }: FtrProviderContext) { it('should return a graph with nodes and edges by actor', async () => { const response = await postGraph(supertestViewer, { query: { - eventIds: [], + originEventIds: [], start: '2024-09-01T00:00:00Z', end: '2024-09-02T00:00:00Z', esQuery: { From 1b52848c5b041bdd0500945cc4a1b98ef6360f25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arturo=20Lidue=C3=B1a?= Date: Tue, 17 Dec 2024 17:33:40 +0100 Subject: [PATCH 07/60] [Observability] Update required field from 'score' to 'scores' (#203584) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #203739 ## Summary fix error: `“Error scoring documents: Tool call arguments for score were invalid”` [Observability] Update required field from 'score' to 'scores' in scoreSuggestions schema --- .../server/utils/recall/score_suggestions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/server/utils/recall/score_suggestions.ts b/x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/server/utils/recall/score_suggestions.ts index 7d1a19463cce..b57e5928ce0b 100644 --- a/x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/server/utils/recall/score_suggestions.ts +++ b/x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/server/utils/recall/score_suggestions.ts @@ -102,7 +102,7 @@ export async function scoreSuggestions({ type: 'string', }, }, - required: ['score'], + required: ['scores'], } as const, }; From cc34e97de4d2d8a5509eec5e4f9ffcb7338ed54a Mon Sep 17 00:00:00 2001 From: Faisal Kanout Date: Tue, 17 Dec 2024 17:45:16 +0100 Subject: [PATCH 08/60] Fix code scanning alert no. 494: Incomplete string escaping or encoding (#204528) Fixes [https://github.com/elastic/kibana/security/code-scanning/494](https://github.com/elastic/kibana/security/code-scanning/494) Fixes #1311 Escape first backslash occurrences and all single quotes in the `filter` string. --- .../public/components/rule_condition_chart/helpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/solutions/observability/plugins/observability/public/components/rule_condition_chart/helpers.ts b/x-pack/solutions/observability/plugins/observability/public/components/rule_condition_chart/helpers.ts index 30663d02cda7..775da2fc1c80 100644 --- a/x-pack/solutions/observability/plugins/observability/public/components/rule_condition_chart/helpers.ts +++ b/x-pack/solutions/observability/plugins/observability/public/components/rule_condition_chart/helpers.ts @@ -18,7 +18,7 @@ export const getLensOperationFromRuleMetric = (metric: GenericMetric): LensOpera const { aggType, field, filter = '' } = metric; let operation: string = aggType; const operationArgs: string[] = []; - const escapedFilter = filter.replace(/'/g, "\\'"); + const escapedFilter = filter.replace(/\\/g, '\\\\').replace(/'/g, "\\'"); if (aggType === Aggregators.RATE) { return { From 02b65bd457293a71b730cf5ffbb376e637e2a7ff Mon Sep 17 00:00:00 2001 From: Nicolas Chaulet Date: Tue, 17 Dec 2024 11:50:33 -0500 Subject: [PATCH 09/60] [Fleet] Remove adopted showDevToolRequest feature flag (#204586) --- .../fleet/common/experimental_features.ts | 1 - .../hooks/devtools_request.tsx | 8 +--- .../components/settings/index.tsx | 42 +++++++++---------- .../components/create_agent_policy.tsx | 36 +++++++--------- 4 files changed, 36 insertions(+), 51 deletions(-) diff --git a/x-pack/plugins/fleet/common/experimental_features.ts b/x-pack/plugins/fleet/common/experimental_features.ts index 1c42bf3ab2af..1cf35952904a 100644 --- a/x-pack/plugins/fleet/common/experimental_features.ts +++ b/x-pack/plugins/fleet/common/experimental_features.ts @@ -10,7 +10,6 @@ export type ExperimentalFeatures = typeof allowedExperimentalValues; const _allowedExperimentalValues = { createPackagePolicyMultiPageLayout: true, packageVerification: true, - showDevtoolsRequest: true, diagnosticFileUploadEnabled: true, displayAgentMetrics: true, showIntegrationsSubcategories: true, diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/devtools_request.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/devtools_request.tsx index 91ca089f2ffe..81f2304efee9 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/devtools_request.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/devtools_request.tsx @@ -11,7 +11,6 @@ import { i18n } from '@kbn/i18n'; import { omit } from 'lodash'; import { set } from '@kbn/safer-lodash-set'; -import { ExperimentalFeaturesService } from '../../../../../services'; import { generateCreatePackagePolicyDevToolsRequest, generateCreateAgentPolicyDevToolsRequest, @@ -39,12 +38,7 @@ export function useDevToolsRequest({ packageInfo?: PackageInfo; packagePolicyId?: string; }) { - const { showDevtoolsRequest: isShowDevtoolRequestExperimentEnabled } = - ExperimentalFeaturesService.get(); - - const showDevtoolsRequest = - !HIDDEN_API_REFERENCE_PACKAGES.includes(packageInfo?.name ?? '') && - isShowDevtoolRequestExperimentEnabled; + const showDevtoolsRequest = !HIDDEN_API_REFERENCE_PACKAGES.includes(packageInfo?.name ?? ''); const [devtoolRequest, devtoolRequestDescription] = useMemo(() => { if (selectedPolicyTab === SelectedPolicyTab.NEW) { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/settings/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/settings/index.tsx index 50baac84ff4a..efb7066b0d5e 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/settings/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/settings/index.tsx @@ -40,7 +40,6 @@ import { ConfirmDeployAgentPolicyModal, } from '../../../components'; import { DevtoolsRequestFlyoutButton } from '../../../../../components'; -import { ExperimentalFeaturesService } from '../../../../../services'; import { generateUpdateAgentPolicyDevToolsRequest } from '../../../services'; import { UNKNOWN_SPACE } from '../../../../../../../../common/constants'; @@ -155,7 +154,6 @@ export const SettingsView = memo<{ agentPolicy: AgentPolicy }>( setIsLoading(false); }; - const { showDevtoolsRequest } = ExperimentalFeaturesService.get(); const devtoolRequest = useMemo( () => generateUpdateAgentPolicyDevToolsRequest( @@ -235,28 +233,26 @@ export const SettingsView = memo<{ agentPolicy: AgentPolicy }>( />
- {showDevtoolsRequest ? ( - - 0 || - hasAdvancedSettingsErrors || - hasInvalidSpaceError + + 0 || + hasAdvancedSettingsErrors || + hasInvalidSpaceError + } + btnProps={{ + color: 'text', + }} + description={i18n.translate( + 'xpack.fleet.editAgentPolicy.devtoolsRequestDescription', + { + defaultMessage: 'This Kibana request updates an agent policy.', } - btnProps={{ - color: 'text', - }} - description={i18n.translate( - 'xpack.fleet.editAgentPolicy.devtoolsRequestDescription', - { - defaultMessage: 'This Kibana request updates an agent policy.', - } - )} - request={devtoolRequest} - /> - - ) : null} + )} + request={devtoolRequest} + /> + = ({ /> ); - const { showDevtoolsRequest } = ExperimentalFeaturesService.get(); const agentPolicyContent = useMemo( () => generateCreateAgentPolicyDevToolsRequest(agentPolicy, withSysMonitoring), [agentPolicy, withSysMonitoring] @@ -128,25 +126,23 @@ export const CreateAgentPolicyFlyout: React.FunctionComponent = ({ - {showDevtoolsRequest ? ( - - 0 || - hasAdvancedSettingsErrors || - hasInvalidSpaceError + + 0 || + hasAdvancedSettingsErrors || + hasInvalidSpaceError + } + description={i18n.translate( + 'xpack.fleet.createAgentPolicy.devtoolsRequestDescription', + { + defaultMessage: 'This Kibana request creates a new agent policy.', } - description={i18n.translate( - 'xpack.fleet.createAgentPolicy.devtoolsRequestDescription', - { - defaultMessage: 'This Kibana request creates a new agent policy.', - } - )} - request={agentPolicyContent} - /> - - ) : null} + )} + request={agentPolicyContent} + /> + Date: Tue, 17 Dec 2024 17:13:02 +0000 Subject: [PATCH 10/60] Fix share modal copy embed code (#204584) ## Summary Closes https://github.com/elastic/kibana/issues/204312 This PR removes an unnecessary function, that causes an infinite render loop for visualisations. ## After https://github.com/user-attachments/assets/259d238b-c1cf-4d74-bfca-1a6440d0f5cd ## How to test - From the left side nav, click the `Visualize Library` menu item, attempt to create a legacy visualisation, any one of choice and attempt sharing said created visualisation clicking the copy embed code should not result in any error but rather copy the embed code with the visual feedback. --- .../tabs/embed/embed_content.test.tsx | 7 +--- .../components/tabs/embed/embed_content.tsx | 6 ---- .../public/components/tabs/embed/index.tsx | 34 +------------------ 3 files changed, 2 insertions(+), 45 deletions(-) diff --git a/src/plugins/share/public/components/tabs/embed/embed_content.test.tsx b/src/plugins/share/public/components/tabs/embed/embed_content.test.tsx index ee9fdf01588d..edbb9ebb4799 100644 --- a/src/plugins/share/public/components/tabs/embed/embed_content.test.tsx +++ b/src/plugins/share/public/components/tabs/embed/embed_content.test.tsx @@ -18,12 +18,7 @@ describe('Share modal embed content tab', () => { beforeEach(() => { component = mountWithIntl( - jest.fn()} - shareableUrl="/home#/" - /> + ); }); diff --git a/src/plugins/share/public/components/tabs/embed/embed_content.tsx b/src/plugins/share/public/components/tabs/embed/embed_content.tsx index 5a9163097c8d..a3bc6048e64e 100644 --- a/src/plugins/share/public/components/tabs/embed/embed_content.tsx +++ b/src/plugins/share/public/components/tabs/embed/embed_content.tsx @@ -34,7 +34,6 @@ type EmbedProps = Pick< | 'objectType' | 'isDirty' > & { - setIsNotSaved: () => void; objectConfig?: ShareContextObjectTypeConfig; }; @@ -55,7 +54,6 @@ export const EmbedContent = ({ shareableUrl, objectType, objectConfig = {}, - setIsNotSaved, isDirty, }: EmbedProps) => { const isMounted = useMountedState(); @@ -67,10 +65,6 @@ export const EmbedContent = ({ const [anonymousAccessParameters] = useState(null); const [usePublicUrl] = useState(false); - useEffect(() => { - if (objectType !== 'dashboard') setIsNotSaved(); - }, [url, setIsNotSaved, objectType]); - const makeUrlEmbeddable = useCallback((tempUrl: string): string => { const embedParam = '?embed=true'; const urlHasQueryString = tempUrl.indexOf('?') !== -1; diff --git a/src/plugins/share/public/components/tabs/embed/index.tsx b/src/plugins/share/public/components/tabs/embed/index.tsx index 44d61833268c..3c74ce3fe0b1 100644 --- a/src/plugins/share/public/components/tabs/embed/index.tsx +++ b/src/plugins/share/public/components/tabs/embed/index.tsx @@ -8,35 +8,13 @@ */ import { i18n } from '@kbn/i18n'; -import React, { useCallback } from 'react'; +import React from 'react'; import { type IModalTabDeclaration } from '@kbn/shared-ux-tabbed-modal'; import { EmbedContent } from './embed_content'; import { useShareTabsContext } from '../../context'; -const EMBED_TAB_ACTIONS = { - SET_EMBED_URL: 'SET_EMBED_URL', - SET_IS_NOT_SAVED: 'SET_IS_NOT_SAVED', -}; - type IEmbedTab = IModalTabDeclaration<{ url: string; isNotSaved: boolean }>; -const embedTabReducer: IEmbedTab['reducer'] = (state = { url: '', isNotSaved: false }, action) => { - switch (action.type) { - case EMBED_TAB_ACTIONS.SET_IS_NOT_SAVED: - return { - ...state, - isNotSaved: action.payload, - }; - case EMBED_TAB_ACTIONS.SET_IS_NOT_SAVED: - return { - ...state, - isNotSaved: action.payload, - }; - default: - return state; - } -}; - const EmbedTabContent: NonNullable = ({ state, dispatch }) => { const { embedUrlParamExtensions, @@ -47,13 +25,6 @@ const EmbedTabContent: NonNullable = ({ state, dispatch }) isDirty, } = useShareTabsContext()!; - const setIsNotSaved = useCallback(() => { - dispatch({ - type: EMBED_TAB_ACTIONS.SET_IS_NOT_SAVED, - payload: objectType === 'dashboard' ? isDirty : false, - }); - }, [dispatch, objectType, isDirty]); - return ( = ({ state, dispatch }) shareableUrl, objectType, objectConfig: objectTypeMeta?.config?.embed, - isNotSaved: state?.isNotSaved, - setIsNotSaved, isDirty, }} /> @@ -75,6 +44,5 @@ export const embedTab: IEmbedTab = { name: i18n.translate('share.contextMenu.embedCodeTab', { defaultMessage: 'Embed', }), - reducer: embedTabReducer, content: EmbedTabContent, }; From 15dc9c7b45f0007558b30d6ea83ecc41737f3653 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Bl=C3=A1zquez?= Date: Tue, 17 Dec 2024 19:39:34 +0100 Subject: [PATCH 11/60] Implement feature flag to toggle Asset Inventory plugin (#203844) ## Summary Closes https://github.com/elastic/kibana/issues/201705. Reuse security_solution's config to control visibility of Asset Inventory plugin. ### Definition of done - [x] Use the existing `xpack.securitySolution.enableExperimental` configuration to add a new feature flag - Done in `x-pack/plugins/security_solution/common/experimental_features.ts` - [x] Implement the feature flag `xpack.securitySolution.enableExperimental: ['assetInventoryStoreEnabled']`. - This can only be done locally in `kibana.dev.yml`, but I can add it to `kibana.yml` instead. - [x] Update any relevant documentation to explain how to enable the feature. - Updated plugin's `README` file. ### How to test In your [kibana.yml](https://github.com/elastic/kibana/blob/main/config/kibana.yml) file, add the following entry at the bottom: ``` xpack.securitySolution.enableExperimental: ['assetInventoryStoreEnabled'] ``` ### Checklist - [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --- .../solutions/security/plugins/asset_inventory/README.md | 8 ++++++++ .../security_solution/common/experimental_features.ts | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/x-pack/solutions/security/plugins/asset_inventory/README.md b/x-pack/solutions/security/plugins/asset_inventory/README.md index e1dd9d4ac890..313a45cec6f7 100755 --- a/x-pack/solutions/security/plugins/asset_inventory/README.md +++ b/x-pack/solutions/security/plugins/asset_inventory/README.md @@ -8,6 +8,14 @@ Centralized asset inventory experience within the Elastic Security solution. A c See the [kibana contributing guide](https://github.com/elastic/kibana/blob/main/CONTRIBUTING.md) for instructions setting up your development environment. +### Feature flag + +First, enable the `assetInventoryStoreEnabled` experimental feature flag by adding the following to your `kibana.dev.yml`: + +```yml +xpack.securitySolution.enableExperimental: ['assetInventoryStoreEnabled'] +``` + ## Testing For general guidelines, read [Kibana Testing Guide](https://www.elastic.co/guide/en/kibana/current/development-tests.html) for more details diff --git a/x-pack/solutions/security/plugins/security_solution/common/experimental_features.ts b/x-pack/solutions/security/plugins/security_solution/common/experimental_features.ts index 428a48cf4b7b..b09e8cae5391 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/experimental_features.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/experimental_features.ts @@ -266,8 +266,12 @@ export const allowedExperimentalValues = Object.freeze({ /** * Enables CrowdStrike's RunScript RTR command */ - crowdstrikeRunScriptEnabled: false, + + /** + * Enables the Asset Inventory feature + */ + assetInventoryStoreEnabled: false, }); type ExperimentalConfigKeys = Array; From 62c99f73fdbf2649b75baf4d1fa3092850068c36 Mon Sep 17 00:00:00 2001 From: jennypavlova Date: Tue, 17 Dec 2024 20:09:37 +0100 Subject: [PATCH 12/60] [ECO][Inventory V2] Turn off entityCentricExperience feature flag by default (#204278) Closes #204238 ## Summary This PR turns off the`entityCentricExperience` feature flag by default | Before | After | | ------ | ------ | | image| ![image](https://github.com/user-attachments/assets/20906756-3209-4b16-a44b-eacba6180874)| | ![image](https://github.com/user-attachments/assets/37e1b6bc-1395-4f32-8e5b-1ddf4afd93b6)| image | | ![image](https://github.com/user-attachments/assets/16b78af2-f9fc-4263-87cd-9dfa978410da)| image | | ![image](https://github.com/user-attachments/assets/90d1b791-8f7f-40c2-a73b-3263cfc17a7f) | ![image](https://github.com/user-attachments/assets/fd0417b0-5257-4bca-993f-51c08be47c14)| ## Testing The `entityCentricExperience` feature flag should be turned off by default and the inventory menu item should not be visible. The inventory menu item should be visible if the flag is manually turned on. https://github.com/user-attachments/assets/7bee8ccb-bb29-451e-8a64-22325d9d8477 --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Sergi Romeu --- .../use_entity_centric_experience_setting.tsx | 2 +- .../use_entity_centric_experience_setting.tsx | 2 +- .../entities/get_data_stream_types.test.ts | 18 +++++++++--------- .../routes/entities/get_data_stream_types.ts | 6 +++--- .../infra/server/routes/entities/index.ts | 4 ++-- .../cypress/e2e/alert_count/alert_count.cy.ts | 7 +++++++ .../inventory/e2e/cypress/e2e/home.cy.ts | 19 +++++++++++++++++++ .../inventory/e2e/cypress/support/commands.ts | 14 ++++++++++++++ .../inventory/e2e/cypress/support/types.d.ts | 1 + .../inventory/public/plugin.ts | 2 +- .../observability/server/ui_settings.ts | 2 +- 11 files changed, 59 insertions(+), 18 deletions(-) diff --git a/x-pack/plugins/observability_solution/apm/public/hooks/use_entity_centric_experience_setting.tsx b/x-pack/plugins/observability_solution/apm/public/hooks/use_entity_centric_experience_setting.tsx index 32e68c40788f..e5290bb25dbb 100644 --- a/x-pack/plugins/observability_solution/apm/public/hooks/use_entity_centric_experience_setting.tsx +++ b/x-pack/plugins/observability_solution/apm/public/hooks/use_entity_centric_experience_setting.tsx @@ -13,7 +13,7 @@ export function useEntityCentricExperienceSetting() { const isEntityCentricExperienceEnabled = core.uiSettings.get( entityCentricExperience, - true + false ); return { isEntityCentricExperienceEnabled }; diff --git a/x-pack/plugins/observability_solution/infra/public/hooks/use_entity_centric_experience_setting.tsx b/x-pack/plugins/observability_solution/infra/public/hooks/use_entity_centric_experience_setting.tsx index 1cbc4680405e..1ac6eed88f2a 100644 --- a/x-pack/plugins/observability_solution/infra/public/hooks/use_entity_centric_experience_setting.tsx +++ b/x-pack/plugins/observability_solution/infra/public/hooks/use_entity_centric_experience_setting.tsx @@ -11,7 +11,7 @@ import { useKibanaContextForPlugin } from './use_kibana'; export function useEntityCentricExperienceSetting() { const { uiSettings } = useKibanaContextForPlugin().services; - const isEntityCentricExperienceEnabled = uiSettings.get(entityCentricExperience, true); + const isEntityCentricExperienceEnabled = uiSettings.get(entityCentricExperience); return { isEntityCentricExperienceEnabled }; } diff --git a/x-pack/plugins/observability_solution/infra/server/routes/entities/get_data_stream_types.test.ts b/x-pack/plugins/observability_solution/infra/server/routes/entities/get_data_stream_types.test.ts index 75048ac22a6a..4a1466b698c7 100644 --- a/x-pack/plugins/observability_solution/infra/server/routes/entities/get_data_stream_types.test.ts +++ b/x-pack/plugins/observability_solution/infra/server/routes/entities/get_data_stream_types.test.ts @@ -35,13 +35,13 @@ describe('getDataStreamTypes', () => { jest.clearAllMocks(); }); - it('should return only metrics when entityCentriExperienceEnabled is false and hasMetricsData is true', async () => { + it('should return only metrics when entityCentricExperienceEnabled is false and hasMetricsData is true', async () => { (getHasMetricsData as jest.Mock).mockResolvedValue(true); const params = { entityId: 'entity123', entityType: 'host' as EntityType, - entityCentriExperienceEnabled: false, + entityCentricExperienceEnabled: false, infraMetricsClient, obsEsClient, entityManagerClient, @@ -58,13 +58,13 @@ describe('getDataStreamTypes', () => { }); }); - it('should return an empty array when entityCentriExperienceEnabled is false and hasMetricsData is false', async () => { + it('should return an empty array when entityCentricExperienceEnabled is false and hasMetricsData is false', async () => { (getHasMetricsData as jest.Mock).mockResolvedValue(false); const params = { entityId: 'entity123', entityType: 'container' as EntityType, - entityCentriExperienceEnabled: false, + entityCentricExperienceEnabled: false, infraMetricsClient, obsEsClient, entityManagerClient, @@ -75,7 +75,7 @@ describe('getDataStreamTypes', () => { expect(result).toEqual([]); }); - it('should return metrics and entity source_data_stream types when entityCentriExperienceEnabled is true and has entity data', async () => { + it('should return metrics and entity source_data_stream types when entityCentricExperienceEnabled is true and has entity data', async () => { (getHasMetricsData as jest.Mock).mockResolvedValue(true); (getLatestEntity as jest.Mock).mockResolvedValue({ sourceDataStreamType: ['logs', 'metrics'], @@ -84,7 +84,7 @@ describe('getDataStreamTypes', () => { const params = { entityId: 'entity123', entityType: 'host' as EntityType, - entityCentriExperienceEnabled: true, + entityCentricExperienceEnabled: true, infraMetricsClient, obsEsClient, entityManagerClient, @@ -104,14 +104,14 @@ describe('getDataStreamTypes', () => { }); }); - it('should return only metrics when entityCentriExperienceEnabled is true but entity data is undefined', async () => { + it('should return only metrics when entityCentricExperienceEnabled is true but entity data is undefined', async () => { (getHasMetricsData as jest.Mock).mockResolvedValue(true); (getLatestEntity as jest.Mock).mockResolvedValue(undefined); const params = { entityId: 'entity123', entityType: 'host' as EntityType, - entityCentriExperienceEnabled: true, + entityCentricExperienceEnabled: true, infraMetricsClient, obsEsClient, entityManagerClient, @@ -131,7 +131,7 @@ describe('getDataStreamTypes', () => { const params = { entityId: 'entity123', entityType: 'host' as EntityType, - entityCentriExperienceEnabled: true, + entityCentricExperienceEnabled: true, infraMetricsClient, obsEsClient, entityManagerClient, diff --git a/x-pack/plugins/observability_solution/infra/server/routes/entities/get_data_stream_types.ts b/x-pack/plugins/observability_solution/infra/server/routes/entities/get_data_stream_types.ts index 4a949de4d0ed..d1cd99be31f9 100644 --- a/x-pack/plugins/observability_solution/infra/server/routes/entities/get_data_stream_types.ts +++ b/x-pack/plugins/observability_solution/infra/server/routes/entities/get_data_stream_types.ts @@ -18,7 +18,7 @@ import { getLatestEntity } from './get_latest_entity'; interface Params { entityId: string; entityType: 'host' | 'container'; - entityCentriExperienceEnabled: boolean; + entityCentricExperienceEnabled: boolean; infraMetricsClient: InfraMetricsClient; obsEsClient: ObservabilityElasticsearchClient; entityManagerClient: EntityClient; @@ -26,7 +26,7 @@ interface Params { } export async function getDataStreamTypes({ - entityCentriExperienceEnabled, + entityCentricExperienceEnabled, entityId, entityManagerClient, entityType, @@ -42,7 +42,7 @@ export async function getDataStreamTypes({ const sourceDataStreams = new Set(hasMetricsData ? [EntityDataStreamType.METRICS] : []); - if (!entityCentriExperienceEnabled) { + if (!entityCentricExperienceEnabled) { return Array.from(sourceDataStreams); } diff --git a/x-pack/plugins/observability_solution/infra/server/routes/entities/index.ts b/x-pack/plugins/observability_solution/infra/server/routes/entities/index.ts index 4056faba9427..9c5c5c4527fe 100644 --- a/x-pack/plugins/observability_solution/infra/server/routes/entities/index.ts +++ b/x-pack/plugins/observability_solution/infra/server/routes/entities/index.ts @@ -54,13 +54,13 @@ export const initEntitiesConfigurationRoutes = (libs: InfraBackendLibs) => { plugin: `@kbn/${METRICS_APP_ID}-plugin`, }); - const entityCentriExperienceEnabled = await coreContext.uiSettings.client.get( + const entityCentricExperienceEnabled = await coreContext.uiSettings.client.get( entityCentricExperience ); try { const sourceDataStreamTypes = await getDataStreamTypes({ - entityCentriExperienceEnabled, + entityCentricExperienceEnabled, entityId, entityManagerClient, entityType, diff --git a/x-pack/plugins/observability_solution/inventory/e2e/cypress/e2e/alert_count/alert_count.cy.ts b/x-pack/plugins/observability_solution/inventory/e2e/cypress/e2e/alert_count/alert_count.cy.ts index b303adc21d1f..525828de10b1 100644 --- a/x-pack/plugins/observability_solution/inventory/e2e/cypress/e2e/alert_count/alert_count.cy.ts +++ b/x-pack/plugins/observability_solution/inventory/e2e/cypress/e2e/alert_count/alert_count.cy.ts @@ -38,6 +38,10 @@ describe.skip('Alert count', () => { beforeEach(() => { cy.loginAsSuperUser(); + cy.updateAdvancedSettings({ + 'observability:entityCentricExperience': true, + }); + cy.intercept('GET', '/internal/entities/managed/enablement', { fixture: 'eem_enabled.json', }).as('getEEMStatus'); @@ -50,6 +54,9 @@ describe.skip('Alert count', () => { }); afterEach(() => { + cy.updateAdvancedSettings({ + 'observability:entityCentricExperience': false, + }); entitiesSynthtrace.clean(); cleanEntityAlerts(); }); diff --git a/x-pack/plugins/observability_solution/inventory/e2e/cypress/e2e/home.cy.ts b/x-pack/plugins/observability_solution/inventory/e2e/cypress/e2e/home.cy.ts index 57ca19e429a1..e86c673c2a6b 100644 --- a/x-pack/plugins/observability_solution/inventory/e2e/cypress/e2e/home.cy.ts +++ b/x-pack/plugins/observability_solution/inventory/e2e/cypress/e2e/home.cy.ts @@ -15,6 +15,25 @@ const end = '2024-10-16T00:15:00.000Z'; describe.skip('Home page', () => { beforeEach(() => { cy.loginAsSuperUser(); + cy.updateAdvancedSettings({ + 'observability:entityCentricExperience': true, + }); + }); + + afterEach(() => { + cy.updateAdvancedSettings({ + 'observability:entityCentricExperience': false, + }); + }); + + describe('When the entityCentricExperience FF is disabled', () => { + it('Shows 404', () => { + cy.updateAdvancedSettings({ + 'observability:entityCentricExperience': false, + }); + cy.visitKibana('/app/inventory'); + cy.contains('Application Not Found'); + }); }); describe('When EEM is disabled', () => { diff --git a/x-pack/plugins/observability_solution/inventory/e2e/cypress/support/commands.ts b/x-pack/plugins/observability_solution/inventory/e2e/cypress/support/commands.ts index c3462f8b6ff1..9a260519c760 100644 --- a/x-pack/plugins/observability_solution/inventory/e2e/cypress/support/commands.ts +++ b/x-pack/plugins/observability_solution/inventory/e2e/cypress/support/commands.ts @@ -55,3 +55,17 @@ Cypress.Commands.add( ); } ); + +Cypress.Commands.add('updateAdvancedSettings', (settings: Record) => { + const kibanaUrl = Cypress.env('KIBANA_URL'); + cy.request({ + log: false, + method: 'POST', + url: `${kibanaUrl}/internal/kibana/settings`, + body: { changes: settings }, + headers: { + 'kbn-xsrf': 'e2e_test', + }, + auth: { user: 'elastic', pass: 'changeme' }, + }); +}); diff --git a/x-pack/plugins/observability_solution/inventory/e2e/cypress/support/types.d.ts b/x-pack/plugins/observability_solution/inventory/e2e/cypress/support/types.d.ts index c51b20c3b990..8e49da093612 100644 --- a/x-pack/plugins/observability_solution/inventory/e2e/cypress/support/types.d.ts +++ b/x-pack/plugins/observability_solution/inventory/e2e/cypress/support/types.d.ts @@ -13,6 +13,7 @@ declare namespace Cypress { password: string; }): Cypress.Chainable>; getByTestSubj(selector: string): Chainable>; + updateAdvancedSettings(settings: Record): void; visitKibana(url: string): void; } } diff --git a/x-pack/plugins/observability_solution/inventory/public/plugin.ts b/x-pack/plugins/observability_solution/inventory/public/plugin.ts index 109123859d4c..0d9309d3694f 100644 --- a/x-pack/plugins/observability_solution/inventory/public/plugin.ts +++ b/x-pack/plugins/observability_solution/inventory/public/plugin.ts @@ -57,7 +57,7 @@ export class InventoryPlugin const inventoryAPIClient = createCallInventoryAPI(coreSetup); const isEntityCentricExperienceSettingEnabled = coreSetup.uiSettings.get( 'observability:entityCentricExperience', - true + false ); this.telemetry.setup({ diff --git a/x-pack/solutions/observability/plugins/observability/server/ui_settings.ts b/x-pack/solutions/observability/plugins/observability/server/ui_settings.ts index e5695a3c9034..a68ae28b267f 100644 --- a/x-pack/solutions/observability/plugins/observability/server/ui_settings.ts +++ b/x-pack/solutions/observability/plugins/observability/server/ui_settings.ts @@ -325,7 +325,7 @@ export const uiSettings: Record = { }, }), schema: schema.boolean(), - value: true, + value: false, requiresPageReload: true, type: 'boolean', }, From e529a899bcfbb28e2d490642fc4d29ee522debf8 Mon Sep 17 00:00:00 2001 From: Alex Szabo Date: Tue, 17 Dec 2024 21:02:56 +0100 Subject: [PATCH 13/60] [CI] skip flaky integration test (#204645) ## Summary Skips suite "reindex & waitForReindexTask" - Errors are reported here: https://github.com/elastic/kibana/issues/167273 - Original issue, I believe: https://github.com/elastic/kibana/issues/166190 - PR that recently unskipped the test: https://github.com/elastic/kibana/pull/204561 --- .../migrations/group3/actions/actions_test_suite.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/server/integration_tests/saved_objects/migrations/group3/actions/actions_test_suite.ts b/src/core/server/integration_tests/saved_objects/migrations/group3/actions/actions_test_suite.ts index 41a194f5f1e5..c6995c6e2d4c 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group3/actions/actions_test_suite.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group3/actions/actions_test_suite.ts @@ -772,7 +772,9 @@ export const runActionTestSuite = ({ // Reindex doesn't return any errors on its own, so we have to test // together with waitForReindexTask - describe('reindex & waitForReindexTask', () => { + // Flaky: https://github.com/elastic/kibana/issues/166190 + // Reported here: https://github.com/elastic/kibana/issues/167273 + describe.skip('reindex & waitForReindexTask', () => { it('resolves right when reindex succeeds without reindex script', async () => { const res = (await reindex({ client, From 42f94e2b21dd726e74700ad6d4f2e2c6d7bc5ea4 Mon Sep 17 00:00:00 2001 From: Michael DeFazio Date: Tue, 17 Dec 2024 15:52:01 -0500 Subject: [PATCH 14/60] QA fixes to align with the new borealis theme (#204080) ## Summary Fixes https://github.com/elastic/search-team/issues/8647 * ~Updates non-status colors on badges and panels that were using `success` to `accentSecondary`~. Some badges remain as `success`, changed non-status badges to `primary` * New guidance requests that buttons are changed to either `text` or `primary` rather than using `accentSecondary` * Changes serverless welcome banner background to match stack * Updates search labs banner to use right color <-- Background uses `accentSecondary` and keeps `success` button [(Slack thread](https://elastic.slack.com/archives/C7QC1JV6F/p1734103814782069)) * Adds border around code blocks so it is visible in dark mode. | | | |--------|--------| | **Notebooks button:** | ![CleanShot 2024-12-13 at 09 27 37@2x](https://github.com/user-attachments/assets/1e1aeb27-12d3-4a20-829a-6e4720e8dedf) ![CleanShot 2024-12-13 at 09 28 21@2x](https://github.com/user-attachments/assets/2dfb97f0-10f4-4b7c-8b92-19c6e937b341) | | **Getting started Connection details:** | ![CleanShot 2024-12-16 at 09 53 56@2x](https://github.com/user-attachments/assets/1404901e-2079-4046-918e-754d8e49e750) | | **Welcome banner on Serverless: Removes primary background** | ![CleanShot 2024-12-13 at 09 37 56@2x](https://github.com/user-attachments/assets/99243bd6-75b0-4cd2-8f74-f1d00af3ad07) | | **Search labs banner:** | ![CleanShot 2024-12-16 at 09 14 11@2x](https://github.com/user-attachments/assets/d0c43e88-87a9-4929-994a-ac053ec0024a) ![CleanShot 2024-12-16 at 09 13 04@2x](https://github.com/user-attachments/assets/31d9b2b3-9ce9-4292-8f85-19a6dd31c9b2) | | **Borders in dark mode for code blocks** | ![CleanShot 2024-12-13 at 09 48 27@2x](https://github.com/user-attachments/assets/f3a002c4-bf3e-4d33-bce5-862477db073c) | | Crawler updates | ![CleanShot 2024-12-16 at 15 16 04@2x](https://github.com/user-attachments/assets/93c9e7e7-7009-4f2a-9b0b-0b127a5979bf) ![CleanShot 2024-12-16 at 15 16 51@2x](https://github.com/user-attachments/assets/f71f1f38-7e66-4cf5-8ec1-a67fe9dbf9f5) ![CleanShot 2024-12-16 at 15 24 15@2x](https://github.com/user-attachments/assets/62cc7a28-94cc-437c-b149-3ca79d334bb0) | | Pipelines callouts, badges, and buttons | ![CleanShot 2024-12-16 at 15 25 12@2x](https://github.com/user-attachments/assets/d02efa40-71d8-4140-9170-07e135b78d24) ![CleanShot 2024-12-16 at 15 25 46@2x](https://github.com/user-attachments/assets/f7ba21e3-acc8-4513-bca0-5cbb4c6ce06c) | --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .../kbn-search-api-panels/components/cloud_details.tsx | 2 +- .../authentication_panel/authentication_panel_actions.tsx | 2 +- .../crawler/domain_management/domains_panel.tsx | 2 +- .../pipelines/ml_inference/add_ml_inference_button.tsx | 2 +- .../ml_inference/text_expansion_callout/deploy_model.tsx | 8 ++++---- .../components/search_index/pipelines/pipelines.tsx | 2 +- .../shared/search_labs_banner/search_labs_banner.tsx | 3 ++- .../inline_editable_table/inline_editable_table.tsx | 2 +- .../dev_tools_console_code_block.tsx | 2 +- .../home/index_list/details_page/semantic_text_banner.tsx | 4 ++-- .../public/components/notebooks_button.tsx | 4 ++-- .../public/application/components/overview.scss | 6 +----- .../public/application/components/overview.tsx | 5 +---- 13 files changed, 19 insertions(+), 25 deletions(-) diff --git a/packages/kbn-search-api-panels/components/cloud_details.tsx b/packages/kbn-search-api-panels/components/cloud_details.tsx index df2cc6bb6837..0c406b4c3185 100644 --- a/packages/kbn-search-api-panels/components/cloud_details.tsx +++ b/packages/kbn-search-api-panels/components/cloud_details.tsx @@ -97,7 +97,7 @@ export const CloudDetailsPanel = ({ - + { ) : currentAuth === null ? ( enableEditing(currentAuth)} diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/domains_panel.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/domains_panel.tsx index 41af7db78b6b..60f2e5221197 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/domains_panel.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/domains_panel.tsx @@ -47,7 +47,7 @@ export const DomainsPanel: React.FC = () => { data-telemetry-id="entSearchContent-crawler-domainManagement-addDomain-addDomain" onClick={openFlyout} size="s" - color="success" + color="primary" iconType="plusInCircle" > {i18n.translate('xpack.enterpriseSearch.crawler.addDomainFlyout.openButtonLabel', { diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/add_ml_inference_button.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/add_ml_inference_button.tsx index 1f8bc30e2903..c7c296a443eb 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/add_ml_inference_button.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/ml_inference/add_ml_inference_button.tsx @@ -79,7 +79,7 @@ const AddButton: React.FC<{ + - + - +

{i18n.translate( 'xpack.enterpriseSearch.content.index.pipelines.textExpansionCallOut.title', @@ -87,7 +87,7 @@ export const DeployModel = ({ > { hasIndexIngestionPipeline ? ( - + {i18n.translate( 'xpack.enterpriseSearch.content.indices.pipelines.ingestionPipeline.customBadge', { defaultMessage: 'Custom' } diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/search_labs_banner/search_labs_banner.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/search_labs_banner/search_labs_banner.tsx index d9f1be314a56..a1b3302cd35a 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/search_labs_banner/search_labs_banner.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/shared/search_labs_banner/search_labs_banner.tsx @@ -36,10 +36,11 @@ export const SearchLabsBanner: React.FC = () => { ({ iconType="plusInCircle" disabled={isEditing} onClick={editNewItem} - color="success" + color="primary" data-test-subj="inlineEditableTableActionButton" > {addButtonText || diff --git a/x-pack/plugins/enterprise_search/public/applications/vector_search/components/dev_tools_console_code_block/dev_tools_console_code_block.tsx b/x-pack/plugins/enterprise_search/public/applications/vector_search/components/dev_tools_console_code_block/dev_tools_console_code_block.tsx index d48011d54cdf..46a60456be7c 100644 --- a/x-pack/plugins/enterprise_search/public/applications/vector_search/components/dev_tools_console_code_block/dev_tools_console_code_block.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/vector_search/components/dev_tools_console_code_block/dev_tools_console_code_block.tsx @@ -39,7 +39,7 @@ export const DevToolsConsoleCodeBlock: React.FC = return ( - + - + - + {isPlatinumLicense ? platinumLicenseMessage : defaultLicenseMessage} diff --git a/x-pack/plugins/search_notebooks/public/components/notebooks_button.tsx b/x-pack/plugins/search_notebooks/public/components/notebooks_button.tsx index 66fc50a03ddd..d71cade82aae 100644 --- a/x-pack/plugins/search_notebooks/public/components/notebooks_button.tsx +++ b/x-pack/plugins/search_notebooks/public/components/notebooks_button.tsx @@ -30,7 +30,7 @@ export const SearchNotebooksButton = ({ if (activeView) { return ( div { padding-bottom: 0; padding-top: 0; @@ -13,4 +9,4 @@ .serverlessSearchCloudDetailsCopyPanel { word-break: break-all; -} \ No newline at end of file +} diff --git a/x-pack/plugins/serverless_search/public/application/components/overview.tsx b/x-pack/plugins/serverless_search/public/application/components/overview.tsx index 678eadb6b5cb..d20706a6aa80 100644 --- a/x-pack/plugins/serverless_search/public/application/components/overview.tsx +++ b/x-pack/plugins/serverless_search/public/application/components/overview.tsx @@ -14,7 +14,6 @@ import { EuiIcon, EuiPageTemplate, EuiPanel, - EuiText, EuiBadge, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; @@ -96,9 +95,7 @@ export const ElasticsearchOverview = () => { return ( - - - + Date: Tue, 17 Dec 2024 22:34:46 +0100 Subject: [PATCH 15/60] Sustainable Kibana Architecture: Move modules owned by `@elastic/security-detection-engine` (#202844) ## Summary This PR aims at relocating some of the Kibana modules (plugins and packages) into a new folder structure, according to the _Sustainable Kibana Architecture_ initiative. > [!IMPORTANT] > * We kindly ask you to: > * Manually fix the errors in the error section below (if there are any). > * Search for the `packages[\/\\]` and `plugins[\/\\]` patterns in the source code (Babel and Eslint config files), and update them appropriately. > * Manually review `.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that any CI pipeline customizations continue to be correctly applied after the changed path names > * Review all of the updated files, specially the `.ts` and `.js` files listed in the sections below, as some of them contain relative paths that have been updated. > * Think of potential impact of the move, including tooling and configuration files that can be pointing to the relocated modules. E.g.: > * customised eslint rules > * docs pointing to source code > [!NOTE] > * This PR has been auto-generated. > * Any manual contributions will be lost if the 'relocate' script is re-run. > * Try to obtain the missing reviews / approvals before applying manual fixes, and/or keep your changes in a .patch / git stash. > * Please use [#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E) Slack channel for feedback. Are you trying to rebase this PR to solve merge conflicts? Please follow the steps describe [here](https://elastic.slack.com/archives/C07TCKTA22E/p1734019532879269?thread_ts=1734019339.935419&cid=C07TCKTA22E). #### 1 plugin(s) are going to be relocated: | Id | Target folder | | -- | ------------- | | `@kbn/lists-plugin` | `x-pack/solutions/security/plugins/lists` | #### 18 packages(s) are going to be relocated: | Id | Target folder | | -- | ------------- | | `@kbn/securitysolution-autocomplete` | `x-pack/solutions/security/packages/kbn-securitysolution-autocomplete` | | `@kbn/securitysolution-endpoint-exceptions-common` | `x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common` | | `@kbn/securitysolution-es-utils` | `src/platform/packages/shared/kbn-securitysolution-es-utils` | | `@kbn/securitysolution-exception-list-components` | `x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components` | | `@kbn/securitysolution-exceptions-common` | `x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common` | | `@kbn/securitysolution-hook-utils` | `x-pack/solutions/security/packages/kbn-securitysolution-hook-utils` | | `@kbn/securitysolution-io-ts-alerting-types` | `x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types` | | `@kbn/securitysolution-io-ts-list-types` | `x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types` | | `@kbn/securitysolution-io-ts-types` | `src/platform/packages/shared/kbn-securitysolution-io-ts-types` | | `@kbn/securitysolution-io-ts-utils` | `src/platform/packages/shared/kbn-securitysolution-io-ts-utils` | | `@kbn/securitysolution-list-api` | `x-pack/solutions/security/packages/kbn-securitysolution-list-api` | | `@kbn/securitysolution-list-constants` | `x-pack/solutions/security/packages/kbn-securitysolution-list-constants` | | `@kbn/securitysolution-list-hooks` | `x-pack/solutions/security/packages/kbn-securitysolution-list-hooks` | | `@kbn/securitysolution-list-utils` | `x-pack/solutions/security/packages/kbn-securitysolution-list-utils` | | `@kbn/securitysolution-lists-common` | `x-pack/solutions/security/packages/kbn-securitysolution-lists-common` | | `@kbn/securitysolution-rules` | `src/platform/packages/shared/kbn-securitysolution-rules` | | `@kbn/securitysolution-t-grid` | `x-pack/solutions/security/packages/kbn-securitysolution-t-grid` | | `@kbn/securitysolution-utils` | `x-pack/solutions/security/packages/kbn-securitysolution-utils` |
Updated references ``` ./.buildkite/scripts/steps/code_generation/security_solution_codegen.sh ./.buildkite/scripts/steps/openapi_bundling/security_solution_openapi_bundling.sh ./.eslintrc.js ./.github/codeql/codeql-config.yml ./.i18nrc.json ./docs/developer/plugin-list.asciidoc ./oas_docs/scripts/merge_ess_oas.js ./oas_docs/scripts/merge_serverless_oas.js ./package.json ./packages/kbn-repo-packages/package-map.json ./packages/kbn-securitysolution-list-hooks/src/use_persist_exception_item/index.ts ./packages/kbn-synthetic-package-map/synthetic-packages.json ./packages/kbn-ts-projects/config-paths.json ./src/dev/storybook/aliases.ts ./src/platform/packages/shared/kbn-securitysolution-es-utils/jest.config.js ./src/platform/packages/shared/kbn-securitysolution-io-ts-types/jest.config.js ./src/platform/packages/shared/kbn-securitysolution-io-ts-utils/jest.config.js ./tsconfig.base.json ./tsconfig.base.type_check.json ./tsconfig.refs.json ./x-pack/.i18nrc.json ./x-pack/build/plugin/kibana/x-pack/.i18nrc.json ./x-pack/plugins/alerting/tsconfig.type_check.json ./x-pack/plugins/cases/tsconfig.type_check.json ./x-pack/plugins/observability_solution/observability/tsconfig.type_check.json ./x-pack/plugins/observability_solution/slo/tsconfig.type_check.json ./x-pack/plugins/observability_solution/synthetics/tsconfig.type_check.json ./x-pack/plugins/observability_solution/uptime/tsconfig.type_check.json ./x-pack/plugins/osquery/tsconfig.type_check.json ./x-pack/plugins/rule_registry/tsconfig.type_check.json ./x-pack/plugins/stack_connectors/tsconfig.type_check.json ./x-pack/solutions/observability/plugins/infra/tsconfig.type_check.json ./x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/jest.config.js ./x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/jest.config.js ./x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/scripts/openapi_generate.js ./x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/jest.config.js ./x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/jest.config.js ./x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/jest.config.js ./x-pack/solutions/security/packages/kbn-securitysolution-list-api/jest.config.js ./x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/jest.config.js ./x-pack/solutions/security/packages/kbn-securitysolution-list-utils/jest.config.js ./x-pack/solutions/security/packages/kbn-securitysolution-lists-common/scripts/openapi_generate.js ./x-pack/solutions/security/packages/kbn-securitysolution-utils/jest.config.js ./x-pack/solutions/security/packages/security-solution/features/tsconfig.type_check.json ./x-pack/solutions/security/plugins/ecs_data_quality_dashboard/tsconfig.type_check.json ./x-pack/solutions/security/plugins/lists/README.md ./x-pack/solutions/security/plugins/lists/jest.config.js ./x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/helpers.test.ts ./x-pack/solutions/security/plugins/lists/public/exceptions/hooks/persist_exception_item.test.ts ./x-pack/solutions/security/plugins/lists/public/exceptions/hooks/persist_exception_list.test.ts ./x-pack/solutions/security/plugins/lists/public/exceptions/hooks/use_api.test.ts ./x-pack/solutions/security/plugins/lists/public/exceptions/hooks/use_exception_lists.test.ts ./x-pack/solutions/security/plugins/lists/public/lists/hooks/use_create_list_index.test.ts ./x-pack/solutions/security/plugins/lists/public/lists/hooks/use_delete_list.test.ts ./x-pack/solutions/security/plugins/lists/public/lists/hooks/use_export_list.test.ts ./x-pack/solutions/security/plugins/lists/public/lists/hooks/use_import_list.test.ts ./x-pack/solutions/security/plugins/lists/public/lists/hooks/use_read_list_index.test.ts ./x-pack/solutions/security/plugins/lists/tsconfig.type_check.json ./x-pack/solutions/security/plugins/security_solution/docs/openapi/README.md ./x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/README.md ./x-pack/solutions/security/plugins/threat_intelligence/tsconfig.type_check.json ./x-pack/solutions/security/plugins/timelines/tsconfig.type_check.json ./x-pack/test/security_solution_api_integration/tsconfig.type_check.json ./x-pack/test/security_solution_cypress/cypress/tsconfig.type_check.json ./x-pack/test/security_solution_endpoint/tsconfig.type_check.json ./x-pack/test/tsconfig.type_check.json ./yarn.lock .github/CODEOWNERS ```
Updated relative paths ``` src/platform/packages/shared/kbn-securitysolution-es-utils/jest.config.js:12 src/platform/packages/shared/kbn-securitysolution-es-utils/tsconfig.json:2 src/platform/packages/shared/kbn-securitysolution-es-utils/tsconfig.type_check.json:2 src/platform/packages/shared/kbn-securitysolution-io-ts-types/jest.config.js:12 src/platform/packages/shared/kbn-securitysolution-io-ts-types/tsconfig.json:2 src/platform/packages/shared/kbn-securitysolution-io-ts-types/tsconfig.type_check.json:2 src/platform/packages/shared/kbn-securitysolution-io-ts-utils/jest.config.js:12 src/platform/packages/shared/kbn-securitysolution-io-ts-utils/tsconfig.json:2 src/platform/packages/shared/kbn-securitysolution-io-ts-utils/tsconfig.type_check.json:2 src/platform/packages/shared/kbn-securitysolution-rules/tsconfig.json:2 src/platform/packages/shared/kbn-securitysolution-rules/tsconfig.type_check.json:2 x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/jest.config.js:12 x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_lists/index.test.tsx:28 x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_match/index.tsx:25 x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_match_any/index.tsx:17 x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_wildcard/index.tsx:19 x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/hooks/use_field_value_autocomplete/index.ts:16 x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/list_schema/index.mock.ts:17 x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/list_schema/index.mock.ts:44 x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/tsconfig.json:2 x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/tsconfig.type_check.json:2 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list/create_endpoint_list.schema.yaml:26 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list/create_endpoint_list.schema.yaml:27 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list/create_endpoint_list.schema.yaml:33 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list/create_endpoint_list.schema.yaml:39 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list/create_endpoint_list.schema.yaml:45 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.schema.yaml:22 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.schema.yaml:24 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.schema.yaml:26 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.schema.yaml:28 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.schema.yaml:30 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.schema.yaml:32 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.schema.yaml:35 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.schema.yaml:38 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.schema.yaml:40 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.schema.yaml:60 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.schema.yaml:61 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.schema.yaml:67 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.schema.yaml:73 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.schema.yaml:79 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.schema.yaml:85 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/delete_endpoint_list_item/delete_endpoint_list_item.schema.yaml:19 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/delete_endpoint_list_item/delete_endpoint_list_item.schema.yaml:25 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/delete_endpoint_list_item/delete_endpoint_list_item.schema.yaml:39 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/delete_endpoint_list_item/delete_endpoint_list_item.schema.yaml:40 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/delete_endpoint_list_item/delete_endpoint_list_item.schema.yaml:46 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/delete_endpoint_list_item/delete_endpoint_list_item.schema.yaml:52 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/delete_endpoint_list_item/delete_endpoint_list_item.schema.yaml:58 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/delete_endpoint_list_item/delete_endpoint_list_item.schema.yaml:64 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/find_endpoint_list_item/find_endpoint_list_item.schema.yaml:102 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/find_endpoint_list_item/find_endpoint_list_item.schema.yaml:108 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/find_endpoint_list_item/find_endpoint_list_item.schema.yaml:113 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/find_endpoint_list_item/find_endpoint_list_item.schema.yaml:41 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/find_endpoint_list_item/find_endpoint_list_item.schema.yaml:83 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/find_endpoint_list_item/find_endpoint_list_item.schema.yaml:84 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/find_endpoint_list_item/find_endpoint_list_item.schema.yaml:90 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/find_endpoint_list_item/find_endpoint_list_item.schema.yaml:96 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/model/endpoint_list_common.schema.yaml:11 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/model/endpoint_list_common.schema.yaml:16 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/read_endpoint_list_item/read_endpoint_list_item.schema.yaml:19 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/read_endpoint_list_item/read_endpoint_list_item.schema.yaml:25 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/read_endpoint_list_item/read_endpoint_list_item.schema.yaml:41 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/read_endpoint_list_item/read_endpoint_list_item.schema.yaml:42 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/read_endpoint_list_item/read_endpoint_list_item.schema.yaml:48 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/read_endpoint_list_item/read_endpoint_list_item.schema.yaml:54 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/read_endpoint_list_item/read_endpoint_list_item.schema.yaml:60 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/read_endpoint_list_item/read_endpoint_list_item.schema.yaml:66 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.schema.yaml:22 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.schema.yaml:25 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.schema.yaml:28 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.schema.yaml:30 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.schema.yaml:32 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.schema.yaml:34 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.schema.yaml:36 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.schema.yaml:39 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.schema.yaml:41 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.schema.yaml:43 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.schema.yaml:65 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.schema.yaml:66 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.schema.yaml:72 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.schema.yaml:78 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.schema.yaml:84 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.schema.yaml:90 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/scripts/openapi_bundle.js:10 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/scripts/openapi_generate.js:10 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/tsconfig.json:7 x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/tsconfig.type_check.json:14 x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/jest.config.js:12 x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/tsconfig.json:2 x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/tsconfig.type_check.json:2 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list/create_exception_list.schema.yaml:62 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list/create_exception_list.schema.yaml:63 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list/create_exception_list.schema.yaml:69 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list/create_exception_list.schema.yaml:75 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list/create_exception_list.schema.yaml:81 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list/create_exception_list.schema.yaml:87 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list_item/create_exception_list_item.schema.yaml:106 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list_item/create_exception_list_item.schema.yaml:72 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list_item/create_exception_list_item.schema.yaml:73 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list_item/create_exception_list_item.schema.yaml:79 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list_item/create_exception_list_item.schema.yaml:85 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list_item/create_exception_list_item.schema.yaml:91 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list_item/create_exception_list_item.schema.yaml:97 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_rule_exceptions/create_rule_exceptions.schema.yaml:48 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_rule_exceptions/create_rule_exceptions.schema.yaml:49 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_rule_exceptions/create_rule_exceptions.schema.yaml:55 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_rule_exceptions/create_rule_exceptions.schema.yaml:61 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_rule_exceptions/create_rule_exceptions.schema.yaml:67 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_rule_exceptions/create_rule_exceptions.schema.yaml:72 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_rule_exceptions/create_rule_exceptions.schema.yaml:78 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_shared_exceptions_list/create_shared_exceptions_list.schema.yaml:43 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_shared_exceptions_list/create_shared_exceptions_list.schema.yaml:44 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_shared_exceptions_list/create_shared_exceptions_list.schema.yaml:50 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_shared_exceptions_list/create_shared_exceptions_list.schema.yaml:56 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_shared_exceptions_list/create_shared_exceptions_list.schema.yaml:62 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_shared_exceptions_list/create_shared_exceptions_list.schema.yaml:68 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list/delete_exception_list.schema.yaml:45 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list/delete_exception_list.schema.yaml:46 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list/delete_exception_list.schema.yaml:52 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list/delete_exception_list.schema.yaml:58 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list/delete_exception_list.schema.yaml:64 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list/delete_exception_list.schema.yaml:70 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list_item/delete_exception_list_item.schema.yaml:45 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list_item/delete_exception_list_item.schema.yaml:46 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list_item/delete_exception_list_item.schema.yaml:52 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list_item/delete_exception_list_item.schema.yaml:58 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list_item/delete_exception_list_item.schema.yaml:64 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list_item/delete_exception_list_item.schema.yaml:70 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/duplicate_exception_list/duplicate_exception_list.schema.yaml:46 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/duplicate_exception_list/duplicate_exception_list.schema.yaml:47 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/duplicate_exception_list/duplicate_exception_list.schema.yaml:53 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/duplicate_exception_list/duplicate_exception_list.schema.yaml:59 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/duplicate_exception_list/duplicate_exception_list.schema.yaml:65 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/duplicate_exception_list/duplicate_exception_list.schema.yaml:71 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/export_exception_list/export_exception_list.schema.yaml:54 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/export_exception_list/export_exception_list.schema.yaml:55 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/export_exception_list/export_exception_list.schema.yaml:61 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/export_exception_list/export_exception_list.schema.yaml:67 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/export_exception_list/export_exception_list.schema.yaml:73 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/export_exception_list/export_exception_list.schema.yaml:79 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_list_items/find_exception_list_items.schema.yaml:110 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_list_items/find_exception_list_items.schema.yaml:111 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_list_items/find_exception_list_items.schema.yaml:117 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_list_items/find_exception_list_items.schema.yaml:123 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_list_items/find_exception_list_items.schema.yaml:129 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_list_items/find_exception_list_items.schema.yaml:135 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_list_items/find_exception_list_items.schema.yaml:140 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_list_items/find_exception_list_items.schema.yaml:68 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_lists/find_exception_lists.schema.yaml:103 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_lists/find_exception_lists.schema.yaml:109 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_lists/find_exception_lists.schema.yaml:115 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_lists/find_exception_lists.schema.yaml:96 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_lists/find_exception_lists.schema.yaml:97 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/import_exceptions/import_exceptions.schema.yaml:102 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/import_exceptions/import_exceptions.schema.yaml:108 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/import_exceptions/import_exceptions.schema.yaml:114 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/import_exceptions/import_exceptions.schema.yaml:95 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/import_exceptions/import_exceptions.schema.yaml:96 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.schema.yaml:10 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.schema.yaml:125 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.schema.yaml:128 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.schema.yaml:13 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.schema.yaml:135 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.schema.yaml:147 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.schema.yaml:165 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.schema.yaml:167 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.schema.yaml:172 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.schema.yaml:177 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.schema.yaml:281 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.schema.yaml:104 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.schema.yaml:122 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.schema.yaml:124 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.schema.yaml:20 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.schema.yaml:22 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.schema.yaml:38 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.schema.yaml:42 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.schema.yaml:59 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.schema.yaml:64 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.schema.yaml:66 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.schema.yaml:83 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list/read_exception_list.schema.yaml:45 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list/read_exception_list.schema.yaml:46 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list/read_exception_list.schema.yaml:52 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list/read_exception_list.schema.yaml:58 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list/read_exception_list.schema.yaml:64 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list/read_exception_list.schema.yaml:70 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_item/read_exception_list_item.schema.yaml:45 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_item/read_exception_list_item.schema.yaml:46 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_item/read_exception_list_item.schema.yaml:52 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_item/read_exception_list_item.schema.yaml:58 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_item/read_exception_list_item.schema.yaml:64 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_item/read_exception_list_item.schema.yaml:70 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_summary/read_exception_list_summary.schema.yaml:64 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_summary/read_exception_list_summary.schema.yaml:65 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_summary/read_exception_list_summary.schema.yaml:71 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_summary/read_exception_list_summary.schema.yaml:77 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_summary/read_exception_list_summary.schema.yaml:83 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_summary/read_exception_list_summary.schema.yaml:89 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list/update_exception_list.schema.yaml:62 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list/update_exception_list.schema.yaml:63 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list/update_exception_list.schema.yaml:69 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list/update_exception_list.schema.yaml:75 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list/update_exception_list.schema.yaml:81 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list/update_exception_list.schema.yaml:87 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list_item/update_exception_list_item.schema.yaml:107 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list_item/update_exception_list_item.schema.yaml:109 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list_item/update_exception_list_item.schema.yaml:73 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list_item/update_exception_list_item.schema.yaml:74 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list_item/update_exception_list_item.schema.yaml:80 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list_item/update_exception_list_item.schema.yaml:86 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list_item/update_exception_list_item.schema.yaml:92 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list_item/update_exception_list_item.schema.yaml:98 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/scripts/openapi_bundle.js:10 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/scripts/openapi_generate.js:10 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/tsconfig.json:7 x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/tsconfig.type_check.json:14 x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/jest.config.js:12 x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/tsconfig.json:2 x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/tsconfig.type_check.json:2 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/jest.config.js:12 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/tsconfig.json:2 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/tsconfig.type_check.json:2 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/jest.config.js:12 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/tsconfig.json:2 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/tsconfig.type_check.json:2 x-pack/solutions/security/packages/kbn-securitysolution-list-api/jest.config.js:12 x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/types.ts:20 x-pack/solutions/security/packages/kbn-securitysolution-list-api/tsconfig.json:2 x-pack/solutions/security/packages/kbn-securitysolution-list-api/tsconfig.type_check.json:2 x-pack/solutions/security/packages/kbn-securitysolution-list-constants/tsconfig.json:2 x-pack/solutions/security/packages/kbn-securitysolution-list-constants/tsconfig.type_check.json:2 x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/jest.config.js:12 x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/tsconfig.json:2 x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/tsconfig.type_check.json:2 x-pack/solutions/security/packages/kbn-securitysolution-list-utils/jest.config.js:12 x-pack/solutions/security/packages/kbn-securitysolution-list-utils/tsconfig.json:2 x-pack/solutions/security/packages/kbn-securitysolution-list-utils/tsconfig.type_check.json:2 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list/create_list.schema.yaml:56 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list/create_list.schema.yaml:57 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list/create_list.schema.yaml:63 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list/create_list.schema.yaml:69 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list/create_list.schema.yaml:75 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list/create_list.schema.yaml:81 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_index/create_list_index.schema.yaml:30 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_index/create_list_index.schema.yaml:31 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_index/create_list_index.schema.yaml:37 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_index/create_list_index.schema.yaml:43 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_index/create_list_index.schema.yaml:49 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_index/create_list_index.schema.yaml:55 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_item/create_list_item.schema.yaml:57 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_item/create_list_item.schema.yaml:58 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_item/create_list_item.schema.yaml:64 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_item/create_list_item.schema.yaml:70 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_item/create_list_item.schema.yaml:76 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_item/create_list_item.schema.yaml:82 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list/delete_list.schema.yaml:48 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list/delete_list.schema.yaml:49 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list/delete_list.schema.yaml:55 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list/delete_list.schema.yaml:61 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list/delete_list.schema.yaml:67 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list/delete_list.schema.yaml:73 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_index/delete_list_index.schema.yaml:30 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_index/delete_list_index.schema.yaml:31 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_index/delete_list_index.schema.yaml:37 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_index/delete_list_index.schema.yaml:43 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_index/delete_list_index.schema.yaml:49 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_index/delete_list_index.schema.yaml:55 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_item/delete_list_item.schema.yaml:57 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_item/delete_list_item.schema.yaml:58 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_item/delete_list_item.schema.yaml:64 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_item/delete_list_item.schema.yaml:70 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_item/delete_list_item.schema.yaml:76 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_item/delete_list_item.schema.yaml:82 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/export_list_items/export_list_items.schema.yaml:35 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/export_list_items/export_list_items.schema.yaml:36 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/export_list_items/export_list_items.schema.yaml:42 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/export_list_items/export_list_items.schema.yaml:48 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/export_list_items/export_list_items.schema.yaml:54 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/export_list_items/export_list_items.schema.yaml:60 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_list_items/find_list_items.schema.yaml:104 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_list_items/find_list_items.schema.yaml:110 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_list_items/find_list_items.schema.yaml:116 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_list_items/find_list_items.schema.yaml:121 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_list_items/find_list_items.schema.yaml:37 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_list_items/find_list_items.schema.yaml:97 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_list_items/find_list_items.schema.yaml:98 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_lists/find_lists.schema.yaml:104 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_lists/find_lists.schema.yaml:110 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_lists/find_lists.schema.yaml:115 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_lists/find_lists.schema.yaml:31 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_lists/find_lists.schema.yaml:91 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_lists/find_lists.schema.yaml:92 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_lists/find_lists.schema.yaml:98 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/import_list_items/import_list_items.schema.yaml:101 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/import_list_items/import_list_items.schema.yaml:76 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/import_list_items/import_list_items.schema.yaml:77 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/import_list_items/import_list_items.schema.yaml:83 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/import_list_items/import_list_items.schema.yaml:89 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/import_list_items/import_list_items.schema.yaml:95 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/model/list_common.schema.yaml:39 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/model/list_common.schema.yaml:42 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/model/list_common.schema.yaml:49 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/model/list_common.schema.yaml:52 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/model/list_common.schema.yaml:55 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/model/list_common.schema.yaml:9 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list/patch_list.schema.yaml:49 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list/patch_list.schema.yaml:50 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list/patch_list.schema.yaml:56 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list/patch_list.schema.yaml:62 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list/patch_list.schema.yaml:68 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list/patch_list.schema.yaml:74 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list_item/patch_list_item.schema.yaml:51 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list_item/patch_list_item.schema.yaml:52 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list_item/patch_list_item.schema.yaml:58 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list_item/patch_list_item.schema.yaml:64 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list_item/patch_list_item.schema.yaml:70 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list_item/patch_list_item.schema.yaml:76 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list/read_list.schema.yaml:33 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list/read_list.schema.yaml:34 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list/read_list.schema.yaml:40 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list/read_list.schema.yaml:46 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list/read_list.schema.yaml:52 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list/read_list.schema.yaml:58 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_index/read_list_index.schema.yaml:32 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_index/read_list_index.schema.yaml:33 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_index/read_list_index.schema.yaml:39 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_index/read_list_index.schema.yaml:45 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_index/read_list_index.schema.yaml:51 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_index/read_list_index.schema.yaml:57 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_item/read_list_item.schema.yaml:49 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_item/read_list_item.schema.yaml:50 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_item/read_list_item.schema.yaml:56 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_item/read_list_item.schema.yaml:62 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_item/read_list_item.schema.yaml:68 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_item/read_list_item.schema.yaml:74 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_privileges/read_list_privileges.schema.yaml:36 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_privileges/read_list_privileges.schema.yaml:37 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_privileges/read_list_privileges.schema.yaml:43 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_privileges/read_list_privileges.schema.yaml:49 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_privileges/read_list_privileges.schema.yaml:55 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list/update_list.schema.yaml:54 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list/update_list.schema.yaml:55 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list/update_list.schema.yaml:61 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list/update_list.schema.yaml:67 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list/update_list.schema.yaml:73 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list/update_list.schema.yaml:79 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list_item/update_list_item.schema.yaml:48 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list_item/update_list_item.schema.yaml:49 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list_item/update_list_item.schema.yaml:55 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list_item/update_list_item.schema.yaml:61 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list_item/update_list_item.schema.yaml:67 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list_item/update_list_item.schema.yaml:73 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/scripts/openapi_bundle.js:10 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/scripts/openapi_generate.js:10 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/tsconfig.json:7 x-pack/solutions/security/packages/kbn-securitysolution-lists-common/tsconfig.type_check.json:14 x-pack/solutions/security/packages/kbn-securitysolution-t-grid/tsconfig.json:2 x-pack/solutions/security/packages/kbn-securitysolution-t-grid/tsconfig.type_check.json:2 x-pack/solutions/security/packages/kbn-securitysolution-utils/jest.config.js:12 x-pack/solutions/security/packages/kbn-securitysolution-utils/tsconfig.json:2 x-pack/solutions/security/packages/kbn-securitysolution-utils/tsconfig.type_check.json:2 x-pack/solutions/security/plugins/lists/jest.config.js:13 x-pack/solutions/security/plugins/lists/tsconfig.json:2 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:100 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:103 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:106 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:109 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:112 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:19 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:2 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:28 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:31 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:34 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:37 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:40 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:43 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:46 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:49 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:52 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:55 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:58 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:61 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:64 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:67 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:70 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:73 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:76 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:79 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:82 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:85 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:88 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:91 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:94 x-pack/solutions/security/plugins/lists/tsconfig.type_check.json:97 ```
--------- Co-authored-by: Marshall Main --- .../pipelines/pull_request/pipeline.ts | 12 +-- .../security_solution_codegen.sh | 6 +- .../security_solution_openapi_bundling.sh | 6 +- .eslintrc.js | 18 +++-- .github/CODEOWNERS | 68 ++++++++--------- .github/codeql/codeql-config.yml | 4 +- .i18nrc.json | 31 ++++---- docs/developer/plugin-list.asciidoc | 2 +- oas_docs/scripts/merge_ess_oas.js | 6 +- oas_docs/scripts/merge_serverless_oas.js | 6 +- package.json | 38 +++++----- .../styled_components_files.js | 3 +- .../disabled_types_with_tooltip_text.ts | 17 ----- .../src/hooks/index.ts | 10 --- .../src/param_contains_space/index.ts | 10 --- .../jest.config.js | 29 ------- .../setup_test.ts | 11 --- .../src/custom.d.ts | 14 ---- .../src/exception_item_card/index.ts | 14 ---- .../menu_link.styles.ts | 20 ----- .../src/mocks/value_list_modal.mock.tsx | 16 ---- .../src/value_with_space_warning/index.ts | 10 --- .../kbn-securitysolution-hook-utils/index.ts | 14 ---- .../src/types.ts | 19 ----- .../jest.config.js | 14 ---- .../src/constants/index.ts | 14 ---- .../src/severity/index.ts | 13 ---- .../index.ts | 13 ---- .../jest.config.js | 14 ---- .../src/common/create_comment/index.mock.ts | 16 ---- .../src/common/created_at/index.ts | 14 ---- .../src/common/created_by/index.ts | 14 ---- .../src/common/cursor/index.ts | 15 ---- .../src/common/description/index.ts | 15 ---- .../src/common/deserializer/index.ts | 15 ---- .../common/endpoint/entry_match/index.mock.ts | 18 ----- .../src/common/endpoint/index.ts | 11 --- .../src/common/entries_list/index.mock.ts | 18 ----- .../src/common/expire_time/index.ts | 15 ---- .../src/common/file/index.ts | 12 --- .../src/common/filter/index.ts | 15 ---- .../src/common/id/index.ts | 16 ---- .../src/common/immutable/index.ts | 15 ---- .../src/common/item/index.ts | 12 --- .../src/common/list_type/index.ts | 15 ---- .../src/common/name/index.ts | 15 ---- .../src/common/namespace_type/index.ts | 14 ---- .../src/common/page/index.ts | 16 ---- .../src/common/search/index.ts | 16 ---- .../src/common/serializer/index.ts | 15 ---- .../src/common/sort_field/index.ts | 16 ---- .../src/common/tie_breaker_id/index.ts | 14 ---- .../src/common/timestamp/index.ts | 14 ---- .../src/common/total/index.ts | 14 ---- .../src/common/underscore_version/index.ts | 14 ---- .../src/common/updated_at/index.ts | 14 ---- .../src/common/updated_by/index.ts | 14 ---- .../src/common/value/index.ts | 13 ---- .../index.mock.ts | 16 ---- .../index.mock.ts | 17 ----- .../index.mock.ts | 17 ----- .../delete_list_item_schema/index.mock.ts | 18 ----- .../request/delete_list_schema/index.mock.ts | 18 ----- .../index.mock.ts | 16 ---- .../patch_list_item_schema/index.mock.ts | 18 ----- .../request/patch_list_schema/index.mock.ts | 19 ----- .../index.mock.ts | 17 ----- .../index.mock.ts | 18 ----- .../read_exception_list_schema/index.mock.ts | 18 ----- .../read_list_item_schema/index.mock.ts | 18 ----- .../request/read_list_schema/index.mock.ts | 16 ---- .../src/request/read_list_schema/index.ts | 20 ----- .../response/acknowledge_schema/index.mock.ts | 14 ---- .../src/response/acknowledge_schema/index.ts | 14 ---- .../create_endpoint_list_schema/index.ts | 15 ---- .../index.mock.ts | 17 ----- .../found_all_list_items_schema/index.mock.ts | 16 ---- .../response/found_list_schema/index.mock.ts | 19 ----- .../found_lists_by_size_schema/index.mock.ts | 16 ---- .../index.mock.ts | 15 ---- .../list_item_index_exist_schema/index.ts | 19 ----- .../jest.config.js | 14 ---- .../jest.config.js | 14 ---- .../kbn-securitysolution-list-api/index.ts | 14 ---- .../jest.config.js | 14 ---- .../mocks/response/acknowledge_schema.mock.ts | 14 ---- .../list_item_index_exist_schema.mock.ts | 15 ---- .../jest.config.js | 14 ---- .../src/constants.ts | 10 --- .../src/use_delete_list/index.ts | 15 ---- .../src/use_export_list/index.ts | 15 ---- .../src/use_find_lists/index.ts | 15 ---- .../src/use_import_list/index.ts | 15 ---- .../jest.config.js | 14 ---- .../src/has_large_value_list/index.ts | 15 ---- packages/kbn-securitysolution-t-grid/index.ts | 13 ---- .../src/mock/index.ts | 10 --- .../src/utils/index.ts | 11 --- packages/kbn-securitysolution-utils/index.ts | 15 ---- .../kbn-securitysolution-utils/jest.config.js | 14 ---- .../src/esql/index.ts | 12 --- .../src/transform_data_to_ndjson/index.ts | 17 ----- src/dev/storybook/aliases.ts | 2 +- .../kbn-securitysolution-es-utils/README.md | 0 .../kbn-securitysolution-es-utils/index.ts | 0 .../jest.config.js | 4 +- .../kibana.jsonc | 0 .../package.json | 0 .../src/bad_request_error/index.ts | 0 .../src/create_boostrap_index/index.ts | 0 .../src/create_data_stream/index.ts | 0 .../src/decode_version/index.ts | 0 .../src/delete_all_index/index.ts | 0 .../src/delete_data_stream/index.ts | 0 .../src/delete_index_template/index.ts | 0 .../src/delete_policy/index.ts | 0 .../src/delete_template/index.ts | 0 .../src/elasticsearch_client/index.ts | 0 .../src/encode_hit_version/index.ts | 0 .../src/get_bootstrap_index_exists/index.ts | 0 .../src/get_data_stream_exists/index.ts | 0 .../src/get_index_aliases/index.ts | 0 .../src/get_index_count/index.ts | 0 .../src/get_index_exists/index.ts | 0 .../src/get_index_template_exists/index.ts | 0 .../src/get_policy_exists/index.ts | 0 .../src/get_template_exists/index.ts | 0 .../src/migrate_to_data_stream/index.ts | 0 .../src/put_mappings/index.ts | 0 .../src/read_index/index.ts | 0 .../src/read_privileges/index.ts | 0 .../src/remove_policy_from_index/index.ts | 0 .../src/set_index_template/index.ts | 0 .../src/set_policy/index.ts | 0 .../src/set_template/index.ts | 0 .../src/transform_error/index.test.ts | 0 .../src/transform_error/index.ts | 0 .../tsconfig.json | 2 +- .../README.md | 0 .../kbn-securitysolution-io-ts-types/index.ts | 0 .../jest.config.js | 4 +- .../kibana.jsonc | 0 .../package.json | 0 .../src/default_array/index.test.ts | 0 .../src/default_array/index.ts | 0 .../src/default_boolean_false/index.test.ts | 0 .../src/default_boolean_false/index.ts | 0 .../src/default_boolean_true/index.test.ts | 0 .../src/default_boolean_true/index.ts | 0 .../src/default_csv_array/index.test.ts | 0 .../src/default_csv_array/index.ts | 0 .../src/default_empty_string/index.test.ts | 0 .../src/default_empty_string/index.ts | 0 .../src/default_string_array/index.test.ts | 0 .../src/default_string_array/index.ts | 0 .../index.test.ts | 0 .../src/default_string_boolean_false/index.ts | 0 .../src/default_uuid/index.test.ts | 0 .../src/default_uuid/index.ts | 0 .../src/default_value/index.test.ts | 0 .../src/default_value/index.ts | 0 .../src/default_version_number/index.test.ts | 0 .../src/default_version_number/index.ts | 0 .../src/empty_string_array/index.test.ts | 0 .../src/empty_string_array/index.ts | 0 .../src/enumeration/index.test.ts | 0 .../src/enumeration/index.ts | 0 .../src/import_query_schema/index.test.ts | 0 .../src/import_query_schema/index.ts | 0 .../src/iso_date_string/index.test.ts | 0 .../src/iso_date_string/index.ts | 0 .../src/limited_size_array/index.test.ts | 0 .../src/limited_size_array/index.ts | 0 .../src/non_empty_array/index.test.ts | 0 .../src/non_empty_array/index.ts | 0 .../index.test.ts | 0 .../index.ts | 0 .../src/non_empty_string/index.test.ts | 0 .../src/non_empty_string/index.ts | 0 .../src/non_empty_string_array/index.test.ts | 0 .../src/non_empty_string_array/index.ts | 0 .../index.test.ts | 0 .../index.ts | 0 .../src/only_false_allowed/index.test.ts | 0 .../src/only_false_allowed/index.ts | 0 .../src/operator/index.ts | 0 .../src/positive_integer/index.test.ts | 0 .../src/positive_integer/index.ts | 0 .../index.test.ts | 0 .../index.ts | 0 .../src/string_to_positive_number/index.ts | 0 .../src/time_duration/index.test.ts | 0 .../src/time_duration/index.ts | 0 .../src/uuid/index.test.ts | 0 .../src/uuid/index.ts | 0 .../src/version/index.ts | 0 .../tsconfig.json | 2 +- .../README.md | 0 .../kbn-securitysolution-io-ts-utils/index.ts | 0 .../jest.config.js | 4 +- .../kibana.jsonc | 0 .../package.json | 0 .../src/exact_check/index.test.ts | 0 .../src/exact_check/index.ts | 0 .../src/format_errors/index.test.ts | 0 .../src/format_errors/index.ts | 0 .../src/parse_schedule_dates/index.test.ts | 0 .../src/parse_schedule_dates/index.ts | 0 .../src/test_utils/index.ts | 0 .../src/validate/index.test.ts | 0 .../src/validate/index.ts | 0 .../tsconfig.json | 2 +- .../kbn-securitysolution-rules/README.md | 0 .../kbn-securitysolution-rules/index.ts | 0 .../kbn-securitysolution-rules/kibana.jsonc | 0 .../kbn-securitysolution-rules/package.json | 0 .../src/configuration_constants.ts | 0 .../src/rule_type_constants.ts | 0 .../src/rule_type_mappings.ts | 0 .../kbn-securitysolution-rules/src/utils.ts | 0 .../kbn-securitysolution-rules/tsconfig.json | 2 +- tsconfig.base.json | 76 +++++++++---------- x-pack/.i18nrc.json | 2 +- .../README.md | 0 .../index.ts | 8 +- .../jest.config.js | 12 +++ .../kibana.jsonc | 0 .../package.json | 2 +- .../src/autocomplete/index.mock.ts | 8 +- .../src/check_empty_value/index.test.ts | 8 +- .../src/check_empty_value/index.ts | 8 +- .../__snapshots__/index.test.tsx.snap | 0 .../disabled_types_with_tooltip_text.test.ts | 8 +- .../__tests__/index.test.tsx | 8 +- .../__tests__/use_es_field.test.ts | 8 +- .../disabled_types_with_tooltip_text.ts | 15 ++++ .../src/es_field_selector/index.tsx | 8 +- .../src/es_field_selector/types.ts | 8 +- .../src/es_field_selector/use_es_field.tsx | 11 +-- .../src/field_value_exists/index.test.tsx | 8 +- .../src/field_value_exists/index.tsx | 8 +- .../src/field_value_lists/index.test.tsx | 10 +-- .../src/field_value_lists/index.tsx | 9 +-- .../src/field_value_match/index.test.tsx | 8 +- .../src/field_value_match/index.tsx | 11 ++- .../src/field_value_match_any/index.test.tsx | 8 +- .../src/field_value_match_any/index.tsx | 11 ++- .../src/field_value_wildcard/index.test.tsx | 8 +- .../src/field_value_wildcard/index.tsx | 11 ++- .../src/fields/index.mock.ts | 8 +- .../src/filter_field_to_list/index.test.ts | 8 +- .../src/filter_field_to_list/index.ts | 8 +- .../index.test.tsx | 8 +- .../src/get_generic_combo_box_props/index.ts | 8 +- .../src/get_operators/index.test.ts | 8 +- .../src/get_operators/index.ts | 8 +- .../src/hooks/index.ts | 8 ++ .../index.test.ts | 8 +- .../use_field_value_autocomplete/index.ts | 11 ++- .../src/list_schema/index.mock.ts | 12 ++- .../src/operator/index.test.tsx | 8 +- .../src/operator/index.tsx | 8 +- .../src/param_contains_space/index.test.ts | 8 +- .../src/param_contains_space/index.ts | 8 ++ .../src/param_is_valid/index.test.ts | 8 +- .../src/param_is_valid/index.ts | 8 +- .../src/translations/index.ts | 8 +- .../src/type_match/index.test.ts | 8 +- .../src/type_match/index.ts | 8 +- .../tsconfig.json | 2 +- .../README.md | 0 .../create_endpoint_list.gen.ts | 8 +- .../create_endpoint_list.schema.yaml | 10 +-- .../create_endpoint_list_item.gen.ts | 8 +- .../create_endpoint_list_item.schema.yaml | 12 +-- .../delete_endpoint_list_item.gen.ts | 8 +- .../delete_endpoint_list_item.schema.yaml | 12 +-- .../find_endpoint_list_item.gen.ts | 8 +- .../find_endpoint_list_item.schema.yaml | 16 ++-- .../api/index.ts | 8 +- .../api/model/endpoint_list_common.gen.ts | 8 +- .../model/endpoint_list_common.schema.yaml | 0 .../read_endpoint_list_item.gen.ts | 8 +- .../read_endpoint_list_item.schema.yaml | 12 +-- .../update_endpoint_list_item.gen.ts | 8 +- .../update_endpoint_list_item.schema.yaml | 12 +-- ...eptions_api_2023_10_31.bundled.schema.yaml | 0 ...eptions_api_2023_10_31.bundled.schema.yaml | 0 .../kibana.jsonc | 0 .../package.json | 2 +- .../scripts/openapi_bundle.js | 11 ++- .../scripts/openapi_generate.js | 11 ++- .../tsconfig.json | 2 +- .../README.md | 0 .../index.ts | 8 +- .../jest.config.js | 29 +++++++ .../kibana.jsonc | 0 .../package.json | 2 +- .../setup_test.ts | 9 +++ ...on_product_no_results_magnifying_glass.svg | 0 .../src/custom.d.ts | 12 +++ .../empty_viewer_state.test.tsx | 8 +- .../src/empty_viewer_state/index.tsx | 8 +- .../__snapshots__/comments.test.tsx.snap | 0 .../comments/comments.test.tsx | 8 +- .../exception_item_card/comments/index.tsx | 8 +- .../conditions/conditions.config.ts | 8 +- .../conditions/conditions.styles.tsx | 8 +- .../conditions/conditions.test.tsx | 8 +- .../__snapshots__/entry_content.test.tsx.snap | 0 .../entry_content.helper.test.tsx | 8 +- .../entry_content/entry_content.helper.tsx | 8 +- .../entry_content/entry_content.test.tsx | 8 +- .../conditions/entry_content/index.tsx | 8 +- .../exception_item_card/conditions/index.tsx | 8 +- .../__snapshots__/os_conditions.test.tsx.snap | 0 .../conditions/os_conditions/index.tsx | 8 +- .../os_conditions/os_conditions.test.tsx | 9 +-- .../exception_item_card/conditions/types.ts | 8 +- .../exception_item_card.test.tsx | 8 +- .../exception_item_card.tsx | 8 +- .../header/header.test.tsx | 8 +- .../src/exception_item_card/header/index.tsx | 8 +- .../src/exception_item_card/index.ts | 12 +++ .../__snapshots__/details_info.test.tsx.snap | 0 .../meta/details_info/details_info.test.tsx | 9 +-- .../meta/details_info/index.tsx | 8 +- .../src/exception_item_card/meta/index.tsx | 8 +- .../exception_item_card/meta/meta.test.tsx | 8 +- .../src/exception_item_card/translations.ts | 8 +- .../use_exception_item_card.test.ts | 8 +- .../use_exception_item_card.ts | 8 +- .../exception_items/exception_items.test.tsx | 8 +- .../src/exception_items/index.tsx | 8 +- ...erate_linked_rules_menu_item.test.tsx.snap | 0 .../generate_linked_rules_menu_item.test.tsx | 13 ++-- .../generate_linked_rules_menu_item/index.tsx | 8 +- .../menu_link.styles.ts | 18 +++++ .../__snapshots__/header_menu.test.tsx.snap | 0 .../src/header_menu/header_menu.test.tsx | 8 +- .../src/header_menu/index.tsx | 8 +- .../__snapshots__/list_header.test.tsx.snap | 0 .../__snapshots__/edit_modal.test.tsx.snap | 0 .../edit_modal/edit_modal.test.tsx | 8 +- .../src/list_header/edit_modal/index.tsx | 8 +- .../edit_modal/use_edit_modal.test.ts | 8 +- .../list_header/edit_modal/use_edit_modal.ts | 8 +- .../src/list_header/index.tsx | 10 +-- .../src/list_header/list_header.styles.ts | 8 +- .../src/list_header/list_header.test.tsx | 8 +- .../__snapshots__/menu_items.test.tsx.snap | 0 .../src/list_header/menu_items/index.tsx | 8 +- .../menu_items/menu_items.test.tsx | 8 +- .../src/list_header/use_list_header.test.ts | 8 +- .../src/list_header/use_list_header.ts | 8 +- .../src/mocks/comments.mock.tsx | 8 +- .../src/mocks/entry.mock.ts | 8 +- .../mocks/exception_list_item_schema.mock.ts | 8 +- .../src/mocks/header.mock.ts | 8 +- .../src/mocks/rule_references.mock.ts | 8 +- .../mocks/security_link_component.mock.tsx | 8 +- .../src/mocks/value_list_modal.mock.tsx | 14 ++++ .../src/pagination/pagination.test.tsx | 8 +- .../src/pagination/pagination.tsx | 8 +- .../src/pagination/use_pagination.test.ts | 8 +- .../src/pagination/use_pagination.ts | 8 +- .../partial_code_signature_callout/index.tsx | 8 +- .../src/search_bar/index.tsx | 8 +- .../src/search_bar/search_bar.test.tsx | 8 +- .../text_with_edit.test.tsx.snap | 0 .../src/text_with_edit/index.tsx | 8 +- .../text_with_edit/text_with_edit.styles.ts | 8 +- .../text_with_edit/text_with_edit.test.tsx | 9 +-- .../src/translations.ts | 8 +- .../src/types/index.ts | 8 +- .../src/value_with_space_warning/index.ts | 8 ++ .../use_value_with_space_warning.test.ts | 8 +- .../use_value_with_space_warning.ts | 8 +- .../value_with_space_warning.test.tsx | 8 +- .../value_with_space_warning.tsx | 8 +- .../index.tsx | 8 +- .../tsconfig.json | 2 +- .../README.md | 0 .../create_exception_list.gen.ts | 8 +- .../create_exception_list.schema.yaml | 12 +-- .../create_exception_list_item.gen.ts | 8 +- .../create_exception_list_item.schema.yaml | 14 ++-- .../create_rule_exceptions.gen.ts | 8 +- .../create_rule_exceptions.schema.yaml | 16 ++-- .../create_shared_exceptions_list.gen.ts | 8 +- .../create_shared_exceptions_list.schema.yaml | 12 +-- .../delete_exception_list.gen.ts | 8 +- .../delete_exception_list.schema.yaml | 12 +-- .../delete_exception_list_item.gen.ts | 8 +- .../delete_exception_list_item.schema.yaml | 12 +-- .../duplicate_exception_list.gen.ts | 8 +- .../duplicate_exception_list.schema.yaml | 12 +-- .../export_exception_list.gen.ts | 8 +- .../export_exception_list.schema.yaml | 12 +-- .../find_exception_list_items.gen.ts | 8 +- .../find_exception_list_items.schema.yaml | 16 ++-- .../find_exception_lists.gen.ts | 8 +- .../find_exception_lists.schema.yaml | 10 +-- .../import_exceptions.gen.ts | 8 +- .../import_exceptions.schema.yaml | 10 +-- .../api/index.ts | 8 +- .../api/model/exception_list_common.gen.ts | 8 +- .../model/exception_list_common.schema.yaml | 22 +++--- .../model/exception_list_item_entry.gen.ts | 8 +- .../exception_list_item_entry.schema.yaml | 18 ++--- .../api/quickstart_client.gen.ts | 8 +- .../read_exception_list.gen.ts | 8 +- .../read_exception_list.schema.yaml | 12 +-- .../read_exception_list_item.gen.ts | 8 +- .../read_exception_list_item.schema.yaml | 12 +-- .../read_exception_list_summary.gen.ts | 8 +- .../read_exception_list_summary.schema.yaml | 12 +-- .../update_exception_list.gen.ts | 8 +- .../update_exception_list.schema.yaml | 12 +-- .../update_exception_list_item.gen.ts | 8 +- .../update_exception_list_item.schema.yaml | 16 ++-- ...eptions_api_2023_10_31.bundled.schema.yaml | 0 ...eptions_api_2023_10_31.bundled.schema.yaml | 0 .../kibana.jsonc | 0 .../package.json | 2 +- .../scripts/openapi_bundle.js | 11 ++- .../exceptions_ess.info.yaml | 0 .../exceptions_serverless.info.yaml | 0 .../scripts/openapi_generate.js | 13 ++-- .../tsconfig.json | 2 +- .../kbn-securitysolution-hook-utils/README.md | 0 .../kbn-securitysolution-hook-utils/index.ts | 12 +++ .../jest.config.js | 12 +++ .../kibana.jsonc | 0 .../package.json | 2 +- .../src/types.ts | 17 +++++ .../src/use_async/index.test.ts | 8 +- .../src/use_async/index.ts | 8 +- .../src/use_is_mounted/index.test.ts | 8 +- .../src/use_is_mounted/index.ts | 8 +- .../src/use_observable/index.test.ts | 8 +- .../src/use_observable/index.ts | 8 +- .../src/with_optional_signal/index.test.ts | 8 +- .../src/with_optional_signal/index.ts | 8 +- .../tsconfig.json | 2 +- .../README.md | 0 .../index.ts | 8 +- .../jest.config.js | 12 +++ .../kibana.jsonc | 0 .../package.json | 2 +- .../src/actions/index.ts | 8 +- .../src/constants/index.mock.ts | 8 +- .../src/constants/index.ts | 12 +++ .../src/default_actions_array/index.ts | 8 +- .../default_export_file_name/index.test.ts | 8 +- .../src/default_export_file_name/index.ts | 8 +- .../src/default_from_string/index.test.ts | 8 +- .../src/default_from_string/index.ts | 8 +- .../src/default_interval_string/index.test.ts | 8 +- .../src/default_interval_string/index.ts | 8 +- .../src/default_language_string/index.test.ts | 8 +- .../src/default_language_string/index.ts | 8 +- .../default_max_signals_number/index.test.ts | 8 +- .../src/default_max_signals_number/index.ts | 8 +- .../src/default_page/index.test.ts | 8 +- .../src/default_page/index.ts | 8 +- .../src/default_per_page/index.test.ts | 8 +- .../src/default_per_page/index.ts | 8 +- .../default_risk_score_mapping_array/index.ts | 8 +- .../default_severity_mapping_array/index.ts | 8 +- .../src/default_threat_array/index.test.ts | 8 +- .../src/default_threat_array/index.ts | 8 +- .../src/default_to_string/index.test.ts | 8 +- .../src/default_to_string/index.ts | 8 +- .../src/default_uuid/index.test.ts | 8 +- .../src/default_uuid/index.ts | 8 +- .../src/frequency/index.ts | 8 +- .../src/from/index.ts | 8 +- .../src/language/index.ts | 8 +- .../src/machine_learning_job_id/index.ts | 8 +- .../src/max_signals/index.ts | 8 +- .../src/normalized_ml_job_id/index.ts | 8 +- .../references_default_array/index.test.ts | 8 +- .../src/references_default_array/index.ts | 8 +- .../src/risk_score/index.test.ts | 8 +- .../src/risk_score/index.ts | 8 +- .../src/risk_score_mapping/index.ts | 8 +- .../src/rule_schedule/index.ts | 8 +- .../src/saved_object_attributes/index.ts | 8 +- .../src/severity/index.ts | 11 +++ .../src/severity_mapping/index.ts | 8 +- .../src/threat/index.ts | 8 +- .../src/threat_mapping/index.test.ts | 8 +- .../src/threat_mapping/index.ts | 8 +- .../src/threat_subtechnique/index.ts | 8 +- .../src/threat_tactic/index.ts | 8 +- .../src/threat_technique/index.ts | 8 +- .../src/throttle/index.ts | 8 +- .../src/type/index.ts | 8 +- .../tsconfig.json | 2 +- .../README.md | 0 .../index.ts | 11 +++ .../jest.config.js | 12 +++ .../kibana.jsonc | 0 .../package.json | 2 +- .../src/common/comment/index.mock.ts | 8 +- .../src/common/comment/index.test.ts | 8 +- .../src/common/comment/index.ts | 8 +- .../src/common/create_comment/index.mock.ts | 14 ++++ .../src/common/create_comment/index.test.ts | 8 +- .../src/common/create_comment/index.ts | 8 +- .../src/common/created_at/index.ts | 12 +++ .../src/common/created_by/index.ts | 12 +++ .../src/common/cursor/index.ts | 13 ++++ .../default_comments_array/index.test.ts | 8 +- .../common/default_comments_array/index.ts | 8 +- .../index.test.ts | 8 +- .../default_create_comments_array/index.ts | 8 +- .../index.test.ts | 8 +- .../default_import_comments_array/index.ts | 8 +- .../common/default_namespace/index.test.ts | 8 +- .../src/common/default_namespace/index.ts | 8 +- .../default_namespace_array/index.test.ts | 8 +- .../common/default_namespace_array/index.ts | 8 +- .../index.test.ts | 8 +- .../default_update_comments_array/index.ts | 8 +- .../src/common/description/index.ts | 13 ++++ .../src/common/deserializer/index.ts | 13 ++++ .../src/common/endpoint/entries/index.mock.ts | 8 +- .../src/common/endpoint/entries/index.test.ts | 8 +- .../src/common/endpoint/entries/index.ts | 8 +- .../common/endpoint/entry_match/index.mock.ts | 16 ++++ .../common/endpoint/entry_match/index.test.ts | 8 +- .../src/common/endpoint/entry_match/index.ts | 8 +- .../endpoint/entry_match_any/index.mock.ts | 8 +- .../endpoint/entry_match_any/index.test.ts | 8 +- .../common/endpoint/entry_match_any/index.ts | 8 +- .../entry_match_wildcard/index.mock.ts | 8 +- .../entry_match_wildcard/index.test.ts | 8 +- .../endpoint/entry_match_wildcard/index.ts | 8 +- .../endpoint/entry_nested/index.mock.ts | 8 +- .../endpoint/entry_nested/index.test.ts | 8 +- .../src/common/endpoint/entry_nested/index.ts | 8 +- .../src/common/endpoint/index.ts | 9 +++ .../non_empty_nested_entries_array/index.ts | 8 +- .../src/common/entries/index.mock.ts | 8 +- .../src/common/entries/index.test.ts | 8 +- .../src/common/entries/index.ts | 8 +- .../src/common/entries_exist/index.mock.ts | 8 +- .../src/common/entries_exist/index.test.ts | 8 +- .../src/common/entries_exist/index.ts | 8 +- .../src/common/entries_list/index.mock.ts | 16 ++++ .../src/common/entries_list/index.test.ts | 8 +- .../src/common/entries_list/index.ts | 8 +- .../src/common/entry_match/index.mock.ts | 8 +- .../src/common/entry_match/index.test.ts | 8 +- .../src/common/entry_match/index.ts | 8 +- .../src/common/entry_match_any/index.mock.ts | 8 +- .../src/common/entry_match_any/index.test.ts | 8 +- .../src/common/entry_match_any/index.ts | 8 +- .../common/entry_match_wildcard/index.mock.ts | 8 +- .../common/entry_match_wildcard/index.test.ts | 8 +- .../src/common/entry_match_wildcard/index.ts | 8 +- .../src/common/entry_nested/index.mock.ts | 8 +- .../src/common/entry_nested/index.test.ts | 8 +- .../src/common/entry_nested/index.ts | 8 +- .../exception_export_details/index.mock.ts | 8 +- .../exception_export_details/index.test.ts | 8 +- .../common/exception_export_details/index.ts | 8 +- .../src/common/exception_list/index.test.ts | 8 +- .../src/common/exception_list/index.ts | 8 +- .../common/exception_list_item_type/index.ts | 8 +- .../src/common/expire_time/index.ts | 13 ++++ .../src/common/file/index.ts | 10 +++ .../src/common/filter/index.ts | 13 ++++ .../src/common/id/index.ts | 14 ++++ .../src/common/immutable/index.ts | 13 ++++ .../src/common/import_comment/index.test.ts | 8 +- .../src/common/import_comment/index.ts | 8 +- .../include_expired_exceptions/index.ts | 8 +- .../src/common/index.ts | 8 +- .../src/common/item/index.ts | 10 +++ .../src/common/item_id/index.ts | 8 +- .../src/common/list_id/index.ts | 8 +- .../src/common/list_operator/index.test.ts | 8 +- .../src/common/list_operator/index.ts | 8 +- .../src/common/list_type/index.ts | 13 ++++ .../src/common/lists/index.mock.ts | 8 +- .../src/common/lists/index.test.ts | 8 +- .../src/common/lists/index.ts | 8 +- .../common/lists_default_array/index.test.ts | 8 +- .../src/common/lists_default_array/index.ts | 8 +- .../src/common/max_size/index.test.ts | 12 +-- .../src/common/max_size/index.ts | 8 +- .../src/common/meta/index.ts | 8 +- .../src/common/name/index.ts | 13 ++++ .../src/common/namespace_type/index.ts | 12 +++ .../non_empty_entries_array/index.test.ts | 8 +- .../common/non_empty_entries_array/index.ts | 8 +- .../index.test.ts | 8 +- .../non_empty_nested_entries_array/index.ts | 8 +- .../src/common/os_type/index.test.ts | 12 +-- .../src/common/os_type/index.ts | 8 +- .../src/common/page/index.ts | 14 ++++ .../src/common/per_page/index.ts | 8 +- .../src/common/pit/index.test.ts | 12 +-- .../src/common/pit/index.ts | 8 +- .../src/common/refresh/index.ts | 8 +- .../common/required_keep_undefined/index.ts | 8 +- .../src/common/search/index.test.ts | 12 +-- .../src/common/search/index.ts | 14 ++++ .../src/common/search_after/index.test.ts | 12 +-- .../src/common/search_after/index.ts | 8 +- .../src/common/serializer/index.ts | 13 ++++ .../src/common/sort_field/index.ts | 14 ++++ .../src/common/sort_order/index.ts | 8 +- .../src/common/tags/index.ts | 8 +- .../src/common/tie_breaker_id/index.ts | 12 +++ .../src/common/timestamp/index.ts | 12 +++ .../src/common/total/index.ts | 12 +++ .../src/common/type/index.test.ts | 8 +- .../src/common/type/index.ts | 8 +- .../src/common/underscore_version/index.ts | 12 +++ .../src/common/update_comment/index.mock.ts | 8 +- .../src/common/update_comment/index.test.ts | 8 +- .../src/common/update_comment/index.ts | 8 +- .../src/common/updated_at/index.ts | 12 +++ .../src/common/updated_by/index.ts | 12 +++ .../src/common/value/index.ts | 11 +++ .../src/constants/index.mock.ts | 8 +- .../index.mock.ts | 8 +- .../index.test.ts | 8 +- .../create_endpoint_list_item_schema/index.ts | 11 +-- .../index.mock.ts | 8 +- .../index.test.ts | 8 +- .../index.ts | 11 +-- .../index.mock.ts | 8 +- .../index.test.ts | 8 +- .../create_exception_list_schema/index.ts | 11 +-- .../create_list_item_schema/index.mock.ts | 8 +- .../create_list_item_schema/index.test.ts | 8 +- .../request/create_list_item_schema/index.ts | 8 +- .../request/create_list_schema/index.mock.ts | 8 +- .../request/create_list_schema/index.test.ts | 8 +- .../src/request/create_list_schema/index.ts | 8 +- .../index.test.ts | 8 +- .../index.ts | 8 +- .../index.mock.ts | 14 ++++ .../index.test.ts | 8 +- .../delete_endpoint_list_item_schema/index.ts | 8 +- .../index.mock.ts | 15 ++++ .../index.test.ts | 8 +- .../index.ts | 8 +- .../index.mock.ts | 15 ++++ .../index.test.ts | 8 +- .../delete_exception_list_schema/index.ts | 8 +- .../delete_list_item_schema/index.mock.ts | 16 ++++ .../delete_list_item_schema/index.test.ts | 8 +- .../request/delete_list_item_schema/index.ts | 8 +- .../request/delete_list_schema/index.mock.ts | 16 ++++ .../request/delete_list_schema/index.test.ts | 8 +- .../src/request/delete_list_schema/index.ts | 8 +- .../index.mock.ts | 8 +- .../index.test.ts | 8 +- .../index.ts | 8 +- .../index.mock.ts | 8 +- .../index.test.ts | 8 +- .../index.ts | 8 +- .../index.mock.ts | 14 ++++ .../index.test.ts | 8 +- .../export_list_item_query_schema/index.ts | 8 +- .../index.mock.ts | 8 +- .../index.test.ts | 8 +- .../find_endpoint_list_item_schema/index.ts | 8 +- .../index.mock.ts | 8 +- .../index.test.ts | 8 +- .../find_exception_list_item_schema/index.ts | 8 +- .../find_exception_list_schema/index.mock.ts | 8 +- .../find_exception_list_schema/index.test.ts | 8 +- .../find_exception_list_schema/index.ts | 8 +- .../find_list_item_schema/index.mock.ts | 8 +- .../find_list_item_schema/index.test.ts | 8 +- .../request/find_list_item_schema/index.ts | 8 +- .../request/find_list_schema/index.mock.ts | 8 +- .../request/find_list_schema/index.test.ts | 8 +- .../src/request/find_list_schema/index.ts | 8 +- .../get_exception_filter_schema/index.ts | 8 +- .../index.mock.ts | 8 +- .../index.test.ts | 8 +- .../import_exception_item_schema/index.ts | 14 ++-- .../index.mock.ts | 8 +- .../index.test.ts | 8 +- .../import_exception_list_schema/index.ts | 14 ++-- .../index.mock.ts | 8 +- .../index.test.ts | 8 +- .../import_list_item_query_schema/index.ts | 8 +- .../import_list_item_schema/index.mock.ts | 8 +- .../import_list_item_schema/index.test.ts | 8 +- .../request/import_list_item_schema/index.ts | 8 +- .../src/request/index.ts | 8 +- .../index.test.ts | 8 +- .../create_exception_list_schema/index.ts | 8 +- .../patch_list_item_schema/index.mock.ts | 16 ++++ .../patch_list_item_schema/index.test.ts | 8 +- .../request/patch_list_item_schema/index.ts | 8 +- .../request/patch_list_schema/index.mock.ts | 17 +++++ .../request/patch_list_schema/index.test.ts | 8 +- .../src/request/patch_list_schema/index.ts | 8 +- .../index.mock.ts | 15 ++++ .../index.test.ts | 8 +- .../read_endpoint_list_item_schema/index.ts | 8 +- .../index.mock.ts | 16 ++++ .../index.test.ts | 8 +- .../read_exception_list_item_schema/index.ts | 8 +- .../read_exception_list_schema/index.mock.ts | 16 ++++ .../read_exception_list_schema/index.test.ts | 8 +- .../read_exception_list_schema/index.ts | 8 +- .../read_list_item_schema/index.mock.ts | 16 ++++ .../read_list_item_schema/index.test.ts | 8 +- .../request/read_list_item_schema/index.ts | 8 +- .../request/read_list_schema/index.mock.ts | 14 ++++ .../request/read_list_schema/index.test.ts | 8 +- .../src/request/read_list_schema/index.ts | 18 +++++ .../index.mock.ts | 8 +- .../index.test.ts | 8 +- .../summary_exception_list_schema/index.ts | 8 +- .../index.mock.ts | 8 +- .../index.test.ts | 8 +- .../update_endpoint_list_item_schema/index.ts | 8 +- .../index.mock.ts | 8 +- .../index.test.ts | 8 +- .../index.ts | 8 +- .../index.mock.ts | 8 +- .../index.test.ts | 8 +- .../update_exception_list_schema/index.ts | 8 +- .../update_list_item_schema/index.mock.ts | 8 +- .../update_list_item_schema/index.test.ts | 8 +- .../request/update_list_item_schema/index.ts | 8 +- .../request/update_list_schema/index.mock.ts | 8 +- .../request/update_list_schema/index.test.ts | 8 +- .../src/request/update_list_schema/index.ts | 8 +- .../response/acknowledge_schema/index.mock.ts | 12 +++ .../response/acknowledge_schema/index.test.ts | 8 +- .../src/response/acknowledge_schema/index.ts | 12 +++ .../create_endpoint_list_schema/index.test.ts | 8 +- .../create_endpoint_list_schema/index.ts | 13 ++++ .../exception_list_item_schema/index.mock.ts | 8 +- .../exception_list_item_schema/index.test.ts | 8 +- .../exception_list_item_schema/index.ts | 8 +- .../exception_list_schema/index.mock.ts | 8 +- .../exception_list_schema/index.test.ts | 8 +- .../response/exception_list_schema/index.ts | 8 +- .../index.mock.ts | 15 ++++ .../index.test.ts | 8 +- .../exception_list_summary_schema/index.ts | 8 +- .../found_all_list_items_schema/index.mock.ts | 14 ++++ .../found_all_list_items_schema/index.ts | 8 +- .../index.mock.ts | 8 +- .../index.test.ts | 8 +- .../found_exception_list_item_schema/index.ts | 8 +- .../found_exception_list_schema/index.mock.ts | 8 +- .../found_exception_list_schema/index.test.ts | 8 +- .../found_exception_list_schema/index.ts | 8 +- .../found_list_item_schema/index.mock.ts | 8 +- .../response/found_list_item_schema/index.ts | 8 +- .../response/found_list_schema/index.mock.ts | 17 +++++ .../src/response/found_list_schema/index.ts | 8 +- .../found_lists_by_size_schema/index.mock.ts | 14 ++++ .../found_lists_by_size_schema/index.ts | 8 +- .../import_exceptions_schema/index.mock.ts | 8 +- .../import_exceptions_schema/index.test.ts | 8 +- .../import_exceptions_schema/index.ts | 8 +- .../src/response/index.ts | 8 +- .../index.mock.ts | 13 ++++ .../index.test.ts | 8 +- .../list_item_index_exist_schema/index.ts | 17 +++++ .../response/list_item_schema/index.mock.ts | 8 +- .../response/list_item_schema/index.test.ts | 8 +- .../src/response/list_item_schema/index.ts | 8 +- .../src/response/list_schema/index.mock.ts | 8 +- .../src/response/list_schema/index.test.ts | 8 +- .../src/response/list_schema/index.ts | 8 +- .../search_list_item_schema/index.mock.ts | 8 +- .../search_list_item_schema/index.test.ts | 8 +- .../response/search_list_item_schema/index.ts | 8 +- .../src/typescript_types/index.ts | 8 +- .../tsconfig.json | 2 +- .../kbn-securitysolution-list-api/README.md | 0 .../kbn-securitysolution-list-api/index.ts | 12 +++ .../jest.config.js | 12 +++ .../kibana.jsonc | 0 .../package.json | 2 +- .../src/api/index.ts | 8 +- .../src/fp_utils/index.test.ts | 8 +- .../src/fp_utils/index.ts | 8 +- .../src/list_api/index.test.ts | 8 +- .../src/list_api/index.ts | 8 +- .../src/list_api/mocks/constants.mock.ts | 8 +- .../response/acknowledge_schema.mock.ts | 0 .../mocks}/response/found_list_schema.mock.ts | 0 .../list_item_index_exist_schema.mock.ts | 0 .../mocks/response/list_schema.mock.ts | 8 +- .../src/list_item_api/index.test.ts | 8 +- .../src/list_item_api/index.ts | 8 +- .../src/list_item_api/mocks/response/index.ts | 8 +- .../mocks/response/list_item_schema.mock.ts | 8 +- .../src/types.ts | 11 ++- .../tsconfig.json | 2 +- .../README.md | 0 .../index.ts | 8 +- .../kibana.jsonc | 0 .../package.json | 2 +- .../tsconfig.json | 2 +- .../kbn-securitysolution-list-hooks/README.md | 0 .../kbn-securitysolution-list-hooks/index.ts | 8 +- .../jest.config.js | 12 +++ .../kibana.jsonc | 0 .../package.json | 2 +- .../src/constants.ts | 8 ++ .../src/index.ts | 8 +- .../src/mocks/constants.mock.ts | 8 +- .../create_exception_list_item_schema.mock.ts | 8 +- .../update_exception_list_item_schema.mock.ts | 8 +- .../exception_list_item_schema.mock.ts | 8 +- .../mocks/response/found_list_schema.mock.ts | 8 +- .../src}/mocks/response/list_schema.mock.ts | 8 +- .../src/transforms/index.test.ts | 8 +- .../src/transforms/index.ts | 8 +- .../src/use_api/index.ts | 8 +- .../src/use_create_list_index/index.ts | 8 +- .../src/use_create_list_item/index.ts | 8 +- .../src/use_cursor/index.test.ts | 8 +- .../src/use_cursor/index.ts | 8 +- .../src/use_delete_list/index.ts | 13 ++++ .../src/use_delete_list_item/index.ts | 8 +- .../src/use_exception_lists/index.ts | 8 +- .../src/use_export_list/index.ts | 13 ++++ .../src/use_find_list_items/index.ts | 8 +- .../src/use_find_lists/index.test.ts | 8 +- .../src/use_find_lists/index.ts | 13 ++++ .../src/use_find_lists_by_size/index.ts | 8 +- .../src/use_get_list_by_id/index.ts | 8 +- .../src/use_import_list/index.ts | 13 ++++ .../src/use_patch_list_item/index.ts | 8 +- .../src/use_persist_exception_item/index.ts | 12 ++- .../src/use_persist_exception_list/index.ts | 8 +- .../src/use_read_list_index/index.ts | 8 +- .../src/use_read_list_privileges/index.ts | 8 +- .../tsconfig.json | 2 +- .../kbn-securitysolution-list-utils/README.md | 0 .../kbn-securitysolution-list-utils/index.ts | 8 +- .../jest.config.js | 12 +++ .../kibana.jsonc | 0 .../package.json | 2 +- .../src/autocomplete_operators/index.ts | 8 +- .../src/get_exception_list_type/index.ts | 8 +- .../src/get_filters/index.test.ts | 8 +- .../src/get_filters/index.ts | 8 +- .../src/get_general_filters/index.test.ts | 8 +- .../src/get_general_filters/index.ts | 8 +- .../src/get_ids_and_namespaces/index.test.ts | 8 +- .../src/get_ids_and_namespaces/index.ts | 8 +- .../src/get_saved_object_type/index.ts | 8 +- .../src/get_saved_object_types/index.ts | 8 +- .../src/has_large_value_list/index.ts | 13 ++++ .../src/helpers/index.test.ts | 8 +- .../src/helpers/index.ts | 9 +-- .../src/types/index.ts | 8 +- .../tsconfig.json | 2 +- .../README.md | 0 .../api/create_list/create_list.gen.ts | 8 +- .../api/create_list/create_list.schema.yaml | 12 +-- .../create_list_index.gen.ts | 8 +- .../create_list_index.schema.yaml | 12 +-- .../create_list_item/create_list_item.gen.ts | 8 +- .../create_list_item.schema.yaml | 14 ++-- .../api/delete_list/delete_list.gen.ts | 8 +- .../api/delete_list/delete_list.schema.yaml | 12 +-- .../delete_list_index.gen.ts | 8 +- .../delete_list_index.schema.yaml | 12 +-- .../delete_list_item/delete_list_item.gen.ts | 8 +- .../delete_list_item.schema.yaml | 12 +-- .../export_list_items.gen.ts | 8 +- .../export_list_items.schema.yaml | 12 +-- .../find_list_items/find_list_items.gen.ts | 8 +- .../find_list_items.schema.yaml | 14 ++-- .../api/find_lists/find_lists.gen.ts | 8 +- .../api/find_lists/find_lists.schema.yaml | 14 ++-- .../import_list_items.gen.ts | 8 +- .../import_list_items.schema.yaml | 12 +-- .../api/index.ts | 8 +- .../api/model/list_common.gen.ts | 8 +- .../api/model/list_common.schema.yaml | 12 +-- .../api/model/list_schemas.gen.ts | 8 +- .../api/model/list_schemas.schema.yaml | 0 .../api/patch_list/patch_list.gen.ts | 8 +- .../api/patch_list/patch_list.schema.yaml | 12 +-- .../patch_list_item/patch_list_item.gen.ts | 8 +- .../patch_list_item.schema.yaml | 12 +-- .../api/quickstart_client.gen.ts | 8 +- .../api/read_list/read_list.gen.ts | 8 +- .../api/read_list/read_list.schema.yaml | 12 +-- .../read_list_index/read_list_index.gen.ts | 8 +- .../read_list_index.schema.yaml | 14 ++-- .../api/read_list_item/read_list_item.gen.ts | 8 +- .../read_list_item/read_list_item.schema.yaml | 12 +-- .../read_list_privileges.gen.ts | 8 +- .../read_list_privileges.schema.yaml | 10 +-- .../api/update_list/update_list.gen.ts | 8 +- .../api/update_list/update_list.schema.yaml | 12 +-- .../update_list_item/update_list_item.gen.ts | 8 +- .../update_list_item.schema.yaml | 12 +-- ...n_lists_api_2023_10_31.bundled.schema.yaml | 0 ...n_lists_api_2023_10_31.bundled.schema.yaml | 0 .../kibana.jsonc | 0 .../package.json | 2 +- .../scripts/openapi_bundle.js | 11 ++- .../openapi_bundle_info/lists_ess.info.yaml | 0 .../lists_serverless.info.yaml | 0 .../scripts/openapi_generate.js | 13 ++-- .../tsconfig.json | 2 +- .../kbn-securitysolution-t-grid/README.md | 0 .../kbn-securitysolution-t-grid/index.ts | 11 +++ .../kbn-securitysolution-t-grid/kibana.jsonc | 0 .../kbn-securitysolution-t-grid/package.json | 2 +- .../src/constants/index.ts | 8 +- .../src/mock/index.ts | 8 ++ .../src/mock/mock_event_details.ts | 8 +- .../src/utils/api/index.ts | 8 +- .../src/utils/drag_and_drop/index.ts | 8 +- .../src/utils/index.ts | 9 +++ .../kbn-securitysolution-t-grid/tsconfig.json | 2 +- .../kbn-securitysolution-utils/README.md | 0 .../kbn-securitysolution-utils/index.ts | 13 ++++ .../kbn-securitysolution-utils/jest.config.js | 12 +++ .../kbn-securitysolution-utils/kibana.jsonc | 0 .../kbn-securitysolution-utils/package.json | 2 +- .../src/add_remove_id_to_item/index.test.ts | 8 +- .../src/add_remove_id_to_item/index.ts | 8 +- .../src/axios/index.ts | 9 +-- .../src/client_concurrency/index.ts | 8 +- .../src/debounce_async/debounce_async.test.ts | 8 +- .../src/debounce_async/debounce_async.ts | 8 +- .../compute_if_esql_query_aggregating.test.ts | 8 +- .../esql/compute_if_esql_query_aggregating.ts | 8 +- .../get_index_list_from_esql_query.test.ts | 8 +- .../esql/get_index_list_from_esql_query.ts | 8 +- .../src/esql/index.ts | 10 +++ .../src/esql/parse_esql_query.test.ts | 8 +- .../src/esql/parse_esql_query.ts | 8 +- .../src/path_validations/index.test.ts | 8 +- .../src/path_validations/index.ts | 8 +- .../transform_data_to_ndjson/index.test.ts | 8 +- .../src/transform_data_to_ndjson/index.ts | 15 ++++ .../kbn-securitysolution-utils/tsconfig.json | 2 +- .../plugins/lists/.storybook/main.js | 0 .../security}/plugins/lists/README.md | 2 +- .../create_exception_list_route.ts | 0 .../get_exception_filter_route.ts | 0 .../plugins/lists/common/api/index.ts | 0 .../find_lists_by_size_route.ts | 0 .../plugins/lists/common/constants.mock.ts | 0 .../security}/plugins/lists/common/index.ts | 0 .../create_exception_list_item_schema.mock.ts | 0 .../create_exception_list_schema.mock.ts | 0 .../request/create_list_item_schema.mock.ts | 0 .../request/create_list_schema.mock.ts | 0 .../get_exception_filter_schema.mock.ts | 0 .../request/import_exceptions_schema.mock.ts | 0 .../request/import_list_item_schema.mock.ts | 0 .../update_exception_list_item_schema.mock.ts | 0 .../update_exception_list_schema.mock.ts | 0 .../request/update_list_item_schema.mock.ts | 0 .../request/update_list_schema.mock.ts | 0 .../response/acknowledge_schema.mock.ts | 12 +++ .../exception_export_details_schema.mock.ts | 0 .../exception_list_item_schema.mock.ts | 0 .../response/exception_list_schema.mock.ts | 0 .../exception_list_summary_schema.mock.ts | 0 .../found_all_list_items_schema.mock.ts | 0 .../found_exception_list_item_schema.mock.ts | 0 .../found_exception_list_schema.mock.ts | 0 .../response/found_list_item_schema.mock.ts | 0 .../response/found_list_schema.mock.ts | 8 +- .../found_lists_by_size_schema.mock.ts | 0 .../list_item_index_exist_schema.mock.ts | 13 ++++ .../schemas/response/list_item_schema.mock.ts | 0 .../schemas/response/list_schema.mock.ts | 0 .../response/search_list_item_schema.mock.ts | 0 .../common/schemas/types/comment.mock.ts | 0 .../schemas/types/create_comment.mock.ts | 0 .../common/schemas/types/entries.mock.ts | 0 .../common/schemas/types/entry_exists.mock.ts | 0 .../common/schemas/types/entry_list.mock.ts | 0 .../common/schemas/types/entry_match.mock.ts | 0 .../schemas/types/entry_match_any.mock.ts | 0 .../types/entry_match_wildcard.mock.ts | 0 .../common/schemas/types/entry_nested.mock.ts | 0 .../schemas/types/update_comment.mock.ts | 0 .../security}/plugins/lists/jest.config.js | 11 ++- .../security}/plugins/lists/kibana.jsonc | 0 .../lists/public/common/empty_value.ts | 0 .../lists/public/exceptions/api.test.ts | 0 .../__mock__/show_value_list_modal.mock.tsx | 0 .../components/and_or_badge/index.stories.tsx | 0 .../components/and_or_badge/index.test.tsx | 0 .../components/and_or_badge/index.tsx | 0 .../and_or_badge/rounded_badge.test.tsx | 0 .../components/and_or_badge/rounded_badge.tsx | 0 .../rounded_badge_antenna.test.tsx | 0 .../and_or_badge/rounded_badge_antenna.tsx | 0 .../components/and_or_badge/translations.ts | 0 .../components/builder/and_badge.test.tsx | 0 .../components/builder/and_badge.tsx | 0 .../components/builder/builder.stories.tsx | 0 .../builder/entry_delete_button.test.tsx | 0 .../builder/entry_delete_button.tsx | 0 .../builder/entry_renderer.stories.tsx | 0 .../builder/entry_renderer.test.tsx | 0 .../components/builder/entry_renderer.tsx | 0 .../builder/exception_item_renderer.test.tsx | 0 .../builder/exception_item_renderer.tsx | 0 .../builder/exception_items_renderer.test.tsx | 0 .../builder/exception_items_renderer.tsx | 0 .../components/builder/helpers.test.ts | 2 +- .../exceptions/components/builder/index.tsx | 0 .../components/builder/logic_buttons.test.tsx | 0 .../components/builder/logic_buttons.tsx | 0 .../exceptions/components/builder/reducer.ts | 0 .../components/builder/selectors.ts | 0 .../components/builder/translations.ts | 0 .../hooks/persist_exception_item.test.ts | 2 +- .../hooks/persist_exception_list.test.ts | 2 +- .../public/exceptions/hooks/use_api.test.ts | 2 +- .../hooks/use_exception_lists.test.ts | 2 +- .../public/exceptions/transforms.test.ts | 0 .../security}/plugins/lists/public/index.ts | 0 .../lists/hooks/use_create_list_index.test.ts | 2 +- .../lists/hooks/use_delete_list.test.ts | 2 +- .../lists/hooks/use_export_list.test.ts | 2 +- .../lists/hooks/use_import_list.test.ts | 2 +- .../lists/hooks/use_read_list_index.test.ts | 2 +- .../public/lists/mocks/query_wrapper.tsx | 0 .../plugins/lists/public/lists/types.ts | 0 .../security}/plugins/lists/public/plugin.ts | 0 .../plugins/lists/public/shared_exports.ts | 0 .../security}/plugins/lists/public/types.ts | 0 .../plugins/lists/scripts/storybook.js | 0 .../plugins/lists/server/config.mock.ts | 0 .../plugins/lists/server/config.test.ts | 0 .../security}/plugins/lists/server/config.ts | 0 .../lists/server/error_with_status_code.ts | 0 .../plugins/lists/server/get_space_id.test.ts | 0 .../plugins/lists/server/get_space_id.ts | 0 .../plugins/lists/server/get_user.test.ts | 0 .../plugins/lists/server/get_user.ts | 0 .../handlers/create_exception_list_handler.ts | 0 .../security}/plugins/lists/server/index.ts | 0 .../security}/plugins/lists/server/mocks.ts | 0 .../security}/plugins/lists/server/plugin.ts | 0 .../routes/create_endpoint_list_item_route.ts | 0 .../routes/create_endpoint_list_route.ts | 0 .../create_exception_list_item_route.ts | 0 .../routes/create_exception_list_route.ts | 0 .../routes/delete_endpoint_list_item_route.ts | 0 .../delete_exception_list_item_route.ts | 0 .../routes/delete_exception_list_route.ts | 0 .../routes/duplicate_exception_list_route.ts | 0 .../routes/endpoint_disallowed_fields.ts | 0 .../routes/export_exception_list_route.ts | 0 .../routes/find_endpoint_list_item_route.ts | 0 .../routes/find_exception_list_item_route.ts | 0 .../routes/find_exception_list_route.ts | 0 .../server/routes/import_exceptions_route.ts | 0 .../plugins/lists/server/routes/index.ts | 0 .../lists/server/routes/init_routes.ts | 0 .../internal/create_exception_filter_route.ts | 0 .../internal/create_exceptions_list_route.ts | 0 .../internal/find_lists_by_size_route.ts | 0 .../server/routes/list/create_list_route.ts | 0 .../server/routes/list/delete_list_route.ts | 0 .../routes/list/import_list_item_route.ts | 0 .../server/routes/list/patch_list_route.ts | 0 .../server/routes/list/read_list_route.ts | 0 .../server/routes/list/update_list_route.ts | 0 .../list_index/create_list_index_route.ts | 0 .../list_index/delete_list_index_route.ts | 0 .../list_index/export_list_item_route.ts | 0 .../routes/list_index/find_list_route.ts | 0 .../list_index/read_list_index_route.ts | 0 .../list_item/create_list_item_route.ts | 0 .../list_item/delete_list_item_route.ts | 0 .../routes/list_item/find_list_item_route.ts | 0 .../routes/list_item/patch_list_item_route.ts | 0 .../routes/list_item/read_list_item_route.ts | 0 .../list_item/update_list_item_route.ts | 0 .../read_list_privileges_route.mock.ts | 0 .../read_list_privileges_route.ts | 0 .../routes/read_endpoint_list_item_route.ts | 0 .../routes/read_exception_list_item_route.ts | 0 .../routes/read_exception_list_route.ts | 0 .../routes/summary_exception_list_route.ts | 0 .../routes/update_endpoint_list_item_route.ts | 0 .../update_exception_list_item_route.ts | 0 .../routes/update_exception_list_route.ts | 0 .../routes/utils/build_siem_response.ts | 0 .../routes/utils/create_stream_from_buffer.ts | 0 .../utils/get_error_message_exception_list.ts | 0 .../get_error_message_exception_list_item.ts | 0 .../routes/utils/get_exception_list_client.ts | 0 .../routes/utils/get_internal_list_client.ts | 0 .../server/routes/utils/get_list_client.ts | 0 .../lists/server/routes/utils/index.ts | 0 .../routes/utils/route_validation.test.ts | 0 .../server/routes/utils/route_validation.ts | 0 .../utils/validate_comments_to_update.test.ts | 0 .../utils/validate_comments_to_update.ts | 0 .../plugins/lists/server/routes/validate.ts | 0 .../server/saved_objects/exception_list.ts | 0 .../lists/server/saved_objects/index.ts | 0 .../saved_objects/init_saved_objects.ts | 0 .../server/saved_objects/migrations.test.ts | 0 .../lists/server/saved_objects/migrations.ts | 0 .../server/schemas/common/get_shard.mock.ts | 0 .../server/schemas/common/schemas.test.ts | 0 .../lists/server/schemas/common/schemas.ts | 0 .../elastic_query/create_es_bulk_type.ts | 0 .../server/schemas/elastic_query/index.ts | 0 .../index_es_list_item_schema.mock.ts | 0 .../index_es_list_item_schema.ts | 0 .../index_es_list_schema.mock.ts | 0 .../elastic_query/index_es_list_schema.ts | 0 .../update_es_list_item_schema.ts | 0 .../elastic_query/update_es_list_schema.ts | 0 .../server/schemas/elastic_response/index.ts | 0 .../search_es_list_item_schema.mock.ts | 0 .../search_es_list_item_schema.test.ts | 0 .../search_es_list_item_schema.ts | 0 .../search_es_list_schema.mock.ts | 0 .../search_es_list_schema.test.ts | 0 .../elastic_response/search_es_list_schema.ts | 0 .../exceptions_list_so_schema.ts | 0 .../server/schemas/saved_objects/index.ts | 0 .../server/scripts/check_env_variables.sh | 0 .../scripts/delete_all_exception_lists.sh | 0 .../scripts/delete_endpoint_list_item.sh | 0 .../delete_endpoint_list_item_by_id.sh | 0 .../server/scripts/delete_exception_list.sh | 0 .../scripts/delete_exception_list_by_id.sh | 0 .../scripts/delete_exception_list_item.sh | 0 .../delete_exception_list_item_by_id.sh | 0 .../lists/server/scripts/delete_list.sh | 0 .../lists/server/scripts/delete_list_index.sh | 0 .../server/scripts/delete_list_item_by_id.sh | 0 .../scripts/delete_list_item_by_value.sh | 0 .../scripts/download_load_lists_example.sh | 0 .../exception_lists/files/import.ndjson | 0 .../new/endpoint_list_item.json | 0 .../exception_lists/new/exception_list.json | 0 .../new/exception_list_agnostic.json | 0 .../new/exception_list_auto_id.json | 0 .../new/exception_list_detection.json | 0 .../new/exception_list_item.json | 0 .../new/exception_list_item_agnostic.json | 0 .../new/exception_list_item_auto_id.json | 0 ...exception_list_item_detection_auto_id.json | 0 .../exception_list_item_with_bad_ip_list.json | 0 .../new/exception_list_item_with_list.json | 0 .../exception_list_detection_1.json | 0 .../exception_list_detection_2_agnostic.json | 0 .../exception_list_detection_3.json | 0 ...xception_list_item_1_multi_value_list.json | 0 .../exception_list_item_1_non_value_list.json | 0 ...xception_list_item_2_multi_value_list.json | 0 .../exception_list_item_2_non_value_list.json | 0 .../exception_list_item_3_non_value_list.json | 0 ...ception_list_item_3_single_value_list.json | 0 .../new/trusted_app_list_item_agnostic.json | 0 .../updates/simple_update.json | 0 .../updates/simple_update_agnostic.json | 0 .../updates/simple_update_item.json | 0 .../lists/server/scripts/export_list_items.sh | 0 .../scripts/export_list_items_to_file.sh | 0 .../scripts/find_endpoint_list_items.sh | 0 .../scripts/find_exception_list_items.sh | 0 .../find_exception_list_items_by_filter.sh | 0 .../server/scripts/find_exception_lists.sh | 0 .../scripts/find_exception_lists_by_filter.sh | 0 .../lists/server/scripts/find_list_items.sh | 0 .../scripts/find_list_items_with_cursor.sh | 0 .../scripts/find_list_items_with_sort.sh | 0 .../find_list_items_with_sort_cursor.sh | 0 .../lists/server/scripts/find_lists.sh | 0 .../server/scripts/find_lists_with_cursor.sh | 0 .../server/scripts/find_lists_with_filter.sh | 0 .../server/scripts/find_lists_with_sort.sh | 0 .../scripts/find_lists_with_sort_cursor.sh | 0 .../server/scripts/get_endpoint_list_item.sh | 0 .../scripts/get_endpoint_list_item_by_id.sh | 0 .../server/scripts/get_exception_list.sh | 0 .../scripts/get_exception_list_by_id.sh | 0 .../server/scripts/get_exception_list_item.sh | 0 .../scripts/get_exception_list_item_by_id.sh | 0 .../plugins/lists/server/scripts/get_list.sh | 0 .../server/scripts/get_list_item_by_id.sh | 0 .../server/scripts/get_list_item_by_value.sh | 0 .../lists/server/scripts/get_privileges.sh | 0 .../lists/server/scripts/hard_reset.sh | 0 .../server/scripts/import_exception_lists.sh | 0 .../lists/server/scripts/import_list_items.sh | 0 .../scripts/import_list_items_by_filename.sh | 0 .../server/scripts/lists/files/binary.txt | 0 .../server/scripts/lists/files/boolean.txt | 0 .../lists/server/scripts/lists/files/byte.txt | 0 .../lists/server/scripts/lists/files/date.txt | 0 .../server/scripts/lists/files/date_nanos.txt | 0 .../server/scripts/lists/files/date_range.txt | 0 .../lists/files/date_range_custom_format.txt | 0 .../server/scripts/lists/files/double.txt | 0 .../scripts/lists/files/double_range.txt | 0 .../server/scripts/lists/files/float.txt | 0 .../scripts/lists/files/float_range.txt | 0 .../server/scripts/lists/files/geo_hash.txt | 0 .../server/scripts/lists/files/geo_point.txt | 0 .../scripts/lists/files/geo_point_wkt.txt | 0 .../server/scripts/lists/files/half_float.txt | 0 .../server/scripts/lists/files/hosts.txt | 0 .../server/scripts/lists/files/integer.txt | 0 .../scripts/lists/files/integer_range.txt | 0 .../server/scripts/lists/files/ip_range.txt | 0 .../scripts/lists/files/ip_range_cidr.txt | 0 .../scripts/lists/files/ip_range_mixed.txt | 0 .../lists/server/scripts/lists/files/ips.txt | 0 .../lists/server/scripts/lists/files/long.txt | 0 .../server/scripts/lists/files/long_range.txt | 0 .../server/scripts/lists/files/short.txt | 0 .../lists/server/scripts/lists/files/text.txt | 0 .../scripts/lists/new/items/binary_item.json | 0 .../scripts/lists/new/items/boolean_item.json | 0 .../scripts/lists/new/items/byte_item.json | 0 .../scripts/lists/new/items/date_item.json | 0 .../lists/new/items/date_nanos_item.json | 0 .../lists/new/items/date_range_item.json | 0 .../scripts/lists/new/items/double_item.json | 0 .../lists/new/items/double_range_item.json | 0 .../scripts/lists/new/items/float_item.json | 0 .../lists/new/items/float_range_item.json | 0 .../lists/new/items/geo_point_item.json | 0 .../lists/new/items/geo_shape_item.json | 0 .../lists/new/items/half_float_item.json | 0 .../scripts/lists/new/items/integer_item.json | 0 .../lists/new/items/integer_range_item.json | 0 .../scripts/lists/new/items/ip_item.json | 0 .../lists/new/items/ip_item_everything.json | 0 .../lists/new/items/ip_range_item.json | 0 .../scripts/lists/new/items/keyword_item.json | 0 .../scripts/lists/new/items/long_item.json | 0 .../lists/new/items/long_range_item.json | 0 .../scripts/lists/new/items/shape_item.json | 0 .../scripts/lists/new/items/short_item.json | 0 .../scripts/lists/new/items/text_item.json | 0 .../scripts/lists/new/list_ip_item.json | 0 .../scripts/lists/new/list_keyword_item.json | 0 .../scripts/lists/new/lists/auto_id.json | 0 .../scripts/lists/new/lists/binary.json | 0 .../scripts/lists/new/lists/boolean.json | 0 .../server/scripts/lists/new/lists/byte.json | 0 .../server/scripts/lists/new/lists/date.json | 0 .../scripts/lists/new/lists/date_nanos.json | 0 .../scripts/lists/new/lists/date_range.json | 0 .../new/lists/date_range_custom_format.json | 0 .../scripts/lists/new/lists/double.json | 0 .../scripts/lists/new/lists/double_range.json | 0 .../scripts/lists/new/lists/everything.json | 0 .../server/scripts/lists/new/lists/float.json | 0 .../scripts/lists/new/lists/float_range.json | 0 .../scripts/lists/new/lists/geo_point.json | 0 .../scripts/lists/new/lists/geo_shape.json | 0 .../scripts/lists/new/lists/half_float.json | 0 .../scripts/lists/new/lists/integer.json | 0 .../lists/new/lists/integer_range.json | 0 .../server/scripts/lists/new/lists/ip.json | 0 .../lists/new/lists/ip_custom_format.json | 0 .../scripts/lists/new/lists/ip_no_id.json | 0 .../scripts/lists/new/lists/ip_range.json | 0 .../scripts/lists/new/lists/keyword.json | 0 .../new/lists/keyword_custom_format.json | 0 .../server/scripts/lists/new/lists/long.json | 0 .../server/scripts/lists/new/lists/shape.json | 0 .../server/scripts/lists/new/lists/short.json | 0 .../server/scripts/lists/new/lists/text.json | 0 .../server/scripts/lists/patches/ip_item.json | 0 .../lists/patches/simplest_updated_name.json | 0 .../server/scripts/lists/updates/ip_item.json | 0 .../scripts/lists/updates/simple_update.json | 0 .../server/scripts/lists_index_exists.sh | 0 .../lists/server/scripts/patch_list.sh | 0 .../lists/server/scripts/patch_list_item.sh | 0 .../server/scripts/post_endpoint_list.sh | 0 .../server/scripts/post_endpoint_list_item.sh | 0 .../server/scripts/post_exception_list.sh | 0 .../scripts/post_exception_list_item.sh | 0 .../plugins/lists/server/scripts/post_list.sh | 0 .../lists/server/scripts/post_list_index.sh | 0 .../lists/server/scripts/post_list_item.sh | 0 .../scripts/post_x_exception_list_items.sh | 0 .../lists/server/scripts/quick_start.sh | 0 .../quick_start_value_list_references.sh | 0 .../server/scripts/summary_exception_list.sh | 0 .../server/scripts/update_endpoint_item.sh | 0 .../server/scripts/update_exception_list.sh | 0 .../scripts/update_exception_list_item.sh | 0 .../lists/server/scripts/update_list.sh | 0 .../lists/server/scripts/update_list_item.sh | 0 .../build_exception_filter.test.ts | 0 .../exception_lists/build_exception_filter.ts | 0 .../bulk_create_exception_list_items.ts | 0 .../exception_lists/close_point_in_time.ts | 0 .../exception_lists/create_endpoint_list.ts | 0 .../create_endpoint_trusted_apps_list.ts | 0 .../exception_lists/create_exception_list.ts | 0 .../create_exception_list_item.ts | 0 .../exception_lists/delete_exception_list.ts | 0 .../delete_exception_list_item.ts | 0 .../delete_exception_list_items_by_list.ts | 0 .../duplicate_exception_list.test.ts | 0 .../duplicate_exception_list.ts | 0 .../exception_list_client.mock.ts | 0 .../exception_list_client.test.ts | 0 .../exception_lists/exception_list_client.ts | 0 .../exception_list_client_types.ts | 0 .../export_exception_list_and_items.test.ts | 0 .../export_exception_list_and_items.ts | 0 .../exception_lists/find_exception_list.ts | 0 .../find_exception_list_item.ts | 0 ...xception_list_item_point_in_time_finder.ts | 0 .../find_exception_list_items.ts | 0 ...ception_list_items_point_in_time_finder.ts | 0 ...ind_exception_list_point_in_time_finder.ts | 0 .../find_value_list_exception_list_items.ts | 0 ...ception_list_items_point_in_time_finder.ts | 0 .../exception_lists/get_exception_list.ts | 0 .../get_exception_list_item.ts | 0 .../get_exception_list_summary.test.ts | 0 .../get_exception_list_summary.ts | 0 .../import_exception_list_and_items.test.ts | 0 .../import_exception_list_and_items.ts | 0 .../server/services/exception_lists/index.ts | 0 .../exception_lists/open_point_in_time.ts | 0 .../exception_lists/update_exception_list.ts | 0 .../update_exception_list_item.ts | 0 .../update_overwrite_exception_list_item.ts | 0 .../services/exception_lists/utils/errors.ts | 0 .../utils/get_exception_list_filter.test.ts | 0 .../utils/get_exception_list_filter.ts | 0 .../get_exception_lists_item_filter.test.ts | 0 .../utils/get_exception_lists_item_filter.ts | 0 .../import/bulk_create_imported_items.test.ts | 0 .../import/bulk_create_imported_items.ts | 0 .../import/bulk_create_imported_lists.test.ts | 0 .../import/bulk_create_imported_lists.ts | 0 .../import/bulk_update_imported_items.test.ts | 0 .../import/bulk_update_imported_items.ts | 0 .../import/bulk_update_imported_lists.test.ts | 0 .../import/bulk_update_imported_lists.ts | 0 .../create_exceptions_stream_logic.test.ts | 0 .../import/create_exceptions_stream_logic.ts | 0 .../import/dedupe_incoming_items.test.ts | 0 .../utils/import/dedupe_incoming_items.ts | 0 .../import/dedupe_incoming_lists.test.ts | 0 .../utils/import/dedupe_incoming_lists.ts | 0 .../delete_list_items_to_overwrite.test.ts | 0 .../import/delete_list_items_to_overwrite.ts | 0 ...find_all_exception_list_item_types.test.ts | 0 .../find_all_exception_list_item_types.ts | 0 .../find_all_exception_list_types.test.ts | 0 .../import/find_all_exception_list_types.ts | 0 .../import/import_exception_list_items.ts | 0 .../utils/import/import_exception_lists.ts | 0 .../utils/import/is_import_regular.test.ts | 0 .../utils/import/is_import_regular.ts | 0 ...xception_items_to_create_or_update.test.ts | 0 .../sort_exception_items_to_create_update.ts | 0 ...xception_lists_to_create_or_update.test.ts | 0 .../sort_exception_lists_to_create_update.ts | 0 .../import/sort_import_by_namespace.test.ts | 0 .../utils/import/sort_import_by_namespace.ts | 0 .../import/sort_import_responses.test.ts | 0 .../utils/import/sort_import_responses.ts | 0 .../exception_lists/utils/index.test.ts | 0 .../services/exception_lists/utils/index.ts | 0 .../utils/validate_data.test.ts | 0 .../exception_lists/utils/validate_data.ts | 0 .../services/extension_points/errors.ts | 0 .../extension_point_storage.mock.ts | 0 .../extension_point_storage.test.ts | 0 .../extension_point_storage.ts | 0 .../extension_point_storage_client.test.ts | 0 .../extension_point_storage_client.ts | 0 .../server/services/extension_points/index.ts | 0 .../server/services/extension_points/types.ts | 0 .../services/items/buffer_lines.test.ts | 0 .../server/services/items/buffer_lines.ts | 0 .../services/items/create_list_item.mock.ts | 0 .../services/items/create_list_item.test.ts | 0 .../server/services/items/create_list_item.ts | 0 .../items/create_list_items_bulk.mock.ts | 0 .../items/create_list_items_bulk.test.ts | 0 .../services/items/create_list_items_bulk.ts | 0 .../services/items/delete_list_item.mock.ts | 0 .../services/items/delete_list_item.test.ts | 0 .../server/services/items/delete_list_item.ts | 0 .../items/delete_list_item_by_value.mock.ts | 0 .../items/delete_list_item_by_value.test.ts | 0 .../items/delete_list_item_by_value.ts | 0 .../items/find_all_list_items.mock.ts | 0 .../items/find_all_list_items.test.ts | 0 .../services/items/find_all_list_items.ts | 0 .../services/items/find_list_item.mock.ts | 0 .../services/items/find_list_item.test.ts | 0 .../server/services/items/find_list_item.ts | 0 .../services/items/get_list_item.test.ts | 0 .../server/services/items/get_list_item.ts | 0 .../items/get_list_item_by_value.mock.ts | 0 .../items/get_list_item_by_value.test.ts | 0 .../services/items/get_list_item_by_value.ts | 0 .../items/get_list_item_by_values.mock.ts | 0 .../items/get_list_item_by_values.test.ts | 0 .../services/items/get_list_item_by_values.ts | 0 .../items/get_list_item_index.test.ts | 0 .../services/items/get_list_item_index.ts | 0 .../items/get_list_item_template.test.ts | 0 .../services/items/get_list_item_template.ts | 0 .../lists/server/services/items/index.ts | 0 .../services/items/list_item_mappings.json | 0 .../services/items/list_item_policy.json | 0 .../items/search_list_item_by_values.mock.ts | 0 .../items/search_list_item_by_values.test.ts | 0 .../items/search_list_item_by_values.ts | 0 .../services/items/test_readable.mock.ts | 0 .../services/items/update_list_item.mock.ts | 0 .../services/items/update_list_item.test.ts | 0 .../server/services/items/update_list_item.ts | 0 .../write_lines_to_bulk_list_items.mock.ts | 0 .../write_lines_to_bulk_list_items.test.ts | 0 .../items/write_lines_to_bulk_list_items.ts | 0 .../items/write_list_items_to_stream.test.ts | 0 .../items/write_list_items_to_stream.ts | 0 .../items/write_list_items_to_streams.mock.ts | 0 .../server/services/lists/create_list.mock.ts | 0 .../server/services/lists/create_list.test.ts | 0 .../server/services/lists/create_list.ts | 0 .../lists/create_list_if_it_does_not_exist.ts | 0 .../server/services/lists/delete_list.mock.ts | 0 .../server/services/lists/delete_list.test.ts | 0 .../server/services/lists/delete_list.ts | 0 .../lists/server/services/lists/find_list.ts | 0 .../server/services/lists/get_list.test.ts | 0 .../lists/server/services/lists/get_list.ts | 0 .../services/lists/get_list_index.test.ts | 0 .../server/services/lists/get_list_index.ts | 0 .../services/lists/get_list_template.test.ts | 0 .../services/lists/get_list_template.ts | 0 .../lists/server/services/lists/index.ts | 0 .../server/services/lists/list_client.mock.ts | 0 .../server/services/lists/list_client.test.ts | 0 .../server/services/lists/list_client.ts | 0 .../services/lists/list_client_types.ts | 0 .../server/services/lists/list_mappings.json | 0 .../server/services/lists/list_policy.json | 0 .../lists/server/services/lists/types.ts | 0 .../server/services/lists/update_list.mock.ts | 0 .../server/services/lists/update_list.test.ts | 0 .../server/services/lists/update_list.ts | 0 .../services/utils/calculate_scroll_math.ts | 0 .../services/utils/check_version_conflict.ts | 0 .../services/utils/encode_decode_cursor.ts | 0 .../server/services/utils/escape_query.ts | 0 .../services/utils/find_source_type.test.ts | 0 .../server/services/utils/find_source_type.ts | 0 .../services/utils/find_source_value.test.ts | 0 .../services/utils/find_source_value.ts | 0 .../services/utils/get_query_filter.test.ts | 0 .../server/services/utils/get_query_filter.ts | 0 .../get_query_filter_from_type_value.test.ts | 0 .../utils/get_query_filter_from_type_value.ts | 0 .../services/utils/get_search_after_scroll.ts | 0 .../get_search_after_with_tie_breaker.ts | 0 .../utils/get_sort_with_tie_breaker.ts | 0 .../utils/get_source_with_tie_breaker.ts | 0 .../lists/server/services/utils/index.ts | 0 .../services/utils/scroll_to_start_page.ts | 0 ..._elastic_named_search_to_list_item.test.ts | 0 ...sform_elastic_named_search_to_list_item.ts | 0 .../utils/transform_elastic_to_list.ts | 0 .../transform_elastic_to_list_item.test.ts | 0 .../utils/transform_elastic_to_list_item.ts | 0 ...ansform_list_item_to_elastic_query.test.ts | 0 .../transform_list_item_to_elastic_query.ts | 0 .../utils/wait_until_document_indexed.ts | 0 .../security}/plugins/lists/server/types.ts | 0 .../security}/plugins/lists/tsconfig.json | 2 +- .../security_solution/docs/openapi/README.md | 12 +-- .../server/lib/detection_engine/README.md | 2 +- yarn.lock | 38 +++++----- 1505 files changed, 3293 insertions(+), 4494 deletions(-) delete mode 100644 packages/kbn-securitysolution-autocomplete/src/es_field_selector/disabled_types_with_tooltip_text.ts delete mode 100644 packages/kbn-securitysolution-autocomplete/src/hooks/index.ts delete mode 100644 packages/kbn-securitysolution-autocomplete/src/param_contains_space/index.ts delete mode 100644 packages/kbn-securitysolution-exception-list-components/jest.config.js delete mode 100644 packages/kbn-securitysolution-exception-list-components/setup_test.ts delete mode 100644 packages/kbn-securitysolution-exception-list-components/src/custom.d.ts delete mode 100644 packages/kbn-securitysolution-exception-list-components/src/exception_item_card/index.ts delete mode 100644 packages/kbn-securitysolution-exception-list-components/src/generate_linked_rules_menu_item/menu_link.styles.ts delete mode 100644 packages/kbn-securitysolution-exception-list-components/src/mocks/value_list_modal.mock.tsx delete mode 100644 packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/index.ts delete mode 100644 packages/kbn-securitysolution-hook-utils/index.ts delete mode 100644 packages/kbn-securitysolution-hook-utils/src/types.ts delete mode 100644 packages/kbn-securitysolution-io-ts-alerting-types/jest.config.js delete mode 100644 packages/kbn-securitysolution-io-ts-alerting-types/src/constants/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-alerting-types/src/severity/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/jest.config.js delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/create_comment/index.mock.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/created_at/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/created_by/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/cursor/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/description/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/deserializer/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match/index.mock.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/entries_list/index.mock.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/expire_time/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/file/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/filter/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/id/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/immutable/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/item/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/list_type/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/name/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/namespace_type/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/page/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/search/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/serializer/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/sort_field/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/tie_breaker_id/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/timestamp/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/total/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/underscore_version/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/updated_at/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/updated_by/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/common/value/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/request/delete_endpoint_list_item_schema/index.mock.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_item_schema/index.mock.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_schema/index.mock.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_item_schema/index.mock.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_schema/index.mock.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/request/export_list_item_query_schema/index.mock.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_item_schema/index.mock.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_schema/index.mock.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/request/read_endpoint_list_item_schema/index.mock.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_item_schema/index.mock.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_schema/index.mock.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_item_schema/index.mock.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_schema/index.mock.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_schema/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/response/acknowledge_schema/index.mock.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/response/acknowledge_schema/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/response/create_endpoint_list_schema/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_summary_schema/index.mock.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/response/found_all_list_items_schema/index.mock.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_schema/index.mock.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/response/found_lists_by_size_schema/index.mock.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_index_exist_schema/index.mock.ts delete mode 100644 packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_index_exist_schema/index.ts delete mode 100644 packages/kbn-securitysolution-io-ts-types/jest.config.js delete mode 100644 packages/kbn-securitysolution-io-ts-utils/jest.config.js delete mode 100644 packages/kbn-securitysolution-list-api/index.ts delete mode 100644 packages/kbn-securitysolution-list-api/jest.config.js delete mode 100644 packages/kbn-securitysolution-list-api/src/list_api/mocks/response/acknowledge_schema.mock.ts delete mode 100644 packages/kbn-securitysolution-list-api/src/list_api/mocks/response/list_item_index_exist_schema.mock.ts delete mode 100644 packages/kbn-securitysolution-list-hooks/jest.config.js delete mode 100644 packages/kbn-securitysolution-list-hooks/src/constants.ts delete mode 100644 packages/kbn-securitysolution-list-hooks/src/use_delete_list/index.ts delete mode 100644 packages/kbn-securitysolution-list-hooks/src/use_export_list/index.ts delete mode 100644 packages/kbn-securitysolution-list-hooks/src/use_find_lists/index.ts delete mode 100644 packages/kbn-securitysolution-list-hooks/src/use_import_list/index.ts delete mode 100644 packages/kbn-securitysolution-list-utils/jest.config.js delete mode 100644 packages/kbn-securitysolution-list-utils/src/has_large_value_list/index.ts delete mode 100644 packages/kbn-securitysolution-t-grid/index.ts delete mode 100644 packages/kbn-securitysolution-t-grid/src/mock/index.ts delete mode 100644 packages/kbn-securitysolution-t-grid/src/utils/index.ts delete mode 100644 packages/kbn-securitysolution-utils/index.ts delete mode 100644 packages/kbn-securitysolution-utils/jest.config.js delete mode 100644 packages/kbn-securitysolution-utils/src/esql/index.ts delete mode 100644 packages/kbn-securitysolution-utils/src/transform_data_to_ndjson/index.ts rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/README.md (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/index.ts (100%) rename {packages/kbn-securitysolution-hook-utils => src/platform/packages/shared/kbn-securitysolution-es-utils}/jest.config.js (82%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/kibana.jsonc (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/package.json (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/bad_request_error/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/create_boostrap_index/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/create_data_stream/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/decode_version/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/delete_all_index/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/delete_data_stream/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/delete_index_template/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/delete_policy/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/delete_template/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/elasticsearch_client/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/encode_hit_version/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/get_bootstrap_index_exists/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/get_data_stream_exists/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/get_index_aliases/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/get_index_count/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/get_index_exists/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/get_index_template_exists/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/get_policy_exists/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/get_template_exists/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/migrate_to_data_stream/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/put_mappings/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/read_index/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/read_privileges/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/remove_policy_from_index/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/set_index_template/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/set_policy/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/set_template/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/transform_error/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/src/transform_error/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-es-utils/tsconfig.json (83%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/README.md (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/index.ts (100%) rename {packages/kbn-securitysolution-autocomplete => src/platform/packages/shared/kbn-securitysolution-io-ts-types}/jest.config.js (81%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/kibana.jsonc (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/package.json (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/default_array/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/default_array/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/default_boolean_false/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/default_boolean_false/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/default_boolean_true/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/default_boolean_true/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/default_csv_array/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/default_csv_array/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/default_empty_string/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/default_empty_string/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/default_string_array/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/default_string_array/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/default_string_boolean_false/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/default_string_boolean_false/index.ts (100%) rename {packages/kbn-securitysolution-io-ts-alerting-types => src/platform/packages/shared/kbn-securitysolution-io-ts-types}/src/default_uuid/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/default_uuid/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/default_value/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/default_value/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/default_version_number/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/default_version_number/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/empty_string_array/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/empty_string_array/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/enumeration/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/enumeration/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/import_query_schema/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/import_query_schema/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/iso_date_string/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/iso_date_string/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/limited_size_array/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/limited_size_array/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/non_empty_array/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/non_empty_array/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/non_empty_or_nullable_string_array/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/non_empty_or_nullable_string_array/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/non_empty_string/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/non_empty_string/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/non_empty_string_array/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/non_empty_string_array/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/number_between_zero_and_one_inclusive/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/number_between_zero_and_one_inclusive/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/only_false_allowed/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/only_false_allowed/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/operator/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/positive_integer/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/positive_integer/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/positive_integer_greater_than_zero/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/positive_integer_greater_than_zero/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/string_to_positive_number/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/time_duration/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/time_duration/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/uuid/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/uuid/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/src/version/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-types/tsconfig.json (83%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-utils/README.md (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-utils/index.ts (100%) rename {packages/kbn-securitysolution-es-utils => src/platform/packages/shared/kbn-securitysolution-io-ts-utils}/jest.config.js (81%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-utils/kibana.jsonc (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-utils/package.json (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-utils/src/exact_check/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-utils/src/exact_check/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-utils/src/format_errors/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-utils/src/format_errors/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-utils/src/parse_schedule_dates/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-utils/src/parse_schedule_dates/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-utils/src/test_utils/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-utils/src/validate/index.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-utils/src/validate/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-io-ts-utils/tsconfig.json (82%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-rules/README.md (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-rules/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-rules/kibana.jsonc (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-rules/package.json (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-rules/src/configuration_constants.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-rules/src/rule_type_constants.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-rules/src/rule_type_mappings.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-rules/src/utils.ts (100%) rename {packages => src/platform/packages/shared}/kbn-securitysolution-rules/tsconfig.json (78%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/README.md (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/index.ts (65%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/jest.config.js rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/kibana.jsonc (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/package.json (71%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/autocomplete/index.mock.ts (54%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/check_empty_value/index.test.ts (80%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/check_empty_value/index.ts (64%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/es_field_selector/__tests__/__snapshots__/index.test.tsx.snap (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/es_field_selector/__tests__/disabled_types_with_tooltip_text.test.ts (59%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/es_field_selector/__tests__/index.test.tsx (92%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/es_field_selector/__tests__/use_es_field.test.ts (97%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/es_field_selector/disabled_types_with_tooltip_text.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/es_field_selector/index.tsx (87%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/es_field_selector/types.ts (72%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/es_field_selector/use_es_field.tsx (94%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/field_value_exists/index.test.tsx (59%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/field_value_exists/index.tsx (71%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/field_value_lists/index.test.tsx (94%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/field_value_lists/index.tsx (93%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/field_value_match/index.test.tsx (97%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/field_value_match/index.tsx (95%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/field_value_match_any/index.test.tsx (96%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/field_value_match_any/index.tsx (94%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/field_value_wildcard/index.test.tsx (97%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/field_value_wildcard/index.tsx (94%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/fields/index.mock.ts (94%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/filter_field_to_list/index.test.ts (91%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/filter_field_to_list/index.ts (77%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/get_generic_combo_box_props/index.test.tsx (88%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/get_generic_combo_box_props/index.ts (79%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/get_operators/index.test.ts (80%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/get_operators/index.ts (70%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/hooks/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/hooks/use_field_value_autocomplete/index.test.ts (96%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/hooks/use_field_value_autocomplete/index.ts (88%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/list_schema/index.mock.ts (73%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/operator/index.test.tsx (94%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/operator/index.tsx (87%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/param_contains_space/index.test.ts (70%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/param_contains_space/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/param_is_valid/index.test.ts (90%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/param_is_valid/index.ts (77%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/translations/index.ts (86%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/type_match/index.test.ts (79%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/src/type_match/index.ts (68%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-autocomplete/tsconfig.json (90%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-endpoint-exceptions-common/README.md (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list/create_endpoint_list.gen.ts (59%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list/create_endpoint_list.schema.yaml (62%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.gen.ts (81%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.schema.yaml (79%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-endpoint-exceptions-common/api/delete_endpoint_list_item/delete_endpoint_list_item.gen.ts (75%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-endpoint-exceptions-common/api/delete_endpoint_list_item/delete_endpoint_list_item.schema.yaml (68%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-endpoint-exceptions-common/api/find_endpoint_list_item/find_endpoint_list_item.gen.ts (83%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-endpoint-exceptions-common/api/find_endpoint_list_item/find_endpoint_list_item.schema.yaml (72%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-endpoint-exceptions-common/api/index.ts (57%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-endpoint-exceptions-common/api/model/endpoint_list_common.gen.ts (65%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-endpoint-exceptions-common/api/model/endpoint_list_common.schema.yaml (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-endpoint-exceptions-common/api/read_endpoint_list_item/read_endpoint_list_item.gen.ts (75%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-endpoint-exceptions-common/api/read_endpoint_list_item/read_endpoint_list_item.schema.yaml (68%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.gen.ts (83%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.schema.yaml (80%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-endpoint-exceptions-common/docs/openapi/ess/security_solution_endpoint_exceptions_api_2023_10_31.bundled.schema.yaml (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-endpoint-exceptions-common/docs/openapi/serverless/security_solution_endpoint_exceptions_api_2023_10_31.bundled.schema.yaml (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-endpoint-exceptions-common/kibana.jsonc (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-endpoint-exceptions-common/package.json (81%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-endpoint-exceptions-common/scripts/openapi_bundle.js (83%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-endpoint-exceptions-common/scripts/openapi_generate.js (66%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-endpoint-exceptions-common/tsconfig.json (84%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/README.md (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/index.ts (63%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/jest.config.js rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/kibana.jsonc (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/package.json (66%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/setup_test.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/assets/images/illustration_product_no_results_magnifying_glass.svg (100%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/custom.d.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/empty_viewer_state/empty_viewer_state.test.tsx (93%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/empty_viewer_state/index.tsx (91%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_item_card/comments/__snapshots__/comments.test.tsx.snap (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_item_card/comments/comments.test.tsx (83%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_item_card/comments/index.tsx (79%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.config.ts (77%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.styles.tsx (65%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.test.tsx (96%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/__snapshots__/entry_content.test.tsx.snap (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.helper.test.tsx (93%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.helper.tsx (85%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.test.tsx (83%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/index.tsx (86%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/index.tsx (83%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/os_conditions/__snapshots__/os_conditions.test.tsx.snap (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/os_conditions/index.tsx (73%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/os_conditions/os_conditions.test.tsx (82%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/types.ts (63%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.test.tsx (94%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx (91%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_item_card/header/header.test.tsx (81%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_item_card/header/index.tsx (79%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/details_info/__snapshots__/details_info.test.tsx.snap (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/details_info/details_info.test.tsx (73%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/details_info/index.tsx (84%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/index.tsx (92%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/meta.test.tsx (90%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_item_card/translations.ts (93%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_item_card/use_exception_item_card.test.ts (90%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_item_card/use_exception_item_card.ts (86%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_items/exception_items.test.tsx (96%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/exception_items/index.tsx (93%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/generate_linked_rules_menu_item/__snapshots__/generate_linked_rules_menu_item.test.tsx.snap (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/generate_linked_rules_menu_item/generate_linked_rules_menu_item.test.tsx (80%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/generate_linked_rules_menu_item/index.tsx (81%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/generate_linked_rules_menu_item/menu_link.styles.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/header_menu/__snapshots__/header_menu.test.tsx.snap (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/header_menu/header_menu.test.tsx (93%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/header_menu/index.tsx (90%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/list_header/__snapshots__/list_header.test.tsx.snap (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/__snapshots__/edit_modal.test.tsx.snap (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/edit_modal.test.tsx (93%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/index.tsx (88%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/use_edit_modal.test.ts (81%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/use_edit_modal.ts (80%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/list_header/index.tsx (92%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/list_header/list_header.styles.ts (66%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/list_header/list_header.test.tsx (94%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/list_header/menu_items/__snapshots__/menu_items.test.tsx.snap (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/list_header/menu_items/index.tsx (91%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/list_header/menu_items/menu_items.test.tsx (94%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/list_header/use_list_header.test.ts (86%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/list_header/use_list_header.ts (73%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/mocks/comments.mock.tsx (62%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/mocks/entry.mock.ts (58%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/mocks/exception_list_item_schema.mock.ts (75%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/mocks/header.mock.ts (65%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/mocks/rule_references.mock.ts (66%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/mocks/security_link_component.mock.tsx (70%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/mocks/value_list_modal.mock.tsx rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/pagination/pagination.test.tsx (84%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/pagination/pagination.tsx (74%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/pagination/use_pagination.test.ts (87%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/pagination/use_pagination.ts (76%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/partial_code_signature_callout/index.tsx (71%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/search_bar/index.tsx (89%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/search_bar/search_bar.test.tsx (88%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/text_with_edit/__snapshots__/text_with_edit.test.tsx.snap (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/text_with_edit/index.tsx (78%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/text_with_edit/text_with_edit.styles.ts (54%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/text_with_edit/text_with_edit.test.tsx (84%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/translations.ts (92%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/types/index.ts (80%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/value_with_space_warning/use_value_with_space_warning.test.ts (84%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/value_with_space_warning/use_value_with_space_warning.ts (67%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/value_with_space_warning/value_with_space_warning.test.tsx (81%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/value_with_space_warning/value_with_space_warning.tsx (75%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/src/wildcard_with_wrong_operator_callout/index.tsx (80%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exception-list-components/tsconfig.json (89%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/README.md (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/create_exception_list/create_exception_list.gen.ts (78%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/create_exception_list/create_exception_list.schema.yaml (79%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/create_exception_list_item/create_exception_list_item.gen.ts (85%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/create_exception_list_item/create_exception_list_item.schema.yaml (78%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/create_rule_exceptions/create_rule_exceptions.gen.ts (88%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/create_rule_exceptions/create_rule_exceptions.schema.yaml (78%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/create_shared_exceptions_list/create_shared_exceptions_list.gen.ts (72%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/create_shared_exceptions_list/create_shared_exceptions_list.schema.yaml (72%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/delete_exception_list/delete_exception_list.gen.ts (75%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/delete_exception_list/delete_exception_list.schema.yaml (69%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/delete_exception_list_item/delete_exception_list_item.gen.ts (76%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/delete_exception_list_item/delete_exception_list_item.schema.yaml (70%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/duplicate_exception_list/duplicate_exception_list.gen.ts (75%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/duplicate_exception_list/duplicate_exception_list.schema.yaml (69%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/export_exception_list/export_exception_list.gen.ts (73%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/export_exception_list/export_exception_list.schema.yaml (72%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/find_exception_list_items/find_exception_list_items.gen.ts (86%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/find_exception_list_items/find_exception_list_items.schema.yaml (77%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/find_exception_lists/find_exception_lists.gen.ts (85%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/find_exception_lists/find_exception_lists.schema.yaml (82%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/import_exceptions/import_exceptions.gen.ts (86%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/import_exceptions/import_exceptions.schema.yaml (85%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/index.ts (77%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/model/exception_list_common.gen.ts (94%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/model/exception_list_common.schema.yaml (83%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.gen.ts (90%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.schema.yaml (74%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/quickstart_client.gen.ts (97%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/read_exception_list/read_exception_list.gen.ts (74%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/read_exception_list/read_exception_list.schema.yaml (69%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/read_exception_list_item/read_exception_list_item.gen.ts (75%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/read_exception_list_item/read_exception_list_item.schema.yaml (70%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/read_exception_list_summary/read_exception_list_summary.gen.ts (79%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/read_exception_list_summary/read_exception_list_summary.schema.yaml (73%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/update_exception_list/update_exception_list.gen.ts (79%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/update_exception_list/update_exception_list.schema.yaml (77%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/update_exception_list_item/update_exception_list_item.gen.ts (86%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/api/update_exception_list_item/update_exception_list_item.schema.yaml (77%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/docs/openapi/ess/security_solution_exceptions_api_2023_10_31.bundled.schema.yaml (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/docs/openapi/serverless/security_solution_exceptions_api_2023_10_31.bundled.schema.yaml (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/kibana.jsonc (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/package.json (81%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/scripts/openapi_bundle.js (69%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/scripts/openapi_bundle_info/exceptions_ess.info.yaml (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/scripts/openapi_bundle_info/exceptions_serverless.info.yaml (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/scripts/openapi_generate.js (68%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-exceptions-common/tsconfig.json (88%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-hook-utils/README.md (100%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/index.ts create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/jest.config.js rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-hook-utils/kibana.jsonc (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-hook-utils/package.json (73%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/src/types.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-hook-utils/src/use_async/index.test.ts (91%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-hook-utils/src/use_async/index.ts (78%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-hook-utils/src/use_is_mounted/index.test.ts (59%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-hook-utils/src/use_is_mounted/index.ts (63%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-hook-utils/src/use_observable/index.test.ts (91%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-hook-utils/src/use_observable/index.ts (84%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-hook-utils/src/with_optional_signal/index.test.ts (68%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-hook-utils/src/with_optional_signal/index.ts (63%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-hook-utils/tsconfig.json (76%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/README.md (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/index.ts (78%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/jest.config.js rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/kibana.jsonc (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/package.json (77%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/actions/index.ts (89%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/constants/index.mock.ts (63%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/constants/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/default_actions_array/index.ts (57%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/default_export_file_name/index.test.ts (77%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/default_export_file_name/index.ts (59%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/default_from_string/index.test.ts (76%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/default_from_string/index.ts (61%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/default_interval_string/index.test.ts (77%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/default_interval_string/index.ts (58%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/default_language_string/index.test.ts (77%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/default_language_string/index.ts (60%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/default_max_signals_number/index.test.ts (84%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/default_max_signals_number/index.ts (66%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/default_page/index.test.ts (87%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/default_page/index.ts (71%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/default_per_page/index.test.ts (87%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/default_per_page/index.ts (71%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/default_risk_score_mapping_array/index.ts (63%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/default_severity_mapping_array/index.ts (63%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/default_threat_array/index.test.ts (84%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/default_threat_array/index.ts (59%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/default_to_string/index.test.ts (76%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/default_to_string/index.ts (58%) rename {packages/kbn-securitysolution-io-ts-types => x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types}/src/default_uuid/index.test.ts (77%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/default_uuid/index.ts (64%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/frequency/index.ts (75%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/from/index.ts (65%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/language/index.ts (50%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/machine_learning_job_id/index.ts (61%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/max_signals/index.ts (57%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/normalized_ml_job_id/index.ts (63%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/references_default_array/index.test.ts (81%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/references_default_array/index.ts (59%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/risk_score/index.test.ts (83%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/risk_score/index.ts (63%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/risk_score_mapping/index.ts (61%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/rule_schedule/index.ts (61%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/saved_object_attributes/index.ts (82%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/severity/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/severity_mapping/index.ts (59%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/threat/index.ts (68%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/threat_mapping/index.test.ts (95%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/threat_mapping/index.ts (89%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/threat_subtechnique/index.ts (62%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/threat_tactic/index.ts (53%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/threat_technique/index.ts (67%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/throttle/index.ts (51%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/src/type/index.ts (55%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-alerting-types/tsconfig.json (85%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/README.md (100%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/index.ts create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/jest.config.js rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/kibana.jsonc (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/package.json (77%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/comment/index.mock.ts (53%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/comment/index.test.ts (95%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/comment/index.ts (71%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/create_comment/index.mock.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/create_comment/index.test.ts (92%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/create_comment/index.ts (65%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/created_at/index.ts create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/created_by/index.ts create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/cursor/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/default_comments_array/index.test.ts (86%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/default_comments_array/index.ts (61%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/default_create_comments_array/index.test.ts (86%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/default_create_comments_array/index.ts (63%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/default_import_comments_array/index.test.ts (89%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/default_import_comments_array/index.ts (64%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/default_namespace/index.test.ts (83%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/default_namespace/index.ts (65%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/default_namespace_array/index.test.ts (91%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/default_namespace_array/index.ts (77%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/default_update_comments_array/index.test.ts (85%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/default_update_comments_array/index.ts (64%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/description/index.ts create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/deserializer/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entries/index.mock.ts (63%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entries/index.test.ts (92%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entries/index.ts (79%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match/index.mock.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match/index.test.ts (90%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match/index.ts (54%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_any/index.mock.ts (50%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_any/index.test.ts (90%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_any/index.ts (57%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_wildcard/index.mock.ts (50%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_wildcard/index.test.ts (90%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_wildcard/index.ts (58%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_nested/index.mock.ts (57%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_nested/index.test.ts (93%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_nested/index.ts (57%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/endpoint/non_empty_nested_entries_array/index.ts (77%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/entries/index.mock.ts (70%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/entries/index.test.ts (93%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/entries/index.ts (74%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/entries_exist/index.mock.ts (52%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/entries_exist/index.test.ts (87%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/entries_exist/index.ts (53%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_list/index.mock.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/entries_list/index.test.ts (89%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/entries_list/index.ts (57%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/entry_match/index.mock.ts (54%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/entry_match/index.test.ts (90%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/entry_match/index.ts (54%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/entry_match_any/index.mock.ts (58%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/entry_match_any/index.test.ts (90%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/entry_match_any/index.ts (57%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/entry_match_wildcard/index.mock.ts (57%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/entry_match_wildcard/index.test.ts (90%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/entry_match_wildcard/index.ts (56%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/entry_nested/index.mock.ts (71%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/entry_nested/index.test.ts (91%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/entry_nested/index.ts (56%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/exception_export_details/index.mock.ts (69%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/exception_export_details/index.test.ts (76%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/exception_export_details/index.ts (68%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/exception_list/index.test.ts (82%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/exception_list/index.ts (72%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/exception_list_item_type/index.ts (54%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/expire_time/index.ts create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/file/index.ts create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/filter/index.ts create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/id/index.ts create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/immutable/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/import_comment/index.test.ts (93%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/import_comment/index.ts (62%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/include_expired_exceptions/index.ts (55%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/index.ts (83%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/item/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/item_id/index.ts (54%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/list_id/index.ts (55%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/list_operator/index.test.ts (79%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/list_operator/index.ts (65%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/list_type/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/lists/index.mock.ts (60%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/lists/index.test.ts (93%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/lists/index.ts (65%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/lists_default_array/index.test.ts (84%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/lists_default_array/index.ts (60%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/max_size/index.test.ts (78%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/max_size/index.ts (56%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/meta/index.ts (55%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/name/index.ts create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/namespace_type/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/non_empty_entries_array/index.test.ts (92%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/non_empty_entries_array/index.ts (76%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/non_empty_nested_entries_array/index.test.ts (91%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/non_empty_nested_entries_array/index.ts (76%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/os_type/index.test.ts (72%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/os_type/index.ts (59%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/page/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/per_page/index.ts (54%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/pit/index.test.ts (78%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/pit/index.ts (54%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/refresh/index.ts (52%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/required_keep_undefined/index.ts (63%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/search/index.test.ts (74%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/search/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/search_after/index.test.ts (75%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/search_after/index.ts (53%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/serializer/index.ts create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/sort_field/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/sort_order/index.ts (50%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/tags/index.ts (51%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/tie_breaker_id/index.ts create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/timestamp/index.ts create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/total/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/type/index.test.ts (78%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/type/index.ts (69%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/underscore_version/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/update_comment/index.mock.ts (52%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/update_comment/index.test.ts (93%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/common/update_comment/index.ts (66%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/updated_at/index.ts create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/updated_by/index.ts create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/value/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/constants/index.mock.ts (91%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/create_endpoint_list_item_schema/index.mock.ts (59%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/create_endpoint_list_item_schema/index.test.ts (96%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/create_endpoint_list_item_schema/index.ts (81%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_item_schema/index.mock.ts (76%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_item_schema/index.test.ts (96%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_item_schema/index.ts (84%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_schema/index.mock.ts (76%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_schema/index.test.ts (90%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_schema/index.ts (80%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/create_list_item_schema/index.mock.ts (65%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/create_list_item_schema/index.test.ts (84%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/create_list_item_schema/index.ts (67%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/create_list_schema/index.mock.ts (70%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/create_list_schema/index.test.ts (88%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/create_list_schema/index.ts (78%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/create_rule_exception_item_schema/index.test.ts (91%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/create_rule_exception_item_schema/index.ts (83%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_endpoint_list_item_schema/index.mock.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/delete_endpoint_list_item_schema/index.test.ts (84%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/delete_endpoint_list_item_schema/index.ts (64%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_item_schema/index.mock.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_item_schema/index.test.ts (83%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_item_schema/index.ts (71%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_schema/index.mock.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_schema/index.test.ts (82%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_schema/index.ts (70%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_item_schema/index.mock.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/delete_list_item_schema/index.test.ts (77%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/delete_list_item_schema/index.ts (66%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_schema/index.mock.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/delete_list_schema/index.test.ts (81%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/delete_list_schema/index.ts (65%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/duplicate_exception_list_query_schema/index.mock.ts (51%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/duplicate_exception_list_query_schema/index.test.ts (86%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/duplicate_exception_list_query_schema/index.ts (70%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/export_exception_list_query_schema/index.mock.ts (52%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/export_exception_list_query_schema/index.test.ts (88%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/export_exception_list_query_schema/index.ts (64%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/export_list_item_query_schema/index.mock.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/export_list_item_query_schema/index.test.ts (82%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/export_list_item_query_schema/index.ts (60%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/find_endpoint_list_item_schema/index.mock.ts (61%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/find_endpoint_list_item_schema/index.test.ts (92%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/find_endpoint_list_item_schema/index.ts (75%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_item_schema/index.mock.ts (80%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_item_schema/index.test.ts (94%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_item_schema/index.ts (81%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_schema/index.mock.ts (64%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_schema/index.test.ts (92%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_schema/index.ts (78%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/find_list_item_schema/index.mock.ts (63%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/find_list_item_schema/index.test.ts (91%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/find_list_item_schema/index.ts (77%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/find_list_schema/index.mock.ts (59%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/find_list_schema/index.test.ts (91%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/find_list_schema/index.ts (74%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/get_exception_filter_schema/index.ts (74%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/import_exception_item_schema/index.mock.ts (69%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/import_exception_item_schema/index.test.ts (94%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/import_exception_item_schema/index.ts (86%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/import_exception_list_schema/index.mock.ts (64%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/import_exception_list_schema/index.test.ts (92%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/import_exception_list_schema/index.ts (84%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_query_schema/index.mock.ts (50%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_query_schema/index.test.ts (90%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_query_schema/index.ts (67%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_schema/index.mock.ts (57%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_schema/index.test.ts (82%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_schema/index.ts (56%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/index.ts (83%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/internal/create_exception_list_schema/index.test.ts (87%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/internal/create_exception_list_schema/index.ts (75%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_item_schema/index.mock.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/patch_list_item_schema/index.test.ts (88%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/patch_list_item_schema/index.ts (66%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_schema/index.mock.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/patch_list_schema/index.test.ts (92%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/patch_list_schema/index.ts (73%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_endpoint_list_item_schema/index.mock.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/read_endpoint_list_item_schema/index.test.ts (89%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/read_endpoint_list_item_schema/index.ts (63%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_item_schema/index.mock.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_item_schema/index.test.ts (92%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_item_schema/index.ts (71%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_schema/index.mock.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_schema/index.test.ts (92%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_schema/index.ts (70%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_item_schema/index.mock.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/read_list_item_schema/index.test.ts (91%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/read_list_item_schema/index.ts (60%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_schema/index.mock.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/read_list_schema/index.test.ts (81%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_schema/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/summary_exception_list_schema/index.mock.ts (50%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/summary_exception_list_schema/index.test.ts (93%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/summary_exception_list_schema/index.ts (72%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/update_endpoint_list_item_schema/index.mock.ts (61%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/update_endpoint_list_item_schema/index.test.ts (93%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/update_endpoint_list_item_schema/index.ts (84%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_schema/index.mock.ts (72%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_schema/index.test.ts (94%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_schema/index.ts (87%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_schema/index.mock.ts (68%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_schema/index.test.ts (92%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_schema/index.ts (84%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/update_list_item_schema/index.mock.ts (56%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/update_list_item_schema/index.test.ts (82%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/update_list_item_schema/index.ts (68%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/update_list_schema/index.mock.ts (62%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/update_list_schema/index.test.ts (82%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/request/update_list_schema/index.ts (72%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/acknowledge_schema/index.mock.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/acknowledge_schema/index.test.ts (82%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/acknowledge_schema/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/create_endpoint_list_schema/index.test.ts (88%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/create_endpoint_list_schema/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/exception_list_item_schema/index.mock.ts (80%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/exception_list_item_schema/index.test.ts (95%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/exception_list_item_schema/index.ts (81%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/exception_list_schema/index.mock.ts (82%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/exception_list_schema/index.test.ts (94%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/exception_list_schema/index.ts (79%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_summary_schema/index.mock.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/exception_list_summary_schema/index.test.ts (89%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/exception_list_summary_schema/index.ts (54%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_all_list_items_schema/index.mock.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/found_all_list_items_schema/index.ts (51%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_item_schema/index.mock.ts (51%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_item_schema/index.test.ts (94%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_item_schema/index.ts (64%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_schema/index.mock.ts (50%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_schema/index.test.ts (93%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_schema/index.ts (63%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/found_list_item_schema/index.mock.ts (53%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/found_list_item_schema/index.ts (60%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_schema/index.mock.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/found_list_schema/index.ts (58%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_lists_by_size_schema/index.mock.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/found_lists_by_size_schema/index.ts (50%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/import_exceptions_schema/index.mock.ts (56%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/import_exceptions_schema/index.test.ts (93%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/import_exceptions_schema/index.ts (74%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/index.ts (67%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_index_exist_schema/index.mock.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/list_item_index_exist_schema/index.test.ts (86%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_index_exist_schema/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/list_item_schema/index.mock.ts (72%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/list_item_schema/index.test.ts (94%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/list_item_schema/index.ts (79%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/list_schema/index.mock.ts (74%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/list_schema/index.test.ts (94%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/list_schema/index.ts (80%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/search_list_item_schema/index.mock.ts (50%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/search_list_item_schema/index.test.ts (82%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/response/search_list_item_schema/index.ts (67%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/src/typescript_types/index.ts (94%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-io-ts-list-types/tsconfig.json (89%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-api/README.md (100%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-list-api/index.ts create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-list-api/jest.config.js rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-api/kibana.jsonc (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-api/package.json (68%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-api/src/api/index.ts (97%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-api/src/fp_utils/index.test.ts (62%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-api/src/fp_utils/index.ts (64%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-api/src/list_api/index.test.ts (97%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-api/src/list_api/index.ts (95%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-api/src/list_api/mocks/constants.mock.ts (57%) rename x-pack/{plugins/lists/common/schemas => solutions/security/packages/kbn-securitysolution-list-api/src/list_api/mocks}/response/acknowledge_schema.mock.ts (100%) rename x-pack/{plugins/lists/common/schemas => solutions/security/packages/kbn-securitysolution-list-api/src/list_api/mocks}/response/found_list_schema.mock.ts (100%) rename x-pack/{plugins/lists/common/schemas => solutions/security/packages/kbn-securitysolution-list-api/src/list_api/mocks}/response/list_item_index_exist_schema.mock.ts (100%) rename {packages/kbn-securitysolution-list-hooks/src => x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_api}/mocks/response/list_schema.mock.ts (74%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-api/src/list_item_api/index.test.ts (92%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-api/src/list_item_api/index.ts (93%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-api/src/list_item_api/mocks/response/index.ts (64%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-api/src/list_item_api/mocks/response/list_item_schema.mock.ts (63%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-api/src/types.ts (83%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-api/tsconfig.json (89%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-constants/README.md (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-constants/index.ts (93%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-constants/kibana.jsonc (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-constants/package.json (76%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-constants/tsconfig.json (81%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-hooks/README.md (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-hooks/index.ts (69%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/jest.config.js rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-hooks/kibana.jsonc (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-hooks/package.json (72%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/constants.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-hooks/src/index.ts (66%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-hooks/src/mocks/constants.mock.ts (87%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-hooks/src/mocks/request/create_exception_list_item_schema.mock.ts (76%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-hooks/src/mocks/request/update_exception_list_item_schema.mock.ts (73%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-hooks/src/mocks/response/exception_list_item_schema.mock.ts (80%) rename {packages/kbn-securitysolution-list-api/src/list_api => x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src}/mocks/response/found_list_schema.mock.ts (50%) rename {packages/kbn-securitysolution-list-api/src/list_api => x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src}/mocks/response/list_schema.mock.ts (74%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-hooks/src/transforms/index.test.ts (96%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-hooks/src/transforms/index.ts (93%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-hooks/src/use_api/index.ts (96%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-hooks/src/use_create_list_index/index.ts (70%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-hooks/src/use_create_list_item/index.ts (80%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-hooks/src/use_cursor/index.test.ts (90%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-hooks/src/use_cursor/index.ts (73%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_delete_list/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-hooks/src/use_delete_list_item/index.ts (79%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-hooks/src/use_exception_lists/index.ts (90%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_export_list/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-hooks/src/use_find_list_items/index.ts (81%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-hooks/src/use_find_lists/index.test.ts (74%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_find_lists/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-hooks/src/use_find_lists_by_size/index.ts (51%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-hooks/src/use_get_list_by_id/index.ts (66%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_import_list/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-hooks/src/use_patch_list_item/index.ts (80%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-hooks/src/use_persist_exception_item/index.ts (83%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-hooks/src/use_persist_exception_list/index.ts (84%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-hooks/src/use_read_list_index/index.ts (72%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-hooks/src/use_read_list_privileges/index.ts (52%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-hooks/tsconfig.json (90%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-utils/README.md (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-utils/index.ts (56%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-list-utils/jest.config.js rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-utils/kibana.jsonc (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-utils/package.json (71%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-utils/src/autocomplete_operators/index.ts (91%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-utils/src/get_exception_list_type/index.ts (55%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-utils/src/get_filters/index.test.ts (95%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-utils/src/get_filters/index.ts (73%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-utils/src/get_general_filters/index.test.ts (83%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-utils/src/get_general_filters/index.ts (75%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-utils/src/get_ids_and_namespaces/index.test.ts (87%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-utils/src/get_ids_and_namespaces/index.ts (69%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-utils/src/get_saved_object_type/index.ts (58%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-utils/src/get_saved_object_types/index.ts (57%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/has_large_value_list/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-utils/src/helpers/index.test.ts (96%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-utils/src/helpers/index.ts (98%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-utils/src/types/index.ts (89%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-list-utils/tsconfig.json (89%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/README.md (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/create_list/create_list.gen.ts (73%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/create_list/create_list.schema.yaml (71%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/create_list_index/create_list_index.gen.ts (56%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/create_list_index/create_list_index.schema.yaml (60%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/create_list_item/create_list_item.gen.ts (74%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/create_list_item/create_list_item.schema.yaml (73%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/delete_list/delete_list.gen.ts (72%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/delete_list/delete_list.schema.yaml (67%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/delete_list_index/delete_list_index.gen.ts (56%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/delete_list_index/delete_list_index.schema.yaml (60%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/delete_list_item/delete_list_item.gen.ts (76%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/delete_list_item/delete_list_item.schema.yaml (72%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/export_list_items/export_list_items.gen.ts (64%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/export_list_items/export_list_items.schema.yaml (63%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/find_list_items/find_list_items.gen.ts (85%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/find_list_items/find_list_items.schema.yaml (77%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/find_lists/find_lists.gen.ts (84%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/find_lists/find_lists.schema.yaml (76%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/import_list_items/import_list_items.gen.ts (77%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/import_list_items/import_list_items.schema.yaml (75%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/index.ts (73%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/model/list_common.gen.ts (82%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/model/list_common.schema.yaml (52%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/model/list_schemas.gen.ts (80%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/model/list_schemas.schema.yaml (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/patch_list/patch_list.gen.ts (72%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/patch_list/patch_list.schema.yaml (69%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/patch_list_item/patch_list_item.gen.ts (74%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/patch_list_item/patch_list_item.schema.yaml (71%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/quickstart_client.gen.ts (97%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/read_list/read_list.gen.ts (67%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/read_list/read_list.schema.yaml (61%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/read_list_index/read_list_index.gen.ts (58%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/read_list_index/read_list_index.schema.yaml (59%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/read_list_item/read_list_item.gen.ts (73%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/read_list_item/read_list_item.schema.yaml (69%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/read_list_privileges/read_list_privileges.gen.ts (76%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/read_list_privileges/read_list_privileges.schema.yaml (78%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/update_list/update_list.gen.ts (71%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/update_list/update_list.schema.yaml (71%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/update_list_item/update_list_item.gen.ts (71%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/api/update_list_item/update_list_item.schema.yaml (69%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/docs/openapi/ess/security_solution_lists_api_2023_10_31.bundled.schema.yaml (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/docs/openapi/serverless/security_solution_lists_api_2023_10_31.bundled.schema.yaml (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/kibana.jsonc (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/package.json (81%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/scripts/openapi_bundle.js (69%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/scripts/openapi_bundle_info/lists_ess.info.yaml (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/scripts/openapi_bundle_info/lists_serverless.info.yaml (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/scripts/openapi_generate.js (68%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-lists-common/tsconfig.json (87%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-t-grid/README.md (100%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-t-grid/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-t-grid/kibana.jsonc (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-t-grid/package.json (80%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-t-grid/src/constants/index.ts (68%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-t-grid/src/mock/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-t-grid/src/mock/mock_event_details.ts (97%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-t-grid/src/utils/api/index.ts (73%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-t-grid/src/utils/drag_and_drop/index.ts (92%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-t-grid/src/utils/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-t-grid/tsconfig.json (78%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-utils/README.md (100%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-utils/index.ts create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-utils/jest.config.js rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-utils/kibana.jsonc (100%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-utils/package.json (77%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-utils/src/add_remove_id_to_item/index.test.ts (84%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-utils/src/add_remove_id_to_item/index.ts (78%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-utils/src/axios/index.ts (79%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-utils/src/client_concurrency/index.ts (74%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-utils/src/debounce_async/debounce_async.test.ts (77%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-utils/src/debounce_async/debounce_async.ts (73%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-utils/src/esql/compute_if_esql_query_aggregating.test.ts (84%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-utils/src/esql/compute_if_esql_query_aggregating.ts (60%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-utils/src/esql/get_index_list_from_esql_query.test.ts (80%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-utils/src/esql/get_index_list_from_esql_query.ts (66%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-utils/src/esql/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-utils/src/esql/parse_esql_query.test.ts (90%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-utils/src/esql/parse_esql_query.ts (83%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-utils/src/path_validations/index.test.ts (98%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-utils/src/path_validations/index.ts (93%) rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-utils/src/transform_data_to_ndjson/index.test.ts (87%) create mode 100644 x-pack/solutions/security/packages/kbn-securitysolution-utils/src/transform_data_to_ndjson/index.ts rename {packages => x-pack/solutions/security/packages}/kbn-securitysolution-utils/tsconfig.json (86%) rename x-pack/{ => solutions/security}/plugins/lists/.storybook/main.js (100%) rename x-pack/{ => solutions/security}/plugins/lists/README.md (98%) rename x-pack/{ => solutions/security}/plugins/lists/common/api/exceptions/create_exception_list/create_exception_list_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/api/exceptions/get_exception_filter/get_exception_filter_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/api/index.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/api/values/find_lists_by_size/find_lists_by_size_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/constants.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/index.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/request/create_exception_list_item_schema.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/request/create_exception_list_schema.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/request/create_list_item_schema.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/request/create_list_schema.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/request/get_exception_filter_schema.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/request/import_exceptions_schema.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/request/import_list_item_schema.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/request/update_exception_list_item_schema.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/request/update_exception_list_schema.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/request/update_list_item_schema.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/request/update_list_schema.mock.ts (100%) create mode 100644 x-pack/solutions/security/plugins/lists/common/schemas/response/acknowledge_schema.mock.ts rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/response/exception_export_details_schema.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/response/exception_list_item_schema.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/response/exception_list_schema.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/response/exception_list_summary_schema.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/response/found_all_list_items_schema.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/response/found_exception_list_item_schema.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/response/found_exception_list_schema.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/response/found_list_item_schema.mock.ts (100%) rename {packages/kbn-securitysolution-list-hooks/src/mocks => x-pack/solutions/security/plugins/lists/common/schemas}/response/found_list_schema.mock.ts (50%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/response/found_lists_by_size_schema.mock.ts (100%) create mode 100644 x-pack/solutions/security/plugins/lists/common/schemas/response/list_item_index_exist_schema.mock.ts rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/response/list_item_schema.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/response/list_schema.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/response/search_list_item_schema.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/types/comment.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/types/create_comment.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/types/entries.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/types/entry_exists.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/types/entry_list.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/types/entry_match.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/types/entry_match_any.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/types/entry_match_wildcard.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/types/entry_nested.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/common/schemas/types/update_comment.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/jest.config.js (51%) rename x-pack/{ => solutions/security}/plugins/lists/kibana.jsonc (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/common/empty_value.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/api.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/components/__mock__/show_value_list_modal.mock.tsx (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/components/and_or_badge/index.stories.tsx (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/components/and_or_badge/index.test.tsx (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/components/and_or_badge/index.tsx (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/components/and_or_badge/rounded_badge.test.tsx (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/components/and_or_badge/rounded_badge.tsx (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/components/and_or_badge/rounded_badge_antenna.test.tsx (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/components/and_or_badge/rounded_badge_antenna.tsx (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/components/and_or_badge/translations.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/components/builder/and_badge.test.tsx (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/components/builder/and_badge.tsx (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/components/builder/builder.stories.tsx (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/components/builder/entry_delete_button.test.tsx (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/components/builder/entry_delete_button.tsx (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/components/builder/entry_renderer.stories.tsx (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/components/builder/entry_renderer.test.tsx (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/components/builder/entry_renderer.tsx (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/components/builder/exception_item_renderer.test.tsx (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/components/builder/exception_item_renderer.tsx (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/components/builder/exception_items_renderer.test.tsx (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/components/builder/exception_items_renderer.tsx (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/components/builder/helpers.test.ts (99%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/components/builder/index.tsx (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/components/builder/logic_buttons.test.tsx (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/components/builder/logic_buttons.tsx (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/components/builder/reducer.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/components/builder/selectors.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/components/builder/translations.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/hooks/persist_exception_item.test.ts (96%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/hooks/persist_exception_list.test.ts (95%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/hooks/use_api.test.ts (99%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/hooks/use_exception_lists.test.ts (97%) rename x-pack/{ => solutions/security}/plugins/lists/public/exceptions/transforms.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/index.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/lists/hooks/use_create_list_index.test.ts (93%) rename x-pack/{ => solutions/security}/plugins/lists/public/lists/hooks/use_delete_list.test.ts (86%) rename x-pack/{ => solutions/security}/plugins/lists/public/lists/hooks/use_export_list.test.ts (86%) rename x-pack/{ => solutions/security}/plugins/lists/public/lists/hooks/use_import_list.test.ts (94%) rename x-pack/{ => solutions/security}/plugins/lists/public/lists/hooks/use_read_list_index.test.ts (91%) rename x-pack/{ => solutions/security}/plugins/lists/public/lists/mocks/query_wrapper.tsx (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/lists/types.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/plugin.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/shared_exports.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/public/types.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/scripts/storybook.js (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/config.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/config.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/config.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/error_with_status_code.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/get_space_id.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/get_space_id.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/get_user.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/get_user.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/handlers/create_exception_list_handler.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/index.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/mocks.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/plugin.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/create_endpoint_list_item_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/create_endpoint_list_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/create_exception_list_item_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/create_exception_list_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/delete_endpoint_list_item_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/delete_exception_list_item_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/delete_exception_list_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/duplicate_exception_list_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/endpoint_disallowed_fields.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/export_exception_list_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/find_endpoint_list_item_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/find_exception_list_item_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/find_exception_list_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/import_exceptions_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/index.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/init_routes.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/internal/create_exception_filter_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/internal/create_exceptions_list_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/internal/find_lists_by_size_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/list/create_list_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/list/delete_list_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/list/import_list_item_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/list/patch_list_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/list/read_list_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/list/update_list_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/list_index/create_list_index_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/list_index/delete_list_index_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/list_index/export_list_item_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/list_index/find_list_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/list_index/read_list_index_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/list_item/create_list_item_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/list_item/delete_list_item_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/list_item/find_list_item_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/list_item/patch_list_item_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/list_item/read_list_item_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/list_item/update_list_item_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/list_privileges/read_list_privileges_route.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/list_privileges/read_list_privileges_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/read_endpoint_list_item_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/read_exception_list_item_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/read_exception_list_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/summary_exception_list_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/update_endpoint_list_item_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/update_exception_list_item_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/update_exception_list_route.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/utils/build_siem_response.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/utils/create_stream_from_buffer.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/utils/get_error_message_exception_list.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/utils/get_error_message_exception_list_item.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/utils/get_exception_list_client.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/utils/get_internal_list_client.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/utils/get_list_client.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/utils/index.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/utils/route_validation.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/utils/route_validation.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/utils/validate_comments_to_update.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/utils/validate_comments_to_update.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/routes/validate.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/saved_objects/exception_list.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/saved_objects/index.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/saved_objects/init_saved_objects.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/saved_objects/migrations.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/saved_objects/migrations.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/schemas/common/get_shard.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/schemas/common/schemas.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/schemas/common/schemas.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/schemas/elastic_query/create_es_bulk_type.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/schemas/elastic_query/index.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/schemas/elastic_query/index_es_list_item_schema.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/schemas/elastic_query/index_es_list_item_schema.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/schemas/elastic_query/index_es_list_schema.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/schemas/elastic_query/index_es_list_schema.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/schemas/elastic_query/update_es_list_item_schema.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/schemas/elastic_query/update_es_list_schema.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/schemas/elastic_response/index.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/schemas/elastic_response/search_es_list_item_schema.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/schemas/elastic_response/search_es_list_item_schema.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/schemas/elastic_response/search_es_list_item_schema.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/schemas/elastic_response/search_es_list_schema.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/schemas/elastic_response/search_es_list_schema.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/schemas/elastic_response/search_es_list_schema.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/schemas/saved_objects/exceptions_list_so_schema.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/schemas/saved_objects/index.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/check_env_variables.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/delete_all_exception_lists.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/delete_endpoint_list_item.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/delete_endpoint_list_item_by_id.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/delete_exception_list.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/delete_exception_list_by_id.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/delete_exception_list_item.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/delete_exception_list_item_by_id.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/delete_list.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/delete_list_index.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/delete_list_item_by_id.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/delete_list_item_by_value.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/download_load_lists_example.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/exception_lists/files/import.ndjson (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/exception_lists/new/endpoint_list_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/exception_lists/new/exception_list.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/exception_lists/new/exception_list_agnostic.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/exception_lists/new/exception_list_auto_id.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/exception_lists/new/exception_list_detection.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/exception_lists/new/exception_list_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/exception_lists/new/exception_list_item_agnostic.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/exception_lists/new/exception_list_item_auto_id.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/exception_lists/new/exception_list_item_detection_auto_id.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/exception_lists/new/exception_list_item_with_bad_ip_list.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/exception_lists/new/exception_list_item_with_list.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/exception_lists/new/references/exception_list_detection_1.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/exception_lists/new/references/exception_list_detection_2_agnostic.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/exception_lists/new/references/exception_list_detection_3.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_1_multi_value_list.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_1_non_value_list.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_2_multi_value_list.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_2_non_value_list.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_3_non_value_list.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_3_single_value_list.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/exception_lists/new/trusted_app_list_item_agnostic.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/exception_lists/updates/simple_update.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/exception_lists/updates/simple_update_agnostic.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/exception_lists/updates/simple_update_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/export_list_items.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/export_list_items_to_file.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/find_endpoint_list_items.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/find_exception_list_items.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/find_exception_list_items_by_filter.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/find_exception_lists.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/find_exception_lists_by_filter.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/find_list_items.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/find_list_items_with_cursor.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/find_list_items_with_sort.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/find_list_items_with_sort_cursor.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/find_lists.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/find_lists_with_cursor.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/find_lists_with_filter.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/find_lists_with_sort.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/find_lists_with_sort_cursor.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/get_endpoint_list_item.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/get_endpoint_list_item_by_id.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/get_exception_list.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/get_exception_list_by_id.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/get_exception_list_item.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/get_exception_list_item_by_id.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/get_list.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/get_list_item_by_id.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/get_list_item_by_value.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/get_privileges.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/hard_reset.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/import_exception_lists.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/import_list_items.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/import_list_items_by_filename.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/files/binary.txt (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/files/boolean.txt (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/files/byte.txt (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/files/date.txt (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/files/date_nanos.txt (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/files/date_range.txt (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/files/date_range_custom_format.txt (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/files/double.txt (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/files/double_range.txt (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/files/float.txt (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/files/float_range.txt (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/files/geo_hash.txt (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/files/geo_point.txt (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/files/geo_point_wkt.txt (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/files/half_float.txt (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/files/hosts.txt (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/files/integer.txt (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/files/integer_range.txt (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/files/ip_range.txt (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/files/ip_range_cidr.txt (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/files/ip_range_mixed.txt (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/files/ips.txt (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/files/long.txt (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/files/long_range.txt (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/files/short.txt (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/files/text.txt (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/items/binary_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/items/boolean_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/items/byte_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/items/date_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/items/date_nanos_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/items/date_range_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/items/double_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/items/double_range_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/items/float_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/items/float_range_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/items/geo_point_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/items/geo_shape_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/items/half_float_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/items/integer_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/items/integer_range_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/items/ip_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/items/ip_item_everything.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/items/ip_range_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/items/keyword_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/items/long_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/items/long_range_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/items/shape_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/items/short_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/items/text_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/list_ip_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/list_keyword_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/lists/auto_id.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/lists/binary.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/lists/boolean.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/lists/byte.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/lists/date.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/lists/date_nanos.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/lists/date_range.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/lists/date_range_custom_format.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/lists/double.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/lists/double_range.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/lists/everything.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/lists/float.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/lists/float_range.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/lists/geo_point.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/lists/geo_shape.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/lists/half_float.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/lists/integer.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/lists/integer_range.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/lists/ip.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/lists/ip_custom_format.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/lists/ip_no_id.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/lists/ip_range.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/lists/keyword.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/lists/keyword_custom_format.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/lists/long.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/lists/shape.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/lists/short.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/new/lists/text.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/patches/ip_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/patches/simplest_updated_name.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/updates/ip_item.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists/updates/simple_update.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/lists_index_exists.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/patch_list.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/patch_list_item.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/post_endpoint_list.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/post_endpoint_list_item.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/post_exception_list.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/post_exception_list_item.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/post_list.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/post_list_index.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/post_list_item.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/post_x_exception_list_items.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/quick_start.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/quick_start_value_list_references.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/summary_exception_list.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/update_endpoint_item.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/update_exception_list.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/update_exception_list_item.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/update_list.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/scripts/update_list_item.sh (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/build_exception_filter.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/build_exception_filter.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/bulk_create_exception_list_items.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/close_point_in_time.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/create_endpoint_list.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/create_endpoint_trusted_apps_list.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/create_exception_list.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/create_exception_list_item.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/delete_exception_list.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/delete_exception_list_item.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/delete_exception_list_items_by_list.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/duplicate_exception_list.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/duplicate_exception_list.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/exception_list_client.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/exception_list_client.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/exception_list_client.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/exception_list_client_types.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/export_exception_list_and_items.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/export_exception_list_and_items.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/find_exception_list.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/find_exception_list_item.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/find_exception_list_item_point_in_time_finder.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/find_exception_list_items.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/find_exception_list_items_point_in_time_finder.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/find_exception_list_point_in_time_finder.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/find_value_list_exception_list_items.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/find_value_list_exception_list_items_point_in_time_finder.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/get_exception_list.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/get_exception_list_item.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/get_exception_list_summary.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/get_exception_list_summary.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/import_exception_list_and_items.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/import_exception_list_and_items.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/index.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/open_point_in_time.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/update_exception_list.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/update_exception_list_item.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/update_overwrite_exception_list_item.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/errors.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/get_exception_list_filter.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/get_exception_list_filter.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/get_exception_lists_item_filter.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/get_exception_lists_item_filter.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/bulk_create_imported_items.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/bulk_create_imported_items.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/bulk_create_imported_lists.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/bulk_create_imported_lists.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/bulk_update_imported_items.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/bulk_update_imported_items.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/bulk_update_imported_lists.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/bulk_update_imported_lists.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/create_exceptions_stream_logic.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/create_exceptions_stream_logic.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/dedupe_incoming_items.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/dedupe_incoming_items.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/dedupe_incoming_lists.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/dedupe_incoming_lists.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/delete_list_items_to_overwrite.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/delete_list_items_to_overwrite.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/find_all_exception_list_item_types.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/find_all_exception_list_item_types.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/find_all_exception_list_types.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/find_all_exception_list_types.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/import_exception_list_items.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/import_exception_lists.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/is_import_regular.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/is_import_regular.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/sort_exception_items_to_create_or_update.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/sort_exception_items_to_create_update.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/sort_exception_lists_to_create_or_update.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/sort_exception_lists_to_create_update.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/sort_import_by_namespace.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/sort_import_by_namespace.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/sort_import_responses.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/import/sort_import_responses.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/index.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/index.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/validate_data.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/exception_lists/utils/validate_data.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/extension_points/errors.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/extension_points/extension_point_storage.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/extension_points/extension_point_storage.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/extension_points/extension_point_storage.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/extension_points/extension_point_storage_client.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/extension_points/extension_point_storage_client.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/extension_points/index.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/extension_points/types.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/buffer_lines.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/buffer_lines.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/create_list_item.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/create_list_item.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/create_list_item.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/create_list_items_bulk.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/create_list_items_bulk.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/create_list_items_bulk.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/delete_list_item.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/delete_list_item.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/delete_list_item.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/delete_list_item_by_value.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/delete_list_item_by_value.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/delete_list_item_by_value.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/find_all_list_items.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/find_all_list_items.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/find_all_list_items.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/find_list_item.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/find_list_item.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/find_list_item.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/get_list_item.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/get_list_item.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/get_list_item_by_value.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/get_list_item_by_value.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/get_list_item_by_value.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/get_list_item_by_values.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/get_list_item_by_values.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/get_list_item_by_values.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/get_list_item_index.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/get_list_item_index.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/get_list_item_template.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/get_list_item_template.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/index.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/list_item_mappings.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/list_item_policy.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/search_list_item_by_values.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/search_list_item_by_values.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/search_list_item_by_values.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/test_readable.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/update_list_item.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/update_list_item.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/update_list_item.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/write_lines_to_bulk_list_items.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/write_lines_to_bulk_list_items.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/write_lines_to_bulk_list_items.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/write_list_items_to_stream.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/write_list_items_to_stream.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/items/write_list_items_to_streams.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/lists/create_list.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/lists/create_list.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/lists/create_list.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/lists/create_list_if_it_does_not_exist.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/lists/delete_list.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/lists/delete_list.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/lists/delete_list.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/lists/find_list.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/lists/get_list.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/lists/get_list.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/lists/get_list_index.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/lists/get_list_index.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/lists/get_list_template.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/lists/get_list_template.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/lists/index.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/lists/list_client.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/lists/list_client.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/lists/list_client.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/lists/list_client_types.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/lists/list_mappings.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/lists/list_policy.json (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/lists/types.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/lists/update_list.mock.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/lists/update_list.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/lists/update_list.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/utils/calculate_scroll_math.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/utils/check_version_conflict.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/utils/encode_decode_cursor.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/utils/escape_query.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/utils/find_source_type.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/utils/find_source_type.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/utils/find_source_value.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/utils/find_source_value.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/utils/get_query_filter.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/utils/get_query_filter.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/utils/get_query_filter_from_type_value.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/utils/get_query_filter_from_type_value.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/utils/get_search_after_scroll.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/utils/get_search_after_with_tie_breaker.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/utils/get_sort_with_tie_breaker.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/utils/get_source_with_tie_breaker.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/utils/index.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/utils/scroll_to_start_page.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/utils/transform_elastic_named_search_to_list_item.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/utils/transform_elastic_named_search_to_list_item.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/utils/transform_elastic_to_list.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/utils/transform_elastic_to_list_item.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/utils/transform_elastic_to_list_item.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/utils/transform_list_item_to_elastic_query.test.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/utils/transform_list_item_to_elastic_query.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/services/utils/wait_until_document_indexed.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/server/types.ts (100%) rename x-pack/{ => solutions/security}/plugins/lists/tsconfig.json (96%) diff --git a/.buildkite/scripts/pipelines/pull_request/pipeline.ts b/.buildkite/scripts/pipelines/pull_request/pipeline.ts index 87ac7096e5a3..b1c877bb3db0 100644 --- a/.buildkite/scripts/pipelines/pull_request/pipeline.ts +++ b/.buildkite/scripts/pipelines/pull_request/pipeline.ts @@ -250,7 +250,7 @@ const getPipeline = (filename: string, removeSteps = true) => { /^packages\/kbn-securitysolution-.*/, /^x-pack\/plugins\/alerting/, /^x-pack\/plugins\/data_views\/common/, - /^x-pack\/plugins\/lists/, + /^x-pack\/solutions\/security\/plugins\/lists/, /^x-pack\/plugins\/rule_registry\/common/, /^x-pack\/solutions\/security\/plugins\/security_solution/, /^x-pack\/solutions\/security\/plugins\/security_solution_ess/, @@ -306,10 +306,10 @@ const getPipeline = (filename: string, removeSteps = true) => { /^packages\/kbn-search-types/, /^packages\/kbn-securitysolution-.*/, /^src\/platform\/packages\/shared\/kbn-securitysolution-ecs/, - /^packages\/kbn-securitysolution-io-ts-alerting-types/, - /^packages\/kbn-securitysolution-io-ts-list-types/, - /^packages\/kbn-securitysolution-list-hooks/, - /^packages\/kbn-securitysolution-t-grid/, + /^x-pack\/solutions\/security\/packages\/kbn-securitysolution-io-ts-alerting-types/, + /^x-pack\/solutions\/security\/packages\/kbn-securitysolution-io-ts-list-types/, + /^x-pack\/solutions\/security\/packages\/kbn-securitysolution-list-hooks/, + /^x-pack\/solutions\/security\/packages\/kbn-securitysolution-t-grid/, /^packages\/kbn-ui-theme/, /^packages\/kbn-utility-types/, /^packages\/react/, @@ -335,7 +335,7 @@ const getPipeline = (filename: string, removeSteps = true) => { /^x-pack\/plugins\/cases/, /^x-pack\/plugins\/data_views\/common/, /^x-pack\/solutions\/security\/plugins\/elastic_assistant/, - /^x-pack\/plugins\/lists/, + /^x-pack\/solutions\/security\/plugins\/lists/, /^x-pack\/plugins\/rule_registry\/common/, /^x-pack\/solutions\/security\/plugins\/security_solution/, /^x-pack\/solutions\/security\/plugins\/security_solution_ess/, diff --git a/.buildkite/scripts/steps/code_generation/security_solution_codegen.sh b/.buildkite/scripts/steps/code_generation/security_solution_codegen.sh index db7131d12785..13bd0aaf7189 100755 --- a/.buildkite/scripts/steps/code_generation/security_solution_codegen.sh +++ b/.buildkite/scripts/steps/code_generation/security_solution_codegen.sh @@ -10,13 +10,13 @@ echo -e "\n[Security Solution OpenAPI Code Generation] OpenAPI Common Package\n" (cd packages/kbn-openapi-common && yarn openapi:generate) echo -e "\n[Security Solution OpenAPI Code Generation] Lists Common Package\n" -(cd packages/kbn-securitysolution-lists-common && yarn openapi:generate) +(cd x-pack/solutions/security/packages/kbn-securitysolution-lists-common && yarn openapi:generate) echo -e "\n[Security Solution OpenAPI Code Generation] Exceptions Common Package\n" -(cd packages/kbn-securitysolution-exceptions-common && yarn openapi:generate) +(cd x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common && yarn openapi:generate) echo -e "\n[Security Solution OpenAPI Code Generation] Endpoint Exceptions Common Package\n" -(cd packages/kbn-securitysolution-endpoint-exceptions-common && yarn openapi:generate) +(cd x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common && yarn openapi:generate) echo -e "\n[Security Solution OpenAPI Code Generation] Security Solution Plugin\n" (cd x-pack/solutions/security/plugins/security_solution && yarn openapi:generate) diff --git a/.buildkite/scripts/steps/openapi_bundling/security_solution_openapi_bundling.sh b/.buildkite/scripts/steps/openapi_bundling/security_solution_openapi_bundling.sh index 18d2c963b3c2..4dd23435e351 100755 --- a/.buildkite/scripts/steps/openapi_bundling/security_solution_openapi_bundling.sh +++ b/.buildkite/scripts/steps/openapi_bundling/security_solution_openapi_bundling.sh @@ -16,13 +16,13 @@ echo -e "\n[Security Solution OpenAPI Bundling] Entity Analytics API\n" (cd x-pack/solutions/security/plugins/security_solution && yarn openapi:bundle:entity-analytics) echo -e "\n[Security Solution OpenAPI Bundling] Lists API\n" -(cd packages/kbn-securitysolution-lists-common && yarn openapi:bundle) +(cd x-pack/solutions/security/packages/kbn-securitysolution-lists-common && yarn openapi:bundle) echo -e "\n[Security Solution OpenAPI Bundling] Exceptions API\n" -(cd packages/kbn-securitysolution-exceptions-common && yarn openapi:bundle) +(cd x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common && yarn openapi:bundle) echo -e "\n[Security Solution OpenAPI Bundling] Endpoint Exceptions API\n" -(cd packages/kbn-securitysolution-endpoint-exceptions-common && yarn openapi:bundle) +(cd x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common && yarn openapi:bundle) echo -e "\n[Security Solution OpenAPI Bundling] Endpoint Management API\n" (cd x-pack/solutions/security/plugins/security_solution && yarn openapi:bundle:endpoint-management) diff --git a/.eslintrc.js b/.eslintrc.js index 6bf88444aaf7..93e3dabf3b86 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1343,8 +1343,8 @@ module.exports = { { // front end and common typescript and javascript files only files: [ - 'x-pack/plugins/lists/public/**/*.{js,mjs,ts,tsx}', - 'x-pack/plugins/lists/common/**/*.{js,mjs,ts,tsx}', + 'x-pack/solutions/security/plugins/lists/public/**/*.{js,mjs,ts,tsx}', + 'x-pack/solutions/security/plugins/lists/common/**/*.{js,mjs,ts,tsx}', ], rules: { 'import/no-nodejs-modules': 'error', @@ -1360,14 +1360,20 @@ module.exports = { }, { // typescript for /public and /common - files: ['x-pack/plugins/lists/public/*.{ts,tsx}', 'x-pack/plugins/lists/common/*.{ts,tsx}'], + files: [ + 'x-pack/solutions/security/plugins/lists/public/*.{ts,tsx}', + 'x-pack/solutions/security/plugins/lists/common/*.{ts,tsx}', + ], rules: { '@typescript-eslint/no-for-in-array': 'error', }, }, { // typescript for /public and /common - files: ['x-pack/plugins/lists/public/*.{ts,tsx}', 'x-pack/plugins/lists/common/*.{ts,tsx}'], + files: [ + 'x-pack/solutions/security/plugins/lists/public/*.{ts,tsx}', + 'x-pack/solutions/security/plugins/lists/common/*.{ts,tsx}', + ], plugins: ['react'], env: { jest: true, @@ -1425,7 +1431,7 @@ module.exports = { }, }, { - files: ['x-pack/plugins/lists/public/**/!(*.test).{js,mjs,ts,tsx}'], + files: ['x-pack/solutions/security/plugins/lists/public/**/!(*.test).{js,mjs,ts,tsx}'], plugins: ['react-perf'], rules: { 'react-perf/jsx-no-new-object-as-prop': 'error', @@ -1436,7 +1442,7 @@ module.exports = { }, { // typescript and javascript for front and back - files: ['x-pack/plugins/lists/**/*.{js,mjs,ts,tsx}'], + files: ['x-pack/solutions/security/plugins/lists/**/*.{js,mjs,ts,tsx}'], plugins: ['eslint-plugin-node'], env: { jest: true, diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 627579d513e9..882ff38a38b0 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -454,24 +454,6 @@ packages/kbn-search-index-documents @elastic/search-kibana packages/kbn-search-response-warnings @elastic/kibana-data-discovery packages/kbn-search-types @elastic/kibana-data-discovery packages/kbn-security-hardening @elastic/kibana-security -packages/kbn-securitysolution-autocomplete @elastic/security-detection-engine -packages/kbn-securitysolution-endpoint-exceptions-common @elastic/security-detection-engine -packages/kbn-securitysolution-es-utils @elastic/security-detection-engine -packages/kbn-securitysolution-exception-list-components @elastic/security-detection-engine -packages/kbn-securitysolution-exceptions-common @elastic/security-detection-engine -packages/kbn-securitysolution-hook-utils @elastic/security-detection-engine -packages/kbn-securitysolution-io-ts-alerting-types @elastic/security-detection-engine -packages/kbn-securitysolution-io-ts-list-types @elastic/security-detection-engine -packages/kbn-securitysolution-io-ts-types @elastic/security-detection-engine -packages/kbn-securitysolution-io-ts-utils @elastic/security-detection-engine -packages/kbn-securitysolution-list-api @elastic/security-detection-engine -packages/kbn-securitysolution-list-constants @elastic/security-detection-engine -packages/kbn-securitysolution-list-hooks @elastic/security-detection-engine -packages/kbn-securitysolution-list-utils @elastic/security-detection-engine -packages/kbn-securitysolution-lists-common @elastic/security-detection-engine -packages/kbn-securitysolution-rules @elastic/security-detection-engine -packages/kbn-securitysolution-t-grid @elastic/security-detection-engine -packages/kbn-securitysolution-utils @elastic/security-detection-engine packages/kbn-server-http-tools @elastic/kibana-core packages/kbn-set-map @elastic/kibana-operations packages/kbn-shared-svg @elastic/obs-ux-infra_services-team @@ -615,6 +597,10 @@ src/platform/packages/shared/kbn-management/settings/types @elastic/kibana-manag src/platform/packages/shared/kbn-management/settings/utilities @elastic/kibana-management src/platform/packages/shared/kbn-osquery-io-ts-types @elastic/security-asset-management src/platform/packages/shared/kbn-securitysolution-ecs @elastic/security-threat-hunting-explore +src/platform/packages/shared/kbn-securitysolution-es-utils @elastic/security-detection-engine +src/platform/packages/shared/kbn-securitysolution-io-ts-types @elastic/security-detection-engine +src/platform/packages/shared/kbn-securitysolution-io-ts-utils @elastic/security-detection-engine +src/platform/packages/shared/kbn-securitysolution-rules @elastic/security-detection-engine src/platform/packages/shared/kbn-server-route-repository @elastic/obs-knowledge-team src/platform/packages/shared/kbn-server-route-repository-client @elastic/obs-knowledge-team src/platform/packages/shared/kbn-server-route-repository-utils @elastic/obs-knowledge-team @@ -909,7 +895,6 @@ x-pack/plugins/graph @elastic/kibana-visualizations x-pack/plugins/index_management @elastic/kibana-management x-pack/plugins/lens @elastic/kibana-visualizations x-pack/plugins/licensing @elastic/kibana-core -x-pack/plugins/lists @elastic/security-detection-engine x-pack/plugins/logstash @elastic/logstash x-pack/plugins/maps @elastic/kibana-presentation x-pack/plugins/monitoring @elastic/stack-monitoring @@ -986,6 +971,20 @@ x-pack/solutions/security/packages/features @elastic/security-threat-hunting-exp x-pack/solutions/security/packages/index-adapter @elastic/security-threat-hunting x-pack/solutions/security/packages/kbn-cloud-security-posture/graph @elastic/kibana-cloud-security-posture x-pack/solutions/security/packages/kbn-cloud-security-posture/public @elastic/kibana-cloud-security-posture +x-pack/solutions/security/packages/kbn-securitysolution-autocomplete @elastic/security-detection-engine +x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common @elastic/security-detection-engine +x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components @elastic/security-detection-engine +x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common @elastic/security-detection-engine +x-pack/solutions/security/packages/kbn-securitysolution-hook-utils @elastic/security-detection-engine +x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types @elastic/security-detection-engine +x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types @elastic/security-detection-engine +x-pack/solutions/security/packages/kbn-securitysolution-list-api @elastic/security-detection-engine +x-pack/solutions/security/packages/kbn-securitysolution-list-constants @elastic/security-detection-engine +x-pack/solutions/security/packages/kbn-securitysolution-list-hooks @elastic/security-detection-engine +x-pack/solutions/security/packages/kbn-securitysolution-list-utils @elastic/security-detection-engine +x-pack/solutions/security/packages/kbn-securitysolution-lists-common @elastic/security-detection-engine +x-pack/solutions/security/packages/kbn-securitysolution-t-grid @elastic/security-detection-engine +x-pack/solutions/security/packages/kbn-securitysolution-utils @elastic/security-detection-engine x-pack/solutions/security/packages/navigation @elastic/security-threat-hunting-explore x-pack/solutions/security/packages/side_nav @elastic/security-threat-hunting-explore x-pack/solutions/security/packages/storybook/config @elastic/security-threat-hunting-explore @@ -996,6 +995,7 @@ x-pack/solutions/security/plugins/cloud_security_posture @elastic/kibana-cloud-s x-pack/solutions/security/plugins/ecs_data_quality_dashboard @elastic/security-threat-hunting-explore x-pack/solutions/security/plugins/elastic_assistant @elastic/security-generative-ai x-pack/solutions/security/plugins/kubernetes_security @elastic/kibana-cloud-security-posture +x-pack/solutions/security/plugins/lists @elastic/security-detection-engine x-pack/solutions/security/plugins/security_solution @elastic/security-solution x-pack/solutions/security/plugins/security_solution_ess @elastic/security-solution x-pack/solutions/security/plugins/security_solution_serverless @elastic/security-solution @@ -3354,20 +3354,20 @@ x-pack/solutions/security/packages/kbn-cloud-security-posture/public @elastic/ki x-pack/solutions/security/packages/data-stream-adapter @elastic/security-threat-hunting x-pack/solutions/security/packages/expandable-flyout @elastic/security-threat-hunting-investigations x-pack/solutions/security/packages/index-adapter @elastic/security-threat-hunting -x-pack/solutions/security/packages/kbn-securitysolution-autocomplete @elastic/security-detection-engine -x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common @elastic/security-detection-engine -x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components @elastic/security-detection-engine -x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common @elastic/security-detection-engine -x-pack/solutions/security/packages/kbn-securitysolution-hook-utils @elastic/security-detection-engine -x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types @elastic/security-detection-engine -x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types @elastic/security-detection-engine -x-pack/solutions/security/packages/kbn-securitysolution-list-api @elastic/security-detection-engine -x-pack/solutions/security/packages/kbn-securitysolution-list-constants @elastic/security-detection-engine -x-pack/solutions/security/packages/kbn-securitysolution-list-hooks @elastic/security-detection-engine -x-pack/solutions/security/packages/kbn-securitysolution-list-utils @elastic/security-detection-engine -x-pack/solutions/security/packages/kbn-securitysolution-lists-common @elastic/security-detection-engine -x-pack/solutions/security/packages/kbn-securitysolution-t-grid @elastic/security-detection-engine -x-pack/solutions/security/packages/kbn-securitysolution-utils @elastic/security-detection-engine +x-pack/solutions/security/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete @elastic/security-detection-engine +x-pack/solutions/security/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common @elastic/security-detection-engine +x-pack/solutions/security/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components @elastic/security-detection-engine +x-pack/solutions/security/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common @elastic/security-detection-engine +x-pack/solutions/security/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils @elastic/security-detection-engine +x-pack/solutions/security/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types @elastic/security-detection-engine +x-pack/solutions/security/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types @elastic/security-detection-engine +x-pack/solutions/security/x-pack/solutions/security/packages/kbn-securitysolution-list-api @elastic/security-detection-engine +x-pack/solutions/security/x-pack/solutions/security/packages/kbn-securitysolution-list-constants @elastic/security-detection-engine +x-pack/solutions/security/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks @elastic/security-detection-engine +x-pack/solutions/security/x-pack/solutions/security/packages/kbn-securitysolution-list-utils @elastic/security-detection-engine +x-pack/solutions/security/x-pack/solutions/security/packages/kbn-securitysolution-lists-common @elastic/security-detection-engine +x-pack/solutions/security/x-pack/solutions/security/packages/kbn-securitysolution-t-grid @elastic/security-detection-engine +x-pack/solutions/security/x-pack/solutions/security/packages/kbn-securitysolution-utils @elastic/security-detection-engine x-pack/solutions/security/packages/navigation @elastic/security-threat-hunting-explore x-pack/solutions/security/packages/side_nav @elastic/security-threat-hunting-explore x-pack/solutions/security/packages/upselling @elastic/security-threat-hunting-explore @@ -3377,7 +3377,7 @@ x-pack/solutions/security/plugins/cloud_security_posture @elastic/kibana-cloud-s x-pack/solutions/security/plugins/ecs_data_quality_dashboard @elastic/security-threat-hunting-explore x-pack/solutions/security/plugins/elastic_assistant @elastic/security-generative-ai x-pack/solutions/security/plugins/kubernetes_security @elastic/kibana-cloud-security-posture -x-pack/solutions/security/plugins/lists @elastic/security-detection-engine +x-pack/solutions/security/solutions/security/plugins/lists @elastic/security-detection-engine x-pack/solutions/security/solutions/security/plugins/security_solution @elastic/security-solution x-pack/solutions/security/solutions/security/plugins/security_solution_ess @elastic/security-solution x-pack/solutions/security/solutions/security/plugins/security_solution_serverless @elastic/security-solution diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml index 8ad946732714..3077ac0f5167 100644 --- a/.github/codeql/codeql-config.yml +++ b/.github/codeql/codeql-config.yml @@ -78,8 +78,8 @@ paths-ignore: - x-pack/solutions/security/plugins/elastic_assistant/scripts - x-pack/plugins/event_log/scripts - x-pack/plugins/fleet/scripts - - x-pack/plugins/lists/scripts - - x-pack/plugins/lists/server/scripts + - x-pack/solutions/security/plugins/lists/scripts + - x-pack/solutions/security/plugins/lists/server/scripts - x-pack/plugins/observability_solution/*/scripts - x-pack/platform/plugins/shared/osquery/scripts - x-pack/plugins/rule_registry/scripts diff --git a/.i18nrc.json b/.i18nrc.json index 63cbc62d1365..0e167c2b08b5 100644 --- a/.i18nrc.json +++ b/.i18nrc.json @@ -6,7 +6,7 @@ "alertsUIShared": "packages/kbn-alerts-ui-shared/src", "alertingTypes": "packages/kbn-alerting-types", "apmOss": "src/plugins/apm_oss", - "autocomplete": "packages/kbn-securitysolution-autocomplete/src", + "autocomplete": "x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src", "avcBanner": "src/platform/packages/shared/kbn-avc-banner/src", "bfetch": "src/plugins/bfetch", "bfetchError": "packages/kbn-bfetch-error", @@ -25,12 +25,13 @@ "data": "src/plugins/data", "observabilityAlertDetails": "x-pack/solutions/observability/packages/alert_details", "dataViews": "src/plugins/data_views", - "defaultNavigation": [ - "packages/default-nav", - "src/platform/packages/private/default-nav" - ], + "defaultNavigation": ["packages/default-nav", "src/platform/packages/private/default-nav"], "devTools": "src/platform/plugins/shared/dev_tools", - "discover": ["src/plugins/discover", "packages/kbn-discover-utils", "packages/kbn-discover-contextual-components"], + "discover": [ + "src/plugins/discover", + "packages/kbn-discover-utils", + "packages/kbn-discover-contextual-components" + ], "savedSearch": "src/plugins/saved_search", "embeddableApi": "src/plugins/embeddable", "presentationPanel": "src/plugins/presentation_panel", @@ -87,8 +88,8 @@ "kibana-react": "src/plugins/kibana_react", "kibanaOverview": "src/plugins/kibana_overview", "lensFormulaDocs": "packages/kbn-lens-formula-docs", - "lists": "packages/kbn-securitysolution-list-utils/src", - "exceptionList-components": "packages/kbn-securitysolution-exception-list-components/src", + "lists": "x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src", + "exceptionList-components": "x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src", "management": [ "src/platform/plugins/shared/management", "src/platform/packages/private/kbn-management", @@ -120,11 +121,15 @@ "searchResponseWarnings": "packages/kbn-search-response-warnings", "searchTypes": "packages/kbn-search-types", "securitySolutionPackages": [ - "x-pack/solutions/security/packages" - ], - "sharedPlatformPackages": [ - "x-pack/platform/packages/shared/kbn-cloud-security-posture" + "x-pack/solutions/security/packages/data_table", + "x-pack/solutions/security/packages/ecs_data_quality_dashboard", + "x-pack/solutions/security/packages/features", + "x-pack/solutions/security/packages/kbn-cloud-security-posture", + "x-pack/solutions/security/packages/navigation", + "x-pack/solutions/security/packages/side_nav", + "x-pack/solutions/security/packages/upselling" ], + "sharedPlatformPackages": ["x-pack/platform/packages/shared/kbn-cloud-security-posture"], "serverlessPackages": "packages/serverless", "sse": ["src/platform/packages/shared/kbn-sse-utils"], "coloring": "packages/kbn-coloring/src", @@ -140,7 +145,7 @@ "uiActionsExamples": "examples/ui_action_examples", "usageCollection": "src/plugins/usage_collection", "userProfileComponents": "packages/kbn-user-profile-components", - "utils": "packages/kbn-securitysolution-utils/src", + "utils": "x-pack/solutions/security/packages/kbn-securitysolution-utils/src", "visDefaultEditor": "src/plugins/vis_default_editor", "visTypeGauge": "src/plugins/vis_types/gauge", "visTypeHeatmap": "src/plugins/vis_types/heatmap", diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index f18bafe5221b..9da7cdbdceee 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -693,7 +693,7 @@ the infrastructure monitoring use-case within Kibana. |The licensing plugin retrieves license data from Elasticsearch at regular configurable intervals. -|{kib-repo}blob/{branch}/x-pack/plugins/lists/README.md[lists] +|{kib-repo}blob/{branch}/x-pack/solutions/security/plugins/lists/README.md[lists] |README.md for developers working on the backend lists on how to get started using the CURL scripts in the scripts folder. diff --git a/oas_docs/scripts/merge_ess_oas.js b/oas_docs/scripts/merge_ess_oas.js index 3d96ad5b5933..df0b6e5a4ac0 100644 --- a/oas_docs/scripts/merge_ess_oas.js +++ b/oas_docs/scripts/merge_ess_oas.js @@ -27,9 +27,9 @@ const { REPO_ROOT } = require('@kbn/repo-info'); // Security solution `${REPO_ROOT}/x-pack/solutions/security/plugins/security_solution/docs/openapi/ess/*.schema.yaml`, - `${REPO_ROOT}/packages/kbn-securitysolution-lists-common/docs/openapi/ess/*.schema.yaml`, - `${REPO_ROOT}/packages/kbn-securitysolution-exceptions-common/docs/openapi/ess/*.schema.yaml`, - `${REPO_ROOT}/packages/kbn-securitysolution-endpoint-exceptions-common/docs/openapi/ess/*.schema.yaml`, + `${REPO_ROOT}/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/docs/openapi/ess/*.schema.yaml`, + `${REPO_ROOT}/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/docs/openapi/ess/*.schema.yaml`, + `${REPO_ROOT}/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/docs/openapi/ess/*.schema.yaml`, `${REPO_ROOT}/x-pack/platform/packages/shared/kbn-elastic-assistant-common/docs/openapi/ess/*.schema.yaml`, `${REPO_ROOT}/x-pack/platform/plugins/shared/osquery/docs/openapi/ess/*.schema.yaml`, ], diff --git a/oas_docs/scripts/merge_serverless_oas.js b/oas_docs/scripts/merge_serverless_oas.js index 2f92195502db..343487d8fc4f 100644 --- a/oas_docs/scripts/merge_serverless_oas.js +++ b/oas_docs/scripts/merge_serverless_oas.js @@ -25,9 +25,9 @@ const { REPO_ROOT } = require('@kbn/repo-info'); // Security solution `${REPO_ROOT}/x-pack/solutions/security/plugins/security_solution/docs/openapi/serverless/*.schema.yaml`, - `${REPO_ROOT}/packages/kbn-securitysolution-lists-common/docs/openapi/serverless/*.schema.yaml`, - `${REPO_ROOT}/packages/kbn-securitysolution-exceptions-common/docs/openapi/serverless/*.schema.yaml`, - `${REPO_ROOT}/packages/kbn-securitysolution-endpoint-exceptions-common/docs/openapi/serverless/*.schema.yaml`, + `${REPO_ROOT}/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/docs/openapi/serverless/*.schema.yaml`, + `${REPO_ROOT}/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/docs/openapi/serverless/*.schema.yaml`, + `${REPO_ROOT}/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/docs/openapi/serverless/*.schema.yaml`, `${REPO_ROOT}/x-pack/platform/packages/shared/kbn-elastic-assistant-common/docs/openapi/serverless/*.schema.yaml`, `${REPO_ROOT}/x-pack/platform/plugins/shared/osquery/docs/openapi/serverless/*.schema.yaml`, ], diff --git a/package.json b/package.json index ee007b076af4..d4f8f9a4c689 100644 --- a/package.json +++ b/package.json @@ -619,7 +619,7 @@ "@kbn/license-management-plugin": "link:x-pack/platform/plugins/shared/license_management", "@kbn/licensing-plugin": "link:x-pack/plugins/licensing", "@kbn/links-plugin": "link:src/plugins/links", - "@kbn/lists-plugin": "link:x-pack/plugins/lists", + "@kbn/lists-plugin": "link:x-pack/solutions/security/plugins/lists", "@kbn/llm-tasks-plugin": "link:x-pack/platform/plugins/shared/ai_infra/llm_tasks", "@kbn/locator-examples-plugin": "link:examples/locator_examples", "@kbn/locator-explorer-plugin": "link:examples/locator_explorer", @@ -839,26 +839,26 @@ "@kbn/security-solution-upselling": "link:x-pack/solutions/security/packages/upselling", "@kbn/security-test-endpoints-plugin": "link:x-pack/test/security_functional/plugins/test_endpoints", "@kbn/security-ui-components": "link:x-pack/packages/security/ui_components", - "@kbn/securitysolution-autocomplete": "link:packages/kbn-securitysolution-autocomplete", + "@kbn/securitysolution-autocomplete": "link:x-pack/solutions/security/packages/kbn-securitysolution-autocomplete", "@kbn/securitysolution-data-table": "link:x-pack/solutions/security/packages/data_table", "@kbn/securitysolution-ecs": "link:src/platform/packages/shared/kbn-securitysolution-ecs", - "@kbn/securitysolution-endpoint-exceptions-common": "link:packages/kbn-securitysolution-endpoint-exceptions-common", - "@kbn/securitysolution-es-utils": "link:packages/kbn-securitysolution-es-utils", - "@kbn/securitysolution-exception-list-components": "link:packages/kbn-securitysolution-exception-list-components", - "@kbn/securitysolution-exceptions-common": "link:packages/kbn-securitysolution-exceptions-common", - "@kbn/securitysolution-hook-utils": "link:packages/kbn-securitysolution-hook-utils", - "@kbn/securitysolution-io-ts-alerting-types": "link:packages/kbn-securitysolution-io-ts-alerting-types", - "@kbn/securitysolution-io-ts-list-types": "link:packages/kbn-securitysolution-io-ts-list-types", - "@kbn/securitysolution-io-ts-types": "link:packages/kbn-securitysolution-io-ts-types", - "@kbn/securitysolution-io-ts-utils": "link:packages/kbn-securitysolution-io-ts-utils", - "@kbn/securitysolution-list-api": "link:packages/kbn-securitysolution-list-api", - "@kbn/securitysolution-list-constants": "link:packages/kbn-securitysolution-list-constants", - "@kbn/securitysolution-list-hooks": "link:packages/kbn-securitysolution-list-hooks", - "@kbn/securitysolution-list-utils": "link:packages/kbn-securitysolution-list-utils", - "@kbn/securitysolution-lists-common": "link:packages/kbn-securitysolution-lists-common", - "@kbn/securitysolution-rules": "link:packages/kbn-securitysolution-rules", - "@kbn/securitysolution-t-grid": "link:packages/kbn-securitysolution-t-grid", - "@kbn/securitysolution-utils": "link:packages/kbn-securitysolution-utils", + "@kbn/securitysolution-endpoint-exceptions-common": "link:x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common", + "@kbn/securitysolution-es-utils": "link:src/platform/packages/shared/kbn-securitysolution-es-utils", + "@kbn/securitysolution-exception-list-components": "link:x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components", + "@kbn/securitysolution-exceptions-common": "link:x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common", + "@kbn/securitysolution-hook-utils": "link:x-pack/solutions/security/packages/kbn-securitysolution-hook-utils", + "@kbn/securitysolution-io-ts-alerting-types": "link:x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types", + "@kbn/securitysolution-io-ts-list-types": "link:x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types", + "@kbn/securitysolution-io-ts-types": "link:src/platform/packages/shared/kbn-securitysolution-io-ts-types", + "@kbn/securitysolution-io-ts-utils": "link:src/platform/packages/shared/kbn-securitysolution-io-ts-utils", + "@kbn/securitysolution-list-api": "link:x-pack/solutions/security/packages/kbn-securitysolution-list-api", + "@kbn/securitysolution-list-constants": "link:x-pack/solutions/security/packages/kbn-securitysolution-list-constants", + "@kbn/securitysolution-list-hooks": "link:x-pack/solutions/security/packages/kbn-securitysolution-list-hooks", + "@kbn/securitysolution-list-utils": "link:x-pack/solutions/security/packages/kbn-securitysolution-list-utils", + "@kbn/securitysolution-lists-common": "link:x-pack/solutions/security/packages/kbn-securitysolution-lists-common", + "@kbn/securitysolution-rules": "link:src/platform/packages/shared/kbn-securitysolution-rules", + "@kbn/securitysolution-t-grid": "link:x-pack/solutions/security/packages/kbn-securitysolution-t-grid", + "@kbn/securitysolution-utils": "link:x-pack/solutions/security/packages/kbn-securitysolution-utils", "@kbn/server-http-tools": "link:packages/kbn-server-http-tools", "@kbn/server-route-repository": "link:src/platform/packages/shared/kbn-server-route-repository", "@kbn/server-route-repository-client": "link:src/platform/packages/shared/kbn-server-route-repository-client", diff --git a/packages/kbn-babel-preset/styled_components_files.js b/packages/kbn-babel-preset/styled_components_files.js index 2a74c5b60f18..60dbb2b1053d 100644 --- a/packages/kbn-babel-preset/styled_components_files.js +++ b/packages/kbn-babel-preset/styled_components_files.js @@ -16,12 +16,13 @@ module.exports = { /packages[\/\\]kbn-ui-shared-deps-(npm|src)[\/\\]/, /src[\/\\]plugins[\/\\](kibana_react)[\/\\]/, /x-pack[\/\\]solutions[\/\\]observability[\/\\]plugins[\/\\](exploratory_view|investigate|investigate_app|observability|observability_ai_assistant_app|observability_ai_assistant_management|observability_solution|serverless_observability|streams|streams_app|synthetics|uptime|ux)[\/\\]/, - /x-pack[\/\\]plugins[\/\\](observability_solution\/apm|beats_management|fleet|lists|observability_solution\/observability|observability_solution\/observability_shared|observability_solution\/exploratory_view|security_solution|timelines|observability_solution\/synthetics|observability_solution\/ux|observability_solution\/uptime)[\/\\]/, + /x-pack[\/\\]plugins[\/\\](observability_solution\/apm|beats_management|fleet|observability_solution\/observability|observability_solution\/observability_shared|observability_solution\/exploratory_view|security_solution|timelines|observability_solution\/synthetics|observability_solution\/ux|observability_solution\/uptime)[\/\\]/, /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\](observability_solution\/apm|beats_management|fleet|observability_solution\/infra|lists|observability_solution\/observability|observability_solution\/observability_shared|observability_solution\/exploratory_view|security_solution|timelines|observability_solution\/synthetics|observability_solution\/ux|observability_solution\/uptime)[\/\\]/, /x-pack[\/\\]test[\/\\]plugin_functional[\/\\]plugins[\/\\]resolver_test[\/\\]/, /x-pack[\/\\]packages[\/\\]elastic_assistant[\/\\]/, /x-pack[\/\\]solutions[\/\\]security[\/\\]packages[\/\\]ecs_data_quality_dashboard[\/\\]/, /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\]security_solution[\/\\]/, /x-pack[\/\\]platform[\/\\]packages[\/\\]shared[\/\\]kbn-elastic-assistant[\/\\]/, + /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\]lists/, ], }; diff --git a/packages/kbn-securitysolution-autocomplete/src/es_field_selector/disabled_types_with_tooltip_text.ts b/packages/kbn-securitysolution-autocomplete/src/es_field_selector/disabled_types_with_tooltip_text.ts deleted file mode 100644 index 422a909bb991..000000000000 --- a/packages/kbn-securitysolution-autocomplete/src/es_field_selector/disabled_types_with_tooltip_text.ts +++ /dev/null @@ -1,17 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -interface DisabledTypesTextType { - [typeName: string]: string; -} -import * as i18n from '../translations'; - -export const disabledTypesWithTooltipText: DisabledTypesTextType = { - binary: i18n.BINARY_TYPE_NOT_SUPPORTED, -}; diff --git a/packages/kbn-securitysolution-autocomplete/src/hooks/index.ts b/packages/kbn-securitysolution-autocomplete/src/hooks/index.ts deleted file mode 100644 index 5aa216af4c67..000000000000 --- a/packages/kbn-securitysolution-autocomplete/src/hooks/index.ts +++ /dev/null @@ -1,10 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -export * from './use_field_value_autocomplete'; diff --git a/packages/kbn-securitysolution-autocomplete/src/param_contains_space/index.ts b/packages/kbn-securitysolution-autocomplete/src/param_contains_space/index.ts deleted file mode 100644 index 996167f20536..000000000000 --- a/packages/kbn-securitysolution-autocomplete/src/param_contains_space/index.ts +++ /dev/null @@ -1,10 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -export const paramContainsSpace = (param: string) => param && param.trim().length !== param.length; diff --git a/packages/kbn-securitysolution-exception-list-components/jest.config.js b/packages/kbn-securitysolution-exception-list-components/jest.config.js deleted file mode 100644 index e9d4ad8ad848..000000000000 --- a/packages/kbn-securitysolution-exception-list-components/jest.config.js +++ /dev/null @@ -1,29 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -module.exports = { - preset: '@kbn/test', - rootDir: '../..', - roots: ['/packages/kbn-securitysolution-exception-list-components'], - coverageReporters: ['text', 'html'], - collectCoverageFrom: [ - '/packages/kbn-securitysolution-exception-list-components/**/*.{ts,tsx}', - '!/packages/kbn-securitysolution-exception-list-components/**/*.test', - '!/packages/kbn-securitysolution-exception-list-components/**/types/*', - '!/packages/kbn-securitysolution-exception-list-components/**/*.type', - '!/packages/kbn-securitysolution-exception-list-components/**/*.styles', - '!/packages/kbn-securitysolution-exception-list-components/**/mocks/*', - '!/packages/kbn-securitysolution-exception-list-components/**/*.config', - '!/packages/kbn-securitysolution-exception-list-components/**/translations', - '!/packages/kbn-securitysolution-exception-list-components/**/types/*', - ], - setupFilesAfterEnv: [ - '/packages/kbn-securitysolution-exception-list-components/setup_test.ts', - ], -}; diff --git a/packages/kbn-securitysolution-exception-list-components/setup_test.ts b/packages/kbn-securitysolution-exception-list-components/setup_test.ts deleted file mode 100644 index 5ebc6d3dac1c..000000000000 --- a/packages/kbn-securitysolution-exception-list-components/setup_test.ts +++ /dev/null @@ -1,11 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -// eslint-disable-next-line import/no-extraneous-dependencies -import '@testing-library/jest-dom'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/custom.d.ts b/packages/kbn-securitysolution-exception-list-components/src/custom.d.ts deleted file mode 100644 index aa99593b9e87..000000000000 --- a/packages/kbn-securitysolution-exception-list-components/src/custom.d.ts +++ /dev/null @@ -1,14 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -declare module '*.svg' { - const content: string; - // eslint-disable-next-line import/no-default-export - export default content; -} diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/index.ts b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/index.ts deleted file mode 100644 index 26af37709233..000000000000 --- a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/index.ts +++ /dev/null @@ -1,14 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -export * from './conditions'; -export * from './header'; -export * from './meta'; -export * from './comments'; -export * from './exception_item_card'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/generate_linked_rules_menu_item/menu_link.styles.ts b/packages/kbn-securitysolution-exception-list-components/src/generate_linked_rules_menu_item/menu_link.styles.ts deleted file mode 100644 index 42f470ce39dd..000000000000 --- a/packages/kbn-securitysolution-exception-list-components/src/generate_linked_rules_menu_item/menu_link.styles.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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { css } from '@emotion/react'; -import { euiThemeVars } from '@kbn/ui-theme'; - -export const containerCss = css` - border-bottom: 1px solid ${euiThemeVars.euiColorLightShade}; -`; - -export const itemContentCss = css` - color: ${euiThemeVars.euiColorPrimary}; - flex-basis: content; -`; diff --git a/packages/kbn-securitysolution-exception-list-components/src/mocks/value_list_modal.mock.tsx b/packages/kbn-securitysolution-exception-list-components/src/mocks/value_list_modal.mock.tsx deleted file mode 100644 index 930439b577ff..000000000000 --- a/packages/kbn-securitysolution-exception-list-components/src/mocks/value_list_modal.mock.tsx +++ /dev/null @@ -1,16 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import React from 'react'; - -export const mockShowValueListModal = jest.fn(); -export const MockedShowValueListModal = (props: { children: React.ReactNode }) => { - mockShowValueListModal(props); - return <>{props.children}; -}; diff --git a/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/index.ts b/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/index.ts deleted file mode 100644 index 5a0843be833f..000000000000 --- a/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/index.ts +++ /dev/null @@ -1,10 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -export { ValueWithSpaceWarning } from './value_with_space_warning'; diff --git a/packages/kbn-securitysolution-hook-utils/index.ts b/packages/kbn-securitysolution-hook-utils/index.ts deleted file mode 100644 index be336bddcf9b..000000000000 --- a/packages/kbn-securitysolution-hook-utils/index.ts +++ /dev/null @@ -1,14 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -export * from './src/types'; -export * from './src/use_async'; -export * from './src/use_is_mounted'; -export * from './src/use_observable'; -export * from './src/with_optional_signal'; diff --git a/packages/kbn-securitysolution-hook-utils/src/types.ts b/packages/kbn-securitysolution-hook-utils/src/types.ts deleted file mode 100644 index 6642afac7381..000000000000 --- a/packages/kbn-securitysolution-hook-utils/src/types.ts +++ /dev/null @@ -1,19 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -/** - * Represents the state of an asynchronous task, along with an initiator - * function to kick off the work. - */ -export interface Task { - loading: boolean; - error: unknown | undefined; - result: Result | undefined; - start: (...args: Args) => void; -} diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/jest.config.js b/packages/kbn-securitysolution-io-ts-alerting-types/jest.config.js deleted file mode 100644 index b4c7014f9154..000000000000 --- a/packages/kbn-securitysolution-io-ts-alerting-types/jest.config.js +++ /dev/null @@ -1,14 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -module.exports = { - preset: '@kbn/test', - rootDir: '../..', - roots: ['/packages/kbn-securitysolution-io-ts-alerting-types'], -}; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/constants/index.ts b/packages/kbn-securitysolution-io-ts-alerting-types/src/constants/index.ts deleted file mode 100644 index 0c930e5f4a80..000000000000 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/constants/index.ts +++ /dev/null @@ -1,14 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -/** - * TODO: Create a kbn-alerting-constants and add this to it. - * @deprecated Use a DEFAULT_MAX_SIGNALS from a kbn-alerting-constants package. - */ -export const DEFAULT_MAX_SIGNALS = 100; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/severity/index.ts b/packages/kbn-securitysolution-io-ts-alerting-types/src/severity/index.ts deleted file mode 100644 index fef1082129df..000000000000 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/severity/index.ts +++ /dev/null @@ -1,13 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import * as t from 'io-ts'; - -export type Severity = t.TypeOf; -export const Severity = t.keyof({ low: null, medium: null, high: null, critical: null }); diff --git a/packages/kbn-securitysolution-io-ts-list-types/index.ts b/packages/kbn-securitysolution-io-ts-list-types/index.ts deleted file mode 100644 index 6d6b4e241b6d..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/index.ts +++ /dev/null @@ -1,13 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -export * from './src/common'; -export * from './src/request'; -export * from './src/response'; -export * from './src/typescript_types'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/jest.config.js b/packages/kbn-securitysolution-io-ts-list-types/jest.config.js deleted file mode 100644 index adcf48629dd7..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/jest.config.js +++ /dev/null @@ -1,14 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -module.exports = { - preset: '@kbn/test', - rootDir: '../..', - roots: ['/packages/kbn-securitysolution-io-ts-list-types'], -}; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/create_comment/index.mock.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/create_comment/index.mock.ts deleted file mode 100644 index bad427de9747..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/create_comment/index.mock.ts +++ /dev/null @@ -1,16 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { CreateComment, CreateCommentsArray } from '.'; - -export const getCreateCommentsMock = (): CreateComment => ({ - comment: 'some comments', -}); - -export const getCreateCommentsArrayMock = (): CreateCommentsArray => [getCreateCommentsMock()]; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/created_at/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/created_at/index.ts deleted file mode 100644 index 697a5034cbf0..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/created_at/index.ts +++ /dev/null @@ -1,14 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -/* eslint-disable @typescript-eslint/naming-convention */ - -import * as t from 'io-ts'; - -export const created_at = t.string; // TODO: Make this into an ISO Date string check diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/created_by/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/created_by/index.ts deleted file mode 100644 index e6f3e2f90edb..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/created_by/index.ts +++ /dev/null @@ -1,14 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -/* eslint-disable @typescript-eslint/naming-convention */ - -import * as t from 'io-ts'; - -export const created_by = t.string; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/cursor/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/cursor/index.ts deleted file mode 100644 index 4844ffe7e364..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/cursor/index.ts +++ /dev/null @@ -1,15 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import * as t from 'io-ts'; - -export const cursor = t.string; -export type Cursor = t.TypeOf; -export const cursorOrUndefined = t.union([cursor, t.undefined]); -export type CursorOrUndefined = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/description/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/description/index.ts deleted file mode 100644 index 75fd7ac92ffc..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/description/index.ts +++ /dev/null @@ -1,15 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import * as t from 'io-ts'; - -export const description = t.string; -export type Description = t.TypeOf; -export const descriptionOrUndefined = t.union([description, t.undefined]); -export type DescriptionOrUndefined = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/deserializer/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/deserializer/index.ts deleted file mode 100644 index c5489a946897..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/deserializer/index.ts +++ /dev/null @@ -1,15 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import * as t from 'io-ts'; - -export const deserializer = t.string; -export type Deserializer = t.TypeOf; -export const deserializerOrUndefined = t.union([deserializer, t.undefined]); -export type DeserializerOrUndefined = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match/index.mock.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match/index.mock.ts deleted file mode 100644 index 76305cf70c58..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match/index.mock.ts +++ /dev/null @@ -1,18 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { EndpointEntryMatch } from '.'; -import { ENTRY_VALUE, FIELD, MATCH, OPERATOR } from '../../../constants/index.mock'; - -export const getEndpointEntryMatchMock = (): EndpointEntryMatch => ({ - field: FIELD, - operator: OPERATOR, - type: MATCH, - value: ENTRY_VALUE, -}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/index.ts deleted file mode 100644 index fb42cc8ee468..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/index.ts +++ /dev/null @@ -1,11 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -export * from './entries'; -export * from './non_empty_nested_entries_array'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_list/index.mock.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_list/index.mock.ts deleted file mode 100644 index 06e006ed661b..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_list/index.mock.ts +++ /dev/null @@ -1,18 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { EntryList } from '.'; -import { FIELD, LIST, LIST_ID, OPERATOR, TYPE } from '../../constants/index.mock'; - -export const getEntryListMock = (): EntryList => ({ - field: FIELD, - list: { id: LIST_ID, type: TYPE }, - operator: OPERATOR, - type: LIST, -}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/expire_time/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/expire_time/index.ts deleted file mode 100644 index 4e8184d4e6ce..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/expire_time/index.ts +++ /dev/null @@ -1,15 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import * as t from 'io-ts'; -import { IsoDateString } from '@kbn/securitysolution-io-ts-types'; - -export const expireTime = IsoDateString; -export const expireTimeOrUndefined = t.union([expireTime, t.undefined]); -export type ExpireTimeOrUndefined = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/file/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/file/index.ts deleted file mode 100644 index f569d42c41f1..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/file/index.ts +++ /dev/null @@ -1,12 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import * as t from 'io-ts'; - -export const file = t.object; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/filter/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/filter/index.ts deleted file mode 100644 index 70d526eaefbe..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/filter/index.ts +++ /dev/null @@ -1,15 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import * as t from 'io-ts'; - -export const filter = t.string; -export type Filter = t.TypeOf; -export const filterOrUndefined = t.union([filter, t.undefined]); -export type FilterOrUndefined = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/id/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/id/index.ts deleted file mode 100644 index c9f35b36ee57..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/id/index.ts +++ /dev/null @@ -1,16 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import * as t from 'io-ts'; -import { NonEmptyString } from '@kbn/securitysolution-io-ts-types'; - -export const id = NonEmptyString; -export type Id = t.TypeOf; -export const idOrUndefined = t.union([id, t.undefined]); -export type IdOrUndefined = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/immutable/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/immutable/index.ts deleted file mode 100644 index 9bdb50647abd..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/immutable/index.ts +++ /dev/null @@ -1,15 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import * as t from 'io-ts'; - -export const immutable = t.boolean; -export type Immutable = t.TypeOf; -export const immutableOrUndefined = t.union([immutable, t.undefined]); -export type ImmutableOrUndefined = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/item/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/item/index.ts deleted file mode 100644 index d69ec5358400..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/item/index.ts +++ /dev/null @@ -1,12 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import * as t from 'io-ts'; - -export const item = t.string; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/list_type/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/list_type/index.ts deleted file mode 100644 index 716d9a6b24d7..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/list_type/index.ts +++ /dev/null @@ -1,15 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -/* eslint-disable @typescript-eslint/naming-convention */ - -import * as t from 'io-ts'; - -export const list_type = t.keyof({ item: null, list: null }); -export type ListType = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/name/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/name/index.ts deleted file mode 100644 index 5d4a13c06cee..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/name/index.ts +++ /dev/null @@ -1,15 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import * as t from 'io-ts'; - -export const name = t.string; -export type Name = t.TypeOf; -export const nameOrUndefined = t.union([name, t.undefined]); -export type NameOrUndefined = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/namespace_type/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/namespace_type/index.ts deleted file mode 100644 index b8d052910b86..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/namespace_type/index.ts +++ /dev/null @@ -1,14 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -/* eslint-disable @typescript-eslint/naming-convention */ - -import { DefaultNamespace } from '../default_namespace'; - -export const namespace_type = DefaultNamespace; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/page/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/page/index.ts deleted file mode 100644 index 58c5581cc6e2..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/page/index.ts +++ /dev/null @@ -1,16 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import * as t from 'io-ts'; - -export const page = t.number; // TODO: Change this out for PositiveNumber from siem -export type Page = t.TypeOf; - -export const pageOrUndefined = t.union([page, t.undefined]); -export type PageOrUndefined = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/search/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/search/index.ts deleted file mode 100644 index 85e360b84267..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/search/index.ts +++ /dev/null @@ -1,16 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import * as t from 'io-ts'; - -export const search = t.string; -export type Search = t.TypeOf; - -export const searchOrUndefined = t.union([search, t.undefined]); -export type SearchOrUndefined = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/serializer/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/serializer/index.ts deleted file mode 100644 index 7eb585c068e2..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/serializer/index.ts +++ /dev/null @@ -1,15 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import * as t from 'io-ts'; - -export const serializer = t.string; -export type Serializer = t.TypeOf; -export const serializerOrUndefined = t.union([serializer, t.undefined]); -export type SerializerOrUndefined = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/sort_field/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/sort_field/index.ts deleted file mode 100644 index e2c61659a94e..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/sort_field/index.ts +++ /dev/null @@ -1,16 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -/* eslint-disable @typescript-eslint/naming-convention */ - -import * as t from 'io-ts'; - -export const sort_field = t.string; -export const sortFieldOrUndefined = t.union([sort_field, t.undefined]); -export type SortFieldOrUndefined = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/tie_breaker_id/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/tie_breaker_id/index.ts deleted file mode 100644 index 0e393c7f154b..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/tie_breaker_id/index.ts +++ /dev/null @@ -1,14 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -/* eslint-disable @typescript-eslint/naming-convention */ - -import * as t from 'io-ts'; - -export const tie_breaker_id = t.string; // TODO: Use UUID for this instead of a string for validation diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/timestamp/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/timestamp/index.ts deleted file mode 100644 index ba47dd545fbb..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/timestamp/index.ts +++ /dev/null @@ -1,14 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import * as t from 'io-ts'; -import { IsoDateString } from '@kbn/securitysolution-io-ts-types'; - -export const timestamp = IsoDateString; -export const timestampOrUndefined = t.union([IsoDateString, t.undefined]); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/total/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/total/index.ts deleted file mode 100644 index f3c84417cd41..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/total/index.ts +++ /dev/null @@ -1,14 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import * as t from 'io-ts'; - -export const total = t.number; // TODO: Change this out for PositiveNumber from siem -export const totalUndefined = t.union([total, t.undefined]); -export type TotalOrUndefined = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/underscore_version/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/underscore_version/index.ts deleted file mode 100644 index 2e4901990fb5..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/underscore_version/index.ts +++ /dev/null @@ -1,14 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import * as t from 'io-ts'; - -export const _version = t.string; -export const _versionOrUndefined = t.union([_version, t.undefined]); -export type _VersionOrUndefined = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/updated_at/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/updated_at/index.ts deleted file mode 100644 index a6c0a803e6db..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/updated_at/index.ts +++ /dev/null @@ -1,14 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -/* eslint-disable @typescript-eslint/naming-convention */ - -import * as t from 'io-ts'; - -export const updated_at = t.string; // TODO: Make this into an ISO Date string check diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/updated_by/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/updated_by/index.ts deleted file mode 100644 index b99396254c91..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/updated_by/index.ts +++ /dev/null @@ -1,14 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -/* eslint-disable @typescript-eslint/naming-convention */ - -import * as t from 'io-ts'; - -export const updated_by = t.string; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/value/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/common/value/index.ts deleted file mode 100644 index cad092aee4b7..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/value/index.ts +++ /dev/null @@ -1,13 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import * as t from 'io-ts'; - -export const value = t.string; -export const valueOrUndefined = t.union([value, t.undefined]); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_endpoint_list_item_schema/index.mock.ts b/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_endpoint_list_item_schema/index.mock.ts deleted file mode 100644 index 2f7963171197..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_endpoint_list_item_schema/index.mock.ts +++ /dev/null @@ -1,16 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { ID } from '../../constants/index.mock'; - -import { DeleteEndpointListItemSchema } from '.'; - -export const getDeleteEndpointListItemSchemaMock = (): DeleteEndpointListItemSchema => ({ - id: ID, -}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_item_schema/index.mock.ts b/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_item_schema/index.mock.ts deleted file mode 100644 index 723b5acb6620..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_item_schema/index.mock.ts +++ /dev/null @@ -1,17 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { ID, NAMESPACE_TYPE } from '../../constants/index.mock'; - -import { DeleteExceptionListItemSchema } from '.'; - -export const getDeleteExceptionListItemSchemaMock = (): DeleteExceptionListItemSchema => ({ - id: ID, - namespace_type: NAMESPACE_TYPE, -}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_schema/index.mock.ts b/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_schema/index.mock.ts deleted file mode 100644 index f41f5b288004..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_schema/index.mock.ts +++ /dev/null @@ -1,17 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { ID, NAMESPACE_TYPE } from '../../constants/index.mock'; - -import { DeleteExceptionListSchema } from '.'; - -export const getDeleteExceptionListSchemaMock = (): DeleteExceptionListSchema => ({ - id: ID, - namespace_type: NAMESPACE_TYPE, -}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_item_schema/index.mock.ts b/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_item_schema/index.mock.ts deleted file mode 100644 index aaa03621d676..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_item_schema/index.mock.ts +++ /dev/null @@ -1,18 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { ID, LIST_ID, VALUE } from '../../constants/index.mock'; - -import { DeleteListItemSchema } from '.'; - -export const getDeleteListItemSchemaMock = (): DeleteListItemSchema => ({ - id: ID, - list_id: LIST_ID, - value: VALUE, -}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_schema/index.mock.ts b/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_schema/index.mock.ts deleted file mode 100644 index 4514b70ad39f..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_schema/index.mock.ts +++ /dev/null @@ -1,18 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { LIST_ID } from '../../constants/index.mock'; - -import { DeleteListSchema } from '.'; - -export const getDeleteListSchemaMock = (): DeleteListSchema => ({ - deleteReferences: false, - id: LIST_ID, - ignoreReferences: true, -}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/export_list_item_query_schema/index.mock.ts b/packages/kbn-securitysolution-io-ts-list-types/src/request/export_list_item_query_schema/index.mock.ts deleted file mode 100644 index 3c66cae1fb0e..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/export_list_item_query_schema/index.mock.ts +++ /dev/null @@ -1,16 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { LIST_ID } from '../../constants/index.mock'; - -import { ExportListItemQuerySchema } from '.'; - -export const getExportListItemQuerySchemaMock = (): ExportListItemQuerySchema => ({ - list_id: LIST_ID, -}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_item_schema/index.mock.ts b/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_item_schema/index.mock.ts deleted file mode 100644 index ff156386baa9..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_item_schema/index.mock.ts +++ /dev/null @@ -1,18 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { LIST_ITEM_ID, META, VALUE } from '../../constants/index.mock'; - -import { PatchListItemSchema } from '.'; - -export const getPathListItemSchemaMock = (): PatchListItemSchema => ({ - id: LIST_ITEM_ID, - meta: META, - value: VALUE, -}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_schema/index.mock.ts b/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_schema/index.mock.ts deleted file mode 100644 index 818dd4e79e98..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_schema/index.mock.ts +++ /dev/null @@ -1,19 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { DESCRIPTION, LIST_ITEM_ID, META, NAME } from '../../constants/index.mock'; - -import { PatchListSchema } from '.'; - -export const getPathListSchemaMock = (): PatchListSchema => ({ - description: DESCRIPTION, - id: LIST_ITEM_ID, - meta: META, - name: NAME, -}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_endpoint_list_item_schema/index.mock.ts b/packages/kbn-securitysolution-io-ts-list-types/src/request/read_endpoint_list_item_schema/index.mock.ts deleted file mode 100644 index d7850f0cca32..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_endpoint_list_item_schema/index.mock.ts +++ /dev/null @@ -1,17 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { ID, ITEM_ID } from '../../constants/index.mock'; - -import { ReadEndpointListItemSchema } from '.'; - -export const getReadEndpointListItemSchemaMock = (): ReadEndpointListItemSchema => ({ - id: ID, - item_id: ITEM_ID, -}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_item_schema/index.mock.ts b/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_item_schema/index.mock.ts deleted file mode 100644 index 00e72dc68f5f..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_item_schema/index.mock.ts +++ /dev/null @@ -1,18 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { ID, ITEM_ID, NAMESPACE_TYPE } from '../../constants/index.mock'; - -import { ReadExceptionListItemSchema } from '.'; - -export const getReadExceptionListItemSchemaMock = (): ReadExceptionListItemSchema => ({ - id: ID, - item_id: ITEM_ID, - namespace_type: NAMESPACE_TYPE, -}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_schema/index.mock.ts b/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_schema/index.mock.ts deleted file mode 100644 index 47fcba01fd95..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_schema/index.mock.ts +++ /dev/null @@ -1,18 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { ID, LIST_ID, NAMESPACE_TYPE } from '../../constants/index.mock'; - -import { ReadExceptionListSchema } from '.'; - -export const getReadExceptionListSchemaMock = (): ReadExceptionListSchema => ({ - id: ID, - list_id: LIST_ID, - namespace_type: NAMESPACE_TYPE, -}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_item_schema/index.mock.ts b/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_item_schema/index.mock.ts deleted file mode 100644 index d78bb6f44bc7..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_item_schema/index.mock.ts +++ /dev/null @@ -1,18 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { LIST_ID, LIST_ITEM_ID, VALUE } from '../../constants/index.mock'; - -import { ReadListItemSchema } from '.'; - -export const getReadListItemSchemaMock = (): ReadListItemSchema => ({ - id: LIST_ITEM_ID, - list_id: LIST_ID, - value: VALUE, -}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_schema/index.mock.ts b/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_schema/index.mock.ts deleted file mode 100644 index 5eecbd49e472..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_schema/index.mock.ts +++ /dev/null @@ -1,16 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { LIST_ID } from '../../constants/index.mock'; - -import { ReadListSchema } from '.'; - -export const getReadListSchemaMock = (): ReadListSchema => ({ - id: LIST_ID, -}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_schema/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_schema/index.ts deleted file mode 100644 index b9c008287139..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_schema/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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import * as t from 'io-ts'; - -import { id } from '../../common/id'; - -export const readListSchema = t.exact( - t.type({ - id, - }) -); - -export type ReadListSchema = t.OutputOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/acknowledge_schema/index.mock.ts b/packages/kbn-securitysolution-io-ts-list-types/src/response/acknowledge_schema/index.mock.ts deleted file mode 100644 index c532dd740197..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/acknowledge_schema/index.mock.ts +++ /dev/null @@ -1,14 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { AcknowledgeSchema } from '.'; - -export const getAcknowledgeSchemaResponseMock = (): AcknowledgeSchema => ({ - acknowledged: true, -}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/acknowledge_schema/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/response/acknowledge_schema/index.ts deleted file mode 100644 index d506f038534d..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/acknowledge_schema/index.ts +++ /dev/null @@ -1,14 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import * as t from 'io-ts'; - -export const acknowledgeSchema = t.exact(t.type({ acknowledged: t.boolean })); - -export type AcknowledgeSchema = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/create_endpoint_list_schema/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/response/create_endpoint_list_schema/index.ts deleted file mode 100644 index cdcdc8e67e07..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/create_endpoint_list_schema/index.ts +++ /dev/null @@ -1,15 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import * as t from 'io-ts'; -import { exceptionListSchema } from '../exception_list_schema'; - -export const createEndpointListSchema = t.union([exceptionListSchema, t.exact(t.type({}))]); - -export type CreateEndpointListSchema = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_summary_schema/index.mock.ts b/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_summary_schema/index.mock.ts deleted file mode 100644 index 1decbde1374b..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_summary_schema/index.mock.ts +++ /dev/null @@ -1,17 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { ExceptionListSummarySchema } from '.'; - -export const getListSummaryResponseMock = (): ExceptionListSummarySchema => ({ - windows: 0, - linux: 1, - macos: 2, - total: 3, -}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/found_all_list_items_schema/index.mock.ts b/packages/kbn-securitysolution-io-ts-list-types/src/response/found_all_list_items_schema/index.mock.ts deleted file mode 100644 index 7f6ec6e8bd5c..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/found_all_list_items_schema/index.mock.ts +++ /dev/null @@ -1,16 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { FoundAllListItemsSchema } from '.'; -import { getListItemResponseMock } from '../list_item_schema/index.mock'; - -export const getFoundAllListItemsSchemaMock = (): FoundAllListItemsSchema => ({ - data: [getListItemResponseMock()], - total: 1, -}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_schema/index.mock.ts b/packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_schema/index.mock.ts deleted file mode 100644 index 232de4d47c15..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_schema/index.mock.ts +++ /dev/null @@ -1,19 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { FoundListSchema } from '.'; -import { getListResponseMock } from '../list_schema/index.mock'; - -export const getFoundListSchemaMock = (): FoundListSchema => ({ - cursor: '123', - data: [getListResponseMock()], - page: 1, - per_page: 1, - total: 1, -}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/found_lists_by_size_schema/index.mock.ts b/packages/kbn-securitysolution-io-ts-list-types/src/response/found_lists_by_size_schema/index.mock.ts deleted file mode 100644 index bd654ccde56e..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/found_lists_by_size_schema/index.mock.ts +++ /dev/null @@ -1,16 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { FoundListsBySizeSchema } from '.'; -import { getListResponseMock } from '../list_schema/index.mock'; - -export const getFoundListsBySizeSchemaMock = (): FoundListsBySizeSchema => ({ - smallLists: [getListResponseMock()], - largeLists: [getListResponseMock()], -}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_index_exist_schema/index.mock.ts b/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_index_exist_schema/index.mock.ts deleted file mode 100644 index eff892b3f00b..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_index_exist_schema/index.mock.ts +++ /dev/null @@ -1,15 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { ListItemIndexExistSchema } from '.'; - -export const getListItemIndexExistSchemaResponseMock = (): ListItemIndexExistSchema => ({ - list_index: true, - list_item_index: true, -}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_index_exist_schema/index.ts b/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_index_exist_schema/index.ts deleted file mode 100644 index 494af4e3e759..000000000000 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_index_exist_schema/index.ts +++ /dev/null @@ -1,19 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import * as t from 'io-ts'; - -export const listItemIndexExistSchema = t.exact( - t.type({ - list_index: t.boolean, - list_item_index: t.boolean, - }) -); - -export type ListItemIndexExistSchema = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-types/jest.config.js b/packages/kbn-securitysolution-io-ts-types/jest.config.js deleted file mode 100644 index c6efe620b09f..000000000000 --- a/packages/kbn-securitysolution-io-ts-types/jest.config.js +++ /dev/null @@ -1,14 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -module.exports = { - preset: '@kbn/test', - rootDir: '../..', - roots: ['/packages/kbn-securitysolution-io-ts-types'], -}; diff --git a/packages/kbn-securitysolution-io-ts-utils/jest.config.js b/packages/kbn-securitysolution-io-ts-utils/jest.config.js deleted file mode 100644 index 457ac315951b..000000000000 --- a/packages/kbn-securitysolution-io-ts-utils/jest.config.js +++ /dev/null @@ -1,14 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -module.exports = { - preset: '@kbn/test', - rootDir: '../..', - roots: ['/packages/kbn-securitysolution-io-ts-utils'], -}; diff --git a/packages/kbn-securitysolution-list-api/index.ts b/packages/kbn-securitysolution-list-api/index.ts deleted file mode 100644 index fc434f01c7ec..000000000000 --- a/packages/kbn-securitysolution-list-api/index.ts +++ /dev/null @@ -1,14 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -export * from './src/api'; -export * from './src/fp_utils'; -export * from './src/list_api'; -export * from './src/list_item_api'; -export * from './src/types'; diff --git a/packages/kbn-securitysolution-list-api/jest.config.js b/packages/kbn-securitysolution-list-api/jest.config.js deleted file mode 100644 index 434cef2b7ca3..000000000000 --- a/packages/kbn-securitysolution-list-api/jest.config.js +++ /dev/null @@ -1,14 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -module.exports = { - preset: '@kbn/test', - rootDir: '../..', - roots: ['/packages/kbn-securitysolution-list-api'], -}; diff --git a/packages/kbn-securitysolution-list-api/src/list_api/mocks/response/acknowledge_schema.mock.ts b/packages/kbn-securitysolution-list-api/src/list_api/mocks/response/acknowledge_schema.mock.ts deleted file mode 100644 index 788fab714e2d..000000000000 --- a/packages/kbn-securitysolution-list-api/src/list_api/mocks/response/acknowledge_schema.mock.ts +++ /dev/null @@ -1,14 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import type { AcknowledgeSchema } from '@kbn/securitysolution-io-ts-list-types'; - -export const getAcknowledgeSchemaResponseMock = (): AcknowledgeSchema => ({ - acknowledged: true, -}); diff --git a/packages/kbn-securitysolution-list-api/src/list_api/mocks/response/list_item_index_exist_schema.mock.ts b/packages/kbn-securitysolution-list-api/src/list_api/mocks/response/list_item_index_exist_schema.mock.ts deleted file mode 100644 index 27a54a5fd96f..000000000000 --- a/packages/kbn-securitysolution-list-api/src/list_api/mocks/response/list_item_index_exist_schema.mock.ts +++ /dev/null @@ -1,15 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import type { ListItemIndexExistSchema } from '@kbn/securitysolution-io-ts-list-types'; - -export const getListItemIndexExistSchemaResponseMock = (): ListItemIndexExistSchema => ({ - list_index: true, - list_item_index: true, -}); diff --git a/packages/kbn-securitysolution-list-hooks/jest.config.js b/packages/kbn-securitysolution-list-hooks/jest.config.js deleted file mode 100644 index f5fadd8bf399..000000000000 --- a/packages/kbn-securitysolution-list-hooks/jest.config.js +++ /dev/null @@ -1,14 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -module.exports = { - preset: '@kbn/test', - rootDir: '../..', - roots: ['/packages/kbn-securitysolution-list-hooks'], -}; diff --git a/packages/kbn-securitysolution-list-hooks/src/constants.ts b/packages/kbn-securitysolution-list-hooks/src/constants.ts deleted file mode 100644 index 333fb40ca4ca..000000000000 --- a/packages/kbn-securitysolution-list-hooks/src/constants.ts +++ /dev/null @@ -1,10 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -export const READ_INDEX_QUERY_KEY = ['detectionEngine', 'listIndex']; diff --git a/packages/kbn-securitysolution-list-hooks/src/use_delete_list/index.ts b/packages/kbn-securitysolution-list-hooks/src/use_delete_list/index.ts deleted file mode 100644 index fe88e19f8489..000000000000 --- a/packages/kbn-securitysolution-list-hooks/src/use_delete_list/index.ts +++ /dev/null @@ -1,15 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { deleteList } from '@kbn/securitysolution-list-api'; -import { useAsync, withOptionalSignal } from '@kbn/securitysolution-hook-utils'; - -const deleteListWithOptionalSignal = withOptionalSignal(deleteList); - -export const useDeleteList = () => useAsync(deleteListWithOptionalSignal); diff --git a/packages/kbn-securitysolution-list-hooks/src/use_export_list/index.ts b/packages/kbn-securitysolution-list-hooks/src/use_export_list/index.ts deleted file mode 100644 index 77a213cc47b9..000000000000 --- a/packages/kbn-securitysolution-list-hooks/src/use_export_list/index.ts +++ /dev/null @@ -1,15 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { exportList } from '@kbn/securitysolution-list-api'; -import { useAsync, withOptionalSignal } from '@kbn/securitysolution-hook-utils'; - -const exportListWithOptionalSignal = withOptionalSignal(exportList); - -export const useExportList = () => useAsync(exportListWithOptionalSignal); diff --git a/packages/kbn-securitysolution-list-hooks/src/use_find_lists/index.ts b/packages/kbn-securitysolution-list-hooks/src/use_find_lists/index.ts deleted file mode 100644 index a33e3ba9f860..000000000000 --- a/packages/kbn-securitysolution-list-hooks/src/use_find_lists/index.ts +++ /dev/null @@ -1,15 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { findLists } from '@kbn/securitysolution-list-api'; -import { useAsync, withOptionalSignal } from '@kbn/securitysolution-hook-utils'; - -const findListsWithOptionalSignal = withOptionalSignal(findLists); - -export const useFindLists = () => useAsync(findListsWithOptionalSignal); diff --git a/packages/kbn-securitysolution-list-hooks/src/use_import_list/index.ts b/packages/kbn-securitysolution-list-hooks/src/use_import_list/index.ts deleted file mode 100644 index 1bbccd144801..000000000000 --- a/packages/kbn-securitysolution-list-hooks/src/use_import_list/index.ts +++ /dev/null @@ -1,15 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { importList } from '@kbn/securitysolution-list-api'; -import { useAsync, withOptionalSignal } from '@kbn/securitysolution-hook-utils'; - -const importListWithOptionalSignal = withOptionalSignal(importList); - -export const useImportList = () => useAsync(importListWithOptionalSignal); diff --git a/packages/kbn-securitysolution-list-utils/jest.config.js b/packages/kbn-securitysolution-list-utils/jest.config.js deleted file mode 100644 index b24a4fa543f7..000000000000 --- a/packages/kbn-securitysolution-list-utils/jest.config.js +++ /dev/null @@ -1,14 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -module.exports = { - preset: '@kbn/test', - rootDir: '../..', - roots: ['/packages/kbn-securitysolution-list-utils'], -}; diff --git a/packages/kbn-securitysolution-list-utils/src/has_large_value_list/index.ts b/packages/kbn-securitysolution-list-utils/src/has_large_value_list/index.ts deleted file mode 100644 index ef774b5c8cf1..000000000000 --- a/packages/kbn-securitysolution-list-utils/src/has_large_value_list/index.ts +++ /dev/null @@ -1,15 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import type { EntriesArray } from '@kbn/securitysolution-io-ts-list-types'; - -export const hasLargeValueList = (entries: EntriesArray): boolean => { - const found = entries.filter(({ type }) => type === 'list'); - return found.length > 0; -}; diff --git a/packages/kbn-securitysolution-t-grid/index.ts b/packages/kbn-securitysolution-t-grid/index.ts deleted file mode 100644 index fb5ebc443ccd..000000000000 --- a/packages/kbn-securitysolution-t-grid/index.ts +++ /dev/null @@ -1,13 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -export * from './src/constants'; -export * from './src/utils'; -// eslint-disable-next-line @kbn/imports/no_boundary_crossing -export * from './src/mock'; diff --git a/packages/kbn-securitysolution-t-grid/src/mock/index.ts b/packages/kbn-securitysolution-t-grid/src/mock/index.ts deleted file mode 100644 index 51a5726d914f..000000000000 --- a/packages/kbn-securitysolution-t-grid/src/mock/index.ts +++ /dev/null @@ -1,10 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -export * from './mock_event_details'; diff --git a/packages/kbn-securitysolution-t-grid/src/utils/index.ts b/packages/kbn-securitysolution-t-grid/src/utils/index.ts deleted file mode 100644 index c921565845e9..000000000000 --- a/packages/kbn-securitysolution-t-grid/src/utils/index.ts +++ /dev/null @@ -1,11 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -export * from './api'; -export * from './drag_and_drop'; diff --git a/packages/kbn-securitysolution-utils/index.ts b/packages/kbn-securitysolution-utils/index.ts deleted file mode 100644 index 8769a281e220..000000000000 --- a/packages/kbn-securitysolution-utils/index.ts +++ /dev/null @@ -1,15 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -export * from './src/add_remove_id_to_item'; -export * from './src/axios'; -export * from './src/transform_data_to_ndjson'; -export * from './src/path_validations'; -export * from './src/esql'; -export * from './src/debounce_async/debounce_async'; diff --git a/packages/kbn-securitysolution-utils/jest.config.js b/packages/kbn-securitysolution-utils/jest.config.js deleted file mode 100644 index 43e3bc62c156..000000000000 --- a/packages/kbn-securitysolution-utils/jest.config.js +++ /dev/null @@ -1,14 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -module.exports = { - preset: '@kbn/test', - rootDir: '../..', - roots: ['/packages/kbn-securitysolution-utils'], -}; diff --git a/packages/kbn-securitysolution-utils/src/esql/index.ts b/packages/kbn-securitysolution-utils/src/esql/index.ts deleted file mode 100644 index 930ff246988e..000000000000 --- a/packages/kbn-securitysolution-utils/src/esql/index.ts +++ /dev/null @@ -1,12 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -export * from './compute_if_esql_query_aggregating'; -export * from './get_index_list_from_esql_query'; -export * from './parse_esql_query'; diff --git a/packages/kbn-securitysolution-utils/src/transform_data_to_ndjson/index.ts b/packages/kbn-securitysolution-utils/src/transform_data_to_ndjson/index.ts deleted file mode 100644 index b20606c356ef..000000000000 --- a/packages/kbn-securitysolution-utils/src/transform_data_to_ndjson/index.ts +++ /dev/null @@ -1,17 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -export const transformDataToNdjson = (data: unknown[]): string => { - if (data.length !== 0) { - const dataString = data.map((item) => JSON.stringify(item)).join('\n'); - return `${dataString}\n`; - } else { - return ''; - } -}; diff --git a/src/dev/storybook/aliases.ts b/src/dev/storybook/aliases.ts index 4991ac0dfe44..c2c24528e3dc 100644 --- a/src/dev/storybook/aliases.ts +++ b/src/dev/storybook/aliases.ts @@ -49,7 +49,7 @@ export const storybookAliases = { inventory: 'x-pack/plugins/observability_solution/inventory/.storybook', investigate: 'x-pack/solutions/observability/plugins/investigate_app/.storybook', kibana_react: 'src/plugins/kibana_react/.storybook', - lists: 'x-pack/plugins/lists/.storybook', + lists: 'x-pack/solutions/security/plugins/lists/.storybook', logs_explorer: 'x-pack/plugins/observability_solution/logs_explorer/.storybook', management: 'packages/kbn-management/storybook/config', observability: 'x-pack/solutions/observability/plugins/observability/.storybook', diff --git a/packages/kbn-securitysolution-es-utils/README.md b/src/platform/packages/shared/kbn-securitysolution-es-utils/README.md similarity index 100% rename from packages/kbn-securitysolution-es-utils/README.md rename to src/platform/packages/shared/kbn-securitysolution-es-utils/README.md diff --git a/packages/kbn-securitysolution-es-utils/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/index.ts diff --git a/packages/kbn-securitysolution-hook-utils/jest.config.js b/src/platform/packages/shared/kbn-securitysolution-es-utils/jest.config.js similarity index 82% rename from packages/kbn-securitysolution-hook-utils/jest.config.js rename to src/platform/packages/shared/kbn-securitysolution-es-utils/jest.config.js index badea193370b..3a654a3a269e 100644 --- a/packages/kbn-securitysolution-hook-utils/jest.config.js +++ b/src/platform/packages/shared/kbn-securitysolution-es-utils/jest.config.js @@ -9,6 +9,6 @@ module.exports = { preset: '@kbn/test', - rootDir: '../..', - roots: ['/packages/kbn-securitysolution-hook-utils'], + rootDir: '../../../../..', + roots: ['/src/platform/packages/shared/kbn-securitysolution-es-utils'], }; diff --git a/packages/kbn-securitysolution-es-utils/kibana.jsonc b/src/platform/packages/shared/kbn-securitysolution-es-utils/kibana.jsonc similarity index 100% rename from packages/kbn-securitysolution-es-utils/kibana.jsonc rename to src/platform/packages/shared/kbn-securitysolution-es-utils/kibana.jsonc diff --git a/packages/kbn-securitysolution-es-utils/package.json b/src/platform/packages/shared/kbn-securitysolution-es-utils/package.json similarity index 100% rename from packages/kbn-securitysolution-es-utils/package.json rename to src/platform/packages/shared/kbn-securitysolution-es-utils/package.json diff --git a/packages/kbn-securitysolution-es-utils/src/bad_request_error/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/bad_request_error/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/bad_request_error/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/bad_request_error/index.ts diff --git a/packages/kbn-securitysolution-es-utils/src/create_boostrap_index/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/create_boostrap_index/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/create_boostrap_index/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/create_boostrap_index/index.ts diff --git a/packages/kbn-securitysolution-es-utils/src/create_data_stream/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/create_data_stream/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/create_data_stream/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/create_data_stream/index.ts diff --git a/packages/kbn-securitysolution-es-utils/src/decode_version/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/decode_version/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/decode_version/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/decode_version/index.ts diff --git a/packages/kbn-securitysolution-es-utils/src/delete_all_index/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/delete_all_index/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/delete_all_index/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/delete_all_index/index.ts diff --git a/packages/kbn-securitysolution-es-utils/src/delete_data_stream/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/delete_data_stream/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/delete_data_stream/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/delete_data_stream/index.ts diff --git a/packages/kbn-securitysolution-es-utils/src/delete_index_template/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/delete_index_template/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/delete_index_template/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/delete_index_template/index.ts diff --git a/packages/kbn-securitysolution-es-utils/src/delete_policy/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/delete_policy/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/delete_policy/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/delete_policy/index.ts diff --git a/packages/kbn-securitysolution-es-utils/src/delete_template/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/delete_template/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/delete_template/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/delete_template/index.ts diff --git a/packages/kbn-securitysolution-es-utils/src/elasticsearch_client/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/elasticsearch_client/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/elasticsearch_client/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/elasticsearch_client/index.ts diff --git a/packages/kbn-securitysolution-es-utils/src/encode_hit_version/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/encode_hit_version/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/encode_hit_version/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/encode_hit_version/index.ts diff --git a/packages/kbn-securitysolution-es-utils/src/get_bootstrap_index_exists/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/get_bootstrap_index_exists/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/get_bootstrap_index_exists/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/get_bootstrap_index_exists/index.ts diff --git a/packages/kbn-securitysolution-es-utils/src/get_data_stream_exists/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/get_data_stream_exists/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/get_data_stream_exists/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/get_data_stream_exists/index.ts diff --git a/packages/kbn-securitysolution-es-utils/src/get_index_aliases/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/get_index_aliases/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/get_index_aliases/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/get_index_aliases/index.ts diff --git a/packages/kbn-securitysolution-es-utils/src/get_index_count/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/get_index_count/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/get_index_count/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/get_index_count/index.ts diff --git a/packages/kbn-securitysolution-es-utils/src/get_index_exists/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/get_index_exists/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/get_index_exists/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/get_index_exists/index.ts diff --git a/packages/kbn-securitysolution-es-utils/src/get_index_template_exists/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/get_index_template_exists/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/get_index_template_exists/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/get_index_template_exists/index.ts diff --git a/packages/kbn-securitysolution-es-utils/src/get_policy_exists/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/get_policy_exists/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/get_policy_exists/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/get_policy_exists/index.ts diff --git a/packages/kbn-securitysolution-es-utils/src/get_template_exists/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/get_template_exists/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/get_template_exists/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/get_template_exists/index.ts diff --git a/packages/kbn-securitysolution-es-utils/src/migrate_to_data_stream/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/migrate_to_data_stream/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/migrate_to_data_stream/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/migrate_to_data_stream/index.ts diff --git a/packages/kbn-securitysolution-es-utils/src/put_mappings/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/put_mappings/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/put_mappings/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/put_mappings/index.ts diff --git a/packages/kbn-securitysolution-es-utils/src/read_index/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/read_index/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/read_index/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/read_index/index.ts diff --git a/packages/kbn-securitysolution-es-utils/src/read_privileges/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/read_privileges/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/read_privileges/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/read_privileges/index.ts diff --git a/packages/kbn-securitysolution-es-utils/src/remove_policy_from_index/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/remove_policy_from_index/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/remove_policy_from_index/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/remove_policy_from_index/index.ts diff --git a/packages/kbn-securitysolution-es-utils/src/set_index_template/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/set_index_template/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/set_index_template/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/set_index_template/index.ts diff --git a/packages/kbn-securitysolution-es-utils/src/set_policy/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/set_policy/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/set_policy/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/set_policy/index.ts diff --git a/packages/kbn-securitysolution-es-utils/src/set_template/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/set_template/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/set_template/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/set_template/index.ts diff --git a/packages/kbn-securitysolution-es-utils/src/transform_error/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/transform_error/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/transform_error/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/transform_error/index.test.ts diff --git a/packages/kbn-securitysolution-es-utils/src/transform_error/index.ts b/src/platform/packages/shared/kbn-securitysolution-es-utils/src/transform_error/index.ts similarity index 100% rename from packages/kbn-securitysolution-es-utils/src/transform_error/index.ts rename to src/platform/packages/shared/kbn-securitysolution-es-utils/src/transform_error/index.ts diff --git a/packages/kbn-securitysolution-es-utils/tsconfig.json b/src/platform/packages/shared/kbn-securitysolution-es-utils/tsconfig.json similarity index 83% rename from packages/kbn-securitysolution-es-utils/tsconfig.json rename to src/platform/packages/shared/kbn-securitysolution-es-utils/tsconfig.json index e584d504cc9c..5a16f6bdaff6 100644 --- a/packages/kbn-securitysolution-es-utils/tsconfig.json +++ b/src/platform/packages/shared/kbn-securitysolution-es-utils/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", "types": [ diff --git a/packages/kbn-securitysolution-io-ts-types/README.md b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/README.md similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/README.md rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/README.md diff --git a/packages/kbn-securitysolution-io-ts-types/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/index.ts diff --git a/packages/kbn-securitysolution-autocomplete/jest.config.js b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/jest.config.js similarity index 81% rename from packages/kbn-securitysolution-autocomplete/jest.config.js rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/jest.config.js index b7d1e59f7786..309c3085d744 100644 --- a/packages/kbn-securitysolution-autocomplete/jest.config.js +++ b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/jest.config.js @@ -9,6 +9,6 @@ module.exports = { preset: '@kbn/test', - rootDir: '../..', - roots: ['/packages/kbn-securitysolution-autocomplete'], + rootDir: '../../../../..', + roots: ['/src/platform/packages/shared/kbn-securitysolution-io-ts-types'], }; diff --git a/packages/kbn-securitysolution-io-ts-types/kibana.jsonc b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/kibana.jsonc similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/kibana.jsonc rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/kibana.jsonc diff --git a/packages/kbn-securitysolution-io-ts-types/package.json b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/package.json similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/package.json rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/package.json diff --git a/packages/kbn-securitysolution-io-ts-types/src/default_array/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_array/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/default_array/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_array/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/default_array/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_array/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/default_array/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_array/index.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/default_boolean_false/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_boolean_false/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/default_boolean_false/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_boolean_false/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/default_boolean_false/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_boolean_false/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/default_boolean_false/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_boolean_false/index.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/default_boolean_true/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_boolean_true/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/default_boolean_true/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_boolean_true/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/default_boolean_true/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_boolean_true/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/default_boolean_true/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_boolean_true/index.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/default_csv_array/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_csv_array/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/default_csv_array/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_csv_array/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/default_csv_array/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_csv_array/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/default_csv_array/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_csv_array/index.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/default_empty_string/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_empty_string/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/default_empty_string/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_empty_string/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/default_empty_string/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_empty_string/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/default_empty_string/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_empty_string/index.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/default_string_array/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_string_array/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/default_string_array/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_string_array/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/default_string_array/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_string_array/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/default_string_array/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_string_array/index.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/default_string_boolean_false/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_string_boolean_false/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/default_string_boolean_false/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_string_boolean_false/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/default_string_boolean_false/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_string_boolean_false/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/default_string_boolean_false/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_string_boolean_false/index.ts diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_uuid/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_uuid/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/default_uuid/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_uuid/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/default_uuid/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_uuid/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/default_uuid/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_uuid/index.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/default_value/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_value/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/default_value/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_value/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/default_value/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_value/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/default_value/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_value/index.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/default_version_number/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_version_number/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/default_version_number/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_version_number/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/default_version_number/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_version_number/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/default_version_number/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/default_version_number/index.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/empty_string_array/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/empty_string_array/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/empty_string_array/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/empty_string_array/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/empty_string_array/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/empty_string_array/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/empty_string_array/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/empty_string_array/index.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/enumeration/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/enumeration/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/enumeration/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/enumeration/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/enumeration/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/enumeration/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/enumeration/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/enumeration/index.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/import_query_schema/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/import_query_schema/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/import_query_schema/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/import_query_schema/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/import_query_schema/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/import_query_schema/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/import_query_schema/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/import_query_schema/index.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/iso_date_string/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/iso_date_string/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/iso_date_string/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/iso_date_string/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/iso_date_string/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/iso_date_string/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/iso_date_string/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/iso_date_string/index.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/limited_size_array/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/limited_size_array/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/limited_size_array/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/limited_size_array/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/limited_size_array/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/limited_size_array/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/limited_size_array/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/limited_size_array/index.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/non_empty_array/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/non_empty_array/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/non_empty_array/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/non_empty_array/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/non_empty_array/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/non_empty_array/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/non_empty_array/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/non_empty_array/index.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/non_empty_or_nullable_string_array/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/non_empty_or_nullable_string_array/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/non_empty_or_nullable_string_array/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/non_empty_or_nullable_string_array/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/non_empty_or_nullable_string_array/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/non_empty_or_nullable_string_array/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/non_empty_or_nullable_string_array/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/non_empty_or_nullable_string_array/index.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/non_empty_string/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/non_empty_string/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/non_empty_string/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/non_empty_string/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/non_empty_string/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/non_empty_string/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/non_empty_string/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/non_empty_string/index.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/non_empty_string_array/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/non_empty_string_array/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/non_empty_string_array/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/non_empty_string_array/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/non_empty_string_array/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/non_empty_string_array/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/non_empty_string_array/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/non_empty_string_array/index.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/number_between_zero_and_one_inclusive/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/number_between_zero_and_one_inclusive/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/number_between_zero_and_one_inclusive/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/number_between_zero_and_one_inclusive/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/number_between_zero_and_one_inclusive/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/number_between_zero_and_one_inclusive/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/number_between_zero_and_one_inclusive/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/number_between_zero_and_one_inclusive/index.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/only_false_allowed/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/only_false_allowed/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/only_false_allowed/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/only_false_allowed/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/only_false_allowed/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/only_false_allowed/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/only_false_allowed/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/only_false_allowed/index.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/operator/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/operator/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/operator/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/operator/index.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/positive_integer/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/positive_integer/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/positive_integer/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/positive_integer/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/positive_integer/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/positive_integer/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/positive_integer/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/positive_integer/index.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/positive_integer_greater_than_zero/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/positive_integer_greater_than_zero/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/positive_integer_greater_than_zero/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/positive_integer_greater_than_zero/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/positive_integer_greater_than_zero/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/positive_integer_greater_than_zero/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/positive_integer_greater_than_zero/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/positive_integer_greater_than_zero/index.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/string_to_positive_number/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/string_to_positive_number/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/string_to_positive_number/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/string_to_positive_number/index.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/time_duration/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/time_duration/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/time_duration/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/time_duration/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/time_duration/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/time_duration/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/time_duration/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/time_duration/index.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/uuid/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/uuid/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/uuid/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/uuid/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/uuid/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/uuid/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/uuid/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/uuid/index.ts diff --git a/packages/kbn-securitysolution-io-ts-types/src/version/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/version/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-types/src/version/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/src/version/index.ts diff --git a/packages/kbn-securitysolution-io-ts-types/tsconfig.json b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/tsconfig.json similarity index 83% rename from packages/kbn-securitysolution-io-ts-types/tsconfig.json rename to src/platform/packages/shared/kbn-securitysolution-io-ts-types/tsconfig.json index 25b82d38b7dc..6bc8a84da337 100644 --- a/packages/kbn-securitysolution-io-ts-types/tsconfig.json +++ b/src/platform/packages/shared/kbn-securitysolution-io-ts-types/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", "types": [ diff --git a/packages/kbn-securitysolution-io-ts-utils/README.md b/src/platform/packages/shared/kbn-securitysolution-io-ts-utils/README.md similarity index 100% rename from packages/kbn-securitysolution-io-ts-utils/README.md rename to src/platform/packages/shared/kbn-securitysolution-io-ts-utils/README.md diff --git a/packages/kbn-securitysolution-io-ts-utils/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-utils/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-utils/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-utils/index.ts diff --git a/packages/kbn-securitysolution-es-utils/jest.config.js b/src/platform/packages/shared/kbn-securitysolution-io-ts-utils/jest.config.js similarity index 81% rename from packages/kbn-securitysolution-es-utils/jest.config.js rename to src/platform/packages/shared/kbn-securitysolution-io-ts-utils/jest.config.js index 5d52b2d390b5..cfa70556f4b8 100644 --- a/packages/kbn-securitysolution-es-utils/jest.config.js +++ b/src/platform/packages/shared/kbn-securitysolution-io-ts-utils/jest.config.js @@ -9,6 +9,6 @@ module.exports = { preset: '@kbn/test', - rootDir: '../..', - roots: ['/packages/kbn-securitysolution-es-utils'], + rootDir: '../../../../..', + roots: ['/src/platform/packages/shared/kbn-securitysolution-io-ts-utils'], }; diff --git a/packages/kbn-securitysolution-io-ts-utils/kibana.jsonc b/src/platform/packages/shared/kbn-securitysolution-io-ts-utils/kibana.jsonc similarity index 100% rename from packages/kbn-securitysolution-io-ts-utils/kibana.jsonc rename to src/platform/packages/shared/kbn-securitysolution-io-ts-utils/kibana.jsonc diff --git a/packages/kbn-securitysolution-io-ts-utils/package.json b/src/platform/packages/shared/kbn-securitysolution-io-ts-utils/package.json similarity index 100% rename from packages/kbn-securitysolution-io-ts-utils/package.json rename to src/platform/packages/shared/kbn-securitysolution-io-ts-utils/package.json diff --git a/packages/kbn-securitysolution-io-ts-utils/src/exact_check/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-utils/src/exact_check/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-utils/src/exact_check/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-utils/src/exact_check/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-utils/src/exact_check/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-utils/src/exact_check/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-utils/src/exact_check/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-utils/src/exact_check/index.ts diff --git a/packages/kbn-securitysolution-io-ts-utils/src/format_errors/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-utils/src/format_errors/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-utils/src/format_errors/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-utils/src/format_errors/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-utils/src/format_errors/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-utils/src/format_errors/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-utils/src/format_errors/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-utils/src/format_errors/index.ts diff --git a/packages/kbn-securitysolution-io-ts-utils/src/parse_schedule_dates/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-utils/src/parse_schedule_dates/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-utils/src/parse_schedule_dates/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-utils/src/parse_schedule_dates/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-utils/src/parse_schedule_dates/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-utils/src/parse_schedule_dates/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-utils/src/parse_schedule_dates/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-utils/src/parse_schedule_dates/index.ts diff --git a/packages/kbn-securitysolution-io-ts-utils/src/test_utils/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-utils/src/test_utils/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-utils/src/test_utils/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-utils/src/test_utils/index.ts diff --git a/packages/kbn-securitysolution-io-ts-utils/src/validate/index.test.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-utils/src/validate/index.test.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-utils/src/validate/index.test.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-utils/src/validate/index.test.ts diff --git a/packages/kbn-securitysolution-io-ts-utils/src/validate/index.ts b/src/platform/packages/shared/kbn-securitysolution-io-ts-utils/src/validate/index.ts similarity index 100% rename from packages/kbn-securitysolution-io-ts-utils/src/validate/index.ts rename to src/platform/packages/shared/kbn-securitysolution-io-ts-utils/src/validate/index.ts diff --git a/packages/kbn-securitysolution-io-ts-utils/tsconfig.json b/src/platform/packages/shared/kbn-securitysolution-io-ts-utils/tsconfig.json similarity index 82% rename from packages/kbn-securitysolution-io-ts-utils/tsconfig.json rename to src/platform/packages/shared/kbn-securitysolution-io-ts-utils/tsconfig.json index 13f8244edd1a..ca5354ad56e4 100644 --- a/packages/kbn-securitysolution-io-ts-utils/tsconfig.json +++ b/src/platform/packages/shared/kbn-securitysolution-io-ts-utils/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", "types": [ diff --git a/packages/kbn-securitysolution-rules/README.md b/src/platform/packages/shared/kbn-securitysolution-rules/README.md similarity index 100% rename from packages/kbn-securitysolution-rules/README.md rename to src/platform/packages/shared/kbn-securitysolution-rules/README.md diff --git a/packages/kbn-securitysolution-rules/index.ts b/src/platform/packages/shared/kbn-securitysolution-rules/index.ts similarity index 100% rename from packages/kbn-securitysolution-rules/index.ts rename to src/platform/packages/shared/kbn-securitysolution-rules/index.ts diff --git a/packages/kbn-securitysolution-rules/kibana.jsonc b/src/platform/packages/shared/kbn-securitysolution-rules/kibana.jsonc similarity index 100% rename from packages/kbn-securitysolution-rules/kibana.jsonc rename to src/platform/packages/shared/kbn-securitysolution-rules/kibana.jsonc diff --git a/packages/kbn-securitysolution-rules/package.json b/src/platform/packages/shared/kbn-securitysolution-rules/package.json similarity index 100% rename from packages/kbn-securitysolution-rules/package.json rename to src/platform/packages/shared/kbn-securitysolution-rules/package.json diff --git a/packages/kbn-securitysolution-rules/src/configuration_constants.ts b/src/platform/packages/shared/kbn-securitysolution-rules/src/configuration_constants.ts similarity index 100% rename from packages/kbn-securitysolution-rules/src/configuration_constants.ts rename to src/platform/packages/shared/kbn-securitysolution-rules/src/configuration_constants.ts diff --git a/packages/kbn-securitysolution-rules/src/rule_type_constants.ts b/src/platform/packages/shared/kbn-securitysolution-rules/src/rule_type_constants.ts similarity index 100% rename from packages/kbn-securitysolution-rules/src/rule_type_constants.ts rename to src/platform/packages/shared/kbn-securitysolution-rules/src/rule_type_constants.ts diff --git a/packages/kbn-securitysolution-rules/src/rule_type_mappings.ts b/src/platform/packages/shared/kbn-securitysolution-rules/src/rule_type_mappings.ts similarity index 100% rename from packages/kbn-securitysolution-rules/src/rule_type_mappings.ts rename to src/platform/packages/shared/kbn-securitysolution-rules/src/rule_type_mappings.ts diff --git a/packages/kbn-securitysolution-rules/src/utils.ts b/src/platform/packages/shared/kbn-securitysolution-rules/src/utils.ts similarity index 100% rename from packages/kbn-securitysolution-rules/src/utils.ts rename to src/platform/packages/shared/kbn-securitysolution-rules/src/utils.ts diff --git a/packages/kbn-securitysolution-rules/tsconfig.json b/src/platform/packages/shared/kbn-securitysolution-rules/tsconfig.json similarity index 78% rename from packages/kbn-securitysolution-rules/tsconfig.json rename to src/platform/packages/shared/kbn-securitysolution-rules/tsconfig.json index 9bd4f35cf62a..131ff3e6bb43 100644 --- a/packages/kbn-securitysolution-rules/tsconfig.json +++ b/src/platform/packages/shared/kbn-securitysolution-rules/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", "types": [ diff --git a/tsconfig.base.json b/tsconfig.base.json index 9b760a854bb5..e8b6704a950d 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1160,8 +1160,8 @@ "@kbn/lint-packages-cli/*": ["packages/kbn-lint-packages-cli/*"], "@kbn/lint-ts-projects-cli": ["packages/kbn-lint-ts-projects-cli"], "@kbn/lint-ts-projects-cli/*": ["packages/kbn-lint-ts-projects-cli/*"], - "@kbn/lists-plugin": ["x-pack/plugins/lists"], - "@kbn/lists-plugin/*": ["x-pack/plugins/lists/*"], + "@kbn/lists-plugin": ["x-pack/solutions/security/plugins/lists"], + "@kbn/lists-plugin/*": ["x-pack/solutions/security/plugins/lists/*"], "@kbn/llm-tasks-plugin": ["x-pack/platform/plugins/shared/ai_infra/llm_tasks"], "@kbn/llm-tasks-plugin/*": ["x-pack/platform/plugins/shared/ai_infra/llm_tasks/*"], "@kbn/locator-examples-plugin": ["examples/locator_examples"], @@ -1656,46 +1656,46 @@ "@kbn/security-test-endpoints-plugin/*": ["x-pack/test/security_functional/plugins/test_endpoints/*"], "@kbn/security-ui-components": ["x-pack/packages/security/ui_components"], "@kbn/security-ui-components/*": ["x-pack/packages/security/ui_components/*"], - "@kbn/securitysolution-autocomplete": ["packages/kbn-securitysolution-autocomplete"], - "@kbn/securitysolution-autocomplete/*": ["packages/kbn-securitysolution-autocomplete/*"], + "@kbn/securitysolution-autocomplete": ["x-pack/solutions/security/packages/kbn-securitysolution-autocomplete"], + "@kbn/securitysolution-autocomplete/*": ["x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/*"], "@kbn/securitysolution-data-table": ["x-pack/solutions/security/packages/data_table"], "@kbn/securitysolution-data-table/*": ["x-pack/solutions/security/packages/data_table/*"], "@kbn/securitysolution-ecs": ["src/platform/packages/shared/kbn-securitysolution-ecs"], "@kbn/securitysolution-ecs/*": ["src/platform/packages/shared/kbn-securitysolution-ecs/*"], - "@kbn/securitysolution-endpoint-exceptions-common": ["packages/kbn-securitysolution-endpoint-exceptions-common"], - "@kbn/securitysolution-endpoint-exceptions-common/*": ["packages/kbn-securitysolution-endpoint-exceptions-common/*"], - "@kbn/securitysolution-es-utils": ["packages/kbn-securitysolution-es-utils"], - "@kbn/securitysolution-es-utils/*": ["packages/kbn-securitysolution-es-utils/*"], - "@kbn/securitysolution-exception-list-components": ["packages/kbn-securitysolution-exception-list-components"], - "@kbn/securitysolution-exception-list-components/*": ["packages/kbn-securitysolution-exception-list-components/*"], - "@kbn/securitysolution-exceptions-common": ["packages/kbn-securitysolution-exceptions-common"], - "@kbn/securitysolution-exceptions-common/*": ["packages/kbn-securitysolution-exceptions-common/*"], - "@kbn/securitysolution-hook-utils": ["packages/kbn-securitysolution-hook-utils"], - "@kbn/securitysolution-hook-utils/*": ["packages/kbn-securitysolution-hook-utils/*"], - "@kbn/securitysolution-io-ts-alerting-types": ["packages/kbn-securitysolution-io-ts-alerting-types"], - "@kbn/securitysolution-io-ts-alerting-types/*": ["packages/kbn-securitysolution-io-ts-alerting-types/*"], - "@kbn/securitysolution-io-ts-list-types": ["packages/kbn-securitysolution-io-ts-list-types"], - "@kbn/securitysolution-io-ts-list-types/*": ["packages/kbn-securitysolution-io-ts-list-types/*"], - "@kbn/securitysolution-io-ts-types": ["packages/kbn-securitysolution-io-ts-types"], - "@kbn/securitysolution-io-ts-types/*": ["packages/kbn-securitysolution-io-ts-types/*"], - "@kbn/securitysolution-io-ts-utils": ["packages/kbn-securitysolution-io-ts-utils"], - "@kbn/securitysolution-io-ts-utils/*": ["packages/kbn-securitysolution-io-ts-utils/*"], - "@kbn/securitysolution-list-api": ["packages/kbn-securitysolution-list-api"], - "@kbn/securitysolution-list-api/*": ["packages/kbn-securitysolution-list-api/*"], - "@kbn/securitysolution-list-constants": ["packages/kbn-securitysolution-list-constants"], - "@kbn/securitysolution-list-constants/*": ["packages/kbn-securitysolution-list-constants/*"], - "@kbn/securitysolution-list-hooks": ["packages/kbn-securitysolution-list-hooks"], - "@kbn/securitysolution-list-hooks/*": ["packages/kbn-securitysolution-list-hooks/*"], - "@kbn/securitysolution-list-utils": ["packages/kbn-securitysolution-list-utils"], - "@kbn/securitysolution-list-utils/*": ["packages/kbn-securitysolution-list-utils/*"], - "@kbn/securitysolution-lists-common": ["packages/kbn-securitysolution-lists-common"], - "@kbn/securitysolution-lists-common/*": ["packages/kbn-securitysolution-lists-common/*"], - "@kbn/securitysolution-rules": ["packages/kbn-securitysolution-rules"], - "@kbn/securitysolution-rules/*": ["packages/kbn-securitysolution-rules/*"], - "@kbn/securitysolution-t-grid": ["packages/kbn-securitysolution-t-grid"], - "@kbn/securitysolution-t-grid/*": ["packages/kbn-securitysolution-t-grid/*"], - "@kbn/securitysolution-utils": ["packages/kbn-securitysolution-utils"], - "@kbn/securitysolution-utils/*": ["packages/kbn-securitysolution-utils/*"], + "@kbn/securitysolution-endpoint-exceptions-common": ["x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common"], + "@kbn/securitysolution-endpoint-exceptions-common/*": ["x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/*"], + "@kbn/securitysolution-es-utils": ["src/platform/packages/shared/kbn-securitysolution-es-utils"], + "@kbn/securitysolution-es-utils/*": ["src/platform/packages/shared/kbn-securitysolution-es-utils/*"], + "@kbn/securitysolution-exception-list-components": ["x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components"], + "@kbn/securitysolution-exception-list-components/*": ["x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/*"], + "@kbn/securitysolution-exceptions-common": ["x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common"], + "@kbn/securitysolution-exceptions-common/*": ["x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/*"], + "@kbn/securitysolution-hook-utils": ["x-pack/solutions/security/packages/kbn-securitysolution-hook-utils"], + "@kbn/securitysolution-hook-utils/*": ["x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/*"], + "@kbn/securitysolution-io-ts-alerting-types": ["x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types"], + "@kbn/securitysolution-io-ts-alerting-types/*": ["x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/*"], + "@kbn/securitysolution-io-ts-list-types": ["x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types"], + "@kbn/securitysolution-io-ts-list-types/*": ["x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/*"], + "@kbn/securitysolution-io-ts-types": ["src/platform/packages/shared/kbn-securitysolution-io-ts-types"], + "@kbn/securitysolution-io-ts-types/*": ["src/platform/packages/shared/kbn-securitysolution-io-ts-types/*"], + "@kbn/securitysolution-io-ts-utils": ["src/platform/packages/shared/kbn-securitysolution-io-ts-utils"], + "@kbn/securitysolution-io-ts-utils/*": ["src/platform/packages/shared/kbn-securitysolution-io-ts-utils/*"], + "@kbn/securitysolution-list-api": ["x-pack/solutions/security/packages/kbn-securitysolution-list-api"], + "@kbn/securitysolution-list-api/*": ["x-pack/solutions/security/packages/kbn-securitysolution-list-api/*"], + "@kbn/securitysolution-list-constants": ["x-pack/solutions/security/packages/kbn-securitysolution-list-constants"], + "@kbn/securitysolution-list-constants/*": ["x-pack/solutions/security/packages/kbn-securitysolution-list-constants/*"], + "@kbn/securitysolution-list-hooks": ["x-pack/solutions/security/packages/kbn-securitysolution-list-hooks"], + "@kbn/securitysolution-list-hooks/*": ["x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/*"], + "@kbn/securitysolution-list-utils": ["x-pack/solutions/security/packages/kbn-securitysolution-list-utils"], + "@kbn/securitysolution-list-utils/*": ["x-pack/solutions/security/packages/kbn-securitysolution-list-utils/*"], + "@kbn/securitysolution-lists-common": ["x-pack/solutions/security/packages/kbn-securitysolution-lists-common"], + "@kbn/securitysolution-lists-common/*": ["x-pack/solutions/security/packages/kbn-securitysolution-lists-common/*"], + "@kbn/securitysolution-rules": ["src/platform/packages/shared/kbn-securitysolution-rules"], + "@kbn/securitysolution-rules/*": ["src/platform/packages/shared/kbn-securitysolution-rules/*"], + "@kbn/securitysolution-t-grid": ["x-pack/solutions/security/packages/kbn-securitysolution-t-grid"], + "@kbn/securitysolution-t-grid/*": ["x-pack/solutions/security/packages/kbn-securitysolution-t-grid/*"], + "@kbn/securitysolution-utils": ["x-pack/solutions/security/packages/kbn-securitysolution-utils"], + "@kbn/securitysolution-utils/*": ["x-pack/solutions/security/packages/kbn-securitysolution-utils/*"], "@kbn/server-http-tools": ["packages/kbn-server-http-tools"], "@kbn/server-http-tools/*": ["packages/kbn-server-http-tools/*"], "@kbn/server-route-repository": ["src/platform/packages/shared/kbn-server-route-repository"], diff --git a/x-pack/.i18nrc.json b/x-pack/.i18nrc.json index a4482fdb8c4a..dca0f526a823 100644 --- a/x-pack/.i18nrc.json +++ b/x-pack/.i18nrc.json @@ -75,7 +75,7 @@ "xpack.licenseApiGuard": "platform/plugins/private/license_api_guard", "xpack.licenseMgmt": "platform/plugins/shared/license_management", "xpack.licensing": "plugins/licensing", - "xpack.lists": "plugins/lists", + "xpack.lists": "solutions/security/plugins/lists", "xpack.logstash": [ "plugins/logstash" ], diff --git a/packages/kbn-securitysolution-autocomplete/README.md b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/README.md similarity index 100% rename from packages/kbn-securitysolution-autocomplete/README.md rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/README.md diff --git a/packages/kbn-securitysolution-autocomplete/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/index.ts similarity index 65% rename from packages/kbn-securitysolution-autocomplete/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/index.ts index e47113719176..f3768e8cd37f 100644 --- a/packages/kbn-securitysolution-autocomplete/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ export * from './src/check_empty_value'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/jest.config.js b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/jest.config.js new file mode 100644 index 000000000000..7384086c5871 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/jest.config.js @@ -0,0 +1,12 @@ +/* + * 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. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../../..', + roots: ['/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete'], +}; diff --git a/packages/kbn-securitysolution-autocomplete/kibana.jsonc b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/kibana.jsonc similarity index 100% rename from packages/kbn-securitysolution-autocomplete/kibana.jsonc rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/kibana.jsonc diff --git a/packages/kbn-securitysolution-autocomplete/package.json b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/package.json similarity index 71% rename from packages/kbn-securitysolution-autocomplete/package.json rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/package.json index f841706e57a7..fcce028035c4 100644 --- a/packages/kbn-securitysolution-autocomplete/package.json +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/package.json @@ -2,7 +2,7 @@ "name": "@kbn/securitysolution-autocomplete", "version": "1.0.0", "description": "Security Solution auto complete", - "license": "Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0", + "license": "Elastic License 2.0", "private": true, "sideEffects": false } \ No newline at end of file diff --git a/packages/kbn-securitysolution-autocomplete/src/autocomplete/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/autocomplete/index.mock.ts similarity index 54% rename from packages/kbn-securitysolution-autocomplete/src/autocomplete/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/autocomplete/index.mock.ts index 71bfb7f4a67c..2372ad727e9f 100644 --- a/packages/kbn-securitysolution-autocomplete/src/autocomplete/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/autocomplete/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ // Copied from "src/plugins/data/public/mocks.ts" but without any type information diff --git a/packages/kbn-securitysolution-autocomplete/src/check_empty_value/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/check_empty_value/index.test.ts similarity index 80% rename from packages/kbn-securitysolution-autocomplete/src/check_empty_value/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/check_empty_value/index.test.ts index d98feca80b75..4f99799bb468 100644 --- a/packages/kbn-securitysolution-autocomplete/src/check_empty_value/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/check_empty_value/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { checkEmptyValue } from '.'; diff --git a/packages/kbn-securitysolution-autocomplete/src/check_empty_value/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/check_empty_value/index.ts similarity index 64% rename from packages/kbn-securitysolution-autocomplete/src/check_empty_value/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/check_empty_value/index.ts index 218b8fee94d1..285c91842f2f 100644 --- a/packages/kbn-securitysolution-autocomplete/src/check_empty_value/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/check_empty_value/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { DataViewFieldBase } from '@kbn/es-query'; diff --git a/packages/kbn-securitysolution-autocomplete/src/es_field_selector/__tests__/__snapshots__/index.test.tsx.snap b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/es_field_selector/__tests__/__snapshots__/index.test.tsx.snap similarity index 100% rename from packages/kbn-securitysolution-autocomplete/src/es_field_selector/__tests__/__snapshots__/index.test.tsx.snap rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/es_field_selector/__tests__/__snapshots__/index.test.tsx.snap diff --git a/packages/kbn-securitysolution-autocomplete/src/es_field_selector/__tests__/disabled_types_with_tooltip_text.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/es_field_selector/__tests__/disabled_types_with_tooltip_text.test.ts similarity index 59% rename from packages/kbn-securitysolution-autocomplete/src/es_field_selector/__tests__/disabled_types_with_tooltip_text.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/es_field_selector/__tests__/disabled_types_with_tooltip_text.test.ts index 980819d1cedf..743ba33fbbe5 100644 --- a/packages/kbn-securitysolution-autocomplete/src/es_field_selector/__tests__/disabled_types_with_tooltip_text.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/es_field_selector/__tests__/disabled_types_with_tooltip_text.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { disabledTypesWithTooltipText } from '../disabled_types_with_tooltip_text'; diff --git a/packages/kbn-securitysolution-autocomplete/src/es_field_selector/__tests__/index.test.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/es_field_selector/__tests__/index.test.tsx similarity index 92% rename from packages/kbn-securitysolution-autocomplete/src/es_field_selector/__tests__/index.test.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/es_field_selector/__tests__/index.test.tsx index 1b33b4b29464..10db3fcce5f5 100644 --- a/packages/kbn-securitysolution-autocomplete/src/es_field_selector/__tests__/index.test.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/es_field_selector/__tests__/index.test.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React from 'react'; diff --git a/packages/kbn-securitysolution-autocomplete/src/es_field_selector/__tests__/use_es_field.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/es_field_selector/__tests__/use_es_field.test.ts similarity index 97% rename from packages/kbn-securitysolution-autocomplete/src/es_field_selector/__tests__/use_es_field.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/es_field_selector/__tests__/use_es_field.test.ts index 942ccbc29c38..1fb07e21fc91 100644 --- a/packages/kbn-securitysolution-autocomplete/src/es_field_selector/__tests__/use_es_field.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/es_field_selector/__tests__/use_es_field.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { DataViewFieldBase } from '@kbn/es-query'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/es_field_selector/disabled_types_with_tooltip_text.ts b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/es_field_selector/disabled_types_with_tooltip_text.ts new file mode 100644 index 000000000000..5b24ecb73605 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/es_field_selector/disabled_types_with_tooltip_text.ts @@ -0,0 +1,15 @@ +/* + * 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. + */ + +interface DisabledTypesTextType { + [typeName: string]: string; +} +import * as i18n from '../translations'; + +export const disabledTypesWithTooltipText: DisabledTypesTextType = { + binary: i18n.BINARY_TYPE_NOT_SUPPORTED, +}; diff --git a/packages/kbn-securitysolution-autocomplete/src/es_field_selector/index.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/es_field_selector/index.tsx similarity index 87% rename from packages/kbn-securitysolution-autocomplete/src/es_field_selector/index.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/es_field_selector/index.tsx index 31efaa23b62d..8ce7e7ed5507 100644 --- a/packages/kbn-securitysolution-autocomplete/src/es_field_selector/index.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/es_field_selector/index.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React from 'react'; diff --git a/packages/kbn-securitysolution-autocomplete/src/es_field_selector/types.ts b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/es_field_selector/types.ts similarity index 72% rename from packages/kbn-securitysolution-autocomplete/src/es_field_selector/types.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/es_field_selector/types.ts index b0f1ab56e807..e300df89e1c3 100644 --- a/packages/kbn-securitysolution-autocomplete/src/es_field_selector/types.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/es_field_selector/types.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { DataViewBase, DataViewFieldBase } from '@kbn/es-query'; diff --git a/packages/kbn-securitysolution-autocomplete/src/es_field_selector/use_es_field.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/es_field_selector/use_es_field.tsx similarity index 94% rename from packages/kbn-securitysolution-autocomplete/src/es_field_selector/use_es_field.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/es_field_selector/use_es_field.tsx index 615571d98960..1d6b84618af3 100644 --- a/packages/kbn-securitysolution-autocomplete/src/es_field_selector/use_es_field.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/es_field_selector/use_es_field.tsx @@ -1,14 +1,11 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React from 'react'; -import { useCallback, useMemo, useState } from 'react'; +import React, { useCallback, useMemo, useState } from 'react'; import { EuiComboBoxOptionOption, EuiIcon, diff --git a/packages/kbn-securitysolution-autocomplete/src/field_value_exists/index.test.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_exists/index.test.tsx similarity index 59% rename from packages/kbn-securitysolution-autocomplete/src/field_value_exists/index.test.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_exists/index.test.tsx index 801f8e2864d5..9fc10f6ba3bc 100644 --- a/packages/kbn-securitysolution-autocomplete/src/field_value_exists/index.test.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_exists/index.test.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React from 'react'; diff --git a/packages/kbn-securitysolution-autocomplete/src/field_value_exists/index.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_exists/index.tsx similarity index 71% rename from packages/kbn-securitysolution-autocomplete/src/field_value_exists/index.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_exists/index.tsx index 592886905aae..ccd27f559e12 100644 --- a/packages/kbn-securitysolution-autocomplete/src/field_value_exists/index.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_exists/index.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React from 'react'; diff --git a/packages/kbn-securitysolution-autocomplete/src/field_value_lists/index.test.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_lists/index.test.tsx similarity index 94% rename from packages/kbn-securitysolution-autocomplete/src/field_value_lists/index.test.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_lists/index.test.tsx index b2d8dc0a70be..30323eba2685 100644 --- a/packages/kbn-securitysolution-autocomplete/src/field_value_lists/index.test.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_lists/index.test.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React from 'react'; @@ -25,7 +23,7 @@ import { // TODO: Once these mocks are available, use them instead of hand mocking, https://github.com/elastic/kibana/issues/100715 // const mockKibanaHttpService = coreMock.createStart().http; -// import { coreMock } from '../../../../../../../src/core/public/mocks'; +// import { coreMock } from '../../../../../../../../../../src/core/public/mocks'; const mockKibanaHttpService = jest.fn(); const mockShowValueListModal = jest.fn(); const MockedShowValueListModal = (props: unknown) => { diff --git a/packages/kbn-securitysolution-autocomplete/src/field_value_lists/index.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_lists/index.tsx similarity index 93% rename from packages/kbn-securitysolution-autocomplete/src/field_value_lists/index.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_lists/index.tsx index c332dde356f2..480791b001c5 100644 --- a/packages/kbn-securitysolution-autocomplete/src/field_value_lists/index.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_lists/index.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React, { ElementType, useCallback, useEffect, useMemo, useState } from 'react'; @@ -19,6 +17,7 @@ import { getGenericComboBoxProps } from '../get_generic_combo_box_props'; // TODO: I have to use any here for now, but once this is available below, we should use the correct types, https://github.com/elastic/kibana/issues/100715 // import { HttpStart } from '@kbn/core/public'; +// eslint-disable-next-line @typescript-eslint/no-explicit-any type HttpStart = any; import * as i18n from '../translations'; diff --git a/packages/kbn-securitysolution-autocomplete/src/field_value_match/index.test.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_match/index.test.tsx similarity index 97% rename from packages/kbn-securitysolution-autocomplete/src/field_value_match/index.test.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_match/index.test.tsx index e83d79b180e9..8ca17a78764c 100644 --- a/packages/kbn-securitysolution-autocomplete/src/field_value_match/index.test.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_match/index.test.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React from 'react'; diff --git a/packages/kbn-securitysolution-autocomplete/src/field_value_match/index.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_match/index.tsx similarity index 95% rename from packages/kbn-securitysolution-autocomplete/src/field_value_match/index.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_match/index.tsx index 5b627451db19..a938ad2f7a99 100644 --- a/packages/kbn-securitysolution-autocomplete/src/field_value_match/index.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_match/index.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React, { useCallback, useMemo, useState, useEffect } from 'react'; @@ -22,7 +20,8 @@ import { uniq } from 'lodash'; import { ListOperatorTypeEnum as OperatorTypeEnum } from '@kbn/securitysolution-io-ts-list-types'; // TODO: I have to use any here for now, but once this is available below, we should use the correct types, https://github.com/elastic/kibana/issues/100715 -// import { AutocompleteStart } from '../../../../../../../src/plugins/unified_search/public'; +// import { AutocompleteStart } from '../../../../../../../../../../src/plugins/unified_search/public'; +// eslint-disable-next-line @typescript-eslint/no-explicit-any type AutocompleteStart = any; import * as i18n from '../translations'; diff --git a/packages/kbn-securitysolution-autocomplete/src/field_value_match_any/index.test.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_match_any/index.test.tsx similarity index 96% rename from packages/kbn-securitysolution-autocomplete/src/field_value_match_any/index.test.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_match_any/index.test.tsx index 0b73a57814aa..33355e2cb382 100644 --- a/packages/kbn-securitysolution-autocomplete/src/field_value_match_any/index.test.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_match_any/index.test.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React from 'react'; diff --git a/packages/kbn-securitysolution-autocomplete/src/field_value_match_any/index.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_match_any/index.tsx similarity index 94% rename from packages/kbn-securitysolution-autocomplete/src/field_value_match_any/index.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_match_any/index.tsx index 761712797c5e..be7fac088ec1 100644 --- a/packages/kbn-securitysolution-autocomplete/src/field_value_match_any/index.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_match_any/index.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React, { useCallback, useEffect, useMemo, useState } from 'react'; @@ -14,7 +12,8 @@ import { ListOperatorTypeEnum as OperatorTypeEnum } from '@kbn/securitysolution- import { DataViewBase, DataViewFieldBase } from '@kbn/es-query'; // TODO: I have to use any here for now, but once this is available below, we should use the correct types, https://github.com/elastic/kibana/issues/100715 -// import { AutocompleteStart } from '../../../../../../../src/plugins/unified_search/public'; +// import { AutocompleteStart } from '../../../../../../../../../../src/plugins/unified_search/public'; +// eslint-disable-next-line @typescript-eslint/no-explicit-any type AutocompleteStart = any; import * as i18n from '../translations'; diff --git a/packages/kbn-securitysolution-autocomplete/src/field_value_wildcard/index.test.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_wildcard/index.test.tsx similarity index 97% rename from packages/kbn-securitysolution-autocomplete/src/field_value_wildcard/index.test.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_wildcard/index.test.tsx index 2840e428a69e..2c2411f0a0c1 100644 --- a/packages/kbn-securitysolution-autocomplete/src/field_value_wildcard/index.test.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_wildcard/index.test.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React from 'react'; diff --git a/packages/kbn-securitysolution-autocomplete/src/field_value_wildcard/index.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_wildcard/index.tsx similarity index 94% rename from packages/kbn-securitysolution-autocomplete/src/field_value_wildcard/index.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_wildcard/index.tsx index 5a55b3399a6a..c095578bf0ff 100644 --- a/packages/kbn-securitysolution-autocomplete/src/field_value_wildcard/index.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/field_value_wildcard/index.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React, { useCallback, useMemo, useState, useEffect, memo } from 'react'; @@ -16,7 +14,8 @@ import { uniq } from 'lodash'; import { ListOperatorTypeEnum as OperatorTypeEnum } from '@kbn/securitysolution-io-ts-list-types'; // TODO: I have to use any here for now, but once this is available below, we should use the correct types, https://github.com/elastic/kibana/issues/100715 -// import { AutocompleteStart } from '../../../../../../../src/plugins/unified_search/public'; +// import { AutocompleteStart } from '../../../../../../../../../../src/plugins/unified_search/public'; +// eslint-disable-next-line @typescript-eslint/no-explicit-any type AutocompleteStart = any; import * as i18n from '../translations'; diff --git a/packages/kbn-securitysolution-autocomplete/src/fields/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/fields/index.mock.ts similarity index 94% rename from packages/kbn-securitysolution-autocomplete/src/fields/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/fields/index.mock.ts index dcb719ccdb56..32e9d6019786 100644 --- a/packages/kbn-securitysolution-autocomplete/src/fields/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/fields/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { DataViewFieldBase } from '@kbn/es-query'; diff --git a/packages/kbn-securitysolution-autocomplete/src/filter_field_to_list/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/filter_field_to_list/index.test.ts similarity index 91% rename from packages/kbn-securitysolution-autocomplete/src/filter_field_to_list/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/filter_field_to_list/index.test.ts index be0710bfd1ba..3328af4e2fa2 100644 --- a/packages/kbn-securitysolution-autocomplete/src/filter_field_to_list/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/filter_field_to_list/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { filterFieldToList } from '.'; diff --git a/packages/kbn-securitysolution-autocomplete/src/filter_field_to_list/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/filter_field_to_list/index.ts similarity index 77% rename from packages/kbn-securitysolution-autocomplete/src/filter_field_to_list/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/filter_field_to_list/index.ts index 86d429cc9ef8..a4df119766a9 100644 --- a/packages/kbn-securitysolution-autocomplete/src/filter_field_to_list/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/filter_field_to_list/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { DataViewFieldBase } from '@kbn/es-query'; diff --git a/packages/kbn-securitysolution-autocomplete/src/get_generic_combo_box_props/index.test.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/get_generic_combo_box_props/index.test.tsx similarity index 88% rename from packages/kbn-securitysolution-autocomplete/src/get_generic_combo_box_props/index.test.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/get_generic_combo_box_props/index.test.tsx index 82ca7f60de24..f333e7c6ebdd 100644 --- a/packages/kbn-securitysolution-autocomplete/src/get_generic_combo_box_props/index.test.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/get_generic_combo_box_props/index.test.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { getGenericComboBoxProps } from '.'; diff --git a/packages/kbn-securitysolution-autocomplete/src/get_generic_combo_box_props/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/get_generic_combo_box_props/index.ts similarity index 79% rename from packages/kbn-securitysolution-autocomplete/src/get_generic_combo_box_props/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/get_generic_combo_box_props/index.ts index 2f2a6697c422..f043fc978836 100644 --- a/packages/kbn-securitysolution-autocomplete/src/get_generic_combo_box_props/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/get_generic_combo_box_props/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { EuiComboBoxOptionOption } from '@elastic/eui'; diff --git a/packages/kbn-securitysolution-autocomplete/src/get_operators/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/get_operators/index.test.ts similarity index 80% rename from packages/kbn-securitysolution-autocomplete/src/get_operators/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/get_operators/index.test.ts index 711e7ea87a8e..db031a65e0bb 100644 --- a/packages/kbn-securitysolution-autocomplete/src/get_operators/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/get_operators/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { diff --git a/packages/kbn-securitysolution-autocomplete/src/get_operators/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/get_operators/index.ts similarity index 70% rename from packages/kbn-securitysolution-autocomplete/src/get_operators/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/get_operators/index.ts index dbb36fd479df..451d4f5c21a7 100644 --- a/packages/kbn-securitysolution-autocomplete/src/get_operators/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/get_operators/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { DataViewFieldBase } from '@kbn/es-query'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/hooks/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/hooks/index.ts new file mode 100644 index 000000000000..e9d4507b1400 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/hooks/index.ts @@ -0,0 +1,8 @@ +/* + * 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. + */ + +export * from './use_field_value_autocomplete'; diff --git a/packages/kbn-securitysolution-autocomplete/src/hooks/use_field_value_autocomplete/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/hooks/use_field_value_autocomplete/index.test.ts similarity index 96% rename from packages/kbn-securitysolution-autocomplete/src/hooks/use_field_value_autocomplete/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/hooks/use_field_value_autocomplete/index.test.ts index 836744f3ede2..7d776db12413 100644 --- a/packages/kbn-securitysolution-autocomplete/src/hooks/use_field_value_autocomplete/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/hooks/use_field_value_autocomplete/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { waitFor, renderHook } from '@testing-library/react'; diff --git a/packages/kbn-securitysolution-autocomplete/src/hooks/use_field_value_autocomplete/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/hooks/use_field_value_autocomplete/index.ts similarity index 88% rename from packages/kbn-securitysolution-autocomplete/src/hooks/use_field_value_autocomplete/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/hooks/use_field_value_autocomplete/index.ts index 9fff2abfd5be..dbbe321014e2 100644 --- a/packages/kbn-securitysolution-autocomplete/src/hooks/use_field_value_autocomplete/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/hooks/use_field_value_autocomplete/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { useEffect, useRef, useState } from 'react'; @@ -13,7 +11,8 @@ import { ListOperatorTypeEnum as OperatorTypeEnum } from '@kbn/securitysolution- import { DataViewBase, DataViewFieldBase, getDataViewFieldSubtypeNested } from '@kbn/es-query'; // TODO: I have to use any here for now, but once this is available below, we should use the correct types, https://github.com/elastic/kibana/issues/100715 -// import { AutocompleteStart } from '../../../../../../../../src/plugins/unified_search/public'; +// import { AutocompleteStart } from '../../../../../../../../../../../src/plugins/unified_search/public'; +// eslint-disable-next-line @typescript-eslint/no-explicit-any type AutocompleteStart = any; interface FuncArgs { diff --git a/packages/kbn-securitysolution-autocomplete/src/list_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/list_schema/index.mock.ts similarity index 73% rename from packages/kbn-securitysolution-autocomplete/src/list_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/list_schema/index.mock.ts index e2c2c9b0fe05..aade602f1950 100644 --- a/packages/kbn-securitysolution-autocomplete/src/list_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/list_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { @@ -14,7 +12,7 @@ import { } from '@kbn/securitysolution-io-ts-list-types'; // TODO: Once this mock is available within packages, use it instead, https://github.com/elastic/kibana/issues/100715 -// import { getFoundListSchemaMock } from '../../../../../lists/common/schemas/response/found_list_schema.mock'; +// import { getFoundListSchemaMock } from '../../../../../../../../lists/common/schemas/response/found_list_schema.mock'; export const getFoundListSchemaMock = (): FoundListSchema => ({ cursor: '123', data: [getListResponseMock()], @@ -41,7 +39,7 @@ export const TYPE = 'ip'; export const NAME = 'some name'; // TODO: Once this mock is available within packages, use it instead, https://github.com/elastic/kibana/issues/100715 -// import { getListResponseMock } from '../../../../../lists/common/schemas/response/list_schema.mock'; +// import { getListResponseMock } from '../../../../../../../../lists/common/schemas/response/list_schema.mock'; export const getListResponseMock = (): ListSchema => ({ '@timestamp': DATE_NOW, _version: undefined, diff --git a/packages/kbn-securitysolution-autocomplete/src/operator/index.test.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/operator/index.test.tsx similarity index 94% rename from packages/kbn-securitysolution-autocomplete/src/operator/index.test.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/operator/index.test.tsx index 4d2112d8f31d..eef8738b67c5 100644 --- a/packages/kbn-securitysolution-autocomplete/src/operator/index.test.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/operator/index.test.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React from 'react'; diff --git a/packages/kbn-securitysolution-autocomplete/src/operator/index.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/operator/index.tsx similarity index 87% rename from packages/kbn-securitysolution-autocomplete/src/operator/index.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/operator/index.tsx index c3d91c16eae9..6c91f7e70b94 100644 --- a/packages/kbn-securitysolution-autocomplete/src/operator/index.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/operator/index.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React, { useCallback, useMemo } from 'react'; diff --git a/packages/kbn-securitysolution-autocomplete/src/param_contains_space/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/param_contains_space/index.test.ts similarity index 70% rename from packages/kbn-securitysolution-autocomplete/src/param_contains_space/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/param_contains_space/index.test.ts index aef6fc4acffa..d0571d157ec2 100644 --- a/packages/kbn-securitysolution-autocomplete/src/param_contains_space/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/param_contains_space/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { paramContainsSpace } from '.'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/param_contains_space/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/param_contains_space/index.ts new file mode 100644 index 000000000000..3d7bb99ae3d0 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/param_contains_space/index.ts @@ -0,0 +1,8 @@ +/* + * 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. + */ + +export const paramContainsSpace = (param: string) => param && param.trim().length !== param.length; diff --git a/packages/kbn-securitysolution-autocomplete/src/param_is_valid/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/param_is_valid/index.test.ts similarity index 90% rename from packages/kbn-securitysolution-autocomplete/src/param_is_valid/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/param_is_valid/index.test.ts index c530bca356cb..f93ad28eb4ad 100644 --- a/packages/kbn-securitysolution-autocomplete/src/param_is_valid/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/param_is_valid/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { paramIsValid } from '.'; diff --git a/packages/kbn-securitysolution-autocomplete/src/param_is_valid/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/param_is_valid/index.ts similarity index 77% rename from packages/kbn-securitysolution-autocomplete/src/param_is_valid/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/param_is_valid/index.ts index 5abde0b36c4c..3d091b7a9b21 100644 --- a/packages/kbn-securitysolution-autocomplete/src/param_is_valid/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/param_is_valid/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 dateMath from '@kbn/datemath'; diff --git a/packages/kbn-securitysolution-autocomplete/src/translations/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/translations/index.ts similarity index 86% rename from packages/kbn-securitysolution-autocomplete/src/translations/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/translations/index.ts index 01671880d2dc..51790e96ba68 100644 --- a/packages/kbn-securitysolution-autocomplete/src/translations/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/translations/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { i18n } from '@kbn/i18n'; diff --git a/packages/kbn-securitysolution-autocomplete/src/type_match/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/type_match/index.test.ts similarity index 79% rename from packages/kbn-securitysolution-autocomplete/src/type_match/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/type_match/index.test.ts index 15c7c3f580da..74c713f63d36 100644 --- a/packages/kbn-securitysolution-autocomplete/src/type_match/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/type_match/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { typeMatch } from '.'; diff --git a/packages/kbn-securitysolution-autocomplete/src/type_match/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/type_match/index.ts similarity index 68% rename from packages/kbn-securitysolution-autocomplete/src/type_match/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/type_match/index.ts index 4d5899a376a0..0e368127b596 100644 --- a/packages/kbn-securitysolution-autocomplete/src/type_match/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/type_match/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 type { Type } from '@kbn/securitysolution-io-ts-list-types'; diff --git a/packages/kbn-securitysolution-autocomplete/tsconfig.json b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/tsconfig.json similarity index 90% rename from packages/kbn-securitysolution-autocomplete/tsconfig.json rename to x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/tsconfig.json index f7df7da6f06a..e4f0b64736b0 100644 --- a/packages/kbn-securitysolution-autocomplete/tsconfig.json +++ b/x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", "types": ["jest", "node"] diff --git a/packages/kbn-securitysolution-endpoint-exceptions-common/README.md b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/README.md similarity index 100% rename from packages/kbn-securitysolution-endpoint-exceptions-common/README.md rename to x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/README.md diff --git a/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list/create_endpoint_list.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list/create_endpoint_list.gen.ts similarity index 59% rename from packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list/create_endpoint_list.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list/create_endpoint_list.gen.ts index 42a3b67106c0..c8e4f90c347a 100644 --- a/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list/create_endpoint_list.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list/create_endpoint_list.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list/create_endpoint_list.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list/create_endpoint_list.schema.yaml similarity index 62% rename from packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list/create_endpoint_list.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list/create_endpoint_list.schema.yaml index b2ca0f563617..12b131e728c5 100644 --- a/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list/create_endpoint_list.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list/create_endpoint_list.schema.yaml @@ -23,23 +23,23 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Insufficient privileges content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 500: description: Internal server error content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.gen.ts similarity index 81% rename from packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.gen.ts index ed3a60dc08f3..c4ce0697b237 100644 --- a/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.schema.yaml similarity index 79% rename from packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.schema.yaml index b90bee75fc07..0393fa3d943e 100644 --- a/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.schema.yaml @@ -57,29 +57,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Insufficient privileges content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 409: description: Endpoint list item already exists content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-endpoint-exceptions-common/api/delete_endpoint_list_item/delete_endpoint_list_item.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/delete_endpoint_list_item/delete_endpoint_list_item.gen.ts similarity index 75% rename from packages/kbn-securitysolution-endpoint-exceptions-common/api/delete_endpoint_list_item/delete_endpoint_list_item.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/delete_endpoint_list_item/delete_endpoint_list_item.gen.ts index 5cb5f518494e..4f268641f93c 100644 --- a/packages/kbn-securitysolution-endpoint-exceptions-common/api/delete_endpoint_list_item/delete_endpoint_list_item.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/delete_endpoint_list_item/delete_endpoint_list_item.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-endpoint-exceptions-common/api/delete_endpoint_list_item/delete_endpoint_list_item.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/delete_endpoint_list_item/delete_endpoint_list_item.schema.yaml similarity index 68% rename from packages/kbn-securitysolution-endpoint-exceptions-common/api/delete_endpoint_list_item/delete_endpoint_list_item.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/delete_endpoint_list_item/delete_endpoint_list_item.schema.yaml index 69db50616918..fac5a12ecc5d 100644 --- a/packages/kbn-securitysolution-endpoint-exceptions-common/api/delete_endpoint_list_item/delete_endpoint_list_item.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/delete_endpoint_list_item/delete_endpoint_list_item.schema.yaml @@ -36,29 +36,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Insufficient privileges content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: Endpoint list item not found content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-endpoint-exceptions-common/api/find_endpoint_list_item/find_endpoint_list_item.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/find_endpoint_list_item/find_endpoint_list_item.gen.ts similarity index 83% rename from packages/kbn-securitysolution-endpoint-exceptions-common/api/find_endpoint_list_item/find_endpoint_list_item.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/find_endpoint_list_item/find_endpoint_list_item.gen.ts index a830572c7b50..5b1e10d9bb04 100644 --- a/packages/kbn-securitysolution-endpoint-exceptions-common/api/find_endpoint_list_item/find_endpoint_list_item.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/find_endpoint_list_item/find_endpoint_list_item.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-endpoint-exceptions-common/api/find_endpoint_list_item/find_endpoint_list_item.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/find_endpoint_list_item/find_endpoint_list_item.schema.yaml similarity index 72% rename from packages/kbn-securitysolution-endpoint-exceptions-common/api/find_endpoint_list_item/find_endpoint_list_item.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/find_endpoint_list_item/find_endpoint_list_item.schema.yaml index 6dc2fcaa7e87..35f565bfa27f 100644 --- a/packages/kbn-securitysolution-endpoint-exceptions-common/api/find_endpoint_list_item/find_endpoint_list_item.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/find_endpoint_list_item/find_endpoint_list_item.schema.yaml @@ -38,7 +38,7 @@ paths: required: false description: Determines which field is used to sort the results schema: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' - name: sort_order in: query required: false @@ -80,34 +80,34 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Insufficient privileges content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: Endpoint list not found content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' components: schemas: FindEndpointListItemsFilter: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' diff --git a/packages/kbn-securitysolution-endpoint-exceptions-common/api/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/index.ts similarity index 57% rename from packages/kbn-securitysolution-endpoint-exceptions-common/api/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/index.ts index c71b02c448db..912af19448e4 100644 --- a/packages/kbn-securitysolution-endpoint-exceptions-common/api/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ export * from './create_endpoint_list/create_endpoint_list.gen'; diff --git a/packages/kbn-securitysolution-endpoint-exceptions-common/api/model/endpoint_list_common.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/model/endpoint_list_common.gen.ts similarity index 65% rename from packages/kbn-securitysolution-endpoint-exceptions-common/api/model/endpoint_list_common.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/model/endpoint_list_common.gen.ts index 6c8093246b1a..a68abd53c11c 100644 --- a/packages/kbn-securitysolution-endpoint-exceptions-common/api/model/endpoint_list_common.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/model/endpoint_list_common.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-endpoint-exceptions-common/api/model/endpoint_list_common.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/model/endpoint_list_common.schema.yaml similarity index 100% rename from packages/kbn-securitysolution-endpoint-exceptions-common/api/model/endpoint_list_common.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/model/endpoint_list_common.schema.yaml diff --git a/packages/kbn-securitysolution-endpoint-exceptions-common/api/read_endpoint_list_item/read_endpoint_list_item.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/read_endpoint_list_item/read_endpoint_list_item.gen.ts similarity index 75% rename from packages/kbn-securitysolution-endpoint-exceptions-common/api/read_endpoint_list_item/read_endpoint_list_item.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/read_endpoint_list_item/read_endpoint_list_item.gen.ts index 4a9c335b395b..e2dc38450bbb 100644 --- a/packages/kbn-securitysolution-endpoint-exceptions-common/api/read_endpoint_list_item/read_endpoint_list_item.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/read_endpoint_list_item/read_endpoint_list_item.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-endpoint-exceptions-common/api/read_endpoint_list_item/read_endpoint_list_item.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/read_endpoint_list_item/read_endpoint_list_item.schema.yaml similarity index 68% rename from packages/kbn-securitysolution-endpoint-exceptions-common/api/read_endpoint_list_item/read_endpoint_list_item.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/read_endpoint_list_item/read_endpoint_list_item.schema.yaml index 8a4e0b291c76..45f0c384c7f0 100644 --- a/packages/kbn-securitysolution-endpoint-exceptions-common/api/read_endpoint_list_item/read_endpoint_list_item.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/read_endpoint_list_item/read_endpoint_list_item.schema.yaml @@ -38,29 +38,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Insufficient privileges content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: Endpoint list item not found content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.gen.ts similarity index 83% rename from packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.gen.ts index 0a235ca2ff89..ec86992d58b7 100644 --- a/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.schema.yaml similarity index 80% rename from packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.schema.yaml index 679000674c7b..cd4cbf0c11d5 100644 --- a/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.schema.yaml @@ -62,29 +62,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Insufficient privileges content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: Endpoint list item not found content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-endpoint-exceptions-common/docs/openapi/ess/security_solution_endpoint_exceptions_api_2023_10_31.bundled.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/docs/openapi/ess/security_solution_endpoint_exceptions_api_2023_10_31.bundled.schema.yaml similarity index 100% rename from packages/kbn-securitysolution-endpoint-exceptions-common/docs/openapi/ess/security_solution_endpoint_exceptions_api_2023_10_31.bundled.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/docs/openapi/ess/security_solution_endpoint_exceptions_api_2023_10_31.bundled.schema.yaml diff --git a/packages/kbn-securitysolution-endpoint-exceptions-common/docs/openapi/serverless/security_solution_endpoint_exceptions_api_2023_10_31.bundled.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/docs/openapi/serverless/security_solution_endpoint_exceptions_api_2023_10_31.bundled.schema.yaml similarity index 100% rename from packages/kbn-securitysolution-endpoint-exceptions-common/docs/openapi/serverless/security_solution_endpoint_exceptions_api_2023_10_31.bundled.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/docs/openapi/serverless/security_solution_endpoint_exceptions_api_2023_10_31.bundled.schema.yaml diff --git a/packages/kbn-securitysolution-endpoint-exceptions-common/kibana.jsonc b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/kibana.jsonc similarity index 100% rename from packages/kbn-securitysolution-endpoint-exceptions-common/kibana.jsonc rename to x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/kibana.jsonc diff --git a/packages/kbn-securitysolution-endpoint-exceptions-common/package.json b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/package.json similarity index 81% rename from packages/kbn-securitysolution-endpoint-exceptions-common/package.json rename to x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/package.json index 78470be1d4e4..39e6232e4e0f 100644 --- a/packages/kbn-securitysolution-endpoint-exceptions-common/package.json +++ b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/package.json @@ -1,6 +1,6 @@ { "description": "OpenAPI Endpoint Exceptions Common", - "license": "Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0", + "license": "Elastic License 2.0", "name": "@kbn/securitysolution-endpoint-exceptions-common", "private": true, "version": "1.0.0", diff --git a/packages/kbn-securitysolution-endpoint-exceptions-common/scripts/openapi_bundle.js b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/scripts/openapi_bundle.js similarity index 83% rename from packages/kbn-securitysolution-endpoint-exceptions-common/scripts/openapi_bundle.js rename to x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/scripts/openapi_bundle.js index e5a02965593c..c54e162b6462 100644 --- a/packages/kbn-securitysolution-endpoint-exceptions-common/scripts/openapi_bundle.js +++ b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/scripts/openapi_bundle.js @@ -1,13 +1,12 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ -require('../../../src/setup_node_env'); +require('../../../../../../src/setup_node_env'); +// eslint-disable-next-line import/no-nodejs-modules const { join, resolve } = require('path'); const { bundle } = require('@kbn/openapi-bundler'); diff --git a/packages/kbn-securitysolution-endpoint-exceptions-common/scripts/openapi_generate.js b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/scripts/openapi_generate.js similarity index 66% rename from packages/kbn-securitysolution-endpoint-exceptions-common/scripts/openapi_generate.js rename to x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/scripts/openapi_generate.js index bca85786a518..9a303c4f74be 100644 --- a/packages/kbn-securitysolution-endpoint-exceptions-common/scripts/openapi_generate.js +++ b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/scripts/openapi_generate.js @@ -1,13 +1,12 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ -require('../../../src/setup_node_env'); +require('../../../../../../src/setup_node_env'); +// eslint-disable-next-line import/no-nodejs-modules const { join, resolve } = require('path'); const { generate } = require('@kbn/openapi-generator'); const { REPO_ROOT } = require('@kbn/repo-info'); diff --git a/packages/kbn-securitysolution-endpoint-exceptions-common/tsconfig.json b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/tsconfig.json similarity index 84% rename from packages/kbn-securitysolution-endpoint-exceptions-common/tsconfig.json rename to x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/tsconfig.json index 7e3c3fd7396d..38f2843b03ad 100644 --- a/packages/kbn-securitysolution-endpoint-exceptions-common/tsconfig.json +++ b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/tsconfig.json @@ -4,7 +4,7 @@ "types": ["jest", "node"] }, "exclude": ["target/**/*"], - "extends": "../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "include": ["**/*.ts"], "kbn_references": [ "@kbn/securitysolution-exceptions-common", diff --git a/packages/kbn-securitysolution-exception-list-components/README.md b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/README.md similarity index 100% rename from packages/kbn-securitysolution-exception-list-components/README.md rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/README.md diff --git a/packages/kbn-securitysolution-exception-list-components/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/index.ts similarity index 63% rename from packages/kbn-securitysolution-exception-list-components/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/index.ts index 0e11a4694384..40277892f1f7 100644 --- a/packages/kbn-securitysolution-exception-list-components/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ export * from './src/search_bar'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/jest.config.js b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/jest.config.js new file mode 100644 index 000000000000..d9a562b21e87 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/jest.config.js @@ -0,0 +1,29 @@ +/* + * 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. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../../..', + roots: [ + '/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components', + ], + coverageReporters: ['text', 'html'], + collectCoverageFrom: [ + '/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/**/*.{ts,tsx}', + '!/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/**/*.test', + '!/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/**/types/*', + '!/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/**/*.type', + '!/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/**/*.styles', + '!/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/**/mocks/*', + '!/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/**/*.config', + '!/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/**/translations', + '!/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/**/types/*', + ], + setupFilesAfterEnv: [ + '/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/setup_test.ts', + ], +}; diff --git a/packages/kbn-securitysolution-exception-list-components/kibana.jsonc b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/kibana.jsonc similarity index 100% rename from packages/kbn-securitysolution-exception-list-components/kibana.jsonc rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/kibana.jsonc diff --git a/packages/kbn-securitysolution-exception-list-components/package.json b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/package.json similarity index 66% rename from packages/kbn-securitysolution-exception-list-components/package.json rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/package.json index 0b99a01c071e..f9246cb9353d 100644 --- a/packages/kbn-securitysolution-exception-list-components/package.json +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/package.json @@ -2,6 +2,6 @@ "name": "@kbn/securitysolution-exception-list-components", "private": true, "version": "1.0.0", - "license": "Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0", + "license": "Elastic License 2.0", "sideEffects": false } \ No newline at end of file diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/setup_test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/setup_test.ts new file mode 100644 index 000000000000..72e0edd0d07f --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/setup_test.ts @@ -0,0 +1,9 @@ +/* + * 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. + */ + +// eslint-disable-next-line import/no-extraneous-dependencies +import '@testing-library/jest-dom'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/assets/images/illustration_product_no_results_magnifying_glass.svg b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/assets/images/illustration_product_no_results_magnifying_glass.svg similarity index 100% rename from packages/kbn-securitysolution-exception-list-components/src/assets/images/illustration_product_no_results_magnifying_glass.svg rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/assets/images/illustration_product_no_results_magnifying_glass.svg diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/custom.d.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/custom.d.ts new file mode 100644 index 000000000000..18dda6a91003 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/custom.d.ts @@ -0,0 +1,12 @@ +/* + * 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. + */ + +declare module '*.svg' { + const content: string; + // eslint-disable-next-line import/no-default-export + export default content; +} diff --git a/packages/kbn-securitysolution-exception-list-components/src/empty_viewer_state/empty_viewer_state.test.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/empty_viewer_state/empty_viewer_state.test.tsx similarity index 93% rename from packages/kbn-securitysolution-exception-list-components/src/empty_viewer_state/empty_viewer_state.test.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/empty_viewer_state/empty_viewer_state.test.tsx index 1b711185c526..7df3f732711a 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/empty_viewer_state/empty_viewer_state.test.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/empty_viewer_state/empty_viewer_state.test.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/empty_viewer_state/index.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/empty_viewer_state/index.tsx similarity index 91% rename from packages/kbn-securitysolution-exception-list-components/src/empty_viewer_state/index.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/empty_viewer_state/index.tsx index e9996e814c34..2e489cb5dca9 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/empty_viewer_state/index.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/empty_viewer_state/index.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React, { useMemo } from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/comments/__snapshots__/comments.test.tsx.snap b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/comments/__snapshots__/comments.test.tsx.snap similarity index 100% rename from packages/kbn-securitysolution-exception-list-components/src/exception_item_card/comments/__snapshots__/comments.test.tsx.snap rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/comments/__snapshots__/comments.test.tsx.snap diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/comments/comments.test.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/comments/comments.test.tsx similarity index 83% rename from packages/kbn-securitysolution-exception-list-components/src/exception_item_card/comments/comments.test.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/comments/comments.test.tsx index c8c8e92cd6c7..caf989efcc9e 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/comments/comments.test.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/comments/comments.test.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/comments/index.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/comments/index.tsx similarity index 79% rename from packages/kbn-securitysolution-exception-list-components/src/exception_item_card/comments/index.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/comments/index.tsx index d2e5ac0577af..76ef48fba0a9 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/comments/index.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/comments/index.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React, { memo } from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.config.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.config.ts similarity index 77% rename from packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.config.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.config.ts index fdb545dc2c03..0c826f40f022 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.config.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.config.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { ListOperatorTypeEnum } from '@kbn/securitysolution-io-ts-list-types'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.styles.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.styles.tsx similarity index 65% rename from packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.styles.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.styles.tsx index 8a089df54f2f..043e2e2e4485 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.styles.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.styles.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { cx } from '@emotion/css'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.test.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.test.tsx similarity index 96% rename from packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.test.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.test.tsx index e19327226de2..6cd3ee06d203 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.test.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.test.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { render } from '@testing-library/react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/__snapshots__/entry_content.test.tsx.snap b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/__snapshots__/entry_content.test.tsx.snap similarity index 100% rename from packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/__snapshots__/entry_content.test.tsx.snap rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/__snapshots__/entry_content.test.tsx.snap diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.helper.test.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.helper.test.tsx similarity index 93% rename from packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.helper.test.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.helper.test.tsx index e49d18ec78c4..07de278ace7b 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.helper.test.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.helper.test.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { ListOperatorTypeEnum } from '@kbn/securitysolution-io-ts-list-types'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.helper.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.helper.tsx similarity index 85% rename from packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.helper.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.helper.tsx index 2fa113e5a612..aeca92d4d003 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.helper.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.helper.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React, { ElementType } from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.test.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.test.tsx similarity index 83% rename from packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.test.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.test.tsx index 7eb141493ef4..bed784f46b87 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.test.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.test.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/index.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/index.tsx similarity index 86% rename from packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/index.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/index.tsx index b765439116ce..7f75694b16d3 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/index.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/index.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React, { ElementType, FC, memo } from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/index.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/index.tsx similarity index 83% rename from packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/index.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/index.tsx index f472402adddc..804af918e4f1 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/index.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/index.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React, { memo } from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/os_conditions/__snapshots__/os_conditions.test.tsx.snap b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/os_conditions/__snapshots__/os_conditions.test.tsx.snap similarity index 100% rename from packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/os_conditions/__snapshots__/os_conditions.test.tsx.snap rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/os_conditions/__snapshots__/os_conditions.test.tsx.snap diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/os_conditions/index.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/os_conditions/index.tsx similarity index 73% rename from packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/os_conditions/index.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/os_conditions/index.tsx index 0d8285924c31..3a2dded6ce2b 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/os_conditions/index.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/os_conditions/index.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React, { memo, useMemo } from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/os_conditions/os_conditions.test.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/os_conditions/os_conditions.test.tsx similarity index 82% rename from packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/os_conditions/os_conditions.test.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/os_conditions/os_conditions.test.tsx index 3aea8d5ed006..a3575c184522 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/os_conditions/os_conditions.test.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/os_conditions/os_conditions.test.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React from 'react'; @@ -35,6 +33,7 @@ describe('OsCondition', () => { expect(wrapper.container).toMatchSnapshot(); }); it('should return any os sent', () => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any const wrapper = render(); expect(wrapper.getByTestId('osLabel')).toHaveTextContent(i18n.CONDITION_OS); expect(wrapper.getByTestId('osValue')).toHaveTextContent( diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/types.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/types.ts similarity index 63% rename from packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/types.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/types.ts index 0400ca6548d9..a69a0f16c1d7 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/types.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/types.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 type { diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.test.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.test.tsx similarity index 94% rename from packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.test.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.test.tsx index aeaf5755ea1d..b3f06eddec71 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.test.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.test.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx similarity index 91% rename from packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx index 44456a130687..52d2f730b33b 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React, { FC, ElementType } from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/header/header.test.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/header/header.test.tsx similarity index 81% rename from packages/kbn-securitysolution-exception-list-components/src/exception_item_card/header/header.test.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/header/header.test.tsx index 5de4f5d729f0..9127589b5b56 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/header/header.test.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/header/header.test.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/header/index.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/header/index.tsx similarity index 79% rename from packages/kbn-securitysolution-exception-list-components/src/exception_item_card/header/index.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/header/index.tsx index 72b02cc79a79..88eb6233a935 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/header/index.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/header/index.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React, { memo } from 'react'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/index.ts new file mode 100644 index 000000000000..2d2b38d288da --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/index.ts @@ -0,0 +1,12 @@ +/* + * 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. + */ + +export * from './conditions'; +export * from './header'; +export * from './meta'; +export * from './comments'; +export * from './exception_item_card'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/details_info/__snapshots__/details_info.test.tsx.snap b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/details_info/__snapshots__/details_info.test.tsx.snap similarity index 100% rename from packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/details_info/__snapshots__/details_info.test.tsx.snap rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/details_info/__snapshots__/details_info.test.tsx.snap diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/details_info/details_info.test.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/details_info/details_info.test.tsx similarity index 73% rename from packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/details_info/details_info.test.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/details_info/details_info.test.tsx index cbb48e172322..3950d674a1ad 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/details_info/details_info.test.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/details_info/details_info.test.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React from 'react'; @@ -29,6 +27,7 @@ describe('MetaInfoDetails', () => { Last update value

} lastUpdateValue="value" /> diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/details_info/index.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/details_info/index.tsx similarity index 84% rename from packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/details_info/index.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/details_info/index.tsx index cc9eaa813aa9..209ce3b59553 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/details_info/index.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/details_info/index.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React, { memo } from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/index.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/index.tsx similarity index 92% rename from packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/index.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/index.tsx index d9c0f84b02d0..8c7734ab51c9 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/index.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/index.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React, { memo, useMemo } from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/meta.test.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/meta.test.tsx similarity index 90% rename from packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/meta.test.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/meta.test.tsx index 10570b263781..f7a94d9d76ff 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/meta.test.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/meta.test.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/translations.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/translations.ts similarity index 93% rename from packages/kbn-securitysolution-exception-list-components/src/exception_item_card/translations.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/translations.ts index 78a0dac775cf..9b1a64bd6cf4 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/translations.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/translations.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { i18n } from '@kbn/i18n'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/use_exception_item_card.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/use_exception_item_card.test.ts similarity index 90% rename from packages/kbn-securitysolution-exception-list-components/src/exception_item_card/use_exception_item_card.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/use_exception_item_card.test.ts index 5c04c8772714..1a144182eeed 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/use_exception_item_card.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/use_exception_item_card.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { ExceptionListTypeEnum } from '@kbn/securitysolution-io-ts-list-types'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/use_exception_item_card.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/use_exception_item_card.ts similarity index 86% rename from packages/kbn-securitysolution-exception-list-components/src/exception_item_card/use_exception_item_card.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/use_exception_item_card.ts index 2978dfb12c72..f3da4ec92595 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/use_exception_item_card.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/use_exception_item_card.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { useCallback, useMemo } from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_items/exception_items.test.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_items/exception_items.test.tsx similarity index 96% rename from packages/kbn-securitysolution-exception-list-components/src/exception_items/exception_items.test.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_items/exception_items.test.tsx index e60cff40626f..936a58b670f5 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/exception_items/exception_items.test.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_items/exception_items.test.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_items/index.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_items/index.tsx similarity index 93% rename from packages/kbn-securitysolution-exception-list-components/src/exception_items/index.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_items/index.tsx index edad9aecdb0d..6fde321cfcb9 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/exception_items/index.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_items/index.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React, { ElementType } from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/generate_linked_rules_menu_item/__snapshots__/generate_linked_rules_menu_item.test.tsx.snap b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/generate_linked_rules_menu_item/__snapshots__/generate_linked_rules_menu_item.test.tsx.snap similarity index 100% rename from packages/kbn-securitysolution-exception-list-components/src/generate_linked_rules_menu_item/__snapshots__/generate_linked_rules_menu_item.test.tsx.snap rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/generate_linked_rules_menu_item/__snapshots__/generate_linked_rules_menu_item.test.tsx.snap diff --git a/packages/kbn-securitysolution-exception-list-components/src/generate_linked_rules_menu_item/generate_linked_rules_menu_item.test.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/generate_linked_rules_menu_item/generate_linked_rules_menu_item.test.tsx similarity index 80% rename from packages/kbn-securitysolution-exception-list-components/src/generate_linked_rules_menu_item/generate_linked_rules_menu_item.test.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/generate_linked_rules_menu_item/generate_linked_rules_menu_item.test.tsx index 01f708a0f6bd..2bf26f551fb0 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/generate_linked_rules_menu_item/generate_linked_rules_menu_item.test.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/generate_linked_rules_menu_item/generate_linked_rules_menu_item.test.tsx @@ -1,15 +1,12 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { render } from '@testing-library/react'; -import { ReactElement } from 'react'; -import { ElementType } from 'react'; +import { ReactElement, ElementType } from 'react'; import { generateLinkedRulesMenuItems } from '.'; import { rules } from '../mocks/rule_references.mock'; import { @@ -45,7 +42,7 @@ describe('generateLinedRulesMenuItems', () => { leftIcon: 'check', }) as ReactElement[]; - result.map((link) => { + result.forEach((link) => { const wrapper = render(link); expect(wrapper.container).toMatchSnapshot(); expect(wrapper.getByTestId('generateLinedRulesMenuItemsTestActionItem1a2b3c')); diff --git a/packages/kbn-securitysolution-exception-list-components/src/generate_linked_rules_menu_item/index.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/generate_linked_rules_menu_item/index.tsx similarity index 81% rename from packages/kbn-securitysolution-exception-list-components/src/generate_linked_rules_menu_item/index.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/generate_linked_rules_menu_item/index.tsx index d68ac8f114a0..9187d0975e92 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/generate_linked_rules_menu_item/index.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/generate_linked_rules_menu_item/index.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React, { ElementType, ReactElement } from 'react'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/generate_linked_rules_menu_item/menu_link.styles.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/generate_linked_rules_menu_item/menu_link.styles.ts new file mode 100644 index 000000000000..886369b22e23 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/generate_linked_rules_menu_item/menu_link.styles.ts @@ -0,0 +1,18 @@ +/* + * 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 { css } from '@emotion/react'; +import { euiThemeVars } from '@kbn/ui-theme'; + +export const containerCss = css` + border-bottom: 1px solid ${euiThemeVars.euiColorLightShade}; +`; + +export const itemContentCss = css` + color: ${euiThemeVars.euiColorPrimary}; + flex-basis: content; +`; diff --git a/packages/kbn-securitysolution-exception-list-components/src/header_menu/__snapshots__/header_menu.test.tsx.snap b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/header_menu/__snapshots__/header_menu.test.tsx.snap similarity index 100% rename from packages/kbn-securitysolution-exception-list-components/src/header_menu/__snapshots__/header_menu.test.tsx.snap rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/header_menu/__snapshots__/header_menu.test.tsx.snap diff --git a/packages/kbn-securitysolution-exception-list-components/src/header_menu/header_menu.test.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/header_menu/header_menu.test.tsx similarity index 93% rename from packages/kbn-securitysolution-exception-list-components/src/header_menu/header_menu.test.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/header_menu/header_menu.test.tsx index 7e14b503721b..2869b16e3aaa 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/header_menu/header_menu.test.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/header_menu/header_menu.test.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { createEvent, fireEvent, render } from '@testing-library/react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/header_menu/index.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/header_menu/index.tsx similarity index 90% rename from packages/kbn-securitysolution-exception-list-components/src/header_menu/index.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/header_menu/index.tsx index 2f39959c33fe..bd634b5f6c36 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/header_menu/index.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/header_menu/index.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React, { FC, ReactElement, useMemo, useState } from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/list_header/__snapshots__/list_header.test.tsx.snap b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/__snapshots__/list_header.test.tsx.snap similarity index 100% rename from packages/kbn-securitysolution-exception-list-components/src/list_header/__snapshots__/list_header.test.tsx.snap rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/__snapshots__/list_header.test.tsx.snap diff --git a/packages/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/__snapshots__/edit_modal.test.tsx.snap b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/__snapshots__/edit_modal.test.tsx.snap similarity index 100% rename from packages/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/__snapshots__/edit_modal.test.tsx.snap rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/__snapshots__/edit_modal.test.tsx.snap diff --git a/packages/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/edit_modal.test.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/edit_modal.test.tsx similarity index 93% rename from packages/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/edit_modal.test.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/edit_modal.test.tsx index 39692e35394e..9b23afaf2089 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/edit_modal.test.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/edit_modal.test.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/index.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/index.tsx similarity index 88% rename from packages/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/index.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/index.tsx index 82aec99bebb3..fda87a768fd0 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/index.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/index.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React, { FC } from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/use_edit_modal.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/use_edit_modal.test.ts similarity index 81% rename from packages/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/use_edit_modal.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/use_edit_modal.test.ts index 65b532a55c83..a540fdd7704d 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/use_edit_modal.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/use_edit_modal.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { ChangeEvent, SyntheticEvent } from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/use_edit_modal.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/use_edit_modal.ts similarity index 80% rename from packages/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/use_edit_modal.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/use_edit_modal.ts index 6977b8467b94..38c60328ef3d 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/use_edit_modal.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/edit_modal/use_edit_modal.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { useGeneratedHtmlId } from '@elastic/eui'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/list_header/index.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/index.tsx similarity index 92% rename from packages/kbn-securitysolution-exception-list-components/src/list_header/index.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/index.tsx index 849dd4ef1ba8..a6fce8869999 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/list_header/index.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/index.tsx @@ -1,12 +1,12 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ +/* eslint-disable react/jsx-no-literals */ + import React from 'react'; import type { FC } from 'react'; import { EuiIcon, EuiPageHeader, EuiText } from '@elastic/eui'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/list_header/list_header.styles.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/list_header.styles.ts similarity index 66% rename from packages/kbn-securitysolution-exception-list-components/src/list_header/list_header.styles.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/list_header.styles.ts index c3cba9f9dcdb..7a82cd9bc289 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/list_header/list_header.styles.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/list_header.styles.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { css } from '@emotion/react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/list_header/list_header.test.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/list_header.test.tsx similarity index 94% rename from packages/kbn-securitysolution-exception-list-components/src/list_header/list_header.test.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/list_header.test.tsx index 9ceb648dfa7e..246e88071608 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/list_header/list_header.test.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/list_header.test.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/list_header/menu_items/__snapshots__/menu_items.test.tsx.snap b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/menu_items/__snapshots__/menu_items.test.tsx.snap similarity index 100% rename from packages/kbn-securitysolution-exception-list-components/src/list_header/menu_items/__snapshots__/menu_items.test.tsx.snap rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/menu_items/__snapshots__/menu_items.test.tsx.snap diff --git a/packages/kbn-securitysolution-exception-list-components/src/list_header/menu_items/index.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/menu_items/index.tsx similarity index 91% rename from packages/kbn-securitysolution-exception-list-components/src/list_header/menu_items/index.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/menu_items/index.tsx index f0aecf21b6c7..798f737be65d 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/list_header/menu_items/index.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/menu_items/index.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { EuiButton, EuiFlexGroup, EuiFlexItem, EuiTextColor } from '@elastic/eui'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/list_header/menu_items/menu_items.test.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/menu_items/menu_items.test.tsx similarity index 94% rename from packages/kbn-securitysolution-exception-list-components/src/list_header/menu_items/menu_items.test.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/menu_items/menu_items.test.tsx index 16072bab295a..8fdf6519cf44 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/list_header/menu_items/menu_items.test.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/menu_items/menu_items.test.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { fireEvent, render } from '@testing-library/react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/list_header/use_list_header.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/use_list_header.test.ts similarity index 86% rename from packages/kbn-securitysolution-exception-list-components/src/list_header/use_list_header.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/use_list_header.test.ts index e16681d2b184..a49ef8f6f560 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/list_header/use_list_header.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/use_list_header.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { waitFor, renderHook, act } from '@testing-library/react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/list_header/use_list_header.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/use_list_header.ts similarity index 73% rename from packages/kbn-securitysolution-exception-list-components/src/list_header/use_list_header.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/use_list_header.ts index 676dd08a53be..cda4bf346a20 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/list_header/use_list_header.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/list_header/use_list_header.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { useState } from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/mocks/comments.mock.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/mocks/comments.mock.tsx similarity index 62% rename from packages/kbn-securitysolution-exception-list-components/src/mocks/comments.mock.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/mocks/comments.mock.tsx index 4c9b813463ca..02767cfb979d 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/mocks/comments.mock.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/mocks/comments.mock.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/mocks/entry.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/mocks/entry.mock.ts similarity index 58% rename from packages/kbn-securitysolution-exception-list-components/src/mocks/entry.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/mocks/entry.mock.ts index a39fe947caa2..34a4e98cf981 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/mocks/entry.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/mocks/entry.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { Entry } from '../exception_item_card/conditions/types'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/mocks/exception_list_item_schema.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/mocks/exception_list_item_schema.mock.ts similarity index 75% rename from packages/kbn-securitysolution-exception-list-components/src/mocks/exception_list_item_schema.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/mocks/exception_list_item_schema.mock.ts index f9c24d46228c..a34ddc4dd484 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/mocks/exception_list_item_schema.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/mocks/exception_list_item_schema.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/mocks/header.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/mocks/header.mock.ts similarity index 65% rename from packages/kbn-securitysolution-exception-list-components/src/mocks/header.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/mocks/header.mock.ts index 06aa00b5ff72..5ee301495e6f 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/mocks/header.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/mocks/header.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ export const handleEdit = jest.fn(); diff --git a/packages/kbn-securitysolution-exception-list-components/src/mocks/rule_references.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/mocks/rule_references.mock.ts similarity index 66% rename from packages/kbn-securitysolution-exception-list-components/src/mocks/rule_references.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/mocks/rule_references.mock.ts index 3592d5f03cc4..c4eaff274a74 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/mocks/rule_references.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/mocks/rule_references.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { Rule, RuleReference } from '../types'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/mocks/security_link_component.mock.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/mocks/security_link_component.mock.tsx similarity index 70% rename from packages/kbn-securitysolution-exception-list-components/src/mocks/security_link_component.mock.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/mocks/security_link_component.mock.tsx index 1ad7d2921c5a..03c44d7e9166 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/mocks/security_link_component.mock.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/mocks/security_link_component.mock.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React, { ReactElement } from 'react'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/mocks/value_list_modal.mock.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/mocks/value_list_modal.mock.tsx new file mode 100644 index 000000000000..e0f9f5d700be --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/mocks/value_list_modal.mock.tsx @@ -0,0 +1,14 @@ +/* + * 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 React from 'react'; + +export const mockShowValueListModal = jest.fn(); +export const MockedShowValueListModal = (props: { children: React.ReactNode }) => { + mockShowValueListModal(props); + return <>{props.children}; +}; diff --git a/packages/kbn-securitysolution-exception-list-components/src/pagination/pagination.test.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/pagination/pagination.test.tsx similarity index 84% rename from packages/kbn-securitysolution-exception-list-components/src/pagination/pagination.test.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/pagination/pagination.test.tsx index 5eaab267abb5..1467653d432b 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/pagination/pagination.test.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/pagination/pagination.test.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { fireEvent, render } from '@testing-library/react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/pagination/pagination.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/pagination/pagination.tsx similarity index 74% rename from packages/kbn-securitysolution-exception-list-components/src/pagination/pagination.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/pagination/pagination.tsx index 38be3b8474ad..e7275c4be2c2 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/pagination/pagination.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/pagination/pagination.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/pagination/use_pagination.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/pagination/use_pagination.test.ts similarity index 87% rename from packages/kbn-securitysolution-exception-list-components/src/pagination/use_pagination.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/pagination/use_pagination.test.ts index e90408f1e161..2126ace9191b 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/pagination/use_pagination.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/pagination/use_pagination.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { renderHook, act } from '@testing-library/react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/pagination/use_pagination.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/pagination/use_pagination.ts similarity index 76% rename from packages/kbn-securitysolution-exception-list-components/src/pagination/use_pagination.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/pagination/use_pagination.ts index da96624f8b43..289d5ebcaa26 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/pagination/use_pagination.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/pagination/use_pagination.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { useCallback, useMemo } from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/partial_code_signature_callout/index.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/partial_code_signature_callout/index.tsx similarity index 71% rename from packages/kbn-securitysolution-exception-list-components/src/partial_code_signature_callout/index.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/partial_code_signature_callout/index.tsx index 72836fc78fb5..4339d95b6c4c 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/partial_code_signature_callout/index.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/partial_code_signature_callout/index.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/search_bar/index.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/search_bar/index.tsx similarity index 89% rename from packages/kbn-securitysolution-exception-list-components/src/search_bar/index.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/search_bar/index.tsx index 0670a2553a69..dd36c16b9bd8 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/search_bar/index.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/search_bar/index.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React, { useCallback } from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/search_bar/search_bar.test.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/search_bar/search_bar.test.tsx similarity index 88% rename from packages/kbn-securitysolution-exception-list-components/src/search_bar/search_bar.test.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/search_bar/search_bar.test.tsx index b1eadded0e3f..a7eaa7ba47ad 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/search_bar/search_bar.test.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/search_bar/search_bar.test.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/text_with_edit/__snapshots__/text_with_edit.test.tsx.snap b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/text_with_edit/__snapshots__/text_with_edit.test.tsx.snap similarity index 100% rename from packages/kbn-securitysolution-exception-list-components/src/text_with_edit/__snapshots__/text_with_edit.test.tsx.snap rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/text_with_edit/__snapshots__/text_with_edit.test.tsx.snap diff --git a/packages/kbn-securitysolution-exception-list-components/src/text_with_edit/index.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/text_with_edit/index.tsx similarity index 78% rename from packages/kbn-securitysolution-exception-list-components/src/text_with_edit/index.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/text_with_edit/index.tsx index aa5625cfe671..1428dcfa238e 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/text_with_edit/index.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/text_with_edit/index.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React, { FC } from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/text_with_edit/text_with_edit.styles.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/text_with_edit/text_with_edit.styles.ts similarity index 54% rename from packages/kbn-securitysolution-exception-list-components/src/text_with_edit/text_with_edit.styles.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/text_with_edit/text_with_edit.styles.ts index e293ea073041..d61aaab0f9be 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/text_with_edit/text_with_edit.styles.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/text_with_edit/text_with_edit.styles.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { css } from '@emotion/react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/text_with_edit/text_with_edit.test.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/text_with_edit/text_with_edit.test.tsx similarity index 84% rename from packages/kbn-securitysolution-exception-list-components/src/text_with_edit/text_with_edit.test.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/text_with_edit/text_with_edit.test.tsx index eab0eb7817d8..24b5eec6e335 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/text_with_edit/text_with_edit.test.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/text_with_edit/text_with_edit.test.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { fireEvent, render } from '@testing-library/react'; @@ -35,6 +33,7 @@ describe('TextWithEdit', () => { isReadonly={false} dataTestSubj="TextWithEditTest" text="Test" + // eslint-disable-next-line @typescript-eslint/no-explicit-any onEdit={onEdit as any} /> ); diff --git a/packages/kbn-securitysolution-exception-list-components/src/translations.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/translations.ts similarity index 92% rename from packages/kbn-securitysolution-exception-list-components/src/translations.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/translations.ts index dff688d156da..5660ac3564c7 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/translations.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/translations.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { i18n } from '@kbn/i18n'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/types/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/types/index.ts similarity index 80% rename from packages/kbn-securitysolution-exception-list-components/src/types/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/types/index.ts index 57a0ee3901ba..d628cd013797 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/types/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/types/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { ListArray } from '@kbn/securitysolution-io-ts-list-types'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/index.ts new file mode 100644 index 000000000000..968bc9666b09 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/index.ts @@ -0,0 +1,8 @@ +/* + * 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. + */ + +export { ValueWithSpaceWarning } from './value_with_space_warning'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/use_value_with_space_warning.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/use_value_with_space_warning.test.ts similarity index 84% rename from packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/use_value_with_space_warning.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/use_value_with_space_warning.test.ts index 51954c0140e6..570399a5ecb2 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/use_value_with_space_warning.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/use_value_with_space_warning.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { renderHook } from '@testing-library/react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/use_value_with_space_warning.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/use_value_with_space_warning.ts similarity index 67% rename from packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/use_value_with_space_warning.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/use_value_with_space_warning.ts index d5a6392815a7..252f05f4d102 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/use_value_with_space_warning.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/use_value_with_space_warning.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { paramContainsSpace, autoCompletei18n } from '@kbn/securitysolution-autocomplete'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/value_with_space_warning.test.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/value_with_space_warning.test.tsx similarity index 81% rename from packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/value_with_space_warning.test.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/value_with_space_warning.test.tsx index 8f780181e052..a500f13af6e1 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/value_with_space_warning.test.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/value_with_space_warning.test.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/value_with_space_warning.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/value_with_space_warning.tsx similarity index 75% rename from packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/value_with_space_warning.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/value_with_space_warning.tsx index c736982142b1..c73a39a516ed 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/value_with_space_warning.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/value_with_space_warning.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/src/wildcard_with_wrong_operator_callout/index.tsx b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/wildcard_with_wrong_operator_callout/index.tsx similarity index 80% rename from packages/kbn-securitysolution-exception-list-components/src/wildcard_with_wrong_operator_callout/index.tsx rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/wildcard_with_wrong_operator_callout/index.tsx index d68782b4c17f..b21259f4ed89 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/wildcard_with_wrong_operator_callout/index.tsx +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/wildcard_with_wrong_operator_callout/index.tsx @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 React from 'react'; diff --git a/packages/kbn-securitysolution-exception-list-components/tsconfig.json b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/tsconfig.json similarity index 89% rename from packages/kbn-securitysolution-exception-list-components/tsconfig.json rename to x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/tsconfig.json index b3df3a2aa208..5378a8fbdfe1 100644 --- a/packages/kbn-securitysolution-exception-list-components/tsconfig.json +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", "types": [ diff --git a/packages/kbn-securitysolution-exceptions-common/README.md b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/README.md similarity index 100% rename from packages/kbn-securitysolution-exceptions-common/README.md rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/README.md diff --git a/packages/kbn-securitysolution-exceptions-common/api/create_exception_list/create_exception_list.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list/create_exception_list.gen.ts similarity index 78% rename from packages/kbn-securitysolution-exceptions-common/api/create_exception_list/create_exception_list.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list/create_exception_list.gen.ts index a9acaee37cef..2c7dc29dd182 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/create_exception_list/create_exception_list.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list/create_exception_list.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-exceptions-common/api/create_exception_list/create_exception_list.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list/create_exception_list.schema.yaml similarity index 79% rename from packages/kbn-securitysolution-exceptions-common/api/create_exception_list/create_exception_list.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list/create_exception_list.schema.yaml index 5925d0bd923c..e7a399c2d7a8 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/create_exception_list/create_exception_list.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list/create_exception_list.schema.yaml @@ -59,29 +59,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 409: description: Exception list already exists response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-exceptions-common/api/create_exception_list_item/create_exception_list_item.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list_item/create_exception_list_item.gen.ts similarity index 85% rename from packages/kbn-securitysolution-exceptions-common/api/create_exception_list_item/create_exception_list_item.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list_item/create_exception_list_item.gen.ts index 9adf64b6b083..dba75c11fde8 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/create_exception_list_item/create_exception_list_item.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list_item/create_exception_list_item.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-exceptions-common/api/create_exception_list_item/create_exception_list_item.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list_item/create_exception_list_item.schema.yaml similarity index 78% rename from packages/kbn-securitysolution-exceptions-common/api/create_exception_list_item/create_exception_list_item.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list_item/create_exception_list_item.schema.yaml index 47fa2895d27c..2913d8c5c07d 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/create_exception_list_item/create_exception_list_item.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list_item/create_exception_list_item.schema.yaml @@ -69,32 +69,32 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 409: description: Exception list item already exists response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' components: x-codegen-enabled: true @@ -103,7 +103,7 @@ components: type: object properties: comment: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' required: - comment diff --git a/packages/kbn-securitysolution-exceptions-common/api/create_rule_exceptions/create_rule_exceptions.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_rule_exceptions/create_rule_exceptions.gen.ts similarity index 88% rename from packages/kbn-securitysolution-exceptions-common/api/create_rule_exceptions/create_rule_exceptions.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_rule_exceptions/create_rule_exceptions.gen.ts index 77437ff51618..e2fa379cdc52 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/create_rule_exceptions/create_rule_exceptions.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_rule_exceptions/create_rule_exceptions.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-exceptions-common/api/create_rule_exceptions/create_rule_exceptions.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_rule_exceptions/create_rule_exceptions.schema.yaml similarity index 78% rename from packages/kbn-securitysolution-exceptions-common/api/create_rule_exceptions/create_rule_exceptions.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_rule_exceptions/create_rule_exceptions.schema.yaml index 6162d00d78ae..b7b2db3fabef 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/create_rule_exceptions/create_rule_exceptions.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_rule_exceptions/create_rule_exceptions.schema.yaml @@ -9,7 +9,7 @@ paths: operationId: CreateRuleExceptionListItems x-codegen-enabled: true summary: Create rule exception list items - description: Create exception items that apply to a single detection rule. + description: Create exception items that apply to a single detection rule. parameters: - name: id in: path @@ -45,37 +45,37 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' components: schemas: RuleId: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/UUID' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/UUID' CreateRuleExceptionListItemComment: type: object properties: comment: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' required: - comment diff --git a/packages/kbn-securitysolution-exceptions-common/api/create_shared_exceptions_list/create_shared_exceptions_list.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_shared_exceptions_list/create_shared_exceptions_list.gen.ts similarity index 72% rename from packages/kbn-securitysolution-exceptions-common/api/create_shared_exceptions_list/create_shared_exceptions_list.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_shared_exceptions_list/create_shared_exceptions_list.gen.ts index aedd1f5fc5cc..07650ee2d0c0 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/create_shared_exceptions_list/create_shared_exceptions_list.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_shared_exceptions_list/create_shared_exceptions_list.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-exceptions-common/api/create_shared_exceptions_list/create_shared_exceptions_list.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_shared_exceptions_list/create_shared_exceptions_list.schema.yaml similarity index 72% rename from packages/kbn-securitysolution-exceptions-common/api/create_shared_exceptions_list/create_shared_exceptions_list.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_shared_exceptions_list/create_shared_exceptions_list.schema.yaml index c4cee089e583..040acca3ebd7 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/create_shared_exceptions_list/create_shared_exceptions_list.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_shared_exceptions_list/create_shared_exceptions_list.schema.yaml @@ -40,29 +40,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 409: description: Exception list already exists response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list/delete_exception_list.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list/delete_exception_list.gen.ts similarity index 75% rename from packages/kbn-securitysolution-exceptions-common/api/delete_exception_list/delete_exception_list.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list/delete_exception_list.gen.ts index a12512aab137..0842dc7c7463 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list/delete_exception_list.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list/delete_exception_list.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list/delete_exception_list.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list/delete_exception_list.schema.yaml similarity index 69% rename from packages/kbn-securitysolution-exceptions-common/api/delete_exception_list/delete_exception_list.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list/delete_exception_list.schema.yaml index 92afc3232efe..2912070635b8 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list/delete_exception_list.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list/delete_exception_list.schema.yaml @@ -42,29 +42,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: Exception list not found response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list_item/delete_exception_list_item.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list_item/delete_exception_list_item.gen.ts similarity index 76% rename from packages/kbn-securitysolution-exceptions-common/api/delete_exception_list_item/delete_exception_list_item.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list_item/delete_exception_list_item.gen.ts index a93af0cf3d4c..429568c33f1c 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list_item/delete_exception_list_item.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list_item/delete_exception_list_item.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list_item/delete_exception_list_item.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list_item/delete_exception_list_item.schema.yaml similarity index 70% rename from packages/kbn-securitysolution-exceptions-common/api/delete_exception_list_item/delete_exception_list_item.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list_item/delete_exception_list_item.schema.yaml index 9f57afcd5ab1..05f997307a4c 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list_item/delete_exception_list_item.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list_item/delete_exception_list_item.schema.yaml @@ -42,29 +42,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: Exception list item not found response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-exceptions-common/api/duplicate_exception_list/duplicate_exception_list.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/duplicate_exception_list/duplicate_exception_list.gen.ts similarity index 75% rename from packages/kbn-securitysolution-exceptions-common/api/duplicate_exception_list/duplicate_exception_list.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/duplicate_exception_list/duplicate_exception_list.gen.ts index 61de17abe06f..d259d37b2348 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/duplicate_exception_list/duplicate_exception_list.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/duplicate_exception_list/duplicate_exception_list.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-exceptions-common/api/duplicate_exception_list/duplicate_exception_list.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/duplicate_exception_list/duplicate_exception_list.schema.yaml similarity index 69% rename from packages/kbn-securitysolution-exceptions-common/api/duplicate_exception_list/duplicate_exception_list.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/duplicate_exception_list/duplicate_exception_list.schema.yaml index 758171327ee4..80620c4adf7f 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/duplicate_exception_list/duplicate_exception_list.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/duplicate_exception_list/duplicate_exception_list.schema.yaml @@ -43,29 +43,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 405: description: Exception list to duplicate not found response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-exceptions-common/api/export_exception_list/export_exception_list.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/export_exception_list/export_exception_list.gen.ts similarity index 73% rename from packages/kbn-securitysolution-exceptions-common/api/export_exception_list/export_exception_list.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/export_exception_list/export_exception_list.gen.ts index 9645b8ac793c..280884c7d749 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/export_exception_list/export_exception_list.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/export_exception_list/export_exception_list.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-exceptions-common/api/export_exception_list/export_exception_list.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/export_exception_list/export_exception_list.schema.yaml similarity index 72% rename from packages/kbn-securitysolution-exceptions-common/api/export_exception_list/export_exception_list.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/export_exception_list/export_exception_list.schema.yaml index 3232f46c238c..89f97ff8bbe6 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/export_exception_list/export_exception_list.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/export_exception_list/export_exception_list.schema.yaml @@ -51,29 +51,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: Exception list not found response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-exceptions-common/api/find_exception_list_items/find_exception_list_items.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_list_items/find_exception_list_items.gen.ts similarity index 86% rename from packages/kbn-securitysolution-exceptions-common/api/find_exception_list_items/find_exception_list_items.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_list_items/find_exception_list_items.gen.ts index 99ed1b3a31dd..d7606bbccff3 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/find_exception_list_items/find_exception_list_items.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_list_items/find_exception_list_items.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-exceptions-common/api/find_exception_list_items/find_exception_list_items.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_list_items/find_exception_list_items.schema.yaml similarity index 77% rename from packages/kbn-securitysolution-exceptions-common/api/find_exception_list_items/find_exception_list_items.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_list_items/find_exception_list_items.schema.yaml index e40f780af03e..6d390e9ecdf6 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/find_exception_list_items/find_exception_list_items.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_list_items/find_exception_list_items.schema.yaml @@ -65,7 +65,7 @@ paths: required: false description: Determines which field is used to sort the results schema: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' - name: sort_order in: query required: false @@ -107,34 +107,34 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: Exception list not found response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' components: schemas: FindExceptionListItemsFilter: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' diff --git a/packages/kbn-securitysolution-exceptions-common/api/find_exception_lists/find_exception_lists.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_lists/find_exception_lists.gen.ts similarity index 85% rename from packages/kbn-securitysolution-exceptions-common/api/find_exception_lists/find_exception_lists.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_lists/find_exception_lists.gen.ts index 83a68b4232e8..82f5de2f5a15 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/find_exception_lists/find_exception_lists.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_lists/find_exception_lists.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-exceptions-common/api/find_exception_lists/find_exception_lists.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_lists/find_exception_lists.schema.yaml similarity index 82% rename from packages/kbn-securitysolution-exceptions-common/api/find_exception_lists/find_exception_lists.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_lists/find_exception_lists.schema.yaml index c46dacbab01d..49017d6d4591 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/find_exception_lists/find_exception_lists.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_lists/find_exception_lists.schema.yaml @@ -93,26 +93,26 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' components: schemas: diff --git a/packages/kbn-securitysolution-exceptions-common/api/import_exceptions/import_exceptions.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/import_exceptions/import_exceptions.gen.ts similarity index 86% rename from packages/kbn-securitysolution-exceptions-common/api/import_exceptions/import_exceptions.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/import_exceptions/import_exceptions.gen.ts index ea24803e7945..738ce79dd97d 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/import_exceptions/import_exceptions.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/import_exceptions/import_exceptions.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-exceptions-common/api/import_exceptions/import_exceptions.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/import_exceptions/import_exceptions.schema.yaml similarity index 85% rename from packages/kbn-securitysolution-exceptions-common/api/import_exceptions/import_exceptions.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/import_exceptions/import_exceptions.schema.yaml index 8ae3ac1aa2c0..95bc9ee508e5 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/import_exceptions/import_exceptions.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/import_exceptions/import_exceptions.schema.yaml @@ -92,26 +92,26 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' components: schemas: diff --git a/packages/kbn-securitysolution-exceptions-common/api/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/index.ts similarity index 77% rename from packages/kbn-securitysolution-exceptions-common/api/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/index.ts index fd6722b67ace..014fe58cfce0 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ export * from './model/exception_list_common.gen'; diff --git a/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.gen.ts similarity index 94% rename from packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.gen.ts index 1f2d9e7387da..2ee44afa69b9 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.schema.yaml similarity index 83% rename from packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.schema.yaml index ebcecc9c916f..4ca9326ec6c9 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.schema.yaml @@ -7,10 +7,10 @@ components: x-codegen-enabled: true schemas: ExceptionListId: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' ExceptionListHumanId: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' description: Human readable string identifier, e.g. `trusted-linux-processes` ExceptionListType: @@ -122,17 +122,17 @@ components: - updated_by ExceptionListItemId: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' ExceptionListItemHumanId: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' ExceptionListItemType: type: string enum: [simple] ExceptionListItemName: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' ExceptionListItemDescription: type: string @@ -144,7 +144,7 @@ components: ExceptionListItemTags: type: array items: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' ExceptionListItemOsType: type: string @@ -162,19 +162,19 @@ components: type: object properties: id: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' comment: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' created_at: type: string format: date-time created_by: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' updated_at: type: string format: date-time updated_by: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' required: - id - comment @@ -278,7 +278,7 @@ components: comments: $ref: '#/components/schemas/ExceptionListItemCommentArray' version: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' tie_breaker_id: type: string created_at: diff --git a/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.gen.ts similarity index 90% rename from packages/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.gen.ts index 0b7f0233ba42..272e5e7d6c35 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.schema.yaml similarity index 74% rename from packages/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.schema.yaml index 883a62e5bbec..ab8c427344a0 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.schema.yaml @@ -17,9 +17,9 @@ components: type: string enum: [match] field: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' value: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' operator: $ref: '#/components/schemas/ExceptionListItemEntryOperator' required: @@ -35,11 +35,11 @@ components: type: string enum: [match_any] field: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' value: type: array items: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' minItems: 1 operator: $ref: '#/components/schemas/ExceptionListItemEntryOperator' @@ -56,7 +56,7 @@ components: type: string enum: [list] field: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' list: type: object properties: @@ -80,7 +80,7 @@ components: type: string enum: [exists] field: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' operator: $ref: '#/components/schemas/ExceptionListItemEntryOperator' required: @@ -101,7 +101,7 @@ components: type: string enum: [nested] field: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' entries: type: array items: @@ -119,9 +119,9 @@ components: type: string enum: [wildcard] field: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' value: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' operator: $ref: '#/components/schemas/ExceptionListItemEntryOperator' required: diff --git a/packages/kbn-securitysolution-exceptions-common/api/quickstart_client.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/quickstart_client.gen.ts similarity index 97% rename from packages/kbn-securitysolution-exceptions-common/api/quickstart_client.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/quickstart_client.gen.ts index 4827baab85e9..bfa84f18fa7c 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/quickstart_client.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/quickstart_client.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-exceptions-common/api/read_exception_list/read_exception_list.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list/read_exception_list.gen.ts similarity index 74% rename from packages/kbn-securitysolution-exceptions-common/api/read_exception_list/read_exception_list.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list/read_exception_list.gen.ts index 67a832b01195..87db0f9e7562 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/read_exception_list/read_exception_list.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list/read_exception_list.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-exceptions-common/api/read_exception_list/read_exception_list.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list/read_exception_list.schema.yaml similarity index 69% rename from packages/kbn-securitysolution-exceptions-common/api/read_exception_list/read_exception_list.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list/read_exception_list.schema.yaml index 0bf082c1713b..e50147083daf 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/read_exception_list/read_exception_list.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list/read_exception_list.schema.yaml @@ -42,29 +42,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: Exception list item not found response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_item/read_exception_list_item.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_item/read_exception_list_item.gen.ts similarity index 75% rename from packages/kbn-securitysolution-exceptions-common/api/read_exception_list_item/read_exception_list_item.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_item/read_exception_list_item.gen.ts index 4de512301cd8..02f6d1055838 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_item/read_exception_list_item.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_item/read_exception_list_item.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_item/read_exception_list_item.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_item/read_exception_list_item.schema.yaml similarity index 70% rename from packages/kbn-securitysolution-exceptions-common/api/read_exception_list_item/read_exception_list_item.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_item/read_exception_list_item.schema.yaml index c271016a87eb..6d7fac776718 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_item/read_exception_list_item.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_item/read_exception_list_item.schema.yaml @@ -42,29 +42,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: Exception list item not found response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_summary/read_exception_list_summary.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_summary/read_exception_list_summary.gen.ts similarity index 79% rename from packages/kbn-securitysolution-exceptions-common/api/read_exception_list_summary/read_exception_list_summary.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_summary/read_exception_list_summary.gen.ts index 3e3230dddb0a..8807f4b7e781 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_summary/read_exception_list_summary.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_summary/read_exception_list_summary.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_summary/read_exception_list_summary.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_summary/read_exception_list_summary.schema.yaml similarity index 73% rename from packages/kbn-securitysolution-exceptions-common/api/read_exception_list_summary/read_exception_list_summary.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_summary/read_exception_list_summary.schema.yaml index b0627111e877..02fc3c9c8f6f 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_summary/read_exception_list_summary.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_summary/read_exception_list_summary.schema.yaml @@ -61,29 +61,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: Exception list not found response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-exceptions-common/api/update_exception_list/update_exception_list.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list/update_exception_list.gen.ts similarity index 79% rename from packages/kbn-securitysolution-exceptions-common/api/update_exception_list/update_exception_list.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list/update_exception_list.gen.ts index 2f38661cc958..fb5fde05dcc8 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/update_exception_list/update_exception_list.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list/update_exception_list.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-exceptions-common/api/update_exception_list/update_exception_list.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list/update_exception_list.schema.yaml similarity index 77% rename from packages/kbn-securitysolution-exceptions-common/api/update_exception_list/update_exception_list.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list/update_exception_list.schema.yaml index 5e8f3dfd8b50..0f7218a86c23 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/update_exception_list/update_exception_list.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list/update_exception_list.schema.yaml @@ -59,29 +59,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: Exception list not found response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-exceptions-common/api/update_exception_list_item/update_exception_list_item.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list_item/update_exception_list_item.gen.ts similarity index 86% rename from packages/kbn-securitysolution-exceptions-common/api/update_exception_list_item/update_exception_list_item.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list_item/update_exception_list_item.gen.ts index 651c1dc1f2d4..791af5f65e35 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/update_exception_list_item/update_exception_list_item.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list_item/update_exception_list_item.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-exceptions-common/api/update_exception_list_item/update_exception_list_item.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list_item/update_exception_list_item.schema.yaml similarity index 77% rename from packages/kbn-securitysolution-exceptions-common/api/update_exception_list_item/update_exception_list_item.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list_item/update_exception_list_item.schema.yaml index 2b8182aeb5c3..9adc75141f56 100644 --- a/packages/kbn-securitysolution-exceptions-common/api/update_exception_list_item/update_exception_list_item.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list_item/update_exception_list_item.schema.yaml @@ -70,32 +70,32 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: Exception list item not found response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' components: x-codegen-enabled: true @@ -104,9 +104,9 @@ components: type: object properties: id: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' comment: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' required: - comment diff --git a/packages/kbn-securitysolution-exceptions-common/docs/openapi/ess/security_solution_exceptions_api_2023_10_31.bundled.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/docs/openapi/ess/security_solution_exceptions_api_2023_10_31.bundled.schema.yaml similarity index 100% rename from packages/kbn-securitysolution-exceptions-common/docs/openapi/ess/security_solution_exceptions_api_2023_10_31.bundled.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/docs/openapi/ess/security_solution_exceptions_api_2023_10_31.bundled.schema.yaml diff --git a/packages/kbn-securitysolution-exceptions-common/docs/openapi/serverless/security_solution_exceptions_api_2023_10_31.bundled.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/docs/openapi/serverless/security_solution_exceptions_api_2023_10_31.bundled.schema.yaml similarity index 100% rename from packages/kbn-securitysolution-exceptions-common/docs/openapi/serverless/security_solution_exceptions_api_2023_10_31.bundled.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/docs/openapi/serverless/security_solution_exceptions_api_2023_10_31.bundled.schema.yaml diff --git a/packages/kbn-securitysolution-exceptions-common/kibana.jsonc b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/kibana.jsonc similarity index 100% rename from packages/kbn-securitysolution-exceptions-common/kibana.jsonc rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/kibana.jsonc diff --git a/packages/kbn-securitysolution-exceptions-common/package.json b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/package.json similarity index 81% rename from packages/kbn-securitysolution-exceptions-common/package.json rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/package.json index 5148c4d5eedf..e68c27982b29 100644 --- a/packages/kbn-securitysolution-exceptions-common/package.json +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/package.json @@ -1,6 +1,6 @@ { "description": "Security Solution Exceptions common package", - "license": "Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0", + "license": "Elastic License 2.0", "name": "@kbn/securitysolution-exceptions-common", "private": true, "version": "1.0.0", diff --git a/packages/kbn-securitysolution-exceptions-common/scripts/openapi_bundle.js b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/scripts/openapi_bundle.js similarity index 69% rename from packages/kbn-securitysolution-exceptions-common/scripts/openapi_bundle.js rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/scripts/openapi_bundle.js index 70299e56eac2..996c55ce307d 100644 --- a/packages/kbn-securitysolution-exceptions-common/scripts/openapi_bundle.js +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/scripts/openapi_bundle.js @@ -1,13 +1,12 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ -require('../../../src/setup_node_env'); +require('../../../../../../src/setup_node_env'); +// eslint-disable-next-line import/no-nodejs-modules const { join, resolve } = require('path'); const { bundle } = require('@kbn/openapi-bundler'); diff --git a/packages/kbn-securitysolution-exceptions-common/scripts/openapi_bundle_info/exceptions_ess.info.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/scripts/openapi_bundle_info/exceptions_ess.info.yaml similarity index 100% rename from packages/kbn-securitysolution-exceptions-common/scripts/openapi_bundle_info/exceptions_ess.info.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/scripts/openapi_bundle_info/exceptions_ess.info.yaml diff --git a/packages/kbn-securitysolution-exceptions-common/scripts/openapi_bundle_info/exceptions_serverless.info.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/scripts/openapi_bundle_info/exceptions_serverless.info.yaml similarity index 100% rename from packages/kbn-securitysolution-exceptions-common/scripts/openapi_bundle_info/exceptions_serverless.info.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/scripts/openapi_bundle_info/exceptions_serverless.info.yaml diff --git a/packages/kbn-securitysolution-exceptions-common/scripts/openapi_generate.js b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/scripts/openapi_generate.js similarity index 68% rename from packages/kbn-securitysolution-exceptions-common/scripts/openapi_generate.js rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/scripts/openapi_generate.js index 13b260476f3a..92488001b0b3 100644 --- a/packages/kbn-securitysolution-exceptions-common/scripts/openapi_generate.js +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/scripts/openapi_generate.js @@ -1,13 +1,12 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ -require('../../../src/setup_node_env'); +require('../../../../../../src/setup_node_env'); +// eslint-disable-next-line import/no-nodejs-modules const { join, resolve } = require('path'); const { generate } = require('@kbn/openapi-generator'); const { REPO_ROOT } = require('@kbn/repo-info'); @@ -45,7 +44,7 @@ const ROOT = resolve(__dirname, '..'); bundle: { outFile: join( REPO_ROOT, - 'packages/kbn-securitysolution-exceptions-common/api/quickstart_client.gen.ts' + 'x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/quickstart_client.gen.ts' ), }, }); diff --git a/packages/kbn-securitysolution-exceptions-common/tsconfig.json b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/tsconfig.json similarity index 88% rename from packages/kbn-securitysolution-exceptions-common/tsconfig.json rename to x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/tsconfig.json index a58753f53a4f..ba5a2c115a33 100644 --- a/packages/kbn-securitysolution-exceptions-common/tsconfig.json +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/tsconfig.json @@ -4,7 +4,7 @@ "types": ["jest", "node"] }, "exclude": ["target/**/*"], - "extends": "../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "include": ["**/*.ts"], "kbn_references": [ "@kbn/openapi-common", diff --git a/packages/kbn-securitysolution-hook-utils/README.md b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/README.md similarity index 100% rename from packages/kbn-securitysolution-hook-utils/README.md rename to x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/README.md diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/index.ts new file mode 100644 index 000000000000..40ff03e88094 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/index.ts @@ -0,0 +1,12 @@ +/* + * 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. + */ + +export * from './src/types'; +export * from './src/use_async'; +export * from './src/use_is_mounted'; +export * from './src/use_observable'; +export * from './src/with_optional_signal'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/jest.config.js b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/jest.config.js new file mode 100644 index 000000000000..8238f9f7e97d --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/jest.config.js @@ -0,0 +1,12 @@ +/* + * 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. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../../..', + roots: ['/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils'], +}; diff --git a/packages/kbn-securitysolution-hook-utils/kibana.jsonc b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/kibana.jsonc similarity index 100% rename from packages/kbn-securitysolution-hook-utils/kibana.jsonc rename to x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/kibana.jsonc diff --git a/packages/kbn-securitysolution-hook-utils/package.json b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/package.json similarity index 73% rename from packages/kbn-securitysolution-hook-utils/package.json rename to x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/package.json index 71a83ce3ebb4..efd415370f23 100644 --- a/packages/kbn-securitysolution-hook-utils/package.json +++ b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/package.json @@ -2,7 +2,7 @@ "name": "@kbn/securitysolution-hook-utils", "version": "1.0.0", "description": "Security Solution utilities for React hooks", - "license": "Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0", + "license": "Elastic License 2.0", "private": true, "sideEffects": false } \ No newline at end of file diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/src/types.ts b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/src/types.ts new file mode 100644 index 000000000000..1b31cae2a16d --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/src/types.ts @@ -0,0 +1,17 @@ +/* + * 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. + */ + +/** + * Represents the state of an asynchronous task, along with an initiator + * function to kick off the work. + */ +export interface Task { + loading: boolean; + error: unknown | undefined; + result: Result | undefined; + start: (...args: Args) => void; +} diff --git a/packages/kbn-securitysolution-hook-utils/src/use_async/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/src/use_async/index.test.ts similarity index 91% rename from packages/kbn-securitysolution-hook-utils/src/use_async/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/src/use_async/index.test.ts index 99417c1fe329..e5420124a0eb 100644 --- a/packages/kbn-securitysolution-hook-utils/src/use_async/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/src/use_async/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { waitFor, renderHook, act } from '@testing-library/react'; diff --git a/packages/kbn-securitysolution-hook-utils/src/use_async/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/src/use_async/index.ts similarity index 78% rename from packages/kbn-securitysolution-hook-utils/src/use_async/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/src/use_async/index.ts index 2c695b26acdd..027039ac7cca 100644 --- a/packages/kbn-securitysolution-hook-utils/src/use_async/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/src/use_async/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { useCallback, useState } from 'react'; diff --git a/packages/kbn-securitysolution-hook-utils/src/use_is_mounted/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/src/use_is_mounted/index.test.ts similarity index 59% rename from packages/kbn-securitysolution-hook-utils/src/use_is_mounted/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/src/use_is_mounted/index.test.ts index a8013a65441c..52f3a0739f4a 100644 --- a/packages/kbn-securitysolution-hook-utils/src/use_is_mounted/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/src/use_is_mounted/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { renderHook } from '@testing-library/react'; diff --git a/packages/kbn-securitysolution-hook-utils/src/use_is_mounted/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/src/use_is_mounted/index.ts similarity index 63% rename from packages/kbn-securitysolution-hook-utils/src/use_is_mounted/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/src/use_is_mounted/index.ts index b563840d2f73..8d325aed1abd 100644 --- a/packages/kbn-securitysolution-hook-utils/src/use_is_mounted/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/src/use_is_mounted/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { useCallback, useEffect, useRef } from 'react'; diff --git a/packages/kbn-securitysolution-hook-utils/src/use_observable/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/src/use_observable/index.test.ts similarity index 91% rename from packages/kbn-securitysolution-hook-utils/src/use_observable/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/src/use_observable/index.test.ts index 8d90bffeb3ee..3c6d96e3d3ac 100644 --- a/packages/kbn-securitysolution-hook-utils/src/use_observable/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/src/use_observable/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { renderHook, act } from '@testing-library/react'; diff --git a/packages/kbn-securitysolution-hook-utils/src/use_observable/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/src/use_observable/index.ts similarity index 84% rename from packages/kbn-securitysolution-hook-utils/src/use_observable/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/src/use_observable/index.ts index 0b7f9ab93e02..b7cd1e2623b7 100644 --- a/packages/kbn-securitysolution-hook-utils/src/use_observable/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/src/use_observable/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { useCallback, useEffect, useRef, useReducer, Reducer } from 'react'; diff --git a/packages/kbn-securitysolution-hook-utils/src/with_optional_signal/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/src/with_optional_signal/index.test.ts similarity index 68% rename from packages/kbn-securitysolution-hook-utils/src/with_optional_signal/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/src/with_optional_signal/index.test.ts index fa77482d24be..05a1b2fa167a 100644 --- a/packages/kbn-securitysolution-hook-utils/src/with_optional_signal/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/src/with_optional_signal/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { withOptionalSignal } from '.'; diff --git a/packages/kbn-securitysolution-hook-utils/src/with_optional_signal/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/src/with_optional_signal/index.ts similarity index 63% rename from packages/kbn-securitysolution-hook-utils/src/with_optional_signal/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/src/with_optional_signal/index.ts index eb7cffeb7e00..eadad58804f8 100644 --- a/packages/kbn-securitysolution-hook-utils/src/with_optional_signal/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/src/with_optional_signal/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ interface SignalArgs { diff --git a/packages/kbn-securitysolution-hook-utils/tsconfig.json b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/tsconfig.json similarity index 76% rename from packages/kbn-securitysolution-hook-utils/tsconfig.json rename to x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/tsconfig.json index 9b5c5373afe0..ccdf26c349f0 100644 --- a/packages/kbn-securitysolution-hook-utils/tsconfig.json +++ b/x-pack/solutions/security/packages/kbn-securitysolution-hook-utils/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", "types": ["jest", "node"] diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/README.md b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/README.md similarity index 100% rename from packages/kbn-securitysolution-io-ts-alerting-types/README.md rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/README.md diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/index.ts similarity index 78% rename from packages/kbn-securitysolution-io-ts-alerting-types/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/index.ts index 6baaf0a70403..f5e8f8419b25 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ export * from './src/actions'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/jest.config.js b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/jest.config.js new file mode 100644 index 000000000000..16223422cbd8 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/jest.config.js @@ -0,0 +1,12 @@ +/* + * 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. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../../..', + roots: ['/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types'], +}; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/kibana.jsonc b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/kibana.jsonc similarity index 100% rename from packages/kbn-securitysolution-io-ts-alerting-types/kibana.jsonc rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/kibana.jsonc diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/package.json b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/package.json similarity index 77% rename from packages/kbn-securitysolution-io-ts-alerting-types/package.json rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/package.json index ab19f69d20b3..bbe6c163fb5e 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/package.json +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/package.json @@ -2,7 +2,7 @@ "name": "@kbn/securitysolution-io-ts-alerting-types", "version": "1.0.0", "description": "io ts utilities and types to be shared with plugins from the security solution project", - "license": "Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0", + "license": "Elastic License 2.0", "private": true, "sideEffects": false } \ No newline at end of file diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/actions/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/actions/index.ts similarity index 89% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/actions/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/actions/index.ts index ad1dde3da745..64953a0dc0cd 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/actions/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/actions/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { NonEmptyString } from '@kbn/securitysolution-io-ts-types'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/constants/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/constants/index.mock.ts similarity index 63% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/constants/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/constants/index.mock.ts index bb398e0df846..2747846c74d8 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/constants/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/constants/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ export const ENTRY_VALUE = 'some host name'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/constants/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/constants/index.ts new file mode 100644 index 000000000000..ad5a2ba26226 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/constants/index.ts @@ -0,0 +1,12 @@ +/* + * 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. + */ + +/** + * TODO: Create a kbn-alerting-constants and add this to it. + * @deprecated Use a DEFAULT_MAX_SIGNALS from a kbn-alerting-constants package. + */ +export const DEFAULT_MAX_SIGNALS = 100; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_actions_array/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_actions_array/index.ts similarity index 57% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/default_actions_array/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_actions_array/index.ts index 17c3f9301c6d..28ff3053564c 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_actions_array/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_actions_array/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_export_file_name/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_export_file_name/index.test.ts similarity index 77% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/default_export_file_name/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_export_file_name/index.test.ts index b07ade238db2..009fdb23d3fb 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_export_file_name/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_export_file_name/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_export_file_name/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_export_file_name/index.ts similarity index 59% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/default_export_file_name/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_export_file_name/index.ts index dedbadfa6f52..53f0972baca2 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_export_file_name/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_export_file_name/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_from_string/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_from_string/index.test.ts similarity index 76% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/default_from_string/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_from_string/index.test.ts index 2515b3f8b015..f6c7f91e315a 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_from_string/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_from_string/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_from_string/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_from_string/index.ts similarity index 61% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/default_from_string/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_from_string/index.ts index ccf70aab8a7b..d23bca135d03 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_from_string/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_from_string/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_interval_string/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_interval_string/index.test.ts similarity index 77% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/default_interval_string/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_interval_string/index.test.ts index 8944d57ba899..602d6c9ff79e 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_interval_string/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_interval_string/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_interval_string/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_interval_string/index.ts similarity index 58% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/default_interval_string/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_interval_string/index.ts index 3fc5d4f42ccb..d743fa773f2e 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_interval_string/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_interval_string/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_language_string/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_language_string/index.test.ts similarity index 77% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/default_language_string/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_language_string/index.test.ts index 4a8d50c88eaa..34e6e65518c7 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_language_string/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_language_string/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_language_string/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_language_string/index.ts similarity index 60% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/default_language_string/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_language_string/index.ts index 02328d94b011..ca557dafecef 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_language_string/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_language_string/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_max_signals_number/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_max_signals_number/index.test.ts similarity index 84% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/default_max_signals_number/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_max_signals_number/index.test.ts index 66eb77400ac1..cd4b0aa42953 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_max_signals_number/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_max_signals_number/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_max_signals_number/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_max_signals_number/index.ts similarity index 66% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/default_max_signals_number/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_max_signals_number/index.ts index 8acbc2f223a1..535f9397c7af 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_max_signals_number/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_max_signals_number/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_page/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_page/index.test.ts similarity index 87% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/default_page/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_page/index.test.ts index 5af986fefe8d..d9e63e0f9ec1 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_page/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_page/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_page/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_page/index.ts similarity index 71% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/default_page/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_page/index.ts index 8486c516aebf..6ae23dd8c676 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_page/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_page/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_per_page/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_per_page/index.test.ts similarity index 87% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/default_per_page/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_per_page/index.test.ts index 78fa2a9be8c8..07a6358ba2e8 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_per_page/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_per_page/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_per_page/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_per_page/index.ts similarity index 71% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/default_per_page/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_per_page/index.ts index 4f272fc0517e..320945311d3b 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_per_page/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_per_page/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_risk_score_mapping_array/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_risk_score_mapping_array/index.ts similarity index 63% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/default_risk_score_mapping_array/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_risk_score_mapping_array/index.ts index 9eb6938bcfcb..a457c827e25f 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_risk_score_mapping_array/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_risk_score_mapping_array/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_severity_mapping_array/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_severity_mapping_array/index.ts similarity index 63% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/default_severity_mapping_array/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_severity_mapping_array/index.ts index ac72e3330f2a..8d7b581146ea 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_severity_mapping_array/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_severity_mapping_array/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_threat_array/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_threat_array/index.test.ts similarity index 84% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/default_threat_array/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_threat_array/index.test.ts index ebd1ca9384b1..ed42de41effc 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_threat_array/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_threat_array/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_threat_array/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_threat_array/index.ts similarity index 59% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/default_threat_array/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_threat_array/index.ts index bb38b6382230..8ed8abc58750 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_threat_array/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_threat_array/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_to_string/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_to_string/index.test.ts similarity index 76% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/default_to_string/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_to_string/index.test.ts index e8bcdcc664cf..f87b1c4f24a9 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_to_string/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_to_string/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_to_string/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_to_string/index.ts similarity index 58% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/default_to_string/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_to_string/index.ts index 4074cc3bbbe9..d2e58f423b59 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_to_string/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_to_string/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-types/src/default_uuid/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_uuid/index.test.ts similarity index 77% rename from packages/kbn-securitysolution-io-ts-types/src/default_uuid/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_uuid/index.test.ts index c429529167e5..ee605a5c4383 100644 --- a/packages/kbn-securitysolution-io-ts-types/src/default_uuid/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_uuid/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_uuid/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_uuid/index.ts similarity index 64% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/default_uuid/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_uuid/index.ts index 4144b4e6824c..b3d6fda5b134 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_uuid/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/default_uuid/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/frequency/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/frequency/index.ts similarity index 75% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/frequency/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/frequency/index.ts index 0247bfb155f3..318408f14582 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/frequency/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/frequency/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/from/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/from/index.ts similarity index 65% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/from/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/from/index.ts index 390649416273..d0330fae6140 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/from/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/from/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { Either } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/language/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/language/index.ts similarity index 50% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/language/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/language/index.ts index 95017209b2c6..63ad102a4134 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/language/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/language/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/machine_learning_job_id/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/machine_learning_job_id/index.ts similarity index 61% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/machine_learning_job_id/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/machine_learning_job_id/index.ts index 00dc70eb5575..8e6453ac7e7b 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/machine_learning_job_id/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/machine_learning_job_id/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* eslint-disable @typescript-eslint/naming-convention */ diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/max_signals/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/max_signals/index.ts similarity index 57% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/max_signals/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/max_signals/index.ts index aa8bdf6f539a..64ded4827b5e 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/max_signals/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/max_signals/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* eslint-disable @typescript-eslint/naming-convention */ diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/normalized_ml_job_id/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/normalized_ml_job_id/index.ts similarity index 63% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/normalized_ml_job_id/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/normalized_ml_job_id/index.ts index 2d89147c4fa1..f81c3da1db5d 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/normalized_ml_job_id/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/normalized_ml_job_id/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* eslint-disable @typescript-eslint/naming-convention */ diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/references_default_array/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/references_default_array/index.test.ts similarity index 81% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/references_default_array/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/references_default_array/index.test.ts index 7b6146a320d6..7c5e9bb29877 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/references_default_array/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/references_default_array/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/references_default_array/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/references_default_array/index.ts similarity index 59% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/references_default_array/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/references_default_array/index.ts index fcf22ad918c9..e5ccac365043 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/references_default_array/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/references_default_array/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/risk_score/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/risk_score/index.test.ts similarity index 83% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/risk_score/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/risk_score/index.test.ts index 85d83d0ec77d..b55ef415fbbb 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/risk_score/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/risk_score/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/risk_score/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/risk_score/index.ts similarity index 63% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/risk_score/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/risk_score/index.ts index ecc48e9a699d..143ea2e72754 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/risk_score/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/risk_score/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/risk_score_mapping/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/risk_score_mapping/index.ts similarity index 61% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/risk_score_mapping/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/risk_score_mapping/index.ts index 59f7c7ab69fb..0856806d4898 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/risk_score_mapping/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/risk_score_mapping/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/rule_schedule/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/rule_schedule/index.ts similarity index 61% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/rule_schedule/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/rule_schedule/index.ts index 4d0113f330ae..16bc6dc15310 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/rule_schedule/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/rule_schedule/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/saved_object_attributes/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/saved_object_attributes/index.ts similarity index 82% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/saved_object_attributes/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/saved_object_attributes/index.ts index 2a7af4e66518..33db222f098e 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/saved_object_attributes/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/saved_object_attributes/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* eslint-disable @typescript-eslint/naming-convention */ diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/severity/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/severity/index.ts new file mode 100644 index 000000000000..1b27423eb0db --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/severity/index.ts @@ -0,0 +1,11 @@ +/* + * 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 * as t from 'io-ts'; + +export type Severity = t.TypeOf; +export const Severity = t.keyof({ low: null, medium: null, high: null, critical: null }); diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/severity_mapping/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/severity_mapping/index.ts similarity index 59% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/severity_mapping/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/severity_mapping/index.ts index afd7889658a3..4256314b32a2 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/severity_mapping/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/severity_mapping/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/threat/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/threat/index.ts similarity index 68% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/threat/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/threat/index.ts index e60f9ccafcc1..4b5b7aa16c2d 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/threat/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/threat/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* eslint-disable @typescript-eslint/naming-convention */ diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/threat_mapping/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/threat_mapping/index.test.ts similarity index 95% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/threat_mapping/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/threat_mapping/index.test.ts index 3d3e1ab9a22b..781b5b89ebe6 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/threat_mapping/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/threat_mapping/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/threat_mapping/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/threat_mapping/index.ts similarity index 89% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/threat_mapping/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/threat_mapping/index.ts index 0cc8c950f754..3bf4f84aeec8 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/threat_mapping/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/threat_mapping/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* eslint-disable @typescript-eslint/naming-convention */ diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/threat_subtechnique/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/threat_subtechnique/index.ts similarity index 62% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/threat_subtechnique/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/threat_subtechnique/index.ts index 963bf76bf5f8..b5f2d95a139b 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/threat_subtechnique/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/threat_subtechnique/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* eslint-disable @typescript-eslint/naming-convention */ diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/threat_tactic/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/threat_tactic/index.ts similarity index 53% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/threat_tactic/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/threat_tactic/index.ts index a142788876e7..a4c63cb63289 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/threat_tactic/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/threat_tactic/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* eslint-disable @typescript-eslint/naming-convention */ diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/threat_technique/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/threat_technique/index.ts similarity index 67% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/threat_technique/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/threat_technique/index.ts index 2953ea86b3b3..992c5b15ba65 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/threat_technique/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/threat_technique/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* eslint-disable @typescript-eslint/naming-convention */ diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/throttle/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/throttle/index.ts similarity index 51% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/throttle/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/throttle/index.ts index f1d6bdca8fed..b4be7a4a97ff 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/throttle/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/throttle/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/type/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/type/index.ts similarity index 55% rename from packages/kbn-securitysolution-io-ts-alerting-types/src/type/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/type/index.ts index 68c7a2f30a2b..92b71faf14fe 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/src/type/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/src/type/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/tsconfig.json b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/tsconfig.json similarity index 85% rename from packages/kbn-securitysolution-io-ts-alerting-types/tsconfig.json rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/tsconfig.json index f9fb0b0fcebb..9b61aea31d97 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/tsconfig.json +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", "types": [ diff --git a/packages/kbn-securitysolution-io-ts-list-types/README.md b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/README.md similarity index 100% rename from packages/kbn-securitysolution-io-ts-list-types/README.md rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/README.md diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/index.ts new file mode 100644 index 000000000000..90db55188109 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/index.ts @@ -0,0 +1,11 @@ +/* + * 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. + */ + +export * from './src/common'; +export * from './src/request'; +export * from './src/response'; +export * from './src/typescript_types'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/jest.config.js b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/jest.config.js new file mode 100644 index 000000000000..1e8525371d27 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/jest.config.js @@ -0,0 +1,12 @@ +/* + * 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. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../../..', + roots: ['/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types'], +}; diff --git a/packages/kbn-securitysolution-io-ts-list-types/kibana.jsonc b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/kibana.jsonc similarity index 100% rename from packages/kbn-securitysolution-io-ts-list-types/kibana.jsonc rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/kibana.jsonc diff --git a/packages/kbn-securitysolution-io-ts-list-types/package.json b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/package.json similarity index 77% rename from packages/kbn-securitysolution-io-ts-list-types/package.json rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/package.json index 50c88fb22054..da6c20901584 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/package.json +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/package.json @@ -2,7 +2,7 @@ "name": "@kbn/securitysolution-io-ts-list-types", "version": "1.0.0", "description": "io ts utilities and types to be shared with plugins from the security solution project", - "license": "Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0", + "license": "Elastic License 2.0", "private": true, "sideEffects": false } \ No newline at end of file diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/comment/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/comment/index.mock.ts similarity index 53% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/comment/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/comment/index.mock.ts index d824f23fe74b..69ad828a480e 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/comment/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/comment/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { Comment, CommentsArray } from '.'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/comment/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/comment/index.test.ts similarity index 95% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/comment/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/comment/index.test.ts index deca11f809cb..32a230fcf586 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/comment/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/comment/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/comment/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/comment/index.ts similarity index 71% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/comment/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/comment/index.ts index 3aac99e6c48e..48bce8fabafe 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/comment/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/comment/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/create_comment/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/create_comment/index.mock.ts new file mode 100644 index 000000000000..67be8d1f15da --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/create_comment/index.mock.ts @@ -0,0 +1,14 @@ +/* + * 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 { CreateComment, CreateCommentsArray } from '.'; + +export const getCreateCommentsMock = (): CreateComment => ({ + comment: 'some comments', +}); + +export const getCreateCommentsArrayMock = (): CreateCommentsArray => [getCreateCommentsMock()]; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/create_comment/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/create_comment/index.test.ts similarity index 92% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/create_comment/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/create_comment/index.test.ts index c537e9e28091..15fab1c35a19 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/create_comment/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/create_comment/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/create_comment/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/create_comment/index.ts similarity index 65% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/create_comment/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/create_comment/index.ts index f4082df289ac..e0942203bac6 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/create_comment/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/create_comment/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/created_at/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/created_at/index.ts new file mode 100644 index 000000000000..e962946e447e --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/created_at/index.ts @@ -0,0 +1,12 @@ +/* + * 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. + */ + +/* eslint-disable @typescript-eslint/naming-convention */ + +import * as t from 'io-ts'; + +export const created_at = t.string; // TODO: Make this into an ISO Date string check diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/created_by/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/created_by/index.ts new file mode 100644 index 000000000000..ccf8d816f8e8 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/created_by/index.ts @@ -0,0 +1,12 @@ +/* + * 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. + */ + +/* eslint-disable @typescript-eslint/naming-convention */ + +import * as t from 'io-ts'; + +export const created_by = t.string; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/cursor/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/cursor/index.ts new file mode 100644 index 000000000000..626b510ec895 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/cursor/index.ts @@ -0,0 +1,13 @@ +/* + * 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 * as t from 'io-ts'; + +export const cursor = t.string; +export type Cursor = t.TypeOf; +export const cursorOrUndefined = t.union([cursor, t.undefined]); +export type CursorOrUndefined = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/default_comments_array/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_comments_array/index.test.ts similarity index 86% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/default_comments_array/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_comments_array/index.test.ts index d0c7e3cc0447..af9f342c15e5 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/default_comments_array/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_comments_array/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/default_comments_array/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_comments_array/index.ts similarity index 61% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/default_comments_array/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_comments_array/index.ts index 6a89b0063351..af1576237b9c 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/default_comments_array/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_comments_array/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/default_create_comments_array/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_create_comments_array/index.test.ts similarity index 86% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/default_create_comments_array/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_create_comments_array/index.test.ts index ce909c0314b3..9f4aba07c9bf 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/default_create_comments_array/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_create_comments_array/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/default_create_comments_array/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_create_comments_array/index.ts similarity index 63% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/default_create_comments_array/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_create_comments_array/index.ts index 0ed345891719..5b825578191f 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/default_create_comments_array/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_create_comments_array/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/default_import_comments_array/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_import_comments_array/index.test.ts similarity index 89% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/default_import_comments_array/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_import_comments_array/index.test.ts index 9b6f8df6850c..ea59988dfe0c 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/default_import_comments_array/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_import_comments_array/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/default_import_comments_array/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_import_comments_array/index.ts similarity index 64% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/default_import_comments_array/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_import_comments_array/index.ts index dc8d18e7e11e..135288c2dd3f 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/default_import_comments_array/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_import_comments_array/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/default_namespace/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_namespace/index.test.ts similarity index 83% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/default_namespace/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_namespace/index.test.ts index 69cdd841c0a5..fc271855fc12 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/default_namespace/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_namespace/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/default_namespace/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_namespace/index.ts similarity index 65% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/default_namespace/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_namespace/index.ts index 33f53c55b198..667ddbb82253 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/default_namespace/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_namespace/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/default_namespace_array/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_namespace_array/index.test.ts similarity index 91% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/default_namespace_array/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_namespace_array/index.test.ts index 359674e57041..cb7012503d38 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/default_namespace_array/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_namespace_array/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/default_namespace_array/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_namespace_array/index.ts similarity index 77% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/default_namespace_array/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_namespace_array/index.ts index 9692b8a2783d..494c6025f198 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/default_namespace_array/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_namespace_array/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/default_update_comments_array/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_update_comments_array/index.test.ts similarity index 85% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/default_update_comments_array/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_update_comments_array/index.test.ts index aaffae53ceca..3cced7284425 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/default_update_comments_array/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_update_comments_array/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/default_update_comments_array/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_update_comments_array/index.ts similarity index 64% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/default_update_comments_array/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_update_comments_array/index.ts index 47c0e562133d..28edd4af353e 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/default_update_comments_array/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/default_update_comments_array/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/description/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/description/index.ts new file mode 100644 index 000000000000..adba3ae0ef4f --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/description/index.ts @@ -0,0 +1,13 @@ +/* + * 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 * as t from 'io-ts'; + +export const description = t.string; +export type Description = t.TypeOf; +export const descriptionOrUndefined = t.union([description, t.undefined]); +export type DescriptionOrUndefined = t.TypeOf; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/deserializer/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/deserializer/index.ts new file mode 100644 index 000000000000..4956736b5cf4 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/deserializer/index.ts @@ -0,0 +1,13 @@ +/* + * 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 * as t from 'io-ts'; + +export const deserializer = t.string; +export type Deserializer = t.TypeOf; +export const deserializerOrUndefined = t.union([deserializer, t.undefined]); +export type DeserializerOrUndefined = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entries/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entries/index.mock.ts similarity index 63% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entries/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entries/index.mock.ts index bc091b1e33c3..1d46d6412e12 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entries/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entries/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { EndpointEntriesArray } from '.'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entries/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entries/index.test.ts similarity index 92% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entries/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entries/index.test.ts index 574bf4276461..4a317d5c9152 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entries/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entries/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entries/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entries/index.ts similarity index 79% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entries/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entries/index.ts index 992237161d06..c9a74ae52573 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entries/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entries/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match/index.mock.ts new file mode 100644 index 000000000000..ddcda0e1e2d9 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match/index.mock.ts @@ -0,0 +1,16 @@ +/* + * 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 { EndpointEntryMatch } from '.'; +import { ENTRY_VALUE, FIELD, MATCH, OPERATOR } from '../../../constants/index.mock'; + +export const getEndpointEntryMatchMock = (): EndpointEntryMatch => ({ + field: FIELD, + operator: OPERATOR, + type: MATCH, + value: ENTRY_VALUE, +}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match/index.test.ts similarity index 90% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match/index.test.ts index 5c20b697b3bf..561a36ab194c 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match/index.ts similarity index 54% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match/index.ts index 5ae0258ebfb7..7cc51636cf58 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_any/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_any/index.mock.ts similarity index 50% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_any/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_any/index.mock.ts index b3bfffd4daf9..6c04a6b596d6 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_any/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_any/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { ENTRY_VALUE, FIELD, MATCH_ANY, OPERATOR } from '../../../constants/index.mock'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_any/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_any/index.test.ts similarity index 90% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_any/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_any/index.test.ts index e121eed769ea..feb04606adf9 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_any/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_any/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_any/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_any/index.ts similarity index 57% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_any/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_any/index.ts index d639f4481d4d..7d23e7338e71 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_any/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_any/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_wildcard/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_wildcard/index.mock.ts similarity index 50% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_wildcard/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_wildcard/index.mock.ts index f1b5c7e7421a..ca8f01d3e30e 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_wildcard/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_wildcard/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { ENTRY_VALUE, FIELD, OPERATOR, WILDCARD } from '../../../constants/index.mock'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_wildcard/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_wildcard/index.test.ts similarity index 90% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_wildcard/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_wildcard/index.test.ts index 025994afcd9e..95ea73b2aac1 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_wildcard/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_wildcard/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_wildcard/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_wildcard/index.ts similarity index 58% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_wildcard/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_wildcard/index.ts index b42f6245ea28..cfc96337b627 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_wildcard/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_match_wildcard/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_nested/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_nested/index.mock.ts similarity index 57% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_nested/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_nested/index.mock.ts index 44c5f8db5f6e..93b99e71b0bc 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_nested/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_nested/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { EndpointEntryNested } from '.'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_nested/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_nested/index.test.ts similarity index 93% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_nested/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_nested/index.test.ts index c062deb88af8..d68a0686a439 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_nested/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_nested/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_nested/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_nested/index.ts similarity index 57% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_nested/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_nested/index.ts index 6625c1dfeaf5..f02570af1013 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_nested/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/entry_nested/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/index.ts new file mode 100644 index 000000000000..5138682f463b --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/index.ts @@ -0,0 +1,9 @@ +/* + * 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. + */ + +export * from './entries'; +export * from './non_empty_nested_entries_array'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/non_empty_nested_entries_array/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/non_empty_nested_entries_array/index.ts similarity index 77% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/non_empty_nested_entries_array/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/non_empty_nested_entries_array/index.ts index 9bcfccae97b3..5085b4fdacac 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/non_empty_nested_entries_array/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/endpoint/non_empty_nested_entries_array/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/entries/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entries/index.mock.ts similarity index 70% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/entries/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entries/index.mock.ts index 5b8c802c94a3..1aeea284751b 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/entries/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entries/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { EntriesArray } from '.'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/entries/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entries/index.test.ts similarity index 93% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/entries/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entries/index.test.ts index 73553be78b9a..25c52b68a6f9 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/entries/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entries/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/entries/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entries/index.ts similarity index 74% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/entries/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entries/index.ts index f2dbbd91dfce..73340d2c0af5 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/entries/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entries/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_exist/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_exist/index.mock.ts similarity index 52% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/entries_exist/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_exist/index.mock.ts index 3a588ec9cc7b..e66d14c3c7af 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_exist/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_exist/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { EntryExists } from '.'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_exist/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_exist/index.test.ts similarity index 87% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/entries_exist/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_exist/index.test.ts index 8ebf60ebc19f..dcc6d47a437a 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_exist/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_exist/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_exist/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_exist/index.ts similarity index 53% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/entries_exist/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_exist/index.ts index 460030dcc951..44c83c3f5b64 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_exist/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_exist/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_list/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_list/index.mock.ts new file mode 100644 index 000000000000..77c73d0bcfa3 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_list/index.mock.ts @@ -0,0 +1,16 @@ +/* + * 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 { EntryList } from '.'; +import { FIELD, LIST, LIST_ID, OPERATOR, TYPE } from '../../constants/index.mock'; + +export const getEntryListMock = (): EntryList => ({ + field: FIELD, + list: { id: LIST_ID, type: TYPE }, + operator: OPERATOR, + type: LIST, +}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_list/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_list/index.test.ts similarity index 89% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/entries_list/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_list/index.test.ts index eb047a07f08d..a9b56207d959 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_list/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_list/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_list/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_list/index.ts similarity index 57% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/entries_list/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_list/index.ts index f55a3f056218..214f0c92db22 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_list/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entries_list/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match/index.mock.ts similarity index 54% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match/index.mock.ts index 9e09661c2945..9af6cf08090b 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { EntryMatch } from '.'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match/index.test.ts similarity index 90% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match/index.test.ts index f2f8dbb8998f..6f2fc7fd9e8d 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match/index.ts similarity index 54% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match/index.ts index 17bf0ab5b89e..8e56991b977a 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_any/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_any/index.mock.ts similarity index 58% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_any/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_any/index.mock.ts index 7a5c4c57fa32..a564d4e8fd95 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_any/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_any/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { EntryMatchAny } from '.'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_any/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_any/index.test.ts similarity index 90% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_any/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_any/index.test.ts index 3e4752f39508..84844c432aa2 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_any/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_any/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_any/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_any/index.ts similarity index 57% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_any/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_any/index.ts index be08fb370abd..989c729f8b1b 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_any/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_any/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_wildcard/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_wildcard/index.mock.ts similarity index 57% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_wildcard/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_wildcard/index.mock.ts index 6dc33289d22d..c279fe3ed45d 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_wildcard/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_wildcard/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { EntryMatchWildcard } from '.'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_wildcard/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_wildcard/index.test.ts similarity index 90% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_wildcard/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_wildcard/index.test.ts index a84996a6c105..4bd2d146412a 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_wildcard/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_wildcard/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_wildcard/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_wildcard/index.ts similarity index 56% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_wildcard/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_wildcard/index.ts index 17afe342961c..af168e33fa70 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_wildcard/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_match_wildcard/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_nested/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_nested/index.mock.ts similarity index 71% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/entry_nested/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_nested/index.mock.ts index 34d687502e24..890c3d379d27 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_nested/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_nested/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { EntryNested } from '.'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_nested/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_nested/index.test.ts similarity index 91% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/entry_nested/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_nested/index.test.ts index cfd43c4c0993..be37a0273bce 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_nested/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_nested/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_nested/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_nested/index.ts similarity index 56% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/entry_nested/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_nested/index.ts index 8b19fee9fb5c..dac5d6a3d5a8 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_nested/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/entry_nested/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_export_details/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_export_details/index.mock.ts similarity index 69% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/exception_export_details/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_export_details/index.mock.ts index 15cdd79dc2e9..ded6a6bfbb8a 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_export_details/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_export_details/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { ExportExceptionDetails } from '.'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_export_details/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_export_details/index.test.ts similarity index 76% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/exception_export_details/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_export_details/index.test.ts index c9b1a4767e57..fe8150fd6f3b 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_export_details/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_export_details/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_export_details/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_export_details/index.ts similarity index 68% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/exception_export_details/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_export_details/index.ts index 9e4ff134d6e9..358e987d8b17 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_export_details/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_export_details/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list/index.test.ts similarity index 82% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list/index.test.ts index 2c6aae8a5693..ac57828355d3 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { exceptionListType, ExceptionListTypeEnum } from '.'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list/index.ts similarity index 72% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list/index.ts index db7633705ac5..50273a9c55a9 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list_item_type/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list_item_type/index.ts similarity index 54% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list_item_type/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list_item_type/index.ts index 5e124b9f923d..36857aec92df 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list_item_type/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/exception_list_item_type/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/expire_time/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/expire_time/index.ts new file mode 100644 index 000000000000..9a3f4db110ed --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/expire_time/index.ts @@ -0,0 +1,13 @@ +/* + * 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 * as t from 'io-ts'; +import { IsoDateString } from '@kbn/securitysolution-io-ts-types'; + +export const expireTime = IsoDateString; +export const expireTimeOrUndefined = t.union([expireTime, t.undefined]); +export type ExpireTimeOrUndefined = t.TypeOf; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/file/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/file/index.ts new file mode 100644 index 000000000000..885d714de441 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/file/index.ts @@ -0,0 +1,10 @@ +/* + * 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 * as t from 'io-ts'; + +export const file = t.object; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/filter/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/filter/index.ts new file mode 100644 index 000000000000..43ac9592ed31 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/filter/index.ts @@ -0,0 +1,13 @@ +/* + * 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 * as t from 'io-ts'; + +export const filter = t.string; +export type Filter = t.TypeOf; +export const filterOrUndefined = t.union([filter, t.undefined]); +export type FilterOrUndefined = t.TypeOf; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/id/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/id/index.ts new file mode 100644 index 000000000000..967282c158a2 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/id/index.ts @@ -0,0 +1,14 @@ +/* + * 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 * as t from 'io-ts'; +import { NonEmptyString } from '@kbn/securitysolution-io-ts-types'; + +export const id = NonEmptyString; +export type Id = t.TypeOf; +export const idOrUndefined = t.union([id, t.undefined]); +export type IdOrUndefined = t.TypeOf; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/immutable/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/immutable/index.ts new file mode 100644 index 000000000000..afeb2de36ea1 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/immutable/index.ts @@ -0,0 +1,13 @@ +/* + * 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 * as t from 'io-ts'; + +export const immutable = t.boolean; +export type Immutable = t.TypeOf; +export const immutableOrUndefined = t.union([immutable, t.undefined]); +export type ImmutableOrUndefined = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/import_comment/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/import_comment/index.test.ts similarity index 93% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/import_comment/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/import_comment/index.test.ts index 50121086c141..a447d1f53507 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/import_comment/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/import_comment/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/import_comment/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/import_comment/index.ts similarity index 62% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/import_comment/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/import_comment/index.ts index 4511b28078bc..c4c906117ecd 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/import_comment/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/import_comment/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/include_expired_exceptions/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/include_expired_exceptions/index.ts similarity index 55% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/include_expired_exceptions/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/include_expired_exceptions/index.ts index 7c40e74d8189..0c3d5e4959bc 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/include_expired_exceptions/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/include_expired_exceptions/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* eslint-disable @typescript-eslint/naming-convention */ diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/index.ts similarity index 83% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/index.ts index b30ac02dab96..0ff54c5e5a72 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ export * from './comment'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/item/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/item/index.ts new file mode 100644 index 000000000000..5a71e1242d26 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/item/index.ts @@ -0,0 +1,10 @@ +/* + * 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 * as t from 'io-ts'; + +export const item = t.string; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/item_id/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/item_id/index.ts similarity index 54% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/item_id/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/item_id/index.ts index 0e4551ad5c8f..44ccc97d4666 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/item_id/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/item_id/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* eslint-disable @typescript-eslint/naming-convention */ diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/list_id/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/list_id/index.ts similarity index 55% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/list_id/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/list_id/index.ts index 88e88aa8bc3c..c813d7170e8a 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/list_id/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/list_id/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* eslint-disable @typescript-eslint/naming-convention */ diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/list_operator/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/list_operator/index.test.ts similarity index 79% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/list_operator/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/list_operator/index.test.ts index 054af26b4a62..d3d67a8fd60a 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/list_operator/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/list_operator/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/list_operator/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/list_operator/index.ts similarity index 65% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/list_operator/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/list_operator/index.ts index 574a64e0f032..096b21ec20f9 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/list_operator/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/list_operator/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/list_type/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/list_type/index.ts new file mode 100644 index 000000000000..7a160486c399 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/list_type/index.ts @@ -0,0 +1,13 @@ +/* + * 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. + */ + +/* eslint-disable @typescript-eslint/naming-convention */ + +import * as t from 'io-ts'; + +export const list_type = t.keyof({ item: null, list: null }); +export type ListType = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/lists/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/lists/index.mock.ts similarity index 60% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/lists/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/lists/index.mock.ts index c8319867b577..6ad3c6a371d1 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/lists/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/lists/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { List, ListArray } from '.'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/lists/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/lists/index.test.ts similarity index 93% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/lists/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/lists/index.test.ts index 57c221f10384..aecfe9501ac1 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/lists/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/lists/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/lists/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/lists/index.ts similarity index 65% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/lists/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/lists/index.ts index 564ce7833b0f..bbc99142ffc7 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/lists/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/lists/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/lists_default_array/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/lists_default_array/index.test.ts similarity index 84% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/lists_default_array/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/lists_default_array/index.test.ts index fa4f22c4718e..b702f617d17c 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/lists_default_array/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/lists_default_array/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/lists_default_array/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/lists_default_array/index.ts similarity index 60% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/lists_default_array/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/lists_default_array/index.ts index a014d769410e..33ab281a6f17 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/lists_default_array/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/lists_default_array/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/max_size/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/max_size/index.test.ts similarity index 78% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/max_size/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/max_size/index.test.ts index 9ddf86818eaf..2c733c93ee77 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/max_size/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/max_size/index.test.ts @@ -1,20 +1,16 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { exactCheck } from '@kbn/securitysolution-io-ts-utils'; +import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; import { maxSizeOrUndefined } from '.'; import { pipe } from 'fp-ts/lib/pipeable'; import { left } from 'fp-ts/lib/Either'; -import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; - describe('maxSizeOrUndefined', () => { test('it will validate a correct max value', () => { const payload = 123; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/max_size/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/max_size/index.ts similarity index 56% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/max_size/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/max_size/index.ts index 0c99edf69252..c652ae81d6c4 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/max_size/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/max_size/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* eslint-disable @typescript-eslint/naming-convention */ diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/meta/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/meta/index.ts similarity index 55% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/meta/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/meta/index.ts index 07f329819fc1..547b45969be7 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/meta/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/meta/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/name/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/name/index.ts new file mode 100644 index 000000000000..020f3642306a --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/name/index.ts @@ -0,0 +1,13 @@ +/* + * 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 * as t from 'io-ts'; + +export const name = t.string; +export type Name = t.TypeOf; +export const nameOrUndefined = t.union([name, t.undefined]); +export type NameOrUndefined = t.TypeOf; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/namespace_type/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/namespace_type/index.ts new file mode 100644 index 000000000000..ae16f8b4521c --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/namespace_type/index.ts @@ -0,0 +1,12 @@ +/* + * 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. + */ + +/* eslint-disable @typescript-eslint/naming-convention */ + +import { DefaultNamespace } from '../default_namespace'; + +export const namespace_type = DefaultNamespace; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_entries_array/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_entries_array/index.test.ts similarity index 92% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_entries_array/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_entries_array/index.test.ts index 1128dd53871e..321a57dd4fee 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_entries_array/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_entries_array/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_entries_array/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_entries_array/index.ts similarity index 76% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_entries_array/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_entries_array/index.ts index a5e06d5bb2c4..8d6812077d4e 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_entries_array/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_entries_array/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_nested_entries_array/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_nested_entries_array/index.test.ts similarity index 91% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_nested_entries_array/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_nested_entries_array/index.test.ts index afb62d1f8768..1d1d659f028c 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_nested_entries_array/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_nested_entries_array/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_nested_entries_array/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_nested_entries_array/index.ts similarity index 76% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_nested_entries_array/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_nested_entries_array/index.ts index 73a00e75010f..eb2d1074b9f4 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_nested_entries_array/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/non_empty_nested_entries_array/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/os_type/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/os_type/index.test.ts similarity index 72% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/os_type/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/os_type/index.test.ts index 566a2aa0973a..3b8ca29afa4e 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/os_type/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/os_type/index.test.ts @@ -1,20 +1,16 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { exactCheck } from '@kbn/securitysolution-io-ts-utils'; +import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; import { osType, osTypeArrayOrUndefined } from '.'; import { pipe } from 'fp-ts/lib/pipeable'; import { left } from 'fp-ts/lib/Either'; -import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; - describe('osType', () => { test('it will validate a correct osType', () => { const payload = 'windows'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/os_type/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/os_type/index.ts similarity index 59% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/os_type/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/os_type/index.ts index 1dfbb9687e21..6e8cbb85b631 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/os_type/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/os_type/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/page/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/page/index.ts new file mode 100644 index 000000000000..36faf8e7e5e2 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/page/index.ts @@ -0,0 +1,14 @@ +/* + * 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 * as t from 'io-ts'; + +export const page = t.number; // TODO: Change this out for PositiveNumber from siem +export type Page = t.TypeOf; + +export const pageOrUndefined = t.union([page, t.undefined]); +export type PageOrUndefined = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/per_page/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/per_page/index.ts similarity index 54% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/per_page/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/per_page/index.ts index 9ab3d1dde38c..669e0699b366 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/per_page/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/per_page/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* eslint-disable @typescript-eslint/naming-convention */ diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/pit/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/pit/index.test.ts similarity index 78% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/pit/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/pit/index.test.ts index 36bc95ce1786..9cafd8ed5ec0 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/pit/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/pit/index.test.ts @@ -1,21 +1,17 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { exactCheck } from '@kbn/securitysolution-io-ts-utils'; +import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; import { pitOrUndefined } from '.'; import * as t from 'io-ts'; import { pipe } from 'fp-ts/lib/pipeable'; import { left } from 'fp-ts/lib/Either'; -import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; - describe('pitOrUndefined', () => { test('it will validate a correct pit', () => { const payload = { id: '123', keepAlive: '1m' }; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/pit/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/pit/index.ts similarity index 54% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/pit/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/pit/index.ts index 3347f986113e..97b6957e07e5 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/pit/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/pit/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/refresh/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/refresh/index.ts similarity index 52% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/refresh/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/refresh/index.ts index faa301fd450a..d1a7fe34fc70 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/refresh/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/refresh/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/required_keep_undefined/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/required_keep_undefined/index.ts similarity index 63% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/required_keep_undefined/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/required_keep_undefined/index.ts index 5e6b30cf720c..5854fc42a3a7 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/required_keep_undefined/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/required_keep_undefined/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /** diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/search/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/search/index.test.ts similarity index 74% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/search/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/search/index.test.ts index 1224b277c852..6c45f50c9c89 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/search/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/search/index.test.ts @@ -1,21 +1,17 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { exactCheck } from '@kbn/securitysolution-io-ts-utils'; +import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; import { searchOrUndefined } from '.'; import * as t from 'io-ts'; import { pipe } from 'fp-ts/lib/pipeable'; import { left } from 'fp-ts/lib/Either'; -import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; - describe('search', () => { test('it will validate a correct search', () => { const payload = 'name:foo'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/search/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/search/index.ts new file mode 100644 index 000000000000..b93c4631cd22 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/search/index.ts @@ -0,0 +1,14 @@ +/* + * 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 * as t from 'io-ts'; + +export const search = t.string; +export type Search = t.TypeOf; + +export const searchOrUndefined = t.union([search, t.undefined]); +export type SearchOrUndefined = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/search_after/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/search_after/index.test.ts similarity index 75% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/search_after/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/search_after/index.test.ts index d06198272792..bc176af4fa30 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/search_after/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/search_after/index.test.ts @@ -1,21 +1,17 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { exactCheck } from '@kbn/securitysolution-io-ts-utils'; +import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; import { searchAfterOrUndefined } from '.'; import * as t from 'io-ts'; import { pipe } from 'fp-ts/lib/pipeable'; import { left } from 'fp-ts/lib/Either'; -import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; - describe('searchAfter', () => { test('it will validate a correct search_after', () => { const payload = ['test-1', 'test-2']; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/search_after/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/search_after/index.ts similarity index 53% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/search_after/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/search_after/index.ts index 5cef26cbb0c4..17735728d341 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/search_after/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/search_after/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* eslint-disable @typescript-eslint/naming-convention */ diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/serializer/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/serializer/index.ts new file mode 100644 index 000000000000..28322ff2e991 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/serializer/index.ts @@ -0,0 +1,13 @@ +/* + * 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 * as t from 'io-ts'; + +export const serializer = t.string; +export type Serializer = t.TypeOf; +export const serializerOrUndefined = t.union([serializer, t.undefined]); +export type SerializerOrUndefined = t.TypeOf; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/sort_field/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/sort_field/index.ts new file mode 100644 index 000000000000..762fdf80c227 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/sort_field/index.ts @@ -0,0 +1,14 @@ +/* + * 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. + */ + +/* eslint-disable @typescript-eslint/naming-convention */ + +import * as t from 'io-ts'; + +export const sort_field = t.string; +export const sortFieldOrUndefined = t.union([sort_field, t.undefined]); +export type SortFieldOrUndefined = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/sort_order/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/sort_order/index.ts similarity index 50% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/sort_order/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/sort_order/index.ts index fb075ff63fee..a849e45c316e 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/sort_order/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/sort_order/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* eslint-disable @typescript-eslint/naming-convention */ diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/tags/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/tags/index.ts similarity index 51% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/tags/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/tags/index.ts index ad99a1d0800f..0ad756f05771 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/tags/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/tags/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/tie_breaker_id/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/tie_breaker_id/index.ts new file mode 100644 index 000000000000..362e50089081 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/tie_breaker_id/index.ts @@ -0,0 +1,12 @@ +/* + * 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. + */ + +/* eslint-disable @typescript-eslint/naming-convention */ + +import * as t from 'io-ts'; + +export const tie_breaker_id = t.string; // TODO: Use UUID for this instead of a string for validation diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/timestamp/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/timestamp/index.ts new file mode 100644 index 000000000000..30472bcd101f --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/timestamp/index.ts @@ -0,0 +1,12 @@ +/* + * 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 * as t from 'io-ts'; +import { IsoDateString } from '@kbn/securitysolution-io-ts-types'; + +export const timestamp = IsoDateString; +export const timestampOrUndefined = t.union([IsoDateString, t.undefined]); diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/total/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/total/index.ts new file mode 100644 index 000000000000..f67ca0f2fc5e --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/total/index.ts @@ -0,0 +1,12 @@ +/* + * 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 * as t from 'io-ts'; + +export const total = t.number; // TODO: Change this out for PositiveNumber from siem +export const totalUndefined = t.union([total, t.undefined]); +export type TotalOrUndefined = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/type/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/type/index.test.ts similarity index 78% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/type/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/type/index.test.ts index 60156cda9fe6..d87ea94728b1 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/type/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/type/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/type/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/type/index.ts similarity index 69% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/type/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/type/index.ts index d617fd2cccdf..5a1d234d5f2f 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/type/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/type/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/underscore_version/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/underscore_version/index.ts new file mode 100644 index 000000000000..6e47b89af816 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/underscore_version/index.ts @@ -0,0 +1,12 @@ +/* + * 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 * as t from 'io-ts'; + +export const _version = t.string; +export const _versionOrUndefined = t.union([_version, t.undefined]); +export type _VersionOrUndefined = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/update_comment/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/update_comment/index.mock.ts similarity index 52% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/update_comment/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/update_comment/index.mock.ts index c84db08f8c93..c0cbfe5e3019 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/update_comment/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/update_comment/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { UpdateComment, UpdateCommentsArray } from '.'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/update_comment/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/update_comment/index.test.ts similarity index 93% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/update_comment/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/update_comment/index.test.ts index 88cdfbdd573e..c1f1be8be9c1 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/update_comment/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/update_comment/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/common/update_comment/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/update_comment/index.ts similarity index 66% rename from packages/kbn-securitysolution-io-ts-list-types/src/common/update_comment/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/update_comment/index.ts index 79a721c8dad5..6a0b4b08c772 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/common/update_comment/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/update_comment/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/updated_at/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/updated_at/index.ts new file mode 100644 index 000000000000..bafbadcd8f09 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/updated_at/index.ts @@ -0,0 +1,12 @@ +/* + * 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. + */ + +/* eslint-disable @typescript-eslint/naming-convention */ + +import * as t from 'io-ts'; + +export const updated_at = t.string; // TODO: Make this into an ISO Date string check diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/updated_by/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/updated_by/index.ts new file mode 100644 index 000000000000..58c5b2d666bd --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/updated_by/index.ts @@ -0,0 +1,12 @@ +/* + * 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. + */ + +/* eslint-disable @typescript-eslint/naming-convention */ + +import * as t from 'io-ts'; + +export const updated_by = t.string; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/value/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/value/index.ts new file mode 100644 index 000000000000..38530a942275 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/common/value/index.ts @@ -0,0 +1,11 @@ +/* + * 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 * as t from 'io-ts'; + +export const value = t.string; +export const valueOrUndefined = t.union([value, t.undefined]); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/constants/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/constants/index.mock.ts similarity index 91% rename from packages/kbn-securitysolution-io-ts-list-types/src/constants/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/constants/index.mock.ts index 4d09fc1efbeb..ae91d63d6b7e 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/constants/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/constants/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { EndpointEntriesArray } from '../common/endpoint/entries'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_endpoint_list_item_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_endpoint_list_item_schema/index.mock.ts similarity index 59% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/create_endpoint_list_item_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_endpoint_list_item_schema/index.mock.ts index db83807b0271..0efac9d4de7f 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_endpoint_list_item_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_endpoint_list_item_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { CreateEndpointListItemSchema } from '.'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_endpoint_list_item_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_endpoint_list_item_schema/index.test.ts similarity index 96% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/create_endpoint_list_item_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_endpoint_list_item_schema/index.test.ts index 9dc599a75ad5..78d578dd5d47 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_endpoint_list_item_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_endpoint_list_item_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_endpoint_list_item_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_endpoint_list_item_schema/index.ts similarity index 81% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/create_endpoint_list_item_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_endpoint_list_item_schema/index.ts index f8e3965df733..08fd5e339ade 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_endpoint_list_item_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_endpoint_list_item_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; @@ -16,13 +14,12 @@ import { DefaultCreateCommentsArray } from '../../common/default_create_comments import { OsTypeArray, osTypeArrayOrUndefined } from '../../common/os_type'; import { RequiredKeepUndefined } from '../../common/required_keep_undefined'; import { CreateCommentsArray } from '../../common/create_comment'; -import { Tags } from '../../common/tags'; +import { Tags, tags } from '../../common/tags'; import { ItemId } from '../../common/item_id'; import { EntriesArray } from '../../common/entries'; import { description } from '../../common/description'; import { name } from '../../common/name'; import { meta } from '../../common/meta'; -import { tags } from '../../common/tags'; export const createEndpointListItemSchema = t.intersection([ t.exact( diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_item_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_item_schema/index.mock.ts similarity index 76% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_item_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_item_schema/index.mock.ts index 23b3eb19171d..4ccc82bf2af0 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_item_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_item_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { CreateExceptionListItemSchema } from '.'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_item_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_item_schema/index.test.ts similarity index 96% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_item_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_item_schema/index.test.ts index dc5dcb63cf1b..4d03b83112a3 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_item_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_item_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_item_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_item_schema/index.ts similarity index 84% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_item_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_item_schema/index.ts index 8445b2d03d67..9276a0dafa8b 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_item_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_item_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; @@ -12,7 +10,7 @@ import { DefaultUuid } from '@kbn/securitysolution-io-ts-types'; import { DefaultCreateCommentsArray } from '../../common/default_create_comments_array'; import { CreateCommentsArray } from '../../common/create_comment'; -import { Tags } from '../../common/tags'; +import { Tags, tags } from '../../common/tags'; import { ItemId } from '../../common/item_id'; import { EntriesArray } from '../../common/entries'; import { NamespaceType } from '../../common/default_namespace'; @@ -24,7 +22,6 @@ import { name } from '../../common/name'; import { exceptionListItemType } from '../../common/exception_list_item_type'; import { meta } from '../../common/meta'; import { namespace_type } from '../../common/namespace_type'; -import { tags } from '../../common/tags'; import { nonEmptyEntriesArray } from '../../common/non_empty_entries_array'; import { ExpireTimeOrUndefined, expireTimeOrUndefined } from '../../common'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_schema/index.mock.ts similarity index 76% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_schema/index.mock.ts index 798d36783d7c..2110a0056f0c 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_schema/index.test.ts similarity index 90% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_schema/index.test.ts index f6d164f8786b..26399804591e 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_schema/index.ts similarity index 80% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_schema/index.ts index 786e39a61864..000b4c65a01f 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_exception_list_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; @@ -17,13 +15,12 @@ import { import { exceptionListType } from '../../common/exception_list'; import { OsTypeArray, osTypeArrayOrUndefined } from '../../common/os_type'; import { RequiredKeepUndefined } from '../../common/required_keep_undefined'; -import { Tags } from '../../common/tags'; +import { Tags, tags } from '../../common/tags'; import { ListId } from '../../common/list_id'; import { NamespaceType } from '../../common/default_namespace'; import { name } from '../../common/name'; import { description } from '../../common/description'; import { namespace_type } from '../../common/namespace_type'; -import { tags } from '../../common/tags'; import { meta } from '../../common/meta'; export const createExceptionListSchema = t.intersection([ diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_item_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_item_schema/index.mock.ts similarity index 65% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_item_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_item_schema/index.mock.ts index ed9a77fb859a..03085b3cfa8e 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_item_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_item_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { LIST_ID, LIST_ITEM_ID, META, VALUE } from '../../constants/index.mock'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_item_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_item_schema/index.test.ts similarity index 84% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_item_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_item_schema/index.test.ts index 3e991933b664..509cbdbf0465 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_item_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_item_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_item_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_item_schema/index.ts similarity index 67% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_item_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_item_schema/index.ts index f1b3c6586535..d18e7930c3ee 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_item_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_item_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_schema/index.mock.ts similarity index 70% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_schema/index.mock.ts index bbdd927a58e7..aa4f45d74f4a 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { DESCRIPTION, LIST_ID, META, NAME, TYPE, VERSION } from '../../constants/index.mock'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_schema/index.test.ts similarity index 88% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_schema/index.test.ts index 0eb9ecd02505..a6043addd72a 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_schema/index.ts similarity index 78% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_schema/index.ts index c6e210a999ea..fd771d40a501 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_list_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_rule_exception_item_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_rule_exception_item_schema/index.test.ts similarity index 91% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/create_rule_exception_item_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_rule_exception_item_schema/index.test.ts index 1eda590adb5d..bd95fdd0e086 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_rule_exception_item_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_rule_exception_item_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_rule_exception_item_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_rule_exception_item_schema/index.ts similarity index 83% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/create_rule_exception_item_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_rule_exception_item_schema/index.ts index 1e4a254f92b8..ef0446d9207a 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/create_rule_exception_item_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/create_rule_exception_item_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_endpoint_list_item_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_endpoint_list_item_schema/index.mock.ts new file mode 100644 index 000000000000..2547180e114f --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_endpoint_list_item_schema/index.mock.ts @@ -0,0 +1,14 @@ +/* + * 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 { ID } from '../../constants/index.mock'; + +import { DeleteEndpointListItemSchema } from '.'; + +export const getDeleteEndpointListItemSchemaMock = (): DeleteEndpointListItemSchema => ({ + id: ID, +}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_endpoint_list_item_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_endpoint_list_item_schema/index.test.ts similarity index 84% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/delete_endpoint_list_item_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_endpoint_list_item_schema/index.test.ts index d702632713a5..09697db0c5f4 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_endpoint_list_item_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_endpoint_list_item_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_endpoint_list_item_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_endpoint_list_item_schema/index.ts similarity index 64% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/delete_endpoint_list_item_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_endpoint_list_item_schema/index.ts index f968b1410a25..9825b7414238 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_endpoint_list_item_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_endpoint_list_item_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_item_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_item_schema/index.mock.ts new file mode 100644 index 000000000000..98404e189beb --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_item_schema/index.mock.ts @@ -0,0 +1,15 @@ +/* + * 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 { ID, NAMESPACE_TYPE } from '../../constants/index.mock'; + +import { DeleteExceptionListItemSchema } from '.'; + +export const getDeleteExceptionListItemSchemaMock = (): DeleteExceptionListItemSchema => ({ + id: ID, + namespace_type: NAMESPACE_TYPE, +}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_item_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_item_schema/index.test.ts similarity index 83% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_item_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_item_schema/index.test.ts index 375fc20ba4da..7131a969a795 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_item_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_item_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_item_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_item_schema/index.ts similarity index 71% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_item_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_item_schema/index.ts index 4d961aa9e1a5..02bcd800712e 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_item_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_item_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_schema/index.mock.ts new file mode 100644 index 000000000000..7eca83a9d713 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_schema/index.mock.ts @@ -0,0 +1,15 @@ +/* + * 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 { ID, NAMESPACE_TYPE } from '../../constants/index.mock'; + +import { DeleteExceptionListSchema } from '.'; + +export const getDeleteExceptionListSchemaMock = (): DeleteExceptionListSchema => ({ + id: ID, + namespace_type: NAMESPACE_TYPE, +}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_schema/index.test.ts similarity index 82% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_schema/index.test.ts index 5507f855d783..a439ac040322 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_schema/index.ts similarity index 70% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_schema/index.ts index 62855c9dc212..1c04c0fdc17a 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_exception_list_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_item_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_item_schema/index.mock.ts new file mode 100644 index 000000000000..ef4ff721119a --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_item_schema/index.mock.ts @@ -0,0 +1,16 @@ +/* + * 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 { ID, LIST_ID, VALUE } from '../../constants/index.mock'; + +import { DeleteListItemSchema } from '.'; + +export const getDeleteListItemSchemaMock = (): DeleteListItemSchema => ({ + id: ID, + list_id: LIST_ID, + value: VALUE, +}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_item_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_item_schema/index.test.ts similarity index 77% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_item_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_item_schema/index.test.ts index d838fbab4f16..07db295d3ef2 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_item_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_item_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_item_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_item_schema/index.ts similarity index 66% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_item_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_item_schema/index.ts index bbf0a09a15c8..4b9ef6763014 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_item_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_item_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_schema/index.mock.ts new file mode 100644 index 000000000000..19b7a2aa15b9 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_schema/index.mock.ts @@ -0,0 +1,16 @@ +/* + * 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 { LIST_ID } from '../../constants/index.mock'; + +import { DeleteListSchema } from '.'; + +export const getDeleteListSchemaMock = (): DeleteListSchema => ({ + deleteReferences: false, + id: LIST_ID, + ignoreReferences: true, +}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_schema/index.test.ts similarity index 81% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_schema/index.test.ts index 5de3ec2c2109..5077c0795df3 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_schema/index.ts similarity index 65% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_schema/index.ts index 239a4d72113d..da1d252d9e36 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/delete_list_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/duplicate_exception_list_query_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/duplicate_exception_list_query_schema/index.mock.ts similarity index 51% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/duplicate_exception_list_query_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/duplicate_exception_list_query_schema/index.mock.ts index 121ab5f0b914..d3f9b59d5cf0 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/duplicate_exception_list_query_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/duplicate_exception_list_query_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { LIST_ID, NAMESPACE_TYPE } from '../../constants/index.mock'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/duplicate_exception_list_query_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/duplicate_exception_list_query_schema/index.test.ts similarity index 86% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/duplicate_exception_list_query_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/duplicate_exception_list_query_schema/index.test.ts index 244adc07a81d..73762793e3d2 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/duplicate_exception_list_query_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/duplicate_exception_list_query_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/duplicate_exception_list_query_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/duplicate_exception_list_query_schema/index.ts similarity index 70% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/duplicate_exception_list_query_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/duplicate_exception_list_query_schema/index.ts index b329e1244eb9..2a90eb4aeb05 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/duplicate_exception_list_query_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/duplicate_exception_list_query_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/export_exception_list_query_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/export_exception_list_query_schema/index.mock.ts similarity index 52% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/export_exception_list_query_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/export_exception_list_query_schema/index.mock.ts index 4f34a59407ea..2b1d6a439064 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/export_exception_list_query_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/export_exception_list_query_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { ID, LIST_ID, NAMESPACE_TYPE } from '../../constants/index.mock'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/export_exception_list_query_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/export_exception_list_query_schema/index.test.ts similarity index 88% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/export_exception_list_query_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/export_exception_list_query_schema/index.test.ts index 00b41f6d70f9..dea087dca36d 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/export_exception_list_query_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/export_exception_list_query_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/export_exception_list_query_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/export_exception_list_query_schema/index.ts similarity index 64% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/export_exception_list_query_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/export_exception_list_query_schema/index.ts index 3943af148b15..8967e45c5a61 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/export_exception_list_query_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/export_exception_list_query_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/export_list_item_query_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/export_list_item_query_schema/index.mock.ts new file mode 100644 index 000000000000..85076f592d16 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/export_list_item_query_schema/index.mock.ts @@ -0,0 +1,14 @@ +/* + * 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 { LIST_ID } from '../../constants/index.mock'; + +import { ExportListItemQuerySchema } from '.'; + +export const getExportListItemQuerySchemaMock = (): ExportListItemQuerySchema => ({ + list_id: LIST_ID, +}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/export_list_item_query_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/export_list_item_query_schema/index.test.ts similarity index 82% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/export_list_item_query_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/export_list_item_query_schema/index.test.ts index 55713e33f160..f05e530cbb41 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/export_list_item_query_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/export_list_item_query_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/export_list_item_query_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/export_list_item_query_schema/index.ts similarity index 60% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/export_list_item_query_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/export_list_item_query_schema/index.ts index 86c8318f1ad5..a07e6c73434e 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/export_list_item_query_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/export_list_item_query_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_endpoint_list_item_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_endpoint_list_item_schema/index.mock.ts similarity index 61% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/find_endpoint_list_item_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_endpoint_list_item_schema/index.mock.ts index d24d31cca5d9..5df0322cc803 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_endpoint_list_item_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_endpoint_list_item_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { FILTER } from '../../constants/index.mock'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_endpoint_list_item_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_endpoint_list_item_schema/index.test.ts similarity index 92% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/find_endpoint_list_item_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_endpoint_list_item_schema/index.test.ts index 776cc2976868..1ce9618781c4 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_endpoint_list_item_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_endpoint_list_item_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_endpoint_list_item_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_endpoint_list_item_schema/index.ts similarity index 75% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/find_endpoint_list_item_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_endpoint_list_item_schema/index.ts index a76854d3b4bf..05f32f452f5d 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_endpoint_list_item_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_endpoint_list_item_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_item_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_item_schema/index.mock.ts similarity index 80% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_item_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_item_schema/index.mock.ts index 02b89bdf4c73..16b2ee7a8a37 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_item_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_item_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { FILTER, LIST_ID, NAMESPACE_TYPE } from '../../constants/index.mock'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_item_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_item_schema/index.test.ts similarity index 94% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_item_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_item_schema/index.test.ts index da9c98d48e62..1d6696933321 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_item_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_item_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_item_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_item_schema/index.ts similarity index 81% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_item_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_item_schema/index.ts index 88258538e031..7177a7144c7f 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_item_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_item_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_schema/index.mock.ts similarity index 64% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_schema/index.mock.ts index 0b8c9e3db9bb..f963c6650cf2 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { FILTER, NAMESPACE_TYPE } from '../../constants/index.mock'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_schema/index.test.ts similarity index 92% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_schema/index.test.ts index fd105d3d2f61..8669a3657f02 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_schema/index.ts similarity index 78% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_schema/index.ts index 1e22f752d014..dc9acdefd7a9 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_exception_list_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_item_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_item_schema/index.mock.ts similarity index 63% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_item_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_item_schema/index.mock.ts index 601406ce3e37..44c952a9a382 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_item_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_item_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { CURSOR, FILTER, LIST_ID } from '../../constants/index.mock'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_item_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_item_schema/index.test.ts similarity index 91% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_item_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_item_schema/index.test.ts index b80629f8546b..589a40f641c6 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_item_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_item_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_item_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_item_schema/index.ts similarity index 77% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_item_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_item_schema/index.ts index 4509f6bc973b..4279d5ef4a07 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_item_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_item_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_schema/index.mock.ts similarity index 59% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_schema/index.mock.ts index 48c9671e4ac1..b80369fb6b43 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { FILTER } from '../../constants/index.mock'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_schema/index.test.ts similarity index 91% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_schema/index.test.ts index ba03ddcb8526..06b37bacf845 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_schema/index.ts similarity index 74% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_schema/index.ts index 8b33ffc6a947..8f1520d0caf1 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/find_list_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/get_exception_filter_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/get_exception_filter_schema/index.ts similarity index 74% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/get_exception_filter_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/get_exception_filter_schema/index.ts index 58c93b697a85..656d6cea6164 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/get_exception_filter_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/get_exception_filter_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_item_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_item_schema/index.mock.ts similarity index 69% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_item_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_item_schema/index.mock.ts index e66b805de496..a50c455a9d60 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_item_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_item_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { ENTRIES } from '../../constants/index.mock'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_item_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_item_schema/index.test.ts similarity index 94% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_item_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_item_schema/index.test.ts index 58b9bce4c410..61e135bfd59a 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_item_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_item_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_item_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_item_schema/index.ts similarity index 86% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_item_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_item_schema/index.ts index 9b0762005f3a..a2d60e292aff 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_item_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_item_schema/index.ts @@ -1,24 +1,21 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; import { OsTypeArray, osTypeArrayOrUndefined } from '../../common/os_type'; -import { Tags } from '../../common/tags'; +import { Tags, tags } from '../../common/tags'; import { NamespaceType } from '../../common/default_namespace'; import { name } from '../../common/name'; import { description } from '../../common/description'; import { namespace_type } from '../../common/namespace_type'; -import { tags } from '../../common/tags'; import { meta } from '../../common/meta'; import { list_id } from '../../common/list_id'; -import { item_id } from '../../common/item_id'; +import { item_id, ItemId } from '../../common/item_id'; import { id } from '../../common/id'; import { created_at } from '../../common/created_at'; import { created_by } from '../../common/created_by'; @@ -28,7 +25,6 @@ import { _version } from '../../common/underscore_version'; import { tie_breaker_id } from '../../common/tie_breaker_id'; import { nonEmptyEntriesArray } from '../../common/non_empty_entries_array'; import { exceptionListItemType } from '../../common/exception_list_item_type'; -import { ItemId } from '../../common/item_id'; import { EntriesArray } from '../../common/entries'; import { DefaultImportCommentsArray } from '../../common/default_import_comments_array'; import { ExpireTimeOrUndefined, expireTimeOrUndefined, ImportCommentsArray } from '../../common'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_list_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_list_schema/index.mock.ts similarity index 64% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_list_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_list_schema/index.mock.ts index 5bf263beb372..438b0cd54fb0 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_list_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_list_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { ImportExceptionListSchemaDecoded, ImportExceptionsListSchema } from '.'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_list_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_list_schema/index.test.ts similarity index 92% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_list_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_list_schema/index.test.ts index 677e089fe1ef..e1d0a55a1770 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_list_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_list_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_list_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_list_schema/index.ts similarity index 84% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_list_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_list_schema/index.ts index 9c0584aa267e..98f5988daf1c 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_list_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_exception_list_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; @@ -17,15 +15,13 @@ import { import { exceptionListType } from '../../common/exception_list'; import { OsTypeArray, osTypeArrayOrUndefined } from '../../common/os_type'; -import { Tags } from '../../common/tags'; -import { ListId } from '../../common/list_id'; +import { Tags, tags } from '../../common/tags'; +import { ListId, list_id } from '../../common/list_id'; import { NamespaceType } from '../../common/default_namespace'; import { name } from '../../common/name'; import { description } from '../../common/description'; import { namespace_type } from '../../common/namespace_type'; -import { tags } from '../../common/tags'; import { meta } from '../../common/meta'; -import { list_id } from '../../common/list_id'; import { id } from '../../common/id'; import { created_at } from '../../common/created_at'; import { created_by } from '../../common/created_by'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_query_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_query_schema/index.mock.ts similarity index 50% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_query_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_query_schema/index.mock.ts index 74a2122ff1dc..fc5fc0ca703b 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_query_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_query_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { LIST_ID, TYPE } from '../../constants/index.mock'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_query_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_query_schema/index.test.ts similarity index 90% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_query_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_query_schema/index.test.ts index b0ec4f10af87..26d1ba486468 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_query_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_query_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_query_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_query_schema/index.ts similarity index 67% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_query_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_query_schema/index.ts index e34d94c49866..19cd873825d2 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_query_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_query_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_schema/index.mock.ts similarity index 57% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_schema/index.mock.ts index 15dd19d4bdef..32fee251c078 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { ImportListItemSchema } from '.'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_schema/index.test.ts similarity index 82% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_schema/index.test.ts index c4841f394f8d..0e572255b574 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_schema/index.ts similarity index 56% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_schema/index.ts index 45dbf838e587..4072cf029bae 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/import_list_item_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/index.ts similarity index 83% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/index.ts index 3d21a5ffdcb2..a6a3099ddde8 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ export * from './create_endpoint_list_item_schema'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/internal/create_exception_list_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/internal/create_exception_list_schema/index.test.ts similarity index 87% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/internal/create_exception_list_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/internal/create_exception_list_schema/index.test.ts index 4a4a090723c3..8ab58a7b0bdd 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/internal/create_exception_list_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/internal/create_exception_list_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/internal/create_exception_list_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/internal/create_exception_list_schema/index.ts similarity index 75% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/internal/create_exception_list_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/internal/create_exception_list_schema/index.ts index 3aa11ba50050..ff8f9670a4e0 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/internal/create_exception_list_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/internal/create_exception_list_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { ENDPOINT_ARTIFACT_LIST_IDS } from '@kbn/securitysolution-list-constants'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_item_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_item_schema/index.mock.ts new file mode 100644 index 000000000000..fd30cba20439 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_item_schema/index.mock.ts @@ -0,0 +1,16 @@ +/* + * 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 { LIST_ITEM_ID, META, VALUE } from '../../constants/index.mock'; + +import { PatchListItemSchema } from '.'; + +export const getPathListItemSchemaMock = (): PatchListItemSchema => ({ + id: LIST_ITEM_ID, + meta: META, + value: VALUE, +}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_item_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_item_schema/index.test.ts similarity index 88% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_item_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_item_schema/index.test.ts index fddeeaf0055c..55050ea6eab8 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_item_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_item_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_item_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_item_schema/index.ts similarity index 66% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_item_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_item_schema/index.ts index 96b50702d99b..caa0d62f003f 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_item_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_item_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_schema/index.mock.ts new file mode 100644 index 000000000000..2b71a46c4665 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_schema/index.mock.ts @@ -0,0 +1,17 @@ +/* + * 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 { DESCRIPTION, LIST_ITEM_ID, META, NAME } from '../../constants/index.mock'; + +import { PatchListSchema } from '.'; + +export const getPathListSchemaMock = (): PatchListSchema => ({ + description: DESCRIPTION, + id: LIST_ITEM_ID, + meta: META, + name: NAME, +}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_schema/index.test.ts similarity index 92% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_schema/index.test.ts index b79bfc8fddd6..be0dd3b2f6ea 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_schema/index.ts similarity index 73% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_schema/index.ts index e5c477c84424..cb72d902f189 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/patch_list_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_endpoint_list_item_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_endpoint_list_item_schema/index.mock.ts new file mode 100644 index 000000000000..7b83368ad73e --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_endpoint_list_item_schema/index.mock.ts @@ -0,0 +1,15 @@ +/* + * 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 { ID, ITEM_ID } from '../../constants/index.mock'; + +import { ReadEndpointListItemSchema } from '.'; + +export const getReadEndpointListItemSchemaMock = (): ReadEndpointListItemSchema => ({ + id: ID, + item_id: ITEM_ID, +}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_endpoint_list_item_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_endpoint_list_item_schema/index.test.ts similarity index 89% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/read_endpoint_list_item_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_endpoint_list_item_schema/index.test.ts index d9de257a3130..dc8a14b2ef10 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_endpoint_list_item_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_endpoint_list_item_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_endpoint_list_item_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_endpoint_list_item_schema/index.ts similarity index 63% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/read_endpoint_list_item_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_endpoint_list_item_schema/index.ts index dbf3a59d79b3..6e32b1fe5186 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_endpoint_list_item_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_endpoint_list_item_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_item_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_item_schema/index.mock.ts new file mode 100644 index 000000000000..6ce6e68ec6e0 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_item_schema/index.mock.ts @@ -0,0 +1,16 @@ +/* + * 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 { ID, ITEM_ID, NAMESPACE_TYPE } from '../../constants/index.mock'; + +import { ReadExceptionListItemSchema } from '.'; + +export const getReadExceptionListItemSchemaMock = (): ReadExceptionListItemSchema => ({ + id: ID, + item_id: ITEM_ID, + namespace_type: NAMESPACE_TYPE, +}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_item_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_item_schema/index.test.ts similarity index 92% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_item_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_item_schema/index.test.ts index e1c461551030..68f636ccb870 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_item_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_item_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_item_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_item_schema/index.ts similarity index 71% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_item_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_item_schema/index.ts index 6f54ede5ff51..9111587af7e9 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_item_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_item_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_schema/index.mock.ts new file mode 100644 index 000000000000..f122f1d20339 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_schema/index.mock.ts @@ -0,0 +1,16 @@ +/* + * 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 { ID, LIST_ID, NAMESPACE_TYPE } from '../../constants/index.mock'; + +import { ReadExceptionListSchema } from '.'; + +export const getReadExceptionListSchemaMock = (): ReadExceptionListSchema => ({ + id: ID, + list_id: LIST_ID, + namespace_type: NAMESPACE_TYPE, +}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_schema/index.test.ts similarity index 92% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_schema/index.test.ts index 2c5a93021b7c..89cd869bd17c 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_schema/index.ts similarity index 70% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_schema/index.ts index fb2e66d2f1de..b4d9b7309fb5 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_exception_list_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_item_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_item_schema/index.mock.ts new file mode 100644 index 000000000000..a23911123140 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_item_schema/index.mock.ts @@ -0,0 +1,16 @@ +/* + * 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 { LIST_ID, LIST_ITEM_ID, VALUE } from '../../constants/index.mock'; + +import { ReadListItemSchema } from '.'; + +export const getReadListItemSchemaMock = (): ReadListItemSchema => ({ + id: LIST_ITEM_ID, + list_id: LIST_ID, + value: VALUE, +}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_item_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_item_schema/index.test.ts similarity index 91% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_item_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_item_schema/index.test.ts index 547537afc673..9370aa5e3d45 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_item_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_item_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_item_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_item_schema/index.ts similarity index 60% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_item_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_item_schema/index.ts index 3b45ebeea6ba..571f37ff403e 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_item_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_item_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_schema/index.mock.ts new file mode 100644 index 000000000000..c82b34381554 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_schema/index.mock.ts @@ -0,0 +1,14 @@ +/* + * 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 { LIST_ID } from '../../constants/index.mock'; + +import { ReadListSchema } from '.'; + +export const getReadListSchemaMock = (): ReadListSchema => ({ + id: LIST_ID, +}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_schema/index.test.ts similarity index 81% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_schema/index.test.ts index d26f8206c498..1953341d2be4 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_schema/index.ts new file mode 100644 index 000000000000..6382a7c0ad97 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/read_list_schema/index.ts @@ -0,0 +1,18 @@ +/* + * 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 * as t from 'io-ts'; + +import { id } from '../../common/id'; + +export const readListSchema = t.exact( + t.type({ + id, + }) +); + +export type ReadListSchema = t.OutputOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/summary_exception_list_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/summary_exception_list_schema/index.mock.ts similarity index 50% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/summary_exception_list_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/summary_exception_list_schema/index.mock.ts index 61e8dfbae15f..af6dc55b61da 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/summary_exception_list_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/summary_exception_list_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { FILTER, ID, LIST_ID, NAMESPACE_TYPE } from '../../constants/index.mock'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/summary_exception_list_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/summary_exception_list_schema/index.test.ts similarity index 93% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/summary_exception_list_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/summary_exception_list_schema/index.test.ts index 06db32fa2df3..53a734ed034e 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/summary_exception_list_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/summary_exception_list_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/summary_exception_list_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/summary_exception_list_schema/index.ts similarity index 72% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/summary_exception_list_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/summary_exception_list_schema/index.ts index 2815dfa05b27..6be4f0c57b08 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/summary_exception_list_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/summary_exception_list_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_endpoint_list_item_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_endpoint_list_item_schema/index.mock.ts similarity index 61% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/update_endpoint_list_item_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_endpoint_list_item_schema/index.mock.ts index 8b34549a8c90..57244aac0426 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_endpoint_list_item_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_endpoint_list_item_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_endpoint_list_item_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_endpoint_list_item_schema/index.test.ts similarity index 93% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/update_endpoint_list_item_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_endpoint_list_item_schema/index.test.ts index f595ecd1ebbe..1def91ca1a8e 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_endpoint_list_item_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_endpoint_list_item_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_endpoint_list_item_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_endpoint_list_item_schema/index.ts similarity index 84% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/update_endpoint_list_item_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_endpoint_list_item_schema/index.ts index 7851d80ef2ef..e301137058af 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_endpoint_list_item_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_endpoint_list_item_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_schema/index.mock.ts similarity index 72% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_schema/index.mock.ts index fce5d2f7e18b..c7560348179d 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_schema/index.test.ts similarity index 94% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_schema/index.test.ts index 84e9b801c171..0adbf1224d72 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_schema/index.ts similarity index 87% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_schema/index.ts index b0190d8fa388..910acbe2c942 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_item_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_schema/index.mock.ts similarity index 68% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_schema/index.mock.ts index ff98cc71f03f..9aac2453a7be 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { DESCRIPTION, ID, LIST_ID, META, NAME, NAMESPACE_TYPE } from '../../constants/index.mock'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_schema/index.test.ts similarity index 92% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_schema/index.test.ts index 4821251f36d1..029751ac4d14 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_schema/index.ts similarity index 84% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_schema/index.ts index 62add37568ba..be4006c3efa1 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_exception_list_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_item_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_item_schema/index.mock.ts similarity index 56% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_item_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_item_schema/index.mock.ts index 9c3b2dbbd7d3..7d65f59aa8cd 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_item_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_item_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { ID, LIST_ITEM_ID, META, VALUE } from '../../constants/index.mock'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_item_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_item_schema/index.test.ts similarity index 82% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_item_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_item_schema/index.test.ts index 6c7637cbde05..ca6402455aab 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_item_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_item_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_item_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_item_schema/index.ts similarity index 68% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_item_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_item_schema/index.ts index 613dde36ef0f..2df22b5c57b7 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_item_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_item_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_schema/index.mock.ts similarity index 62% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_schema/index.mock.ts index 5f1fc8fe926d..99362d8ef8a7 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { DESCRIPTION, LIST_ID, META, NAME, _VERSION } from '../../constants/index.mock'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_schema/index.test.ts similarity index 82% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_schema/index.test.ts index cac97d7c32cf..c35861f66e91 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_schema/index.ts similarity index 72% rename from packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_schema/index.ts index 41ddb81c36e3..c6182af2f23f 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/request/update_list_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/acknowledge_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/acknowledge_schema/index.mock.ts new file mode 100644 index 000000000000..2c4ac68f4613 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/acknowledge_schema/index.mock.ts @@ -0,0 +1,12 @@ +/* + * 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 { AcknowledgeSchema } from '.'; + +export const getAcknowledgeSchemaResponseMock = (): AcknowledgeSchema => ({ + acknowledged: true, +}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/acknowledge_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/acknowledge_schema/index.test.ts similarity index 82% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/acknowledge_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/acknowledge_schema/index.test.ts index 2d3086b02315..4fd4adf861bb 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/acknowledge_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/acknowledge_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/acknowledge_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/acknowledge_schema/index.ts new file mode 100644 index 000000000000..97a0dc23682c --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/acknowledge_schema/index.ts @@ -0,0 +1,12 @@ +/* + * 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 * as t from 'io-ts'; + +export const acknowledgeSchema = t.exact(t.type({ acknowledged: t.boolean })); + +export type AcknowledgeSchema = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/create_endpoint_list_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/create_endpoint_list_schema/index.test.ts similarity index 88% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/create_endpoint_list_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/create_endpoint_list_schema/index.test.ts index 52c72cf0e8cb..2ac63d9719e2 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/create_endpoint_list_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/create_endpoint_list_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/create_endpoint_list_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/create_endpoint_list_schema/index.ts new file mode 100644 index 000000000000..44f3629973a0 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/create_endpoint_list_schema/index.ts @@ -0,0 +1,13 @@ +/* + * 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 * as t from 'io-ts'; +import { exceptionListSchema } from '../exception_list_schema'; + +export const createEndpointListSchema = t.union([exceptionListSchema, t.exact(t.type({}))]); + +export type CreateEndpointListSchema = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_item_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_item_schema/index.mock.ts similarity index 80% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_item_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_item_schema/index.mock.ts index 2c0449ea900e..fad9dc5990a8 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_item_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_item_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_item_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_item_schema/index.test.ts similarity index 95% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_item_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_item_schema/index.test.ts index 9c98d97a596a..1231764ae7f5 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_item_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_item_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_item_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_item_schema/index.ts similarity index 81% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_item_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_item_schema/index.ts index 5408aa581bdf..f3f3986c4ea3 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_item_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_item_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_schema/index.mock.ts similarity index 82% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_schema/index.mock.ts index de2efb85c337..07b47f91fead 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_schema/index.test.ts similarity index 94% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_schema/index.test.ts index e8dc043bd6b0..b043cde4c3f0 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_schema/index.ts similarity index 79% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_schema/index.ts index 0667153c2777..e04eadb70765 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_summary_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_summary_schema/index.mock.ts new file mode 100644 index 000000000000..0acac1da648d --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_summary_schema/index.mock.ts @@ -0,0 +1,15 @@ +/* + * 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 { ExceptionListSummarySchema } from '.'; + +export const getListSummaryResponseMock = (): ExceptionListSummarySchema => ({ + windows: 0, + linux: 1, + macos: 2, + total: 3, +}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_summary_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_summary_schema/index.test.ts similarity index 89% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_summary_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_summary_schema/index.test.ts index ad1d8b737e46..b4b6de2e25d1 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_summary_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_summary_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_summary_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_summary_schema/index.ts similarity index 54% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_summary_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_summary_schema/index.ts index a14eaba10b78..7414ca257fbd 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_summary_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/exception_list_summary_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { PositiveInteger } from '@kbn/securitysolution-io-ts-types'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_all_list_items_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_all_list_items_schema/index.mock.ts new file mode 100644 index 000000000000..75330f493743 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_all_list_items_schema/index.mock.ts @@ -0,0 +1,14 @@ +/* + * 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 { FoundAllListItemsSchema } from '.'; +import { getListItemResponseMock } from '../list_item_schema/index.mock'; + +export const getFoundAllListItemsSchemaMock = (): FoundAllListItemsSchema => ({ + data: [getListItemResponseMock()], + total: 1, +}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/found_all_list_items_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_all_list_items_schema/index.ts similarity index 51% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/found_all_list_items_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_all_list_items_schema/index.ts index f8e6dc43647f..c5812499b3e7 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/found_all_list_items_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_all_list_items_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_item_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_item_schema/index.mock.ts similarity index 51% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_item_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_item_schema/index.mock.ts index 8a7abc59a9cd..6f8592320895 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_item_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_item_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { FoundExceptionListItemSchema } from '.'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_item_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_item_schema/index.test.ts similarity index 94% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_item_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_item_schema/index.test.ts index eeaeee26fac4..33d26ca32a5b 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_item_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_item_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_item_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_item_schema/index.ts similarity index 64% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_item_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_item_schema/index.ts index 6e34672f3349..50f57bf42459 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_item_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_item_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_schema/index.mock.ts similarity index 50% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_schema/index.mock.ts index 5a4aa9fcbe57..8a6d9fe2d2a7 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { FoundExceptionListSchema } from '.'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_schema/index.test.ts similarity index 93% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_schema/index.test.ts index 07b302c80170..18d96785ad2e 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_schema/index.ts similarity index 63% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_schema/index.ts index de4a222b61e7..cb7867db7f29 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_exception_list_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_item_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_item_schema/index.mock.ts similarity index 53% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_item_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_item_schema/index.mock.ts index 3f2083565743..bc6c6b63dbea 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_item_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_item_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { FoundListItemSchema } from '.'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_item_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_item_schema/index.ts similarity index 60% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_item_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_item_schema/index.ts index 872a178b2f13..86801ed60bca 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_item_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_item_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_schema/index.mock.ts new file mode 100644 index 000000000000..07cbb1d03000 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_schema/index.mock.ts @@ -0,0 +1,17 @@ +/* + * 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 { FoundListSchema } from '.'; +import { getListResponseMock } from '../list_schema/index.mock'; + +export const getFoundListSchemaMock = (): FoundListSchema => ({ + cursor: '123', + data: [getListResponseMock()], + page: 1, + per_page: 1, + total: 1, +}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_schema/index.ts similarity index 58% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_schema/index.ts index 6b97b8c73e63..16922174e749 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_list_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_lists_by_size_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_lists_by_size_schema/index.mock.ts new file mode 100644 index 000000000000..8d1a421acef2 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_lists_by_size_schema/index.mock.ts @@ -0,0 +1,14 @@ +/* + * 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 { FoundListsBySizeSchema } from '.'; +import { getListResponseMock } from '../list_schema/index.mock'; + +export const getFoundListsBySizeSchemaMock = (): FoundListsBySizeSchema => ({ + smallLists: [getListResponseMock()], + largeLists: [getListResponseMock()], +}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/found_lists_by_size_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_lists_by_size_schema/index.ts similarity index 50% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/found_lists_by_size_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_lists_by_size_schema/index.ts index b4d41484bf26..0271416b5f3c 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/found_lists_by_size_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/found_lists_by_size_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/import_exceptions_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/import_exceptions_schema/index.mock.ts similarity index 56% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/import_exceptions_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/import_exceptions_schema/index.mock.ts index b1502381013c..9e8293b382cc 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/import_exceptions_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/import_exceptions_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { ImportExceptionsResponseSchema } from '.'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/import_exceptions_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/import_exceptions_schema/index.test.ts similarity index 93% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/import_exceptions_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/import_exceptions_schema/index.test.ts index 81dd87bf19a5..d5d481fe87be 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/import_exceptions_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/import_exceptions_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/import_exceptions_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/import_exceptions_schema/index.ts similarity index 74% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/import_exceptions_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/import_exceptions_schema/index.ts index b976ab298e0c..4a172d2ec10a 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/import_exceptions_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/import_exceptions_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/index.ts similarity index 67% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/index.ts index 49c42783473d..04b00f43c702 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ export * from './acknowledge_schema'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_index_exist_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_index_exist_schema/index.mock.ts new file mode 100644 index 000000000000..b3416ab76852 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_index_exist_schema/index.mock.ts @@ -0,0 +1,13 @@ +/* + * 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 { ListItemIndexExistSchema } from '.'; + +export const getListItemIndexExistSchemaResponseMock = (): ListItemIndexExistSchema => ({ + list_index: true, + list_item_index: true, +}); diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_index_exist_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_index_exist_schema/index.test.ts similarity index 86% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_index_exist_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_index_exist_schema/index.test.ts index 2827cd362734..0c8812795935 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_index_exist_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_index_exist_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_index_exist_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_index_exist_schema/index.ts new file mode 100644 index 000000000000..fb1070f72dae --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_index_exist_schema/index.ts @@ -0,0 +1,17 @@ +/* + * 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 * as t from 'io-ts'; + +export const listItemIndexExistSchema = t.exact( + t.type({ + list_index: t.boolean, + list_item_index: t.boolean, + }) +); + +export type ListItemIndexExistSchema = t.TypeOf; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_schema/index.mock.ts similarity index 72% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_schema/index.mock.ts index 22c2e5ae07f6..10283965276d 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { ListItemSchema } from '.'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_schema/index.test.ts similarity index 94% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_schema/index.test.ts index 5b4238e136dc..f855448ff26e 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_schema/index.ts similarity index 79% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_schema/index.ts index 869ca695fa42..0e7af6ab2726 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_item_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/list_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_schema/index.mock.ts similarity index 74% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/list_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_schema/index.mock.ts index 7a0b9e01b87c..3b6ff22ceb15 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/list_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { ListSchema } from '.'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/list_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_schema/index.test.ts similarity index 94% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/list_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_schema/index.test.ts index 17f25de7d8ec..920941a2135a 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/list_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/list_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_schema/index.ts similarity index 80% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/list_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_schema/index.ts index 5029e55df324..687c93ad6f6d 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/list_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/list_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/search_list_item_schema/index.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/search_list_item_schema/index.mock.ts similarity index 50% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/search_list_item_schema/index.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/search_list_item_schema/index.mock.ts index 1cab9a6b827c..1ce8e23d4af5 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/search_list_item_schema/index.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/search_list_item_schema/index.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { SearchListItemSchema } from '.'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/search_list_item_schema/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/search_list_item_schema/index.test.ts similarity index 82% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/search_list_item_schema/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/search_list_item_schema/index.test.ts index a6604f39b462..6f89a58e0bc3 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/search_list_item_schema/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/search_list_item_schema/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { left } from 'fp-ts/lib/Either'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/response/search_list_item_schema/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/search_list_item_schema/index.ts similarity index 67% rename from packages/kbn-securitysolution-io-ts-list-types/src/response/search_list_item_schema/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/search_list_item_schema/index.ts index c5a07308dd0f..8c17db076500 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/response/search_list_item_schema/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/response/search_list_item_schema/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 * as t from 'io-ts'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/src/typescript_types/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/typescript_types/index.ts similarity index 94% rename from packages/kbn-securitysolution-io-ts-list-types/src/typescript_types/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/typescript_types/index.ts index 9a8cd1e4fab5..8b172753bbc5 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/src/typescript_types/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/src/typescript_types/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 type { HttpStart } from '@kbn/core-http-browser'; diff --git a/packages/kbn-securitysolution-io-ts-list-types/tsconfig.json b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/tsconfig.json similarity index 89% rename from packages/kbn-securitysolution-io-ts-list-types/tsconfig.json rename to x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/tsconfig.json index 706aa6e81fc5..b8097b0b7b12 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/tsconfig.json +++ b/x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", "types": ["jest", "node"] diff --git a/packages/kbn-securitysolution-list-api/README.md b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/README.md similarity index 100% rename from packages/kbn-securitysolution-list-api/README.md rename to x-pack/solutions/security/packages/kbn-securitysolution-list-api/README.md diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-list-api/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/index.ts new file mode 100644 index 000000000000..afe1280b9b85 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/index.ts @@ -0,0 +1,12 @@ +/* + * 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. + */ + +export * from './src/api'; +export * from './src/fp_utils'; +export * from './src/list_api'; +export * from './src/list_item_api'; +export * from './src/types'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-list-api/jest.config.js b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/jest.config.js new file mode 100644 index 000000000000..9e9844e5cbd0 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/jest.config.js @@ -0,0 +1,12 @@ +/* + * 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. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../../..', + roots: ['/x-pack/solutions/security/packages/kbn-securitysolution-list-api'], +}; diff --git a/packages/kbn-securitysolution-list-api/kibana.jsonc b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/kibana.jsonc similarity index 100% rename from packages/kbn-securitysolution-list-api/kibana.jsonc rename to x-pack/solutions/security/packages/kbn-securitysolution-list-api/kibana.jsonc diff --git a/packages/kbn-securitysolution-list-api/package.json b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/package.json similarity index 68% rename from packages/kbn-securitysolution-list-api/package.json rename to x-pack/solutions/security/packages/kbn-securitysolution-list-api/package.json index bcb7a79accdc..5159b04f6204 100644 --- a/packages/kbn-securitysolution-list-api/package.json +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/package.json @@ -2,6 +2,6 @@ "name": "@kbn/securitysolution-list-api", "version": "1.0.0", "description": "security solution list REST API", - "license": "Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0", + "license": "Elastic License 2.0", "private": true } \ No newline at end of file diff --git a/packages/kbn-securitysolution-list-api/src/api/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/api/index.ts similarity index 97% rename from packages/kbn-securitysolution-list-api/src/api/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/api/index.ts index 4bd188672e5a..c8fe4143d1bd 100644 --- a/packages/kbn-securitysolution-list-api/src/api/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/api/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { chain, fromEither, tryCatch } from 'fp-ts/lib/TaskEither'; diff --git a/packages/kbn-securitysolution-list-api/src/fp_utils/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/fp_utils/index.test.ts similarity index 62% rename from packages/kbn-securitysolution-list-api/src/fp_utils/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/fp_utils/index.test.ts index 98872f45cb77..574c0f97292e 100644 --- a/packages/kbn-securitysolution-list-api/src/fp_utils/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/fp_utils/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { tryCatch } from 'fp-ts/lib/TaskEither'; diff --git a/packages/kbn-securitysolution-list-api/src/fp_utils/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/fp_utils/index.ts similarity index 64% rename from packages/kbn-securitysolution-list-api/src/fp_utils/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/fp_utils/index.ts index 5614a3e7cb8d..1360c78db59e 100644 --- a/packages/kbn-securitysolution-list-api/src/fp_utils/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/fp_utils/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { pipe } from 'fp-ts/lib/pipeable'; diff --git a/packages/kbn-securitysolution-list-api/src/list_api/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_api/index.test.ts similarity index 97% rename from packages/kbn-securitysolution-list-api/src/list_api/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_api/index.test.ts index 6b8698a707aa..1168b4e49195 100644 --- a/packages/kbn-securitysolution-list-api/src/list_api/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_api/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { createListIndex, deleteList, exportList, findLists, importList, readListIndex } from '.'; diff --git a/packages/kbn-securitysolution-list-api/src/list_api/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_api/index.ts similarity index 95% rename from packages/kbn-securitysolution-list-api/src/list_api/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_api/index.ts index 3087ed5333cc..93160ca739e2 100644 --- a/packages/kbn-securitysolution-list-api/src/list_api/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_api/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { chain, fromEither, map, tryCatch } from 'fp-ts/lib/TaskEither'; diff --git a/packages/kbn-securitysolution-list-api/src/list_api/mocks/constants.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_api/mocks/constants.mock.ts similarity index 57% rename from packages/kbn-securitysolution-list-api/src/list_api/mocks/constants.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_api/mocks/constants.mock.ts index 3043cc70642c..b3ce62d03f48 100644 --- a/packages/kbn-securitysolution-list-api/src/list_api/mocks/constants.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_api/mocks/constants.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ export const DATE_NOW = '2020-04-20T15:25:31.830Z'; diff --git a/x-pack/plugins/lists/common/schemas/response/acknowledge_schema.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_api/mocks/response/acknowledge_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/response/acknowledge_schema.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_api/mocks/response/acknowledge_schema.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/response/found_list_schema.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_api/mocks/response/found_list_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/response/found_list_schema.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_api/mocks/response/found_list_schema.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/response/list_item_index_exist_schema.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_api/mocks/response/list_item_index_exist_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/response/list_item_index_exist_schema.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_api/mocks/response/list_item_index_exist_schema.mock.ts diff --git a/packages/kbn-securitysolution-list-hooks/src/mocks/response/list_schema.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_api/mocks/response/list_schema.mock.ts similarity index 74% rename from packages/kbn-securitysolution-list-hooks/src/mocks/response/list_schema.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_api/mocks/response/list_schema.mock.ts index 79ed25641977..b2b66ad4636c 100644 --- a/packages/kbn-securitysolution-list-hooks/src/mocks/response/list_schema.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_api/mocks/response/list_schema.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 type { ListSchema } from '@kbn/securitysolution-io-ts-list-types'; diff --git a/packages/kbn-securitysolution-list-api/src/list_item_api/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_item_api/index.test.ts similarity index 92% rename from packages/kbn-securitysolution-list-api/src/list_item_api/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_item_api/index.test.ts index 95e37ec43410..651edfe25cb1 100644 --- a/packages/kbn-securitysolution-list-api/src/list_item_api/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_item_api/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { createListItem, deleteListItem, findListItems, patchListItem } from '.'; diff --git a/packages/kbn-securitysolution-list-api/src/list_item_api/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_item_api/index.ts similarity index 93% rename from packages/kbn-securitysolution-list-api/src/list_item_api/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_item_api/index.ts index 8c6cdc358f70..1605b68ee04c 100644 --- a/packages/kbn-securitysolution-list-api/src/list_item_api/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_item_api/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { diff --git a/packages/kbn-securitysolution-list-api/src/list_item_api/mocks/response/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_item_api/mocks/response/index.ts similarity index 64% rename from packages/kbn-securitysolution-list-api/src/list_item_api/mocks/response/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_item_api/mocks/response/index.ts index 5ef4e52adbe8..2dddd844c5f2 100644 --- a/packages/kbn-securitysolution-list-api/src/list_item_api/mocks/response/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_item_api/mocks/response/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 type { FoundListItemSchema, ListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; diff --git a/packages/kbn-securitysolution-list-api/src/list_item_api/mocks/response/list_item_schema.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_item_api/mocks/response/list_item_schema.mock.ts similarity index 63% rename from packages/kbn-securitysolution-list-api/src/list_item_api/mocks/response/list_item_schema.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_item_api/mocks/response/list_item_schema.mock.ts index eb67b9777354..726f49e9d0d3 100644 --- a/packages/kbn-securitysolution-list-api/src/list_item_api/mocks/response/list_item_schema.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/list_item_api/mocks/response/list_item_schema.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 type { ListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; diff --git a/packages/kbn-securitysolution-list-api/src/types.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/types.ts similarity index 83% rename from packages/kbn-securitysolution-list-api/src/types.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/types.ts index c78071bb5824..54aa89936d73 100644 --- a/packages/kbn-securitysolution-list-api/src/types.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/src/types.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 type { @@ -17,8 +15,9 @@ import type { // TODO: Replace these with kbn packaged versions once we have those available to us // These originally came from this location below before moving them to this hacked "any" types: -// import { HttpStart, NotificationsStart } from '../../../../../src/core/public'; +// import { HttpStart, NotificationsStart } from '../../../../../../../../src/core/public'; interface HttpStart { + // eslint-disable-next-line @typescript-eslint/no-explicit-any fetch: (...args: any) => any; } diff --git a/packages/kbn-securitysolution-list-api/tsconfig.json b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/tsconfig.json similarity index 89% rename from packages/kbn-securitysolution-list-api/tsconfig.json rename to x-pack/solutions/security/packages/kbn-securitysolution-list-api/tsconfig.json index 2c2ca29316fc..10dbca803000 100644 --- a/packages/kbn-securitysolution-list-api/tsconfig.json +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-api/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", "types": [ diff --git a/packages/kbn-securitysolution-list-constants/README.md b/x-pack/solutions/security/packages/kbn-securitysolution-list-constants/README.md similarity index 100% rename from packages/kbn-securitysolution-list-constants/README.md rename to x-pack/solutions/security/packages/kbn-securitysolution-list-constants/README.md diff --git a/packages/kbn-securitysolution-list-constants/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-constants/index.ts similarity index 93% rename from packages/kbn-securitysolution-list-constants/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-constants/index.ts index 6f1e8d01b830..746294c8908f 100644 --- a/packages/kbn-securitysolution-list-constants/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-constants/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { deepFreeze } from '@kbn/std'; diff --git a/packages/kbn-securitysolution-list-constants/kibana.jsonc b/x-pack/solutions/security/packages/kbn-securitysolution-list-constants/kibana.jsonc similarity index 100% rename from packages/kbn-securitysolution-list-constants/kibana.jsonc rename to x-pack/solutions/security/packages/kbn-securitysolution-list-constants/kibana.jsonc diff --git a/packages/kbn-securitysolution-list-constants/package.json b/x-pack/solutions/security/packages/kbn-securitysolution-list-constants/package.json similarity index 76% rename from packages/kbn-securitysolution-list-constants/package.json rename to x-pack/solutions/security/packages/kbn-securitysolution-list-constants/package.json index 1b03f95f0f15..f57bdd68a2cc 100644 --- a/packages/kbn-securitysolution-list-constants/package.json +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-constants/package.json @@ -2,6 +2,6 @@ "name": "@kbn/securitysolution-list-constants", "version": "1.0.0", "description": "security solution list constants to use across plugins such lists, security_solution, cases, etc...", - "license": "Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0", + "license": "Elastic License 2.0", "private": true } \ No newline at end of file diff --git a/packages/kbn-securitysolution-list-constants/tsconfig.json b/x-pack/solutions/security/packages/kbn-securitysolution-list-constants/tsconfig.json similarity index 81% rename from packages/kbn-securitysolution-list-constants/tsconfig.json rename to x-pack/solutions/security/packages/kbn-securitysolution-list-constants/tsconfig.json index 0cd8de173ed4..0d3f96d6a17b 100644 --- a/packages/kbn-securitysolution-list-constants/tsconfig.json +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-constants/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", "types": [ diff --git a/packages/kbn-securitysolution-list-hooks/README.md b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/README.md similarity index 100% rename from packages/kbn-securitysolution-list-hooks/README.md rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/README.md diff --git a/packages/kbn-securitysolution-list-hooks/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/index.ts similarity index 69% rename from packages/kbn-securitysolution-list-hooks/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/index.ts index 5ec2cb85d8c2..8e5fdecab186 100644 --- a/packages/kbn-securitysolution-list-hooks/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ export * from './src/transforms'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/jest.config.js b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/jest.config.js new file mode 100644 index 000000000000..7b0430c9bf09 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/jest.config.js @@ -0,0 +1,12 @@ +/* + * 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. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../../..', + roots: ['/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks'], +}; diff --git a/packages/kbn-securitysolution-list-hooks/kibana.jsonc b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/kibana.jsonc similarity index 100% rename from packages/kbn-securitysolution-list-hooks/kibana.jsonc rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/kibana.jsonc diff --git a/packages/kbn-securitysolution-list-hooks/package.json b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/package.json similarity index 72% rename from packages/kbn-securitysolution-list-hooks/package.json rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/package.json index 3d9f2019d3f2..8a2ead4291bd 100644 --- a/packages/kbn-securitysolution-list-hooks/package.json +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/package.json @@ -2,7 +2,7 @@ "name": "@kbn/securitysolution-list-hooks", "version": "1.0.0", "description": "Security solution list ReactJS hooks", - "license": "Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0", + "license": "Elastic License 2.0", "private": true, "sideEffects": false } \ No newline at end of file diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/constants.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/constants.ts new file mode 100644 index 000000000000..377c980531a4 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/constants.ts @@ -0,0 +1,8 @@ +/* + * 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. + */ + +export const READ_INDEX_QUERY_KEY = ['detectionEngine', 'listIndex']; diff --git a/packages/kbn-securitysolution-list-hooks/src/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/index.ts similarity index 66% rename from packages/kbn-securitysolution-list-hooks/src/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/index.ts index 852d138b8931..dd0e180eba26 100644 --- a/packages/kbn-securitysolution-list-hooks/src/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ export * from './transforms'; diff --git a/packages/kbn-securitysolution-list-hooks/src/mocks/constants.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/mocks/constants.mock.ts similarity index 87% rename from packages/kbn-securitysolution-list-hooks/src/mocks/constants.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/mocks/constants.mock.ts index 67dcac046c8d..762d1eb243cf 100644 --- a/packages/kbn-securitysolution-list-hooks/src/mocks/constants.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/mocks/constants.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { diff --git a/packages/kbn-securitysolution-list-hooks/src/mocks/request/create_exception_list_item_schema.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/mocks/request/create_exception_list_item_schema.mock.ts similarity index 76% rename from packages/kbn-securitysolution-list-hooks/src/mocks/request/create_exception_list_item_schema.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/mocks/request/create_exception_list_item_schema.mock.ts index 5727a271a9bf..ff9789a7995b 100644 --- a/packages/kbn-securitysolution-list-hooks/src/mocks/request/create_exception_list_item_schema.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/mocks/request/create_exception_list_item_schema.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 type { CreateExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; diff --git a/packages/kbn-securitysolution-list-hooks/src/mocks/request/update_exception_list_item_schema.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/mocks/request/update_exception_list_item_schema.mock.ts similarity index 73% rename from packages/kbn-securitysolution-list-hooks/src/mocks/request/update_exception_list_item_schema.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/mocks/request/update_exception_list_item_schema.mock.ts index 916ce0c81dac..47b0030c316a 100644 --- a/packages/kbn-securitysolution-list-hooks/src/mocks/request/update_exception_list_item_schema.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/mocks/request/update_exception_list_item_schema.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 type { UpdateExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; diff --git a/packages/kbn-securitysolution-list-hooks/src/mocks/response/exception_list_item_schema.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/mocks/response/exception_list_item_schema.mock.ts similarity index 80% rename from packages/kbn-securitysolution-list-hooks/src/mocks/response/exception_list_item_schema.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/mocks/response/exception_list_item_schema.mock.ts index 0c5e732a1f30..acb7204da9b7 100644 --- a/packages/kbn-securitysolution-list-hooks/src/mocks/response/exception_list_item_schema.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/mocks/response/exception_list_item_schema.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; diff --git a/packages/kbn-securitysolution-list-api/src/list_api/mocks/response/found_list_schema.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/mocks/response/found_list_schema.mock.ts similarity index 50% rename from packages/kbn-securitysolution-list-api/src/list_api/mocks/response/found_list_schema.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/mocks/response/found_list_schema.mock.ts index 436ddcd7a83d..1691221842d3 100644 --- a/packages/kbn-securitysolution-list-api/src/list_api/mocks/response/found_list_schema.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/mocks/response/found_list_schema.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 type { FoundListSchema } from '@kbn/securitysolution-io-ts-list-types'; diff --git a/packages/kbn-securitysolution-list-api/src/list_api/mocks/response/list_schema.mock.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/mocks/response/list_schema.mock.ts similarity index 74% rename from packages/kbn-securitysolution-list-api/src/list_api/mocks/response/list_schema.mock.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/mocks/response/list_schema.mock.ts index 79ed25641977..b2b66ad4636c 100644 --- a/packages/kbn-securitysolution-list-api/src/list_api/mocks/response/list_schema.mock.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/mocks/response/list_schema.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 type { ListSchema } from '@kbn/securitysolution-io-ts-list-types'; diff --git a/packages/kbn-securitysolution-list-hooks/src/transforms/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/transforms/index.test.ts similarity index 96% rename from packages/kbn-securitysolution-list-hooks/src/transforms/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/transforms/index.test.ts index bb0cb6e6e907..dc94fcddd849 100644 --- a/packages/kbn-securitysolution-list-hooks/src/transforms/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/transforms/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 type { diff --git a/packages/kbn-securitysolution-list-hooks/src/transforms/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/transforms/index.ts similarity index 93% rename from packages/kbn-securitysolution-list-hooks/src/transforms/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/transforms/index.ts index c30ea9ad8679..276c52b000af 100644 --- a/packages/kbn-securitysolution-list-hooks/src/transforms/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/transforms/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { flow } from 'fp-ts/lib/function'; diff --git a/packages/kbn-securitysolution-list-hooks/src/use_api/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_api/index.ts similarity index 96% rename from packages/kbn-securitysolution-list-hooks/src/use_api/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_api/index.ts index 4ce917f5ad95..673eaff90b1a 100644 --- a/packages/kbn-securitysolution-list-hooks/src/use_api/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_api/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { useMemo } from 'react'; diff --git a/packages/kbn-securitysolution-list-hooks/src/use_create_list_index/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_create_list_index/index.ts similarity index 70% rename from packages/kbn-securitysolution-list-hooks/src/use_create_list_index/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_create_list_index/index.ts index 06b87f510796..9cfaf30a9e2a 100644 --- a/packages/kbn-securitysolution-list-hooks/src/use_create_list_index/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_create_list_index/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { useMutation, useQueryClient } from '@tanstack/react-query'; diff --git a/packages/kbn-securitysolution-list-hooks/src/use_create_list_item/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_create_list_item/index.ts similarity index 80% rename from packages/kbn-securitysolution-list-hooks/src/use_create_list_item/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_create_list_item/index.ts index 98939d93185d..eaafc36d8733 100644 --- a/packages/kbn-securitysolution-list-hooks/src/use_create_list_item/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_create_list_item/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 type { UseMutationOptions } from '@tanstack/react-query'; diff --git a/packages/kbn-securitysolution-list-hooks/src/use_cursor/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_cursor/index.test.ts similarity index 90% rename from packages/kbn-securitysolution-list-hooks/src/use_cursor/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_cursor/index.test.ts index ca94eda81f95..714c310f6d5e 100644 --- a/packages/kbn-securitysolution-list-hooks/src/use_cursor/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_cursor/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { renderHook, act } from '@testing-library/react'; diff --git a/packages/kbn-securitysolution-list-hooks/src/use_cursor/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_cursor/index.ts similarity index 73% rename from packages/kbn-securitysolution-list-hooks/src/use_cursor/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_cursor/index.ts index b8e8df043882..1bc85c63363c 100644 --- a/packages/kbn-securitysolution-list-hooks/src/use_cursor/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_cursor/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { useCallback, useState } from 'react'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_delete_list/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_delete_list/index.ts new file mode 100644 index 000000000000..ae427947ab66 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_delete_list/index.ts @@ -0,0 +1,13 @@ +/* + * 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 { deleteList } from '@kbn/securitysolution-list-api'; +import { useAsync, withOptionalSignal } from '@kbn/securitysolution-hook-utils'; + +const deleteListWithOptionalSignal = withOptionalSignal(deleteList); + +export const useDeleteList = () => useAsync(deleteListWithOptionalSignal); diff --git a/packages/kbn-securitysolution-list-hooks/src/use_delete_list_item/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_delete_list_item/index.ts similarity index 79% rename from packages/kbn-securitysolution-list-hooks/src/use_delete_list_item/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_delete_list_item/index.ts index 63107edda73a..04c608f9c841 100644 --- a/packages/kbn-securitysolution-list-hooks/src/use_delete_list_item/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_delete_list_item/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 type { UseMutationOptions } from '@tanstack/react-query'; diff --git a/packages/kbn-securitysolution-list-hooks/src/use_exception_lists/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_exception_lists/index.ts similarity index 90% rename from packages/kbn-securitysolution-list-hooks/src/use_exception_lists/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_exception_lists/index.ts index 2907de45eba4..8a8e2aadf258 100644 --- a/packages/kbn-securitysolution-list-hooks/src/use_exception_lists/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_exception_lists/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { useCallback, useEffect, useMemo, useRef, useState } from 'react'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_export_list/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_export_list/index.ts new file mode 100644 index 000000000000..bdaec5e50361 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_export_list/index.ts @@ -0,0 +1,13 @@ +/* + * 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 { exportList } from '@kbn/securitysolution-list-api'; +import { useAsync, withOptionalSignal } from '@kbn/securitysolution-hook-utils'; + +const exportListWithOptionalSignal = withOptionalSignal(exportList); + +export const useExportList = () => useAsync(exportListWithOptionalSignal); diff --git a/packages/kbn-securitysolution-list-hooks/src/use_find_list_items/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_find_list_items/index.ts similarity index 81% rename from packages/kbn-securitysolution-list-hooks/src/use_find_list_items/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_find_list_items/index.ts index f385408d26fd..86ed9892fa95 100644 --- a/packages/kbn-securitysolution-list-hooks/src/use_find_list_items/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_find_list_items/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { useCallback } from 'react'; diff --git a/packages/kbn-securitysolution-list-hooks/src/use_find_lists/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_find_lists/index.test.ts similarity index 74% rename from packages/kbn-securitysolution-list-hooks/src/use_find_lists/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_find_lists/index.test.ts index fcce54ac3be3..0c60b3ebebb3 100644 --- a/packages/kbn-securitysolution-list-hooks/src/use_find_lists/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_find_lists/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { waitFor, renderHook, act } from '@testing-library/react'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_find_lists/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_find_lists/index.ts new file mode 100644 index 000000000000..0ad30728be4a --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_find_lists/index.ts @@ -0,0 +1,13 @@ +/* + * 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 { findLists } from '@kbn/securitysolution-list-api'; +import { useAsync, withOptionalSignal } from '@kbn/securitysolution-hook-utils'; + +const findListsWithOptionalSignal = withOptionalSignal(findLists); + +export const useFindLists = () => useAsync(findListsWithOptionalSignal); diff --git a/packages/kbn-securitysolution-list-hooks/src/use_find_lists_by_size/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_find_lists_by_size/index.ts similarity index 51% rename from packages/kbn-securitysolution-list-hooks/src/use_find_lists_by_size/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_find_lists_by_size/index.ts index 25027ee3901d..e1132bdaab29 100644 --- a/packages/kbn-securitysolution-list-hooks/src/use_find_lists_by_size/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_find_lists_by_size/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { findListsBySize } from '@kbn/securitysolution-list-api'; diff --git a/packages/kbn-securitysolution-list-hooks/src/use_get_list_by_id/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_get_list_by_id/index.ts similarity index 66% rename from packages/kbn-securitysolution-list-hooks/src/use_get_list_by_id/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_get_list_by_id/index.ts index 030fbcfae829..394b48352a32 100644 --- a/packages/kbn-securitysolution-list-hooks/src/use_get_list_by_id/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_get_list_by_id/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { useQuery } from '@tanstack/react-query'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_import_list/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_import_list/index.ts new file mode 100644 index 000000000000..4499b7220128 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_import_list/index.ts @@ -0,0 +1,13 @@ +/* + * 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 { importList } from '@kbn/securitysolution-list-api'; +import { useAsync, withOptionalSignal } from '@kbn/securitysolution-hook-utils'; + +const importListWithOptionalSignal = withOptionalSignal(importList); + +export const useImportList = () => useAsync(importListWithOptionalSignal); diff --git a/packages/kbn-securitysolution-list-hooks/src/use_patch_list_item/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_patch_list_item/index.ts similarity index 80% rename from packages/kbn-securitysolution-list-hooks/src/use_patch_list_item/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_patch_list_item/index.ts index cdae3015cff8..e321006a0b68 100644 --- a/packages/kbn-securitysolution-list-hooks/src/use_patch_list_item/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_patch_list_item/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 type { UseMutationOptions } from '@tanstack/react-query'; diff --git a/packages/kbn-securitysolution-list-hooks/src/use_persist_exception_item/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_persist_exception_item/index.ts similarity index 83% rename from packages/kbn-securitysolution-list-hooks/src/use_persist_exception_item/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_persist_exception_item/index.ts index 79f8748345fd..ad239016ed05 100644 --- a/packages/kbn-securitysolution-list-hooks/src/use_persist_exception_item/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_persist_exception_item/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { Dispatch, useEffect, useRef, useState } from 'react'; @@ -64,7 +62,7 @@ export const usePersistExceptionItem = ({ setIsLoading(true); if (isUpdateExceptionItem(exceptionListItem)) { - // Please see `x-pack/plugins/lists/public/exceptions/transforms.ts` doc notes + // Please see `x-pack/solutions/security/plugins/lists/public/exceptions/transforms.ts` doc notes // for context around the temporary `id` const transformedList = transformOutput(exceptionListItem); @@ -74,7 +72,7 @@ export const usePersistExceptionItem = ({ signal: abortCtrl.signal, }); } else { - // Please see `x-pack/plugins/lists/public/exceptions/transforms.ts` doc notes + // Please see `x-pack/solutions/security/plugins/lists/public/exceptions/transforms.ts` doc notes // for context around the temporary `id` const transformedList = transformNewItemOutput(exceptionListItem); diff --git a/packages/kbn-securitysolution-list-hooks/src/use_persist_exception_list/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_persist_exception_list/index.ts similarity index 84% rename from packages/kbn-securitysolution-list-hooks/src/use_persist_exception_list/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_persist_exception_list/index.ts index 8648516d008c..6814a19679c5 100644 --- a/packages/kbn-securitysolution-list-hooks/src/use_persist_exception_list/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_persist_exception_list/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { Dispatch, useEffect, useState } from 'react'; diff --git a/packages/kbn-securitysolution-list-hooks/src/use_read_list_index/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_read_list_index/index.ts similarity index 72% rename from packages/kbn-securitysolution-list-hooks/src/use_read_list_index/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_read_list_index/index.ts index 4853f0a7480a..2bb2a7018857 100644 --- a/packages/kbn-securitysolution-list-hooks/src/use_read_list_index/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_read_list_index/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { useQuery } from '@tanstack/react-query'; diff --git a/packages/kbn-securitysolution-list-hooks/src/use_read_list_privileges/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_read_list_privileges/index.ts similarity index 52% rename from packages/kbn-securitysolution-list-hooks/src/use_read_list_privileges/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_read_list_privileges/index.ts index 42a055c16808..1e96118228b5 100644 --- a/packages/kbn-securitysolution-list-hooks/src/use_read_list_privileges/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_read_list_privileges/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { readListPrivileges } from '@kbn/securitysolution-list-api'; diff --git a/packages/kbn-securitysolution-list-hooks/tsconfig.json b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/tsconfig.json similarity index 90% rename from packages/kbn-securitysolution-list-hooks/tsconfig.json rename to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/tsconfig.json index 53e105e60975..f2583861bced 100644 --- a/packages/kbn-securitysolution-list-hooks/tsconfig.json +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", "types": [ diff --git a/packages/kbn-securitysolution-list-utils/README.md b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/README.md similarity index 100% rename from packages/kbn-securitysolution-list-utils/README.md rename to x-pack/solutions/security/packages/kbn-securitysolution-list-utils/README.md diff --git a/packages/kbn-securitysolution-list-utils/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/index.ts similarity index 56% rename from packages/kbn-securitysolution-list-utils/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-utils/index.ts index c5999a044a18..cd6928dd89e3 100644 --- a/packages/kbn-securitysolution-list-utils/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ export * from './src/autocomplete_operators'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/jest.config.js b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/jest.config.js new file mode 100644 index 000000000000..e3fc2abb342a --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/jest.config.js @@ -0,0 +1,12 @@ +/* + * 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. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../../..', + roots: ['/x-pack/solutions/security/packages/kbn-securitysolution-list-utils'], +}; diff --git a/packages/kbn-securitysolution-list-utils/kibana.jsonc b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/kibana.jsonc similarity index 100% rename from packages/kbn-securitysolution-list-utils/kibana.jsonc rename to x-pack/solutions/security/packages/kbn-securitysolution-list-utils/kibana.jsonc diff --git a/packages/kbn-securitysolution-list-utils/package.json b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/package.json similarity index 71% rename from packages/kbn-securitysolution-list-utils/package.json rename to x-pack/solutions/security/packages/kbn-securitysolution-list-utils/package.json index e9ace6e30234..585acd8e3d70 100644 --- a/packages/kbn-securitysolution-list-utils/package.json +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/package.json @@ -2,7 +2,7 @@ "name": "@kbn/securitysolution-list-utils", "version": "1.0.0", "description": "security solution list utilities", - "license": "Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0", + "license": "Elastic License 2.0", "private": true, "sideEffects": false } \ No newline at end of file diff --git a/packages/kbn-securitysolution-list-utils/src/autocomplete_operators/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/autocomplete_operators/index.ts similarity index 91% rename from packages/kbn-securitysolution-list-utils/src/autocomplete_operators/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/autocomplete_operators/index.ts index b4b1eec6be34..430a0dbc3a1d 100644 --- a/packages/kbn-securitysolution-list-utils/src/autocomplete_operators/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/autocomplete_operators/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { i18n } from '@kbn/i18n'; diff --git a/packages/kbn-securitysolution-list-utils/src/get_exception_list_type/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/get_exception_list_type/index.ts similarity index 55% rename from packages/kbn-securitysolution-list-utils/src/get_exception_list_type/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/get_exception_list_type/index.ts index 568436c487de..29dba94f7676 100644 --- a/packages/kbn-securitysolution-list-utils/src/get_exception_list_type/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/get_exception_list_type/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 type { NamespaceType } from '@kbn/securitysolution-io-ts-list-types'; diff --git a/packages/kbn-securitysolution-list-utils/src/get_filters/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/get_filters/index.test.ts similarity index 95% rename from packages/kbn-securitysolution-list-utils/src/get_filters/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/get_filters/index.test.ts index 76b9eeda44f8..a88a78479cf5 100644 --- a/packages/kbn-securitysolution-list-utils/src/get_filters/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/get_filters/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { getFilters } from '.'; diff --git a/packages/kbn-securitysolution-list-utils/src/get_filters/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/get_filters/index.ts similarity index 73% rename from packages/kbn-securitysolution-list-utils/src/get_filters/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/get_filters/index.ts index 6ca3119855b3..2bc7960de792 100644 --- a/packages/kbn-securitysolution-list-utils/src/get_filters/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/get_filters/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { ExceptionListFilter, NamespaceType } from '@kbn/securitysolution-io-ts-list-types'; diff --git a/packages/kbn-securitysolution-list-utils/src/get_general_filters/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/get_general_filters/index.test.ts similarity index 83% rename from packages/kbn-securitysolution-list-utils/src/get_general_filters/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/get_general_filters/index.test.ts index b349c57ab386..026202349763 100644 --- a/packages/kbn-securitysolution-list-utils/src/get_general_filters/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/get_general_filters/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { ExceptionListTypeEnum } from '@kbn/securitysolution-io-ts-list-types'; diff --git a/packages/kbn-securitysolution-list-utils/src/get_general_filters/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/get_general_filters/index.ts similarity index 75% rename from packages/kbn-securitysolution-list-utils/src/get_general_filters/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/get_general_filters/index.ts index cc9b46728cbc..7960617fad48 100644 --- a/packages/kbn-securitysolution-list-utils/src/get_general_filters/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/get_general_filters/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { ExceptionListFilter } from '@kbn/securitysolution-io-ts-list-types'; diff --git a/packages/kbn-securitysolution-list-utils/src/get_ids_and_namespaces/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/get_ids_and_namespaces/index.test.ts similarity index 87% rename from packages/kbn-securitysolution-list-utils/src/get_ids_and_namespaces/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/get_ids_and_namespaces/index.test.ts index df5bedc2d2b4..b76bc2df94ff 100644 --- a/packages/kbn-securitysolution-list-utils/src/get_ids_and_namespaces/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/get_ids_and_namespaces/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { getIdsAndNamespaces } from '.'; diff --git a/packages/kbn-securitysolution-list-utils/src/get_ids_and_namespaces/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/get_ids_and_namespaces/index.ts similarity index 69% rename from packages/kbn-securitysolution-list-utils/src/get_ids_and_namespaces/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/get_ids_and_namespaces/index.ts index bc18dff7d33e..25a7ae1931e1 100644 --- a/packages/kbn-securitysolution-list-utils/src/get_ids_and_namespaces/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/get_ids_and_namespaces/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { ExceptionListIdentifiers, NamespaceType } from '@kbn/securitysolution-io-ts-list-types'; diff --git a/packages/kbn-securitysolution-list-utils/src/get_saved_object_type/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/get_saved_object_type/index.ts similarity index 58% rename from packages/kbn-securitysolution-list-utils/src/get_saved_object_type/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/get_saved_object_type/index.ts index 3e6cd312cb96..0ee1b134333c 100644 --- a/packages/kbn-securitysolution-list-utils/src/get_saved_object_type/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/get_saved_object_type/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 type { NamespaceType } from '@kbn/securitysolution-io-ts-list-types'; diff --git a/packages/kbn-securitysolution-list-utils/src/get_saved_object_types/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/get_saved_object_types/index.ts similarity index 57% rename from packages/kbn-securitysolution-list-utils/src/get_saved_object_types/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/get_saved_object_types/index.ts index ec09fc25bd77..92b6ff4a9263 100644 --- a/packages/kbn-securitysolution-list-utils/src/get_saved_object_types/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/get_saved_object_types/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 type { NamespaceTypeArray } from '@kbn/securitysolution-io-ts-list-types'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/has_large_value_list/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/has_large_value_list/index.ts new file mode 100644 index 000000000000..350cb581153b --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/has_large_value_list/index.ts @@ -0,0 +1,13 @@ +/* + * 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 type { EntriesArray } from '@kbn/securitysolution-io-ts-list-types'; + +export const hasLargeValueList = (entries: EntriesArray): boolean => { + const found = entries.filter(({ type }) => type === 'list'); + return found.length > 0; +}; diff --git a/packages/kbn-securitysolution-list-utils/src/helpers/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/helpers/index.test.ts similarity index 96% rename from packages/kbn-securitysolution-list-utils/src/helpers/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/helpers/index.test.ts index fffcabbf4157..fe75ad88e012 100644 --- a/packages/kbn-securitysolution-list-utils/src/helpers/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/helpers/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { diff --git a/packages/kbn-securitysolution-list-utils/src/helpers/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/helpers/index.ts similarity index 98% rename from packages/kbn-securitysolution-list-utils/src/helpers/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/helpers/index.ts index 8031cfba14f2..6cbdbe55cfeb 100644 --- a/packages/kbn-securitysolution-list-utils/src/helpers/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/helpers/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { v4 as uuidv4 } from 'uuid'; @@ -1043,6 +1041,7 @@ export const hasWrongOperatorWithWildcard = ( return item; }); + // eslint-disable-next-line array-callback-return return allEntries.some((e) => { if (e.type !== 'list' && 'value' in e) { return validateHasWildcardWithWrongOperator({ diff --git a/packages/kbn-securitysolution-list-utils/src/types/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/types/index.ts similarity index 89% rename from packages/kbn-securitysolution-list-utils/src/types/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/types/index.ts index 97098af88caf..1730a0e9a829 100644 --- a/packages/kbn-securitysolution-list-utils/src/types/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/types/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { DataViewFieldBase } from '@kbn/es-query'; diff --git a/packages/kbn-securitysolution-list-utils/tsconfig.json b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/tsconfig.json similarity index 89% rename from packages/kbn-securitysolution-list-utils/tsconfig.json rename to x-pack/solutions/security/packages/kbn-securitysolution-list-utils/tsconfig.json index d75eb1f98314..0b6eb353950d 100644 --- a/packages/kbn-securitysolution-list-utils/tsconfig.json +++ b/x-pack/solutions/security/packages/kbn-securitysolution-list-utils/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", "types": [ diff --git a/packages/kbn-securitysolution-lists-common/README.md b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/README.md similarity index 100% rename from packages/kbn-securitysolution-lists-common/README.md rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/README.md diff --git a/packages/kbn-securitysolution-lists-common/api/create_list/create_list.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list/create_list.gen.ts similarity index 73% rename from packages/kbn-securitysolution-lists-common/api/create_list/create_list.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list/create_list.gen.ts index ce05117c3308..cf603f3ac3bd 100644 --- a/packages/kbn-securitysolution-lists-common/api/create_list/create_list.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list/create_list.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-lists-common/api/create_list/create_list.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list/create_list.schema.yaml similarity index 71% rename from packages/kbn-securitysolution-lists-common/api/create_list/create_list.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list/create_list.schema.yaml index 191e973beba6..df3e6b35ef65 100644 --- a/packages/kbn-securitysolution-lists-common/api/create_list/create_list.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list/create_list.schema.yaml @@ -53,29 +53,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 409: description: List already exists response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-lists-common/api/create_list_index/create_list_index.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_index/create_list_index.gen.ts similarity index 56% rename from packages/kbn-securitysolution-lists-common/api/create_list_index/create_list_index.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_index/create_list_index.gen.ts index 13b5248b9270..7eb20ada7f32 100644 --- a/packages/kbn-securitysolution-lists-common/api/create_list_index/create_list_index.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_index/create_list_index.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-lists-common/api/create_list_index/create_list_index.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_index/create_list_index.schema.yaml similarity index 60% rename from packages/kbn-securitysolution-lists-common/api/create_list_index/create_list_index.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_index/create_list_index.schema.yaml index c775a9c7d873..8ff9ad6ab1b2 100644 --- a/packages/kbn-securitysolution-lists-common/api/create_list_index/create_list_index.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_index/create_list_index.schema.yaml @@ -27,29 +27,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 409: description: List data stream exists response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-lists-common/api/create_list_item/create_list_item.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_item/create_list_item.gen.ts similarity index 74% rename from packages/kbn-securitysolution-lists-common/api/create_list_item/create_list_item.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_item/create_list_item.gen.ts index 4ebafd656857..ce4744f3c441 100644 --- a/packages/kbn-securitysolution-lists-common/api/create_list_item/create_list_item.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_item/create_list_item.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-lists-common/api/create_list_item/create_list_item.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_item/create_list_item.schema.yaml similarity index 73% rename from packages/kbn-securitysolution-lists-common/api/create_list_item/create_list_item.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_item/create_list_item.schema.yaml index 01121d014392..01d024f8b40d 100644 --- a/packages/kbn-securitysolution-lists-common/api/create_list_item/create_list_item.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_item/create_list_item.schema.yaml @@ -11,7 +11,7 @@ paths: summary: Create a list item description: | Create a list item and associate it with the specified list. - + All list items in the same list must be the same type. For example, each list item in an `ip` list must define a specific IP address. > info > Before creating a list item, you must create a list. @@ -54,29 +54,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 409: description: List item already exists response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-lists-common/api/delete_list/delete_list.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list/delete_list.gen.ts similarity index 72% rename from packages/kbn-securitysolution-lists-common/api/delete_list/delete_list.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list/delete_list.gen.ts index 109e6c58a116..3dd638be564e 100644 --- a/packages/kbn-securitysolution-lists-common/api/delete_list/delete_list.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list/delete_list.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-lists-common/api/delete_list/delete_list.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list/delete_list.schema.yaml similarity index 67% rename from packages/kbn-securitysolution-lists-common/api/delete_list/delete_list.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list/delete_list.schema.yaml index 709875363637..e8caef0eb2c6 100644 --- a/packages/kbn-securitysolution-lists-common/api/delete_list/delete_list.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list/delete_list.schema.yaml @@ -45,29 +45,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: List not found response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-lists-common/api/delete_list_index/delete_list_index.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_index/delete_list_index.gen.ts similarity index 56% rename from packages/kbn-securitysolution-lists-common/api/delete_list_index/delete_list_index.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_index/delete_list_index.gen.ts index 314c1e81bc6a..4ffd90f6fb8b 100644 --- a/packages/kbn-securitysolution-lists-common/api/delete_list_index/delete_list_index.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_index/delete_list_index.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-lists-common/api/delete_list_index/delete_list_index.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_index/delete_list_index.schema.yaml similarity index 60% rename from packages/kbn-securitysolution-lists-common/api/delete_list_index/delete_list_index.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_index/delete_list_index.schema.yaml index 4f4b0f00e881..ae43c58726d5 100644 --- a/packages/kbn-securitysolution-lists-common/api/delete_list_index/delete_list_index.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_index/delete_list_index.schema.yaml @@ -27,29 +27,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: List data stream not found response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-lists-common/api/delete_list_item/delete_list_item.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_item/delete_list_item.gen.ts similarity index 76% rename from packages/kbn-securitysolution-lists-common/api/delete_list_item/delete_list_item.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_item/delete_list_item.gen.ts index 178641cd8d6a..fe9f7bee0e68 100644 --- a/packages/kbn-securitysolution-lists-common/api/delete_list_item/delete_list_item.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_item/delete_list_item.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-lists-common/api/delete_list_item/delete_list_item.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_item/delete_list_item.schema.yaml similarity index 72% rename from packages/kbn-securitysolution-lists-common/api/delete_list_item/delete_list_item.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_item/delete_list_item.schema.yaml index 28913259387d..b95afcdc1ed3 100644 --- a/packages/kbn-securitysolution-lists-common/api/delete_list_item/delete_list_item.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_item/delete_list_item.schema.yaml @@ -54,29 +54,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: List item not found response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-lists-common/api/export_list_items/export_list_items.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/export_list_items/export_list_items.gen.ts similarity index 64% rename from packages/kbn-securitysolution-lists-common/api/export_list_items/export_list_items.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/export_list_items/export_list_items.gen.ts index 4e514abefccc..87e05bd24e48 100644 --- a/packages/kbn-securitysolution-lists-common/api/export_list_items/export_list_items.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/export_list_items/export_list_items.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-lists-common/api/export_list_items/export_list_items.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/export_list_items/export_list_items.schema.yaml similarity index 63% rename from packages/kbn-securitysolution-lists-common/api/export_list_items/export_list_items.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/export_list_items/export_list_items.schema.yaml index 8d185a23b64c..999eb4a0ae42 100644 --- a/packages/kbn-securitysolution-lists-common/api/export_list_items/export_list_items.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/export_list_items/export_list_items.schema.yaml @@ -32,29 +32,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: List not found response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-lists-common/api/find_list_items/find_list_items.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_list_items/find_list_items.gen.ts similarity index 85% rename from packages/kbn-securitysolution-lists-common/api/find_list_items/find_list_items.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_list_items/find_list_items.gen.ts index f693965e91e2..e40c6fe9e2fc 100644 --- a/packages/kbn-securitysolution-lists-common/api/find_list_items/find_list_items.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_list_items/find_list_items.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-lists-common/api/find_list_items/find_list_items.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_list_items/find_list_items.schema.yaml similarity index 77% rename from packages/kbn-securitysolution-lists-common/api/find_list_items/find_list_items.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_list_items/find_list_items.schema.yaml index 21cf4ffd6184..746b3e9fdbe3 100644 --- a/packages/kbn-securitysolution-lists-common/api/find_list_items/find_list_items.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_list_items/find_list_items.schema.yaml @@ -34,7 +34,7 @@ paths: required: false description: Determines which field is used to sort the results schema: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' - name: sort_order in: query required: false @@ -94,31 +94,31 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' components: schemas: FindListItemsCursor: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' FindListItemsFilter: type: string diff --git a/packages/kbn-securitysolution-lists-common/api/find_lists/find_lists.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_lists/find_lists.gen.ts similarity index 84% rename from packages/kbn-securitysolution-lists-common/api/find_lists/find_lists.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_lists/find_lists.gen.ts index ec104f2e6c2b..74f8ba0217d6 100644 --- a/packages/kbn-securitysolution-lists-common/api/find_lists/find_lists.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_lists/find_lists.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-lists-common/api/find_lists/find_lists.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_lists/find_lists.schema.yaml similarity index 76% rename from packages/kbn-securitysolution-lists-common/api/find_lists/find_lists.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_lists/find_lists.schema.yaml index 3bb55decacff..9b0012e8d696 100644 --- a/packages/kbn-securitysolution-lists-common/api/find_lists/find_lists.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_lists/find_lists.schema.yaml @@ -28,7 +28,7 @@ paths: required: false description: Determines which field is used to sort the results schema: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' - name: sort_order in: query required: false @@ -88,31 +88,31 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' components: schemas: FindListsCursor: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' FindListsFilter: type: string diff --git a/packages/kbn-securitysolution-lists-common/api/import_list_items/import_list_items.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/import_list_items/import_list_items.gen.ts similarity index 77% rename from packages/kbn-securitysolution-lists-common/api/import_list_items/import_list_items.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/import_list_items/import_list_items.gen.ts index b71b05bd7595..baf9d9308a93 100644 --- a/packages/kbn-securitysolution-lists-common/api/import_list_items/import_list_items.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/import_list_items/import_list_items.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-lists-common/api/import_list_items/import_list_items.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/import_list_items/import_list_items.schema.yaml similarity index 75% rename from packages/kbn-securitysolution-lists-common/api/import_list_items/import_list_items.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/import_list_items/import_list_items.schema.yaml index 520213e949c1..f3fae4515934 100644 --- a/packages/kbn-securitysolution-lists-common/api/import_list_items/import_list_items.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/import_list_items/import_list_items.schema.yaml @@ -73,29 +73,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 409: description: List with specified list_id does not exist response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-lists-common/api/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/index.ts similarity index 73% rename from packages/kbn-securitysolution-lists-common/api/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/index.ts index 27c70d162810..6ff15e6109c6 100644 --- a/packages/kbn-securitysolution-lists-common/api/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ export * from './model/list_common.gen'; diff --git a/packages/kbn-securitysolution-lists-common/api/model/list_common.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/model/list_common.gen.ts similarity index 82% rename from packages/kbn-securitysolution-lists-common/api/model/list_common.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/model/list_common.gen.ts index 9a51bd0eeb5a..536e0b859e45 100644 --- a/packages/kbn-securitysolution-lists-common/api/model/list_common.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/model/list_common.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-lists-common/api/model/list_common.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/model/list_common.schema.yaml similarity index 52% rename from packages/kbn-securitysolution-lists-common/api/model/list_common.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/model/list_common.schema.yaml index 6fb160105bb5..808e99c7b1e1 100644 --- a/packages/kbn-securitysolution-lists-common/api/model/list_common.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/model/list_common.schema.yaml @@ -6,7 +6,7 @@ paths: {} components: schemas: ListId: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' ListType: type: string @@ -36,23 +36,23 @@ components: - text ListName: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' ListDescription: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' ListMetadata: type: object additionalProperties: true ListItemId: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' ListItemValue: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' ListItemDescription: - $ref: '../../../kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' ListItemMetadata: type: object diff --git a/packages/kbn-securitysolution-lists-common/api/model/list_schemas.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/model/list_schemas.gen.ts similarity index 80% rename from packages/kbn-securitysolution-lists-common/api/model/list_schemas.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/model/list_schemas.gen.ts index 14d9547c35b5..cd95d20853c1 100644 --- a/packages/kbn-securitysolution-lists-common/api/model/list_schemas.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/model/list_schemas.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-lists-common/api/model/list_schemas.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/model/list_schemas.schema.yaml similarity index 100% rename from packages/kbn-securitysolution-lists-common/api/model/list_schemas.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/model/list_schemas.schema.yaml diff --git a/packages/kbn-securitysolution-lists-common/api/patch_list/patch_list.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list/patch_list.gen.ts similarity index 72% rename from packages/kbn-securitysolution-lists-common/api/patch_list/patch_list.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list/patch_list.gen.ts index d7c955e6daac..f2a67181d396 100644 --- a/packages/kbn-securitysolution-lists-common/api/patch_list/patch_list.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list/patch_list.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-lists-common/api/patch_list/patch_list.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list/patch_list.schema.yaml similarity index 69% rename from packages/kbn-securitysolution-lists-common/api/patch_list/patch_list.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list/patch_list.schema.yaml index b98b34e6347e..6a61e668ced8 100644 --- a/packages/kbn-securitysolution-lists-common/api/patch_list/patch_list.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list/patch_list.schema.yaml @@ -46,29 +46,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: List not found response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-lists-common/api/patch_list_item/patch_list_item.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list_item/patch_list_item.gen.ts similarity index 74% rename from packages/kbn-securitysolution-lists-common/api/patch_list_item/patch_list_item.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list_item/patch_list_item.gen.ts index 9943a9999a89..e5c06ddd7c25 100644 --- a/packages/kbn-securitysolution-lists-common/api/patch_list_item/patch_list_item.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list_item/patch_list_item.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-lists-common/api/patch_list_item/patch_list_item.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list_item/patch_list_item.schema.yaml similarity index 71% rename from packages/kbn-securitysolution-lists-common/api/patch_list_item/patch_list_item.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list_item/patch_list_item.schema.yaml index f79efc4691dd..fdd7a020d098 100644 --- a/packages/kbn-securitysolution-lists-common/api/patch_list_item/patch_list_item.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list_item/patch_list_item.schema.yaml @@ -48,29 +48,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: List item not found response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-lists-common/api/quickstart_client.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/quickstart_client.gen.ts similarity index 97% rename from packages/kbn-securitysolution-lists-common/api/quickstart_client.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/quickstart_client.gen.ts index 7bf343d935f2..232f4b00540c 100644 --- a/packages/kbn-securitysolution-lists-common/api/quickstart_client.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/quickstart_client.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-lists-common/api/read_list/read_list.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list/read_list.gen.ts similarity index 67% rename from packages/kbn-securitysolution-lists-common/api/read_list/read_list.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list/read_list.gen.ts index d744eb15c9b5..d2967d71d57e 100644 --- a/packages/kbn-securitysolution-lists-common/api/read_list/read_list.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list/read_list.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-lists-common/api/read_list/read_list.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list/read_list.schema.yaml similarity index 61% rename from packages/kbn-securitysolution-lists-common/api/read_list/read_list.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list/read_list.schema.yaml index d932e16f528a..280a6fdab754 100644 --- a/packages/kbn-securitysolution-lists-common/api/read_list/read_list.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list/read_list.schema.yaml @@ -30,29 +30,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: List not found response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-lists-common/api/read_list_index/read_list_index.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_index/read_list_index.gen.ts similarity index 58% rename from packages/kbn-securitysolution-lists-common/api/read_list_index/read_list_index.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_index/read_list_index.gen.ts index 8a5068f72f23..bf0aec4dc6bc 100644 --- a/packages/kbn-securitysolution-lists-common/api/read_list_index/read_list_index.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_index/read_list_index.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-lists-common/api/read_list_index/read_list_index.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_index/read_list_index.schema.yaml similarity index 59% rename from packages/kbn-securitysolution-lists-common/api/read_list_index/read_list_index.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_index/read_list_index.schema.yaml index b67526460015..40dbddf25e69 100644 --- a/packages/kbn-securitysolution-lists-common/api/read_list_index/read_list_index.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_index/read_list_index.schema.yaml @@ -8,7 +8,7 @@ paths: x-labels: [serverless, ess] operationId: ReadListIndex x-codegen-enabled: true - summary: Get status of list data streams + summary: Get status of list data streams description: Verify that `.lists` and `.items` data streams exist. responses: 200: @@ -29,29 +29,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: List data stream(s) not found response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-lists-common/api/read_list_item/read_list_item.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_item/read_list_item.gen.ts similarity index 73% rename from packages/kbn-securitysolution-lists-common/api/read_list_item/read_list_item.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_item/read_list_item.gen.ts index cd0c1d8fca26..d22ee4602226 100644 --- a/packages/kbn-securitysolution-lists-common/api/read_list_item/read_list_item.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_item/read_list_item.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-lists-common/api/read_list_item/read_list_item.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_item/read_list_item.schema.yaml similarity index 69% rename from packages/kbn-securitysolution-lists-common/api/read_list_item/read_list_item.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_item/read_list_item.schema.yaml index 4d686f5452e0..a41fb497f611 100644 --- a/packages/kbn-securitysolution-lists-common/api/read_list_item/read_list_item.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_item/read_list_item.schema.yaml @@ -46,29 +46,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: List item not found response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-lists-common/api/read_list_privileges/read_list_privileges.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_privileges/read_list_privileges.gen.ts similarity index 76% rename from packages/kbn-securitysolution-lists-common/api/read_list_privileges/read_list_privileges.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_privileges/read_list_privileges.gen.ts index 356915ba03cf..da6e7e95076d 100644 --- a/packages/kbn-securitysolution-lists-common/api/read_list_privileges/read_list_privileges.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_privileges/read_list_privileges.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-lists-common/api/read_list_privileges/read_list_privileges.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_privileges/read_list_privileges.schema.yaml similarity index 78% rename from packages/kbn-securitysolution-lists-common/api/read_list_privileges/read_list_privileges.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_privileges/read_list_privileges.schema.yaml index ec8604e80694..df7b4a5f5174 100644 --- a/packages/kbn-securitysolution-lists-common/api/read_list_privileges/read_list_privileges.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_privileges/read_list_privileges.schema.yaml @@ -33,26 +33,26 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' components: schemas: diff --git a/packages/kbn-securitysolution-lists-common/api/update_list/update_list.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list/update_list.gen.ts similarity index 71% rename from packages/kbn-securitysolution-lists-common/api/update_list/update_list.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list/update_list.gen.ts index f5eb085fe4aa..ffb28c3d0b53 100644 --- a/packages/kbn-securitysolution-lists-common/api/update_list/update_list.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list/update_list.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-lists-common/api/update_list/update_list.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list/update_list.schema.yaml similarity index 71% rename from packages/kbn-securitysolution-lists-common/api/update_list/update_list.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list/update_list.schema.yaml index c41b52427b63..a059ede38584 100644 --- a/packages/kbn-securitysolution-lists-common/api/update_list/update_list.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list/update_list.schema.yaml @@ -51,29 +51,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: List not found response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-lists-common/api/update_list_item/update_list_item.gen.ts b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list_item/update_list_item.gen.ts similarity index 71% rename from packages/kbn-securitysolution-lists-common/api/update_list_item/update_list_item.gen.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list_item/update_list_item.gen.ts index 052c4c979e84..f5667676ab4c 100644 --- a/packages/kbn-securitysolution-lists-common/api/update_list_item/update_list_item.gen.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list_item/update_list_item.gen.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /* diff --git a/packages/kbn-securitysolution-lists-common/api/update_list_item/update_list_item.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list_item/update_list_item.schema.yaml similarity index 69% rename from packages/kbn-securitysolution-lists-common/api/update_list_item/update_list_item.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list_item/update_list_item.schema.yaml index 6b05e01f35aa..04d86cf1947a 100644 --- a/packages/kbn-securitysolution-lists-common/api/update_list_item/update_list_item.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list_item/update_list_item.schema.yaml @@ -45,29 +45,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: List item not found response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/packages/kbn-securitysolution-lists-common/docs/openapi/ess/security_solution_lists_api_2023_10_31.bundled.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/docs/openapi/ess/security_solution_lists_api_2023_10_31.bundled.schema.yaml similarity index 100% rename from packages/kbn-securitysolution-lists-common/docs/openapi/ess/security_solution_lists_api_2023_10_31.bundled.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/docs/openapi/ess/security_solution_lists_api_2023_10_31.bundled.schema.yaml diff --git a/packages/kbn-securitysolution-lists-common/docs/openapi/serverless/security_solution_lists_api_2023_10_31.bundled.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/docs/openapi/serverless/security_solution_lists_api_2023_10_31.bundled.schema.yaml similarity index 100% rename from packages/kbn-securitysolution-lists-common/docs/openapi/serverless/security_solution_lists_api_2023_10_31.bundled.schema.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/docs/openapi/serverless/security_solution_lists_api_2023_10_31.bundled.schema.yaml diff --git a/packages/kbn-securitysolution-lists-common/kibana.jsonc b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/kibana.jsonc similarity index 100% rename from packages/kbn-securitysolution-lists-common/kibana.jsonc rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/kibana.jsonc diff --git a/packages/kbn-securitysolution-lists-common/package.json b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/package.json similarity index 81% rename from packages/kbn-securitysolution-lists-common/package.json rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/package.json index 624c2709ea73..4e2b03521859 100644 --- a/packages/kbn-securitysolution-lists-common/package.json +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/package.json @@ -1,6 +1,6 @@ { "description": "Security Solution Lists common package", - "license": "Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0", + "license": "Elastic License 2.0", "name": "@kbn/securitysolution-lists-common", "private": true, "version": "1.0.0", diff --git a/packages/kbn-securitysolution-lists-common/scripts/openapi_bundle.js b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/scripts/openapi_bundle.js similarity index 69% rename from packages/kbn-securitysolution-lists-common/scripts/openapi_bundle.js rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/scripts/openapi_bundle.js index 7a6172475917..609ed8bb0807 100644 --- a/packages/kbn-securitysolution-lists-common/scripts/openapi_bundle.js +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/scripts/openapi_bundle.js @@ -1,13 +1,12 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ -require('../../../src/setup_node_env'); +require('../../../../../../src/setup_node_env'); +// eslint-disable-next-line import/no-nodejs-modules const { join, resolve } = require('path'); const { bundle } = require('@kbn/openapi-bundler'); diff --git a/packages/kbn-securitysolution-lists-common/scripts/openapi_bundle_info/lists_ess.info.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/scripts/openapi_bundle_info/lists_ess.info.yaml similarity index 100% rename from packages/kbn-securitysolution-lists-common/scripts/openapi_bundle_info/lists_ess.info.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/scripts/openapi_bundle_info/lists_ess.info.yaml diff --git a/packages/kbn-securitysolution-lists-common/scripts/openapi_bundle_info/lists_serverless.info.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/scripts/openapi_bundle_info/lists_serverless.info.yaml similarity index 100% rename from packages/kbn-securitysolution-lists-common/scripts/openapi_bundle_info/lists_serverless.info.yaml rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/scripts/openapi_bundle_info/lists_serverless.info.yaml diff --git a/packages/kbn-securitysolution-lists-common/scripts/openapi_generate.js b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/scripts/openapi_generate.js similarity index 68% rename from packages/kbn-securitysolution-lists-common/scripts/openapi_generate.js rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/scripts/openapi_generate.js index 7adc36ed32ca..ecda1a791e1f 100644 --- a/packages/kbn-securitysolution-lists-common/scripts/openapi_generate.js +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/scripts/openapi_generate.js @@ -1,13 +1,12 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ -require('../../../src/setup_node_env'); +require('../../../../../../src/setup_node_env'); +// eslint-disable-next-line import/no-nodejs-modules const { join, resolve } = require('path'); const { generate } = require('@kbn/openapi-generator'); const { REPO_ROOT } = require('@kbn/repo-info'); @@ -45,7 +44,7 @@ const ROOT = resolve(__dirname, '..'); bundle: { outFile: join( REPO_ROOT, - 'packages/kbn-securitysolution-lists-common/api/quickstart_client.gen.ts' + 'x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/quickstart_client.gen.ts' ), }, }); diff --git a/packages/kbn-securitysolution-lists-common/tsconfig.json b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/tsconfig.json similarity index 87% rename from packages/kbn-securitysolution-lists-common/tsconfig.json rename to x-pack/solutions/security/packages/kbn-securitysolution-lists-common/tsconfig.json index e8149be08355..6a6637ff64a2 100644 --- a/packages/kbn-securitysolution-lists-common/tsconfig.json +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/tsconfig.json @@ -4,7 +4,7 @@ "types": ["jest", "node"] }, "exclude": ["target/**/*"], - "extends": "../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "include": ["**/*.ts"], "kbn_references": [ "@kbn/zod-helpers", diff --git a/packages/kbn-securitysolution-t-grid/README.md b/x-pack/solutions/security/packages/kbn-securitysolution-t-grid/README.md similarity index 100% rename from packages/kbn-securitysolution-t-grid/README.md rename to x-pack/solutions/security/packages/kbn-securitysolution-t-grid/README.md diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-t-grid/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-t-grid/index.ts new file mode 100644 index 000000000000..371d48e06c14 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-t-grid/index.ts @@ -0,0 +1,11 @@ +/* + * 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. + */ + +export * from './src/constants'; +export * from './src/utils'; +// eslint-disable-next-line @kbn/imports/no_boundary_crossing +export * from './src/mock'; diff --git a/packages/kbn-securitysolution-t-grid/kibana.jsonc b/x-pack/solutions/security/packages/kbn-securitysolution-t-grid/kibana.jsonc similarity index 100% rename from packages/kbn-securitysolution-t-grid/kibana.jsonc rename to x-pack/solutions/security/packages/kbn-securitysolution-t-grid/kibana.jsonc diff --git a/packages/kbn-securitysolution-t-grid/package.json b/x-pack/solutions/security/packages/kbn-securitysolution-t-grid/package.json similarity index 80% rename from packages/kbn-securitysolution-t-grid/package.json rename to x-pack/solutions/security/packages/kbn-securitysolution-t-grid/package.json index b262a21e7dc6..d2f04084da36 100644 --- a/packages/kbn-securitysolution-t-grid/package.json +++ b/x-pack/solutions/security/packages/kbn-securitysolution-t-grid/package.json @@ -2,6 +2,6 @@ "name": "@kbn/securitysolution-t-grid", "version": "1.0.0", "description": "security solution t-grid packages will allow sharing components between timelines and security_solution plugin until we transfer all functionality to timelines plugin", - "license": "Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0", + "license": "Elastic License 2.0", "private": true } \ No newline at end of file diff --git a/packages/kbn-securitysolution-t-grid/src/constants/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-t-grid/src/constants/index.ts similarity index 68% rename from packages/kbn-securitysolution-t-grid/src/constants/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-t-grid/src/constants/index.ts index 3ff541240a8c..a57893d63995 100644 --- a/packages/kbn-securitysolution-t-grid/src/constants/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-t-grid/src/constants/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ export const HIGHLIGHTED_DROP_TARGET_CLASS_NAME = 'highlighted-drop-target'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-t-grid/src/mock/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-t-grid/src/mock/index.ts new file mode 100644 index 000000000000..770bf1ffb018 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-t-grid/src/mock/index.ts @@ -0,0 +1,8 @@ +/* + * 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. + */ + +export * from './mock_event_details'; diff --git a/packages/kbn-securitysolution-t-grid/src/mock/mock_event_details.ts b/x-pack/solutions/security/packages/kbn-securitysolution-t-grid/src/mock/mock_event_details.ts similarity index 97% rename from packages/kbn-securitysolution-t-grid/src/mock/mock_event_details.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-t-grid/src/mock/mock_event_details.ts index 5152132cda4b..538f6fa2cadc 100644 --- a/packages/kbn-securitysolution-t-grid/src/mock/mock_event_details.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-t-grid/src/mock/mock_event_details.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ export const eventHit = { diff --git a/packages/kbn-securitysolution-t-grid/src/utils/api/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-t-grid/src/utils/api/index.ts similarity index 73% rename from packages/kbn-securitysolution-t-grid/src/utils/api/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-t-grid/src/utils/api/index.ts index 8f7588fdeafd..add7df10fe13 100644 --- a/packages/kbn-securitysolution-t-grid/src/utils/api/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-t-grid/src/utils/api/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { has } from 'lodash/fp'; diff --git a/packages/kbn-securitysolution-t-grid/src/utils/drag_and_drop/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-t-grid/src/utils/drag_and_drop/index.ts similarity index 92% rename from packages/kbn-securitysolution-t-grid/src/utils/drag_and_drop/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-t-grid/src/utils/drag_and_drop/index.ts index 9b7f4bf6ed7d..d954ebb055f1 100644 --- a/packages/kbn-securitysolution-t-grid/src/utils/drag_and_drop/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-t-grid/src/utils/drag_and_drop/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 type { DropResult } from '@hello-pangea/dnd'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-t-grid/src/utils/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-t-grid/src/utils/index.ts new file mode 100644 index 000000000000..cafe8ec570c8 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-t-grid/src/utils/index.ts @@ -0,0 +1,9 @@ +/* + * 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. + */ + +export * from './api'; +export * from './drag_and_drop'; diff --git a/packages/kbn-securitysolution-t-grid/tsconfig.json b/x-pack/solutions/security/packages/kbn-securitysolution-t-grid/tsconfig.json similarity index 78% rename from packages/kbn-securitysolution-t-grid/tsconfig.json rename to x-pack/solutions/security/packages/kbn-securitysolution-t-grid/tsconfig.json index 9bd4f35cf62a..131ff3e6bb43 100644 --- a/packages/kbn-securitysolution-t-grid/tsconfig.json +++ b/x-pack/solutions/security/packages/kbn-securitysolution-t-grid/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", "types": [ diff --git a/packages/kbn-securitysolution-utils/README.md b/x-pack/solutions/security/packages/kbn-securitysolution-utils/README.md similarity index 100% rename from packages/kbn-securitysolution-utils/README.md rename to x-pack/solutions/security/packages/kbn-securitysolution-utils/README.md diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-utils/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-utils/index.ts new file mode 100644 index 000000000000..dcf5ee7c4779 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-utils/index.ts @@ -0,0 +1,13 @@ +/* + * 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. + */ + +export * from './src/add_remove_id_to_item'; +export * from './src/axios'; +export * from './src/transform_data_to_ndjson'; +export * from './src/path_validations'; +export * from './src/esql'; +export * from './src/debounce_async/debounce_async'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-utils/jest.config.js b/x-pack/solutions/security/packages/kbn-securitysolution-utils/jest.config.js new file mode 100644 index 000000000000..c25893390c68 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-utils/jest.config.js @@ -0,0 +1,12 @@ +/* + * 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. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../../..', + roots: ['/x-pack/solutions/security/packages/kbn-securitysolution-utils'], +}; diff --git a/packages/kbn-securitysolution-utils/kibana.jsonc b/x-pack/solutions/security/packages/kbn-securitysolution-utils/kibana.jsonc similarity index 100% rename from packages/kbn-securitysolution-utils/kibana.jsonc rename to x-pack/solutions/security/packages/kbn-securitysolution-utils/kibana.jsonc diff --git a/packages/kbn-securitysolution-utils/package.json b/x-pack/solutions/security/packages/kbn-securitysolution-utils/package.json similarity index 77% rename from packages/kbn-securitysolution-utils/package.json rename to x-pack/solutions/security/packages/kbn-securitysolution-utils/package.json index 2e18ecbc7642..d9311ef37a28 100644 --- a/packages/kbn-securitysolution-utils/package.json +++ b/x-pack/solutions/security/packages/kbn-securitysolution-utils/package.json @@ -2,7 +2,7 @@ "name": "@kbn/securitysolution-utils", "version": "1.0.0", "description": "security solution utilities to use across plugins such lists, security_solution, cases, etc...", - "license": "Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0", + "license": "Elastic License 2.0", "private": true, "sideEffects": false } \ No newline at end of file diff --git a/packages/kbn-securitysolution-utils/src/add_remove_id_to_item/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/add_remove_id_to_item/index.test.ts similarity index 84% rename from packages/kbn-securitysolution-utils/src/add_remove_id_to_item/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-utils/src/add_remove_id_to_item/index.test.ts index 462f1245500e..13d13b2acf89 100644 --- a/packages/kbn-securitysolution-utils/src/add_remove_id_to_item/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/add_remove_id_to_item/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { addIdToItem, removeIdFromItem } from '.'; diff --git a/packages/kbn-securitysolution-utils/src/add_remove_id_to_item/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/add_remove_id_to_item/index.ts similarity index 78% rename from packages/kbn-securitysolution-utils/src/add_remove_id_to_item/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-utils/src/add_remove_id_to_item/index.ts index b01a0f7db1ec..5133a13bdbec 100644 --- a/packages/kbn-securitysolution-utils/src/add_remove_id_to_item/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/add_remove_id_to_item/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { v4 as uuidv4 } from 'uuid'; diff --git a/packages/kbn-securitysolution-utils/src/axios/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/axios/index.ts similarity index 79% rename from packages/kbn-securitysolution-utils/src/axios/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-utils/src/axios/index.ts index c5c0bbe9d1fd..44972dba9356 100644 --- a/packages/kbn-securitysolution-utils/src/axios/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/axios/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { AxiosError } from 'axios'; @@ -18,6 +16,7 @@ export class FormattedAxiosError extends Error { public readonly response: { status: number; statusText: string; + // eslint-disable-next-line @typescript-eslint/no-explicit-any data: any; }; diff --git a/packages/kbn-securitysolution-utils/src/client_concurrency/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/client_concurrency/index.ts similarity index 74% rename from packages/kbn-securitysolution-utils/src/client_concurrency/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-utils/src/client_concurrency/index.ts index d3a479b44102..3a44e5061d09 100644 --- a/packages/kbn-securitysolution-utils/src/client_concurrency/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/client_concurrency/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 limit from 'p-limit'; diff --git a/packages/kbn-securitysolution-utils/src/debounce_async/debounce_async.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/debounce_async/debounce_async.test.ts similarity index 77% rename from packages/kbn-securitysolution-utils/src/debounce_async/debounce_async.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-utils/src/debounce_async/debounce_async.test.ts index d7e1201e44e8..7508e99a891f 100644 --- a/packages/kbn-securitysolution-utils/src/debounce_async/debounce_async.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/debounce_async/debounce_async.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { debounceAsync } from './debounce_async'; diff --git a/packages/kbn-securitysolution-utils/src/debounce_async/debounce_async.ts b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/debounce_async/debounce_async.ts similarity index 73% rename from packages/kbn-securitysolution-utils/src/debounce_async/debounce_async.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-utils/src/debounce_async/debounce_async.ts index 99fe653b0e21..ac9f2348d0be 100644 --- a/packages/kbn-securitysolution-utils/src/debounce_async/debounce_async.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/debounce_async/debounce_async.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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. */ /** diff --git a/packages/kbn-securitysolution-utils/src/esql/compute_if_esql_query_aggregating.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/esql/compute_if_esql_query_aggregating.test.ts similarity index 84% rename from packages/kbn-securitysolution-utils/src/esql/compute_if_esql_query_aggregating.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-utils/src/esql/compute_if_esql_query_aggregating.test.ts index cb92d34b33ec..41268ac0fa85 100644 --- a/packages/kbn-securitysolution-utils/src/esql/compute_if_esql_query_aggregating.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/esql/compute_if_esql_query_aggregating.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { computeIsESQLQueryAggregating } from './compute_if_esql_query_aggregating'; diff --git a/packages/kbn-securitysolution-utils/src/esql/compute_if_esql_query_aggregating.ts b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/esql/compute_if_esql_query_aggregating.ts similarity index 60% rename from packages/kbn-securitysolution-utils/src/esql/compute_if_esql_query_aggregating.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-utils/src/esql/compute_if_esql_query_aggregating.ts index c9b8474b5596..d38abdaa481a 100644 --- a/packages/kbn-securitysolution-utils/src/esql/compute_if_esql_query_aggregating.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/esql/compute_if_esql_query_aggregating.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { type ESQLAstQueryExpression, parse } from '@kbn/esql-ast'; diff --git a/packages/kbn-securitysolution-utils/src/esql/get_index_list_from_esql_query.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/esql/get_index_list_from_esql_query.test.ts similarity index 80% rename from packages/kbn-securitysolution-utils/src/esql/get_index_list_from_esql_query.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-utils/src/esql/get_index_list_from_esql_query.test.ts index 7a7726c47e14..39dc934dcdd2 100644 --- a/packages/kbn-securitysolution-utils/src/esql/get_index_list_from_esql_query.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/esql/get_index_list_from_esql_query.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { getIndexPatternFromESQLQuery } from '@kbn/esql-utils'; diff --git a/packages/kbn-securitysolution-utils/src/esql/get_index_list_from_esql_query.ts b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/esql/get_index_list_from_esql_query.ts similarity index 66% rename from packages/kbn-securitysolution-utils/src/esql/get_index_list_from_esql_query.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-utils/src/esql/get_index_list_from_esql_query.ts index 7cf69b409d5d..654f09cd0b84 100644 --- a/packages/kbn-securitysolution-utils/src/esql/get_index_list_from_esql_query.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/esql/get_index_list_from_esql_query.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { getIndexPatternFromESQLQuery } from '@kbn/esql-utils'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/esql/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/esql/index.ts new file mode 100644 index 000000000000..ff6f8a455244 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/esql/index.ts @@ -0,0 +1,10 @@ +/* + * 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. + */ + +export * from './compute_if_esql_query_aggregating'; +export * from './get_index_list_from_esql_query'; +export * from './parse_esql_query'; diff --git a/packages/kbn-securitysolution-utils/src/esql/parse_esql_query.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/esql/parse_esql_query.test.ts similarity index 90% rename from packages/kbn-securitysolution-utils/src/esql/parse_esql_query.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-utils/src/esql/parse_esql_query.test.ts index 6c4fdafd8e70..1e7484fd6e4b 100644 --- a/packages/kbn-securitysolution-utils/src/esql/parse_esql_query.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/esql/parse_esql_query.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { parseEsqlQuery } from './parse_esql_query'; diff --git a/packages/kbn-securitysolution-utils/src/esql/parse_esql_query.ts b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/esql/parse_esql_query.ts similarity index 83% rename from packages/kbn-securitysolution-utils/src/esql/parse_esql_query.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-utils/src/esql/parse_esql_query.ts index 2a62aed8873a..6e088bf386fb 100644 --- a/packages/kbn-securitysolution-utils/src/esql/parse_esql_query.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/esql/parse_esql_query.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { type ESQLAstQueryExpression, parse, ESQLCommandOption, EditorError } from '@kbn/esql-ast'; diff --git a/packages/kbn-securitysolution-utils/src/path_validations/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/path_validations/index.test.ts similarity index 98% rename from packages/kbn-securitysolution-utils/src/path_validations/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-utils/src/path_validations/index.test.ts index e6dfded20007..5304c3a71061 100644 --- a/packages/kbn-securitysolution-utils/src/path_validations/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/path_validations/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { diff --git a/packages/kbn-securitysolution-utils/src/path_validations/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/path_validations/index.ts similarity index 93% rename from packages/kbn-securitysolution-utils/src/path_validations/index.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-utils/src/path_validations/index.ts index 1f1eaf0b0142..965a5b9fbe0f 100644 --- a/packages/kbn-securitysolution-utils/src/path_validations/index.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/path_validations/index.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { i18n } from '@kbn/i18n'; diff --git a/packages/kbn-securitysolution-utils/src/transform_data_to_ndjson/index.test.ts b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/transform_data_to_ndjson/index.test.ts similarity index 87% rename from packages/kbn-securitysolution-utils/src/transform_data_to_ndjson/index.test.ts rename to x-pack/solutions/security/packages/kbn-securitysolution-utils/src/transform_data_to_ndjson/index.test.ts index 8c4e8289b1dd..d91eb687d86d 100644 --- a/packages/kbn-securitysolution-utils/src/transform_data_to_ndjson/index.test.ts +++ b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/transform_data_to_ndjson/index.test.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 { transformDataToNdjson } from '.'; diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/transform_data_to_ndjson/index.ts b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/transform_data_to_ndjson/index.ts new file mode 100644 index 000000000000..572b777731c4 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-securitysolution-utils/src/transform_data_to_ndjson/index.ts @@ -0,0 +1,15 @@ +/* + * 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. + */ + +export const transformDataToNdjson = (data: unknown[]): string => { + if (data.length !== 0) { + const dataString = data.map((item) => JSON.stringify(item)).join('\n'); + return `${dataString}\n`; + } else { + return ''; + } +}; diff --git a/packages/kbn-securitysolution-utils/tsconfig.json b/x-pack/solutions/security/packages/kbn-securitysolution-utils/tsconfig.json similarity index 86% rename from packages/kbn-securitysolution-utils/tsconfig.json rename to x-pack/solutions/security/packages/kbn-securitysolution-utils/tsconfig.json index d45b0c973af8..063735a114da 100644 --- a/packages/kbn-securitysolution-utils/tsconfig.json +++ b/x-pack/solutions/security/packages/kbn-securitysolution-utils/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", "types": [ diff --git a/x-pack/plugins/lists/.storybook/main.js b/x-pack/solutions/security/plugins/lists/.storybook/main.js similarity index 100% rename from x-pack/plugins/lists/.storybook/main.js rename to x-pack/solutions/security/plugins/lists/.storybook/main.js diff --git a/x-pack/plugins/lists/README.md b/x-pack/solutions/security/plugins/lists/README.md similarity index 98% rename from x-pack/plugins/lists/README.md rename to x-pack/solutions/security/plugins/lists/README.md index 02be75730341..b04d7097ddc6 100644 --- a/x-pack/plugins/lists/README.md +++ b/x-pack/solutions/security/plugins/lists/README.md @@ -42,7 +42,7 @@ xpack.lists.listItemIndex: '.items-your-name' 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/lists/server/scripts` and run: +Go to the scripts folder `cd kibana/x-pack/solutions/security/plugins/lists/server/scripts` and run: ```sh ./hard_reset.sh diff --git a/x-pack/plugins/lists/common/api/exceptions/create_exception_list/create_exception_list_route.ts b/x-pack/solutions/security/plugins/lists/common/api/exceptions/create_exception_list/create_exception_list_route.ts similarity index 100% rename from x-pack/plugins/lists/common/api/exceptions/create_exception_list/create_exception_list_route.ts rename to x-pack/solutions/security/plugins/lists/common/api/exceptions/create_exception_list/create_exception_list_route.ts diff --git a/x-pack/plugins/lists/common/api/exceptions/get_exception_filter/get_exception_filter_route.ts b/x-pack/solutions/security/plugins/lists/common/api/exceptions/get_exception_filter/get_exception_filter_route.ts similarity index 100% rename from x-pack/plugins/lists/common/api/exceptions/get_exception_filter/get_exception_filter_route.ts rename to x-pack/solutions/security/plugins/lists/common/api/exceptions/get_exception_filter/get_exception_filter_route.ts diff --git a/x-pack/plugins/lists/common/api/index.ts b/x-pack/solutions/security/plugins/lists/common/api/index.ts similarity index 100% rename from x-pack/plugins/lists/common/api/index.ts rename to x-pack/solutions/security/plugins/lists/common/api/index.ts diff --git a/x-pack/plugins/lists/common/api/values/find_lists_by_size/find_lists_by_size_route.ts b/x-pack/solutions/security/plugins/lists/common/api/values/find_lists_by_size/find_lists_by_size_route.ts similarity index 100% rename from x-pack/plugins/lists/common/api/values/find_lists_by_size/find_lists_by_size_route.ts rename to x-pack/solutions/security/plugins/lists/common/api/values/find_lists_by_size/find_lists_by_size_route.ts diff --git a/x-pack/plugins/lists/common/constants.mock.ts b/x-pack/solutions/security/plugins/lists/common/constants.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/constants.mock.ts rename to x-pack/solutions/security/plugins/lists/common/constants.mock.ts diff --git a/x-pack/plugins/lists/common/index.ts b/x-pack/solutions/security/plugins/lists/common/index.ts similarity index 100% rename from x-pack/plugins/lists/common/index.ts rename to x-pack/solutions/security/plugins/lists/common/index.ts diff --git a/x-pack/plugins/lists/common/schemas/request/create_exception_list_item_schema.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/request/create_exception_list_item_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/request/create_exception_list_item_schema.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/request/create_exception_list_item_schema.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/request/create_exception_list_schema.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/request/create_exception_list_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/request/create_exception_list_schema.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/request/create_exception_list_schema.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/request/create_list_item_schema.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/request/create_list_item_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/request/create_list_item_schema.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/request/create_list_item_schema.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/request/create_list_schema.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/request/create_list_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/request/create_list_schema.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/request/create_list_schema.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/request/get_exception_filter_schema.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/request/get_exception_filter_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/request/get_exception_filter_schema.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/request/get_exception_filter_schema.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/request/import_exceptions_schema.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/request/import_exceptions_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/request/import_exceptions_schema.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/request/import_exceptions_schema.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/request/import_list_item_schema.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/request/import_list_item_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/request/import_list_item_schema.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/request/import_list_item_schema.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/request/update_exception_list_item_schema.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/request/update_exception_list_item_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/request/update_exception_list_item_schema.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/request/update_exception_list_item_schema.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/request/update_exception_list_schema.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/request/update_exception_list_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/request/update_exception_list_schema.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/request/update_exception_list_schema.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/request/update_list_item_schema.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/request/update_list_item_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/request/update_list_item_schema.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/request/update_list_item_schema.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/request/update_list_schema.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/request/update_list_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/request/update_list_schema.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/request/update_list_schema.mock.ts diff --git a/x-pack/solutions/security/plugins/lists/common/schemas/response/acknowledge_schema.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/response/acknowledge_schema.mock.ts new file mode 100644 index 000000000000..0aa6990d44b3 --- /dev/null +++ b/x-pack/solutions/security/plugins/lists/common/schemas/response/acknowledge_schema.mock.ts @@ -0,0 +1,12 @@ +/* + * 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 type { AcknowledgeSchema } from '@kbn/securitysolution-io-ts-list-types'; + +export const getAcknowledgeSchemaResponseMock = (): AcknowledgeSchema => ({ + acknowledged: true, +}); diff --git a/x-pack/plugins/lists/common/schemas/response/exception_export_details_schema.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/response/exception_export_details_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/response/exception_export_details_schema.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/response/exception_export_details_schema.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/response/exception_list_item_schema.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/response/exception_list_item_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/response/exception_list_item_schema.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/response/exception_list_item_schema.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/response/exception_list_schema.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/response/exception_list_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/response/exception_list_schema.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/response/exception_list_schema.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/response/exception_list_summary_schema.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/response/exception_list_summary_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/response/exception_list_summary_schema.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/response/exception_list_summary_schema.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/response/found_all_list_items_schema.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/response/found_all_list_items_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/response/found_all_list_items_schema.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/response/found_all_list_items_schema.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/response/found_exception_list_item_schema.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/response/found_exception_list_item_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/response/found_exception_list_item_schema.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/response/found_exception_list_item_schema.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/response/found_exception_list_schema.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/response/found_exception_list_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/response/found_exception_list_schema.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/response/found_exception_list_schema.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/response/found_list_item_schema.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/response/found_list_item_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/response/found_list_item_schema.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/response/found_list_item_schema.mock.ts diff --git a/packages/kbn-securitysolution-list-hooks/src/mocks/response/found_list_schema.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/response/found_list_schema.mock.ts similarity index 50% rename from packages/kbn-securitysolution-list-hooks/src/mocks/response/found_list_schema.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/response/found_list_schema.mock.ts index 436ddcd7a83d..1691221842d3 100644 --- a/packages/kbn-securitysolution-list-hooks/src/mocks/response/found_list_schema.mock.ts +++ b/x-pack/solutions/security/plugins/lists/common/schemas/response/found_list_schema.mock.ts @@ -1,10 +1,8 @@ /* * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". + * 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 type { FoundListSchema } from '@kbn/securitysolution-io-ts-list-types'; diff --git a/x-pack/plugins/lists/common/schemas/response/found_lists_by_size_schema.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/response/found_lists_by_size_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/response/found_lists_by_size_schema.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/response/found_lists_by_size_schema.mock.ts diff --git a/x-pack/solutions/security/plugins/lists/common/schemas/response/list_item_index_exist_schema.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/response/list_item_index_exist_schema.mock.ts new file mode 100644 index 000000000000..afbb03cab870 --- /dev/null +++ b/x-pack/solutions/security/plugins/lists/common/schemas/response/list_item_index_exist_schema.mock.ts @@ -0,0 +1,13 @@ +/* + * 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 type { ListItemIndexExistSchema } from '@kbn/securitysolution-io-ts-list-types'; + +export const getListItemIndexExistSchemaResponseMock = (): ListItemIndexExistSchema => ({ + list_index: true, + list_item_index: true, +}); diff --git a/x-pack/plugins/lists/common/schemas/response/list_item_schema.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/response/list_item_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/response/list_item_schema.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/response/list_item_schema.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/response/list_schema.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/response/list_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/response/list_schema.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/response/list_schema.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/response/search_list_item_schema.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/response/search_list_item_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/response/search_list_item_schema.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/response/search_list_item_schema.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/types/comment.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/types/comment.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/types/comment.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/types/comment.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/types/create_comment.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/types/create_comment.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/types/create_comment.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/types/create_comment.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/types/entries.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/types/entries.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/types/entries.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/types/entries.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/types/entry_exists.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/types/entry_exists.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/types/entry_exists.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/types/entry_exists.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/types/entry_list.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/types/entry_list.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/types/entry_list.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/types/entry_list.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/types/entry_match.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/types/entry_match.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/types/entry_match.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/types/entry_match.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/types/entry_match_any.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/types/entry_match_any.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/types/entry_match_any.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/types/entry_match_any.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/types/entry_match_wildcard.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/types/entry_match_wildcard.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/types/entry_match_wildcard.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/types/entry_match_wildcard.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/types/entry_nested.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/types/entry_nested.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/types/entry_nested.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/types/entry_nested.mock.ts diff --git a/x-pack/plugins/lists/common/schemas/types/update_comment.mock.ts b/x-pack/solutions/security/plugins/lists/common/schemas/types/update_comment.mock.ts similarity index 100% rename from x-pack/plugins/lists/common/schemas/types/update_comment.mock.ts rename to x-pack/solutions/security/plugins/lists/common/schemas/types/update_comment.mock.ts diff --git a/x-pack/plugins/lists/jest.config.js b/x-pack/solutions/security/plugins/lists/jest.config.js similarity index 51% rename from x-pack/plugins/lists/jest.config.js rename to x-pack/solutions/security/plugins/lists/jest.config.js index cb9832920183..3bbf109f51ab 100644 --- a/x-pack/plugins/lists/jest.config.js +++ b/x-pack/solutions/security/plugins/lists/jest.config.js @@ -6,10 +6,13 @@ */ module.exports = { - collectCoverageFrom: ['/x-pack/plugins/lists/{common,public,server}/**/*.{ts,tsx}'], - coverageDirectory: '/target/kibana-coverage/jest/x-pack/plugins/lists', + collectCoverageFrom: [ + '/x-pack/solutions/security/plugins/lists/{common,public,server}/**/*.{ts,tsx}', + ], + coverageDirectory: + '/target/kibana-coverage/jest/x-pack/solutions/security/plugins/lists', coverageReporters: ['text', 'html'], preset: '@kbn/test', - rootDir: '../../..', - roots: ['/x-pack/plugins/lists'], + rootDir: '../../../../..', + roots: ['/x-pack/solutions/security/plugins/lists'], }; diff --git a/x-pack/plugins/lists/kibana.jsonc b/x-pack/solutions/security/plugins/lists/kibana.jsonc similarity index 100% rename from x-pack/plugins/lists/kibana.jsonc rename to x-pack/solutions/security/plugins/lists/kibana.jsonc diff --git a/x-pack/plugins/lists/public/common/empty_value.ts b/x-pack/solutions/security/plugins/lists/public/common/empty_value.ts similarity index 100% rename from x-pack/plugins/lists/public/common/empty_value.ts rename to x-pack/solutions/security/plugins/lists/public/common/empty_value.ts diff --git a/x-pack/plugins/lists/public/exceptions/api.test.ts b/x-pack/solutions/security/plugins/lists/public/exceptions/api.test.ts similarity index 100% rename from x-pack/plugins/lists/public/exceptions/api.test.ts rename to x-pack/solutions/security/plugins/lists/public/exceptions/api.test.ts diff --git a/x-pack/plugins/lists/public/exceptions/components/__mock__/show_value_list_modal.mock.tsx b/x-pack/solutions/security/plugins/lists/public/exceptions/components/__mock__/show_value_list_modal.mock.tsx similarity index 100% rename from x-pack/plugins/lists/public/exceptions/components/__mock__/show_value_list_modal.mock.tsx rename to x-pack/solutions/security/plugins/lists/public/exceptions/components/__mock__/show_value_list_modal.mock.tsx diff --git a/x-pack/plugins/lists/public/exceptions/components/and_or_badge/index.stories.tsx b/x-pack/solutions/security/plugins/lists/public/exceptions/components/and_or_badge/index.stories.tsx similarity index 100% rename from x-pack/plugins/lists/public/exceptions/components/and_or_badge/index.stories.tsx rename to x-pack/solutions/security/plugins/lists/public/exceptions/components/and_or_badge/index.stories.tsx diff --git a/x-pack/plugins/lists/public/exceptions/components/and_or_badge/index.test.tsx b/x-pack/solutions/security/plugins/lists/public/exceptions/components/and_or_badge/index.test.tsx similarity index 100% rename from x-pack/plugins/lists/public/exceptions/components/and_or_badge/index.test.tsx rename to x-pack/solutions/security/plugins/lists/public/exceptions/components/and_or_badge/index.test.tsx diff --git a/x-pack/plugins/lists/public/exceptions/components/and_or_badge/index.tsx b/x-pack/solutions/security/plugins/lists/public/exceptions/components/and_or_badge/index.tsx similarity index 100% rename from x-pack/plugins/lists/public/exceptions/components/and_or_badge/index.tsx rename to x-pack/solutions/security/plugins/lists/public/exceptions/components/and_or_badge/index.tsx diff --git a/x-pack/plugins/lists/public/exceptions/components/and_or_badge/rounded_badge.test.tsx b/x-pack/solutions/security/plugins/lists/public/exceptions/components/and_or_badge/rounded_badge.test.tsx similarity index 100% rename from x-pack/plugins/lists/public/exceptions/components/and_or_badge/rounded_badge.test.tsx rename to x-pack/solutions/security/plugins/lists/public/exceptions/components/and_or_badge/rounded_badge.test.tsx diff --git a/x-pack/plugins/lists/public/exceptions/components/and_or_badge/rounded_badge.tsx b/x-pack/solutions/security/plugins/lists/public/exceptions/components/and_or_badge/rounded_badge.tsx similarity index 100% rename from x-pack/plugins/lists/public/exceptions/components/and_or_badge/rounded_badge.tsx rename to x-pack/solutions/security/plugins/lists/public/exceptions/components/and_or_badge/rounded_badge.tsx diff --git a/x-pack/plugins/lists/public/exceptions/components/and_or_badge/rounded_badge_antenna.test.tsx b/x-pack/solutions/security/plugins/lists/public/exceptions/components/and_or_badge/rounded_badge_antenna.test.tsx similarity index 100% rename from x-pack/plugins/lists/public/exceptions/components/and_or_badge/rounded_badge_antenna.test.tsx rename to x-pack/solutions/security/plugins/lists/public/exceptions/components/and_or_badge/rounded_badge_antenna.test.tsx diff --git a/x-pack/plugins/lists/public/exceptions/components/and_or_badge/rounded_badge_antenna.tsx b/x-pack/solutions/security/plugins/lists/public/exceptions/components/and_or_badge/rounded_badge_antenna.tsx similarity index 100% rename from x-pack/plugins/lists/public/exceptions/components/and_or_badge/rounded_badge_antenna.tsx rename to x-pack/solutions/security/plugins/lists/public/exceptions/components/and_or_badge/rounded_badge_antenna.tsx diff --git a/x-pack/plugins/lists/public/exceptions/components/and_or_badge/translations.ts b/x-pack/solutions/security/plugins/lists/public/exceptions/components/and_or_badge/translations.ts similarity index 100% rename from x-pack/plugins/lists/public/exceptions/components/and_or_badge/translations.ts rename to x-pack/solutions/security/plugins/lists/public/exceptions/components/and_or_badge/translations.ts diff --git a/x-pack/plugins/lists/public/exceptions/components/builder/and_badge.test.tsx b/x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/and_badge.test.tsx similarity index 100% rename from x-pack/plugins/lists/public/exceptions/components/builder/and_badge.test.tsx rename to x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/and_badge.test.tsx diff --git a/x-pack/plugins/lists/public/exceptions/components/builder/and_badge.tsx b/x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/and_badge.tsx similarity index 100% rename from x-pack/plugins/lists/public/exceptions/components/builder/and_badge.tsx rename to x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/and_badge.tsx diff --git a/x-pack/plugins/lists/public/exceptions/components/builder/builder.stories.tsx b/x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/builder.stories.tsx similarity index 100% rename from x-pack/plugins/lists/public/exceptions/components/builder/builder.stories.tsx rename to x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/builder.stories.tsx diff --git a/x-pack/plugins/lists/public/exceptions/components/builder/entry_delete_button.test.tsx b/x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/entry_delete_button.test.tsx similarity index 100% rename from x-pack/plugins/lists/public/exceptions/components/builder/entry_delete_button.test.tsx rename to x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/entry_delete_button.test.tsx diff --git a/x-pack/plugins/lists/public/exceptions/components/builder/entry_delete_button.tsx b/x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/entry_delete_button.tsx similarity index 100% rename from x-pack/plugins/lists/public/exceptions/components/builder/entry_delete_button.tsx rename to x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/entry_delete_button.tsx diff --git a/x-pack/plugins/lists/public/exceptions/components/builder/entry_renderer.stories.tsx b/x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/entry_renderer.stories.tsx similarity index 100% rename from x-pack/plugins/lists/public/exceptions/components/builder/entry_renderer.stories.tsx rename to x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/entry_renderer.stories.tsx diff --git a/x-pack/plugins/lists/public/exceptions/components/builder/entry_renderer.test.tsx b/x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/entry_renderer.test.tsx similarity index 100% rename from x-pack/plugins/lists/public/exceptions/components/builder/entry_renderer.test.tsx rename to x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/entry_renderer.test.tsx diff --git a/x-pack/plugins/lists/public/exceptions/components/builder/entry_renderer.tsx b/x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/entry_renderer.tsx similarity index 100% rename from x-pack/plugins/lists/public/exceptions/components/builder/entry_renderer.tsx rename to x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/entry_renderer.tsx diff --git a/x-pack/plugins/lists/public/exceptions/components/builder/exception_item_renderer.test.tsx b/x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/exception_item_renderer.test.tsx similarity index 100% rename from x-pack/plugins/lists/public/exceptions/components/builder/exception_item_renderer.test.tsx rename to x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/exception_item_renderer.test.tsx diff --git a/x-pack/plugins/lists/public/exceptions/components/builder/exception_item_renderer.tsx b/x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/exception_item_renderer.tsx similarity index 100% rename from x-pack/plugins/lists/public/exceptions/components/builder/exception_item_renderer.tsx rename to x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/exception_item_renderer.tsx diff --git a/x-pack/plugins/lists/public/exceptions/components/builder/exception_items_renderer.test.tsx b/x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/exception_items_renderer.test.tsx similarity index 100% rename from x-pack/plugins/lists/public/exceptions/components/builder/exception_items_renderer.test.tsx rename to x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/exception_items_renderer.test.tsx diff --git a/x-pack/plugins/lists/public/exceptions/components/builder/exception_items_renderer.tsx b/x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/exception_items_renderer.tsx similarity index 100% rename from x-pack/plugins/lists/public/exceptions/components/builder/exception_items_renderer.tsx rename to x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/exception_items_renderer.tsx diff --git a/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts b/x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/helpers.test.ts similarity index 99% rename from x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts rename to x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/helpers.test.ts index 2c0f8b198b38..c5afe22bb73c 100644 --- a/x-pack/plugins/lists/public/exceptions/components/builder/helpers.test.ts +++ b/x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/helpers.test.ts @@ -1669,7 +1669,7 @@ describe('Exception builder helpers', () => { }); describe('#filterExceptionItems', () => { - // Please see `x-pack/plugins/lists/public/exceptions/transforms.ts` doc notes + // Please see `x-pack/solutions/security/plugins/lists/public/exceptions/transforms.ts` doc notes // for context around the temporary `id` test('it correctly validates entries that include a temporary `id`', () => { const output: ExceptionsBuilderReturnExceptionItem[] = filterExceptionItems([ diff --git a/x-pack/plugins/lists/public/exceptions/components/builder/index.tsx b/x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/index.tsx similarity index 100% rename from x-pack/plugins/lists/public/exceptions/components/builder/index.tsx rename to x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/index.tsx diff --git a/x-pack/plugins/lists/public/exceptions/components/builder/logic_buttons.test.tsx b/x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/logic_buttons.test.tsx similarity index 100% rename from x-pack/plugins/lists/public/exceptions/components/builder/logic_buttons.test.tsx rename to x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/logic_buttons.test.tsx diff --git a/x-pack/plugins/lists/public/exceptions/components/builder/logic_buttons.tsx b/x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/logic_buttons.tsx similarity index 100% rename from x-pack/plugins/lists/public/exceptions/components/builder/logic_buttons.tsx rename to x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/logic_buttons.tsx diff --git a/x-pack/plugins/lists/public/exceptions/components/builder/reducer.ts b/x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/reducer.ts similarity index 100% rename from x-pack/plugins/lists/public/exceptions/components/builder/reducer.ts rename to x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/reducer.ts diff --git a/x-pack/plugins/lists/public/exceptions/components/builder/selectors.ts b/x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/selectors.ts similarity index 100% rename from x-pack/plugins/lists/public/exceptions/components/builder/selectors.ts rename to x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/selectors.ts diff --git a/x-pack/plugins/lists/public/exceptions/components/builder/translations.ts b/x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/translations.ts similarity index 100% rename from x-pack/plugins/lists/public/exceptions/components/builder/translations.ts rename to x-pack/solutions/security/plugins/lists/public/exceptions/components/builder/translations.ts diff --git a/x-pack/plugins/lists/public/exceptions/hooks/persist_exception_item.test.ts b/x-pack/solutions/security/plugins/lists/public/exceptions/hooks/persist_exception_item.test.ts similarity index 96% rename from x-pack/plugins/lists/public/exceptions/hooks/persist_exception_item.test.ts rename to x-pack/solutions/security/plugins/lists/public/exceptions/hooks/persist_exception_item.test.ts index 95ca6285f0d7..029488f850d4 100644 --- a/x-pack/plugins/lists/public/exceptions/hooks/persist_exception_item.test.ts +++ b/x-pack/solutions/security/plugins/lists/public/exceptions/hooks/persist_exception_item.test.ts @@ -17,7 +17,7 @@ import { getExceptionListItemSchemaMock } from '../../../common/schemas/response const mockKibanaHttpService = coreMock.createStart().http; -// TODO: Port this test over to packages/kbn-securitysolution-list-hooks/src/use_persist_exception_item/index.test.ts once the other mocks are added to the kbn package system +// TODO: Port this test over to x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_persist_exception_item/index.test.ts once the other mocks are added to the kbn package system describe('usePersistExceptionItem', () => { let addExceptionListItemSpy: jest.SpyInstance>; diff --git a/x-pack/plugins/lists/public/exceptions/hooks/persist_exception_list.test.ts b/x-pack/solutions/security/plugins/lists/public/exceptions/hooks/persist_exception_list.test.ts similarity index 95% rename from x-pack/plugins/lists/public/exceptions/hooks/persist_exception_list.test.ts rename to x-pack/solutions/security/plugins/lists/public/exceptions/hooks/persist_exception_list.test.ts index c27888b6d8cc..159426d71160 100644 --- a/x-pack/plugins/lists/public/exceptions/hooks/persist_exception_list.test.ts +++ b/x-pack/solutions/security/plugins/lists/public/exceptions/hooks/persist_exception_list.test.ts @@ -18,7 +18,7 @@ const mockKibanaHttpService = coreMock.createStart().http; jest.mock('@kbn/securitysolution-list-api'); -// TODO: Port this to the kbn package of: packages/kbn-securitysolution-list-hooks/src/use_persist_exception_list/index.test.ts once the kibana mocks are ported +// TODO: Port this to the kbn package of: x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_persist_exception_list/index.test.ts once the kibana mocks are ported describe('usePersistExceptionList', () => { const onError = jest.fn(); diff --git a/x-pack/plugins/lists/public/exceptions/hooks/use_api.test.ts b/x-pack/solutions/security/plugins/lists/public/exceptions/hooks/use_api.test.ts similarity index 99% rename from x-pack/plugins/lists/public/exceptions/hooks/use_api.test.ts rename to x-pack/solutions/security/plugins/lists/public/exceptions/hooks/use_api.test.ts index a980261ba5f8..2ceaab63cc04 100644 --- a/x-pack/plugins/lists/public/exceptions/hooks/use_api.test.ts +++ b/x-pack/solutions/security/plugins/lists/public/exceptions/hooks/use_api.test.ts @@ -32,7 +32,7 @@ jest.mock('uuid', () => ({ const mockKibanaHttpService = coreMock.createStart().http; -// TODO: Once the mocks are figured out and the types are moved into kbn core this test should be moved next to the file: packages/kbn-securitysolution-list-hooks/src/use_api/index.test.ts +// TODO: Once the mocks are figured out and the types are moved into kbn core this test should be moved next to the file: x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_api/index.test.ts describe('useApi', () => { const onErrorMock = jest.fn(); diff --git a/x-pack/plugins/lists/public/exceptions/hooks/use_exception_lists.test.ts b/x-pack/solutions/security/plugins/lists/public/exceptions/hooks/use_exception_lists.test.ts similarity index 97% rename from x-pack/plugins/lists/public/exceptions/hooks/use_exception_lists.test.ts rename to x-pack/solutions/security/plugins/lists/public/exceptions/hooks/use_exception_lists.test.ts index 6c684d199e53..db01cc54e855 100644 --- a/x-pack/plugins/lists/public/exceptions/hooks/use_exception_lists.test.ts +++ b/x-pack/solutions/security/plugins/lists/public/exceptions/hooks/use_exception_lists.test.ts @@ -20,7 +20,7 @@ const mockKibanaHttpService = coreMock.createStart().http; const mockKibanaNotificationsService = coreMock.createStart().notifications; jest.mock('@kbn/securitysolution-list-api'); -// TODO: Move this test to the kbn package: packages/kbn-securitysolution-list-hooks/src/use_exception_lists/index.test.ts once mocks are ported over +// TODO: Move this test to the kbn package: x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_exception_lists/index.test.ts once mocks are ported over describe('useExceptionLists', () => { beforeEach(() => { diff --git a/x-pack/plugins/lists/public/exceptions/transforms.test.ts b/x-pack/solutions/security/plugins/lists/public/exceptions/transforms.test.ts similarity index 100% rename from x-pack/plugins/lists/public/exceptions/transforms.test.ts rename to x-pack/solutions/security/plugins/lists/public/exceptions/transforms.test.ts diff --git a/x-pack/plugins/lists/public/index.ts b/x-pack/solutions/security/plugins/lists/public/index.ts similarity index 100% rename from x-pack/plugins/lists/public/index.ts rename to x-pack/solutions/security/plugins/lists/public/index.ts diff --git a/x-pack/plugins/lists/public/lists/hooks/use_create_list_index.test.ts b/x-pack/solutions/security/plugins/lists/public/lists/hooks/use_create_list_index.test.ts similarity index 93% rename from x-pack/plugins/lists/public/lists/hooks/use_create_list_index.test.ts rename to x-pack/solutions/security/plugins/lists/public/lists/hooks/use_create_list_index.test.ts index 7021d49940f2..806d8b633708 100644 --- a/x-pack/plugins/lists/public/lists/hooks/use_create_list_index.test.ts +++ b/x-pack/solutions/security/plugins/lists/public/lists/hooks/use_create_list_index.test.ts @@ -15,7 +15,7 @@ import { createQueryWrapperMock } from '../mocks/query_wrapper'; jest.mock('@kbn/securitysolution-list-api'); -// TODO: This test should be ported to the package: packages/kbn-securitysolution-list-hooks/src/use_create_list_index/index.test.ts once we have mocks in kbn packages +// TODO: This test should be ported to the package: x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_create_list_index/index.test.ts once we have mocks in kbn packages const { wrapper: queryWrapper, queryClient } = createQueryWrapperMock(); diff --git a/x-pack/plugins/lists/public/lists/hooks/use_delete_list.test.ts b/x-pack/solutions/security/plugins/lists/public/lists/hooks/use_delete_list.test.ts similarity index 86% rename from x-pack/plugins/lists/public/lists/hooks/use_delete_list.test.ts rename to x-pack/solutions/security/plugins/lists/public/lists/hooks/use_delete_list.test.ts index 7a339f3e12a4..72276e7c474d 100644 --- a/x-pack/plugins/lists/public/lists/hooks/use_delete_list.test.ts +++ b/x-pack/solutions/security/plugins/lists/public/lists/hooks/use_delete_list.test.ts @@ -14,7 +14,7 @@ import { getListResponseMock } from '../../../common/schemas/response/list_schem jest.mock('@kbn/securitysolution-list-api'); -// TODO: This test should be ported to the package: packages/kbn-securitysolution-list-hooks/src/use_delete_list/index.test.ts once we have mocks in kbn packages +// TODO: This test should be ported to the package: x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_delete_list/index.test.ts once we have mocks in kbn packages describe('useDeleteList', () => { let httpMock: ReturnType; diff --git a/x-pack/plugins/lists/public/lists/hooks/use_export_list.test.ts b/x-pack/solutions/security/plugins/lists/public/lists/hooks/use_export_list.test.ts similarity index 86% rename from x-pack/plugins/lists/public/lists/hooks/use_export_list.test.ts rename to x-pack/solutions/security/plugins/lists/public/lists/hooks/use_export_list.test.ts index 8f08ad5c8bd0..6cafd4958f7a 100644 --- a/x-pack/plugins/lists/public/lists/hooks/use_export_list.test.ts +++ b/x-pack/solutions/security/plugins/lists/public/lists/hooks/use_export_list.test.ts @@ -12,7 +12,7 @@ import { httpServiceMock } from '@kbn/core/public/mocks'; jest.mock('@kbn/securitysolution-list-api'); -// TODO: Move this test to the kbn package: packages/kbn-securitysolution-list-hooks/src/use_export_list/index.ts once Mocks are ported from Kibana +// TODO: Move this test to the kbn package: x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_export_list/index.ts once Mocks are ported from Kibana describe('useExportList', () => { let httpMock: ReturnType; diff --git a/x-pack/plugins/lists/public/lists/hooks/use_import_list.test.ts b/x-pack/solutions/security/plugins/lists/public/lists/hooks/use_import_list.test.ts similarity index 94% rename from x-pack/plugins/lists/public/lists/hooks/use_import_list.test.ts rename to x-pack/solutions/security/plugins/lists/public/lists/hooks/use_import_list.test.ts index d56478a0321b..00a3a39f1f1a 100644 --- a/x-pack/plugins/lists/public/lists/hooks/use_import_list.test.ts +++ b/x-pack/solutions/security/plugins/lists/public/lists/hooks/use_import_list.test.ts @@ -14,7 +14,7 @@ import { getListResponseMock } from '../../../common/schemas/response/list_schem jest.mock('@kbn/securitysolution-list-api'); -// TODO: Port this test over to: packages/kbn-securitysolution-list-hooks/src/use_import_list/index.ts once mocks are moved to packages +// TODO: Port this test over to: x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_import_list/index.ts once mocks are moved to packages describe('useImportList', () => { let httpMock: ReturnType; diff --git a/x-pack/plugins/lists/public/lists/hooks/use_read_list_index.test.ts b/x-pack/solutions/security/plugins/lists/public/lists/hooks/use_read_list_index.test.ts similarity index 91% rename from x-pack/plugins/lists/public/lists/hooks/use_read_list_index.test.ts rename to x-pack/solutions/security/plugins/lists/public/lists/hooks/use_read_list_index.test.ts index 643ac2df5b05..cd36b6d53106 100644 --- a/x-pack/plugins/lists/public/lists/hooks/use_read_list_index.test.ts +++ b/x-pack/solutions/security/plugins/lists/public/lists/hooks/use_read_list_index.test.ts @@ -17,7 +17,7 @@ jest.mock('@kbn/securitysolution-list-api'); const { wrapper: queryWrapper } = createQueryWrapperMock(); -// TODO: Port this code over to the package: packages/kbn-securitysolution-list-hooks/src/use_read_list_index/index.test.ts once kibana has mocks in packages +// TODO: Port this code over to the package: x-pack/solutions/security/packages/kbn-securitysolution-list-hooks/src/use_read_list_index/index.test.ts once kibana has mocks in packages // FLAKY: https://github.com/elastic/kibana/issues/178026 describe.skip('useReadListIndex', () => { diff --git a/x-pack/plugins/lists/public/lists/mocks/query_wrapper.tsx b/x-pack/solutions/security/plugins/lists/public/lists/mocks/query_wrapper.tsx similarity index 100% rename from x-pack/plugins/lists/public/lists/mocks/query_wrapper.tsx rename to x-pack/solutions/security/plugins/lists/public/lists/mocks/query_wrapper.tsx diff --git a/x-pack/plugins/lists/public/lists/types.ts b/x-pack/solutions/security/plugins/lists/public/lists/types.ts similarity index 100% rename from x-pack/plugins/lists/public/lists/types.ts rename to x-pack/solutions/security/plugins/lists/public/lists/types.ts diff --git a/x-pack/plugins/lists/public/plugin.ts b/x-pack/solutions/security/plugins/lists/public/plugin.ts similarity index 100% rename from x-pack/plugins/lists/public/plugin.ts rename to x-pack/solutions/security/plugins/lists/public/plugin.ts diff --git a/x-pack/plugins/lists/public/shared_exports.ts b/x-pack/solutions/security/plugins/lists/public/shared_exports.ts similarity index 100% rename from x-pack/plugins/lists/public/shared_exports.ts rename to x-pack/solutions/security/plugins/lists/public/shared_exports.ts diff --git a/x-pack/plugins/lists/public/types.ts b/x-pack/solutions/security/plugins/lists/public/types.ts similarity index 100% rename from x-pack/plugins/lists/public/types.ts rename to x-pack/solutions/security/plugins/lists/public/types.ts diff --git a/x-pack/plugins/lists/scripts/storybook.js b/x-pack/solutions/security/plugins/lists/scripts/storybook.js similarity index 100% rename from x-pack/plugins/lists/scripts/storybook.js rename to x-pack/solutions/security/plugins/lists/scripts/storybook.js diff --git a/x-pack/plugins/lists/server/config.mock.ts b/x-pack/solutions/security/plugins/lists/server/config.mock.ts similarity index 100% rename from x-pack/plugins/lists/server/config.mock.ts rename to x-pack/solutions/security/plugins/lists/server/config.mock.ts diff --git a/x-pack/plugins/lists/server/config.test.ts b/x-pack/solutions/security/plugins/lists/server/config.test.ts similarity index 100% rename from x-pack/plugins/lists/server/config.test.ts rename to x-pack/solutions/security/plugins/lists/server/config.test.ts diff --git a/x-pack/plugins/lists/server/config.ts b/x-pack/solutions/security/plugins/lists/server/config.ts similarity index 100% rename from x-pack/plugins/lists/server/config.ts rename to x-pack/solutions/security/plugins/lists/server/config.ts diff --git a/x-pack/plugins/lists/server/error_with_status_code.ts b/x-pack/solutions/security/plugins/lists/server/error_with_status_code.ts similarity index 100% rename from x-pack/plugins/lists/server/error_with_status_code.ts rename to x-pack/solutions/security/plugins/lists/server/error_with_status_code.ts diff --git a/x-pack/plugins/lists/server/get_space_id.test.ts b/x-pack/solutions/security/plugins/lists/server/get_space_id.test.ts similarity index 100% rename from x-pack/plugins/lists/server/get_space_id.test.ts rename to x-pack/solutions/security/plugins/lists/server/get_space_id.test.ts diff --git a/x-pack/plugins/lists/server/get_space_id.ts b/x-pack/solutions/security/plugins/lists/server/get_space_id.ts similarity index 100% rename from x-pack/plugins/lists/server/get_space_id.ts rename to x-pack/solutions/security/plugins/lists/server/get_space_id.ts diff --git a/x-pack/plugins/lists/server/get_user.test.ts b/x-pack/solutions/security/plugins/lists/server/get_user.test.ts similarity index 100% rename from x-pack/plugins/lists/server/get_user.test.ts rename to x-pack/solutions/security/plugins/lists/server/get_user.test.ts diff --git a/x-pack/plugins/lists/server/get_user.ts b/x-pack/solutions/security/plugins/lists/server/get_user.ts similarity index 100% rename from x-pack/plugins/lists/server/get_user.ts rename to x-pack/solutions/security/plugins/lists/server/get_user.ts diff --git a/x-pack/plugins/lists/server/handlers/create_exception_list_handler.ts b/x-pack/solutions/security/plugins/lists/server/handlers/create_exception_list_handler.ts similarity index 100% rename from x-pack/plugins/lists/server/handlers/create_exception_list_handler.ts rename to x-pack/solutions/security/plugins/lists/server/handlers/create_exception_list_handler.ts diff --git a/x-pack/plugins/lists/server/index.ts b/x-pack/solutions/security/plugins/lists/server/index.ts similarity index 100% rename from x-pack/plugins/lists/server/index.ts rename to x-pack/solutions/security/plugins/lists/server/index.ts diff --git a/x-pack/plugins/lists/server/mocks.ts b/x-pack/solutions/security/plugins/lists/server/mocks.ts similarity index 100% rename from x-pack/plugins/lists/server/mocks.ts rename to x-pack/solutions/security/plugins/lists/server/mocks.ts diff --git a/x-pack/plugins/lists/server/plugin.ts b/x-pack/solutions/security/plugins/lists/server/plugin.ts similarity index 100% rename from x-pack/plugins/lists/server/plugin.ts rename to x-pack/solutions/security/plugins/lists/server/plugin.ts diff --git a/x-pack/plugins/lists/server/routes/create_endpoint_list_item_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/create_endpoint_list_item_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/create_endpoint_list_item_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/create_endpoint_list_item_route.ts diff --git a/x-pack/plugins/lists/server/routes/create_endpoint_list_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/create_endpoint_list_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/create_endpoint_list_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/create_endpoint_list_route.ts diff --git a/x-pack/plugins/lists/server/routes/create_exception_list_item_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/create_exception_list_item_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/create_exception_list_item_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/create_exception_list_item_route.ts diff --git a/x-pack/plugins/lists/server/routes/create_exception_list_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/create_exception_list_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/create_exception_list_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/create_exception_list_route.ts diff --git a/x-pack/plugins/lists/server/routes/delete_endpoint_list_item_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/delete_endpoint_list_item_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/delete_endpoint_list_item_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/delete_endpoint_list_item_route.ts diff --git a/x-pack/plugins/lists/server/routes/delete_exception_list_item_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/delete_exception_list_item_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/delete_exception_list_item_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/delete_exception_list_item_route.ts diff --git a/x-pack/plugins/lists/server/routes/delete_exception_list_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/delete_exception_list_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/delete_exception_list_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/delete_exception_list_route.ts diff --git a/x-pack/plugins/lists/server/routes/duplicate_exception_list_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/duplicate_exception_list_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/duplicate_exception_list_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/duplicate_exception_list_route.ts diff --git a/x-pack/plugins/lists/server/routes/endpoint_disallowed_fields.ts b/x-pack/solutions/security/plugins/lists/server/routes/endpoint_disallowed_fields.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/endpoint_disallowed_fields.ts rename to x-pack/solutions/security/plugins/lists/server/routes/endpoint_disallowed_fields.ts diff --git a/x-pack/plugins/lists/server/routes/export_exception_list_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/export_exception_list_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/export_exception_list_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/export_exception_list_route.ts diff --git a/x-pack/plugins/lists/server/routes/find_endpoint_list_item_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/find_endpoint_list_item_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/find_endpoint_list_item_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/find_endpoint_list_item_route.ts diff --git a/x-pack/plugins/lists/server/routes/find_exception_list_item_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/find_exception_list_item_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/find_exception_list_item_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/find_exception_list_item_route.ts diff --git a/x-pack/plugins/lists/server/routes/find_exception_list_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/find_exception_list_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/find_exception_list_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/find_exception_list_route.ts diff --git a/x-pack/plugins/lists/server/routes/import_exceptions_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/import_exceptions_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/import_exceptions_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/import_exceptions_route.ts diff --git a/x-pack/plugins/lists/server/routes/index.ts b/x-pack/solutions/security/plugins/lists/server/routes/index.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/index.ts rename to x-pack/solutions/security/plugins/lists/server/routes/index.ts diff --git a/x-pack/plugins/lists/server/routes/init_routes.ts b/x-pack/solutions/security/plugins/lists/server/routes/init_routes.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/init_routes.ts rename to x-pack/solutions/security/plugins/lists/server/routes/init_routes.ts diff --git a/x-pack/plugins/lists/server/routes/internal/create_exception_filter_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/internal/create_exception_filter_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/internal/create_exception_filter_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/internal/create_exception_filter_route.ts diff --git a/x-pack/plugins/lists/server/routes/internal/create_exceptions_list_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/internal/create_exceptions_list_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/internal/create_exceptions_list_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/internal/create_exceptions_list_route.ts diff --git a/x-pack/plugins/lists/server/routes/internal/find_lists_by_size_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/internal/find_lists_by_size_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/internal/find_lists_by_size_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/internal/find_lists_by_size_route.ts diff --git a/x-pack/plugins/lists/server/routes/list/create_list_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/list/create_list_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/list/create_list_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/list/create_list_route.ts diff --git a/x-pack/plugins/lists/server/routes/list/delete_list_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/list/delete_list_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/list/delete_list_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/list/delete_list_route.ts diff --git a/x-pack/plugins/lists/server/routes/list/import_list_item_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/list/import_list_item_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/list/import_list_item_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/list/import_list_item_route.ts diff --git a/x-pack/plugins/lists/server/routes/list/patch_list_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/list/patch_list_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/list/patch_list_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/list/patch_list_route.ts diff --git a/x-pack/plugins/lists/server/routes/list/read_list_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/list/read_list_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/list/read_list_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/list/read_list_route.ts diff --git a/x-pack/plugins/lists/server/routes/list/update_list_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/list/update_list_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/list/update_list_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/list/update_list_route.ts diff --git a/x-pack/plugins/lists/server/routes/list_index/create_list_index_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/list_index/create_list_index_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/list_index/create_list_index_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/list_index/create_list_index_route.ts diff --git a/x-pack/plugins/lists/server/routes/list_index/delete_list_index_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/list_index/delete_list_index_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/list_index/delete_list_index_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/list_index/delete_list_index_route.ts diff --git a/x-pack/plugins/lists/server/routes/list_index/export_list_item_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/list_index/export_list_item_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/list_index/export_list_item_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/list_index/export_list_item_route.ts diff --git a/x-pack/plugins/lists/server/routes/list_index/find_list_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/list_index/find_list_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/list_index/find_list_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/list_index/find_list_route.ts diff --git a/x-pack/plugins/lists/server/routes/list_index/read_list_index_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/list_index/read_list_index_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/list_index/read_list_index_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/list_index/read_list_index_route.ts diff --git a/x-pack/plugins/lists/server/routes/list_item/create_list_item_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/list_item/create_list_item_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/list_item/create_list_item_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/list_item/create_list_item_route.ts diff --git a/x-pack/plugins/lists/server/routes/list_item/delete_list_item_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/list_item/delete_list_item_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/list_item/delete_list_item_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/list_item/delete_list_item_route.ts diff --git a/x-pack/plugins/lists/server/routes/list_item/find_list_item_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/list_item/find_list_item_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/list_item/find_list_item_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/list_item/find_list_item_route.ts diff --git a/x-pack/plugins/lists/server/routes/list_item/patch_list_item_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/list_item/patch_list_item_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/list_item/patch_list_item_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/list_item/patch_list_item_route.ts diff --git a/x-pack/plugins/lists/server/routes/list_item/read_list_item_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/list_item/read_list_item_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/list_item/read_list_item_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/list_item/read_list_item_route.ts diff --git a/x-pack/plugins/lists/server/routes/list_item/update_list_item_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/list_item/update_list_item_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/list_item/update_list_item_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/list_item/update_list_item_route.ts diff --git a/x-pack/plugins/lists/server/routes/list_privileges/read_list_privileges_route.mock.ts b/x-pack/solutions/security/plugins/lists/server/routes/list_privileges/read_list_privileges_route.mock.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/list_privileges/read_list_privileges_route.mock.ts rename to x-pack/solutions/security/plugins/lists/server/routes/list_privileges/read_list_privileges_route.mock.ts diff --git a/x-pack/plugins/lists/server/routes/list_privileges/read_list_privileges_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/list_privileges/read_list_privileges_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/list_privileges/read_list_privileges_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/list_privileges/read_list_privileges_route.ts diff --git a/x-pack/plugins/lists/server/routes/read_endpoint_list_item_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/read_endpoint_list_item_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/read_endpoint_list_item_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/read_endpoint_list_item_route.ts diff --git a/x-pack/plugins/lists/server/routes/read_exception_list_item_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/read_exception_list_item_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/read_exception_list_item_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/read_exception_list_item_route.ts diff --git a/x-pack/plugins/lists/server/routes/read_exception_list_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/read_exception_list_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/read_exception_list_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/read_exception_list_route.ts diff --git a/x-pack/plugins/lists/server/routes/summary_exception_list_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/summary_exception_list_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/summary_exception_list_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/summary_exception_list_route.ts diff --git a/x-pack/plugins/lists/server/routes/update_endpoint_list_item_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/update_endpoint_list_item_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/update_endpoint_list_item_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/update_endpoint_list_item_route.ts diff --git a/x-pack/plugins/lists/server/routes/update_exception_list_item_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/update_exception_list_item_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/update_exception_list_item_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/update_exception_list_item_route.ts diff --git a/x-pack/plugins/lists/server/routes/update_exception_list_route.ts b/x-pack/solutions/security/plugins/lists/server/routes/update_exception_list_route.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/update_exception_list_route.ts rename to x-pack/solutions/security/plugins/lists/server/routes/update_exception_list_route.ts diff --git a/x-pack/plugins/lists/server/routes/utils/build_siem_response.ts b/x-pack/solutions/security/plugins/lists/server/routes/utils/build_siem_response.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/utils/build_siem_response.ts rename to x-pack/solutions/security/plugins/lists/server/routes/utils/build_siem_response.ts diff --git a/x-pack/plugins/lists/server/routes/utils/create_stream_from_buffer.ts b/x-pack/solutions/security/plugins/lists/server/routes/utils/create_stream_from_buffer.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/utils/create_stream_from_buffer.ts rename to x-pack/solutions/security/plugins/lists/server/routes/utils/create_stream_from_buffer.ts diff --git a/x-pack/plugins/lists/server/routes/utils/get_error_message_exception_list.ts b/x-pack/solutions/security/plugins/lists/server/routes/utils/get_error_message_exception_list.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/utils/get_error_message_exception_list.ts rename to x-pack/solutions/security/plugins/lists/server/routes/utils/get_error_message_exception_list.ts diff --git a/x-pack/plugins/lists/server/routes/utils/get_error_message_exception_list_item.ts b/x-pack/solutions/security/plugins/lists/server/routes/utils/get_error_message_exception_list_item.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/utils/get_error_message_exception_list_item.ts rename to x-pack/solutions/security/plugins/lists/server/routes/utils/get_error_message_exception_list_item.ts diff --git a/x-pack/plugins/lists/server/routes/utils/get_exception_list_client.ts b/x-pack/solutions/security/plugins/lists/server/routes/utils/get_exception_list_client.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/utils/get_exception_list_client.ts rename to x-pack/solutions/security/plugins/lists/server/routes/utils/get_exception_list_client.ts diff --git a/x-pack/plugins/lists/server/routes/utils/get_internal_list_client.ts b/x-pack/solutions/security/plugins/lists/server/routes/utils/get_internal_list_client.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/utils/get_internal_list_client.ts rename to x-pack/solutions/security/plugins/lists/server/routes/utils/get_internal_list_client.ts diff --git a/x-pack/plugins/lists/server/routes/utils/get_list_client.ts b/x-pack/solutions/security/plugins/lists/server/routes/utils/get_list_client.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/utils/get_list_client.ts rename to x-pack/solutions/security/plugins/lists/server/routes/utils/get_list_client.ts diff --git a/x-pack/plugins/lists/server/routes/utils/index.ts b/x-pack/solutions/security/plugins/lists/server/routes/utils/index.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/utils/index.ts rename to x-pack/solutions/security/plugins/lists/server/routes/utils/index.ts diff --git a/x-pack/plugins/lists/server/routes/utils/route_validation.test.ts b/x-pack/solutions/security/plugins/lists/server/routes/utils/route_validation.test.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/utils/route_validation.test.ts rename to x-pack/solutions/security/plugins/lists/server/routes/utils/route_validation.test.ts diff --git a/x-pack/plugins/lists/server/routes/utils/route_validation.ts b/x-pack/solutions/security/plugins/lists/server/routes/utils/route_validation.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/utils/route_validation.ts rename to x-pack/solutions/security/plugins/lists/server/routes/utils/route_validation.ts diff --git a/x-pack/plugins/lists/server/routes/utils/validate_comments_to_update.test.ts b/x-pack/solutions/security/plugins/lists/server/routes/utils/validate_comments_to_update.test.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/utils/validate_comments_to_update.test.ts rename to x-pack/solutions/security/plugins/lists/server/routes/utils/validate_comments_to_update.test.ts diff --git a/x-pack/plugins/lists/server/routes/utils/validate_comments_to_update.ts b/x-pack/solutions/security/plugins/lists/server/routes/utils/validate_comments_to_update.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/utils/validate_comments_to_update.ts rename to x-pack/solutions/security/plugins/lists/server/routes/utils/validate_comments_to_update.ts diff --git a/x-pack/plugins/lists/server/routes/validate.ts b/x-pack/solutions/security/plugins/lists/server/routes/validate.ts similarity index 100% rename from x-pack/plugins/lists/server/routes/validate.ts rename to x-pack/solutions/security/plugins/lists/server/routes/validate.ts diff --git a/x-pack/plugins/lists/server/saved_objects/exception_list.ts b/x-pack/solutions/security/plugins/lists/server/saved_objects/exception_list.ts similarity index 100% rename from x-pack/plugins/lists/server/saved_objects/exception_list.ts rename to x-pack/solutions/security/plugins/lists/server/saved_objects/exception_list.ts diff --git a/x-pack/plugins/lists/server/saved_objects/index.ts b/x-pack/solutions/security/plugins/lists/server/saved_objects/index.ts similarity index 100% rename from x-pack/plugins/lists/server/saved_objects/index.ts rename to x-pack/solutions/security/plugins/lists/server/saved_objects/index.ts diff --git a/x-pack/plugins/lists/server/saved_objects/init_saved_objects.ts b/x-pack/solutions/security/plugins/lists/server/saved_objects/init_saved_objects.ts similarity index 100% rename from x-pack/plugins/lists/server/saved_objects/init_saved_objects.ts rename to x-pack/solutions/security/plugins/lists/server/saved_objects/init_saved_objects.ts diff --git a/x-pack/plugins/lists/server/saved_objects/migrations.test.ts b/x-pack/solutions/security/plugins/lists/server/saved_objects/migrations.test.ts similarity index 100% rename from x-pack/plugins/lists/server/saved_objects/migrations.test.ts rename to x-pack/solutions/security/plugins/lists/server/saved_objects/migrations.test.ts diff --git a/x-pack/plugins/lists/server/saved_objects/migrations.ts b/x-pack/solutions/security/plugins/lists/server/saved_objects/migrations.ts similarity index 100% rename from x-pack/plugins/lists/server/saved_objects/migrations.ts rename to x-pack/solutions/security/plugins/lists/server/saved_objects/migrations.ts diff --git a/x-pack/plugins/lists/server/schemas/common/get_shard.mock.ts b/x-pack/solutions/security/plugins/lists/server/schemas/common/get_shard.mock.ts similarity index 100% rename from x-pack/plugins/lists/server/schemas/common/get_shard.mock.ts rename to x-pack/solutions/security/plugins/lists/server/schemas/common/get_shard.mock.ts diff --git a/x-pack/plugins/lists/server/schemas/common/schemas.test.ts b/x-pack/solutions/security/plugins/lists/server/schemas/common/schemas.test.ts similarity index 100% rename from x-pack/plugins/lists/server/schemas/common/schemas.test.ts rename to x-pack/solutions/security/plugins/lists/server/schemas/common/schemas.test.ts diff --git a/x-pack/plugins/lists/server/schemas/common/schemas.ts b/x-pack/solutions/security/plugins/lists/server/schemas/common/schemas.ts similarity index 100% rename from x-pack/plugins/lists/server/schemas/common/schemas.ts rename to x-pack/solutions/security/plugins/lists/server/schemas/common/schemas.ts diff --git a/x-pack/plugins/lists/server/schemas/elastic_query/create_es_bulk_type.ts b/x-pack/solutions/security/plugins/lists/server/schemas/elastic_query/create_es_bulk_type.ts similarity index 100% rename from x-pack/plugins/lists/server/schemas/elastic_query/create_es_bulk_type.ts rename to x-pack/solutions/security/plugins/lists/server/schemas/elastic_query/create_es_bulk_type.ts diff --git a/x-pack/plugins/lists/server/schemas/elastic_query/index.ts b/x-pack/solutions/security/plugins/lists/server/schemas/elastic_query/index.ts similarity index 100% rename from x-pack/plugins/lists/server/schemas/elastic_query/index.ts rename to x-pack/solutions/security/plugins/lists/server/schemas/elastic_query/index.ts diff --git a/x-pack/plugins/lists/server/schemas/elastic_query/index_es_list_item_schema.mock.ts b/x-pack/solutions/security/plugins/lists/server/schemas/elastic_query/index_es_list_item_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/server/schemas/elastic_query/index_es_list_item_schema.mock.ts rename to x-pack/solutions/security/plugins/lists/server/schemas/elastic_query/index_es_list_item_schema.mock.ts diff --git a/x-pack/plugins/lists/server/schemas/elastic_query/index_es_list_item_schema.ts b/x-pack/solutions/security/plugins/lists/server/schemas/elastic_query/index_es_list_item_schema.ts similarity index 100% rename from x-pack/plugins/lists/server/schemas/elastic_query/index_es_list_item_schema.ts rename to x-pack/solutions/security/plugins/lists/server/schemas/elastic_query/index_es_list_item_schema.ts diff --git a/x-pack/plugins/lists/server/schemas/elastic_query/index_es_list_schema.mock.ts b/x-pack/solutions/security/plugins/lists/server/schemas/elastic_query/index_es_list_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/server/schemas/elastic_query/index_es_list_schema.mock.ts rename to x-pack/solutions/security/plugins/lists/server/schemas/elastic_query/index_es_list_schema.mock.ts diff --git a/x-pack/plugins/lists/server/schemas/elastic_query/index_es_list_schema.ts b/x-pack/solutions/security/plugins/lists/server/schemas/elastic_query/index_es_list_schema.ts similarity index 100% rename from x-pack/plugins/lists/server/schemas/elastic_query/index_es_list_schema.ts rename to x-pack/solutions/security/plugins/lists/server/schemas/elastic_query/index_es_list_schema.ts diff --git a/x-pack/plugins/lists/server/schemas/elastic_query/update_es_list_item_schema.ts b/x-pack/solutions/security/plugins/lists/server/schemas/elastic_query/update_es_list_item_schema.ts similarity index 100% rename from x-pack/plugins/lists/server/schemas/elastic_query/update_es_list_item_schema.ts rename to x-pack/solutions/security/plugins/lists/server/schemas/elastic_query/update_es_list_item_schema.ts diff --git a/x-pack/plugins/lists/server/schemas/elastic_query/update_es_list_schema.ts b/x-pack/solutions/security/plugins/lists/server/schemas/elastic_query/update_es_list_schema.ts similarity index 100% rename from x-pack/plugins/lists/server/schemas/elastic_query/update_es_list_schema.ts rename to x-pack/solutions/security/plugins/lists/server/schemas/elastic_query/update_es_list_schema.ts diff --git a/x-pack/plugins/lists/server/schemas/elastic_response/index.ts b/x-pack/solutions/security/plugins/lists/server/schemas/elastic_response/index.ts similarity index 100% rename from x-pack/plugins/lists/server/schemas/elastic_response/index.ts rename to x-pack/solutions/security/plugins/lists/server/schemas/elastic_response/index.ts diff --git a/x-pack/plugins/lists/server/schemas/elastic_response/search_es_list_item_schema.mock.ts b/x-pack/solutions/security/plugins/lists/server/schemas/elastic_response/search_es_list_item_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/server/schemas/elastic_response/search_es_list_item_schema.mock.ts rename to x-pack/solutions/security/plugins/lists/server/schemas/elastic_response/search_es_list_item_schema.mock.ts diff --git a/x-pack/plugins/lists/server/schemas/elastic_response/search_es_list_item_schema.test.ts b/x-pack/solutions/security/plugins/lists/server/schemas/elastic_response/search_es_list_item_schema.test.ts similarity index 100% rename from x-pack/plugins/lists/server/schemas/elastic_response/search_es_list_item_schema.test.ts rename to x-pack/solutions/security/plugins/lists/server/schemas/elastic_response/search_es_list_item_schema.test.ts diff --git a/x-pack/plugins/lists/server/schemas/elastic_response/search_es_list_item_schema.ts b/x-pack/solutions/security/plugins/lists/server/schemas/elastic_response/search_es_list_item_schema.ts similarity index 100% rename from x-pack/plugins/lists/server/schemas/elastic_response/search_es_list_item_schema.ts rename to x-pack/solutions/security/plugins/lists/server/schemas/elastic_response/search_es_list_item_schema.ts diff --git a/x-pack/plugins/lists/server/schemas/elastic_response/search_es_list_schema.mock.ts b/x-pack/solutions/security/plugins/lists/server/schemas/elastic_response/search_es_list_schema.mock.ts similarity index 100% rename from x-pack/plugins/lists/server/schemas/elastic_response/search_es_list_schema.mock.ts rename to x-pack/solutions/security/plugins/lists/server/schemas/elastic_response/search_es_list_schema.mock.ts diff --git a/x-pack/plugins/lists/server/schemas/elastic_response/search_es_list_schema.test.ts b/x-pack/solutions/security/plugins/lists/server/schemas/elastic_response/search_es_list_schema.test.ts similarity index 100% rename from x-pack/plugins/lists/server/schemas/elastic_response/search_es_list_schema.test.ts rename to x-pack/solutions/security/plugins/lists/server/schemas/elastic_response/search_es_list_schema.test.ts diff --git a/x-pack/plugins/lists/server/schemas/elastic_response/search_es_list_schema.ts b/x-pack/solutions/security/plugins/lists/server/schemas/elastic_response/search_es_list_schema.ts similarity index 100% rename from x-pack/plugins/lists/server/schemas/elastic_response/search_es_list_schema.ts rename to x-pack/solutions/security/plugins/lists/server/schemas/elastic_response/search_es_list_schema.ts diff --git a/x-pack/plugins/lists/server/schemas/saved_objects/exceptions_list_so_schema.ts b/x-pack/solutions/security/plugins/lists/server/schemas/saved_objects/exceptions_list_so_schema.ts similarity index 100% rename from x-pack/plugins/lists/server/schemas/saved_objects/exceptions_list_so_schema.ts rename to x-pack/solutions/security/plugins/lists/server/schemas/saved_objects/exceptions_list_so_schema.ts diff --git a/x-pack/plugins/lists/server/schemas/saved_objects/index.ts b/x-pack/solutions/security/plugins/lists/server/schemas/saved_objects/index.ts similarity index 100% rename from x-pack/plugins/lists/server/schemas/saved_objects/index.ts rename to x-pack/solutions/security/plugins/lists/server/schemas/saved_objects/index.ts diff --git a/x-pack/plugins/lists/server/scripts/check_env_variables.sh b/x-pack/solutions/security/plugins/lists/server/scripts/check_env_variables.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/check_env_variables.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/check_env_variables.sh diff --git a/x-pack/plugins/lists/server/scripts/delete_all_exception_lists.sh b/x-pack/solutions/security/plugins/lists/server/scripts/delete_all_exception_lists.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/delete_all_exception_lists.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/delete_all_exception_lists.sh diff --git a/x-pack/plugins/lists/server/scripts/delete_endpoint_list_item.sh b/x-pack/solutions/security/plugins/lists/server/scripts/delete_endpoint_list_item.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/delete_endpoint_list_item.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/delete_endpoint_list_item.sh diff --git a/x-pack/plugins/lists/server/scripts/delete_endpoint_list_item_by_id.sh b/x-pack/solutions/security/plugins/lists/server/scripts/delete_endpoint_list_item_by_id.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/delete_endpoint_list_item_by_id.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/delete_endpoint_list_item_by_id.sh diff --git a/x-pack/plugins/lists/server/scripts/delete_exception_list.sh b/x-pack/solutions/security/plugins/lists/server/scripts/delete_exception_list.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/delete_exception_list.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/delete_exception_list.sh diff --git a/x-pack/plugins/lists/server/scripts/delete_exception_list_by_id.sh b/x-pack/solutions/security/plugins/lists/server/scripts/delete_exception_list_by_id.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/delete_exception_list_by_id.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/delete_exception_list_by_id.sh diff --git a/x-pack/plugins/lists/server/scripts/delete_exception_list_item.sh b/x-pack/solutions/security/plugins/lists/server/scripts/delete_exception_list_item.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/delete_exception_list_item.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/delete_exception_list_item.sh diff --git a/x-pack/plugins/lists/server/scripts/delete_exception_list_item_by_id.sh b/x-pack/solutions/security/plugins/lists/server/scripts/delete_exception_list_item_by_id.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/delete_exception_list_item_by_id.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/delete_exception_list_item_by_id.sh diff --git a/x-pack/plugins/lists/server/scripts/delete_list.sh b/x-pack/solutions/security/plugins/lists/server/scripts/delete_list.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/delete_list.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/delete_list.sh diff --git a/x-pack/plugins/lists/server/scripts/delete_list_index.sh b/x-pack/solutions/security/plugins/lists/server/scripts/delete_list_index.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/delete_list_index.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/delete_list_index.sh diff --git a/x-pack/plugins/lists/server/scripts/delete_list_item_by_id.sh b/x-pack/solutions/security/plugins/lists/server/scripts/delete_list_item_by_id.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/delete_list_item_by_id.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/delete_list_item_by_id.sh diff --git a/x-pack/plugins/lists/server/scripts/delete_list_item_by_value.sh b/x-pack/solutions/security/plugins/lists/server/scripts/delete_list_item_by_value.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/delete_list_item_by_value.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/delete_list_item_by_value.sh diff --git a/x-pack/plugins/lists/server/scripts/download_load_lists_example.sh b/x-pack/solutions/security/plugins/lists/server/scripts/download_load_lists_example.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/download_load_lists_example.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/download_load_lists_example.sh diff --git a/x-pack/plugins/lists/server/scripts/exception_lists/files/import.ndjson b/x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/files/import.ndjson similarity index 100% rename from x-pack/plugins/lists/server/scripts/exception_lists/files/import.ndjson rename to x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/files/import.ndjson diff --git a/x-pack/plugins/lists/server/scripts/exception_lists/new/endpoint_list_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/endpoint_list_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/exception_lists/new/endpoint_list_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/endpoint_list_item.json diff --git a/x-pack/plugins/lists/server/scripts/exception_lists/new/exception_list.json b/x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/exception_list.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/exception_lists/new/exception_list.json rename to x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/exception_list.json diff --git a/x-pack/plugins/lists/server/scripts/exception_lists/new/exception_list_agnostic.json b/x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/exception_list_agnostic.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/exception_lists/new/exception_list_agnostic.json rename to x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/exception_list_agnostic.json diff --git a/x-pack/plugins/lists/server/scripts/exception_lists/new/exception_list_auto_id.json b/x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/exception_list_auto_id.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/exception_lists/new/exception_list_auto_id.json rename to x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/exception_list_auto_id.json diff --git a/x-pack/plugins/lists/server/scripts/exception_lists/new/exception_list_detection.json b/x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/exception_list_detection.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/exception_lists/new/exception_list_detection.json rename to x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/exception_list_detection.json diff --git a/x-pack/plugins/lists/server/scripts/exception_lists/new/exception_list_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/exception_list_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/exception_lists/new/exception_list_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/exception_list_item.json diff --git a/x-pack/plugins/lists/server/scripts/exception_lists/new/exception_list_item_agnostic.json b/x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/exception_list_item_agnostic.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/exception_lists/new/exception_list_item_agnostic.json rename to x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/exception_list_item_agnostic.json diff --git a/x-pack/plugins/lists/server/scripts/exception_lists/new/exception_list_item_auto_id.json b/x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/exception_list_item_auto_id.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/exception_lists/new/exception_list_item_auto_id.json rename to x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/exception_list_item_auto_id.json diff --git a/x-pack/plugins/lists/server/scripts/exception_lists/new/exception_list_item_detection_auto_id.json b/x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/exception_list_item_detection_auto_id.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/exception_lists/new/exception_list_item_detection_auto_id.json rename to x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/exception_list_item_detection_auto_id.json diff --git a/x-pack/plugins/lists/server/scripts/exception_lists/new/exception_list_item_with_bad_ip_list.json b/x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/exception_list_item_with_bad_ip_list.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/exception_lists/new/exception_list_item_with_bad_ip_list.json rename to x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/exception_list_item_with_bad_ip_list.json diff --git a/x-pack/plugins/lists/server/scripts/exception_lists/new/exception_list_item_with_list.json b/x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/exception_list_item_with_list.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/exception_lists/new/exception_list_item_with_list.json rename to x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/exception_list_item_with_list.json diff --git a/x-pack/plugins/lists/server/scripts/exception_lists/new/references/exception_list_detection_1.json b/x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/references/exception_list_detection_1.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/exception_lists/new/references/exception_list_detection_1.json rename to x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/references/exception_list_detection_1.json diff --git a/x-pack/plugins/lists/server/scripts/exception_lists/new/references/exception_list_detection_2_agnostic.json b/x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/references/exception_list_detection_2_agnostic.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/exception_lists/new/references/exception_list_detection_2_agnostic.json rename to x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/references/exception_list_detection_2_agnostic.json diff --git a/x-pack/plugins/lists/server/scripts/exception_lists/new/references/exception_list_detection_3.json b/x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/references/exception_list_detection_3.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/exception_lists/new/references/exception_list_detection_3.json rename to x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/references/exception_list_detection_3.json diff --git a/x-pack/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_1_multi_value_list.json b/x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_1_multi_value_list.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_1_multi_value_list.json rename to x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_1_multi_value_list.json diff --git a/x-pack/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_1_non_value_list.json b/x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_1_non_value_list.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_1_non_value_list.json rename to x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_1_non_value_list.json diff --git a/x-pack/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_2_multi_value_list.json b/x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_2_multi_value_list.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_2_multi_value_list.json rename to x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_2_multi_value_list.json diff --git a/x-pack/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_2_non_value_list.json b/x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_2_non_value_list.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_2_non_value_list.json rename to x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_2_non_value_list.json diff --git a/x-pack/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_3_non_value_list.json b/x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_3_non_value_list.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_3_non_value_list.json rename to x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_3_non_value_list.json diff --git a/x-pack/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_3_single_value_list.json b/x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_3_single_value_list.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_3_single_value_list.json rename to x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/references/exception_list_item_3_single_value_list.json diff --git a/x-pack/plugins/lists/server/scripts/exception_lists/new/trusted_app_list_item_agnostic.json b/x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/trusted_app_list_item_agnostic.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/exception_lists/new/trusted_app_list_item_agnostic.json rename to x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/new/trusted_app_list_item_agnostic.json diff --git a/x-pack/plugins/lists/server/scripts/exception_lists/updates/simple_update.json b/x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/updates/simple_update.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/exception_lists/updates/simple_update.json rename to x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/updates/simple_update.json diff --git a/x-pack/plugins/lists/server/scripts/exception_lists/updates/simple_update_agnostic.json b/x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/updates/simple_update_agnostic.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/exception_lists/updates/simple_update_agnostic.json rename to x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/updates/simple_update_agnostic.json diff --git a/x-pack/plugins/lists/server/scripts/exception_lists/updates/simple_update_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/updates/simple_update_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/exception_lists/updates/simple_update_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/exception_lists/updates/simple_update_item.json diff --git a/x-pack/plugins/lists/server/scripts/export_list_items.sh b/x-pack/solutions/security/plugins/lists/server/scripts/export_list_items.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/export_list_items.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/export_list_items.sh diff --git a/x-pack/plugins/lists/server/scripts/export_list_items_to_file.sh b/x-pack/solutions/security/plugins/lists/server/scripts/export_list_items_to_file.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/export_list_items_to_file.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/export_list_items_to_file.sh diff --git a/x-pack/plugins/lists/server/scripts/find_endpoint_list_items.sh b/x-pack/solutions/security/plugins/lists/server/scripts/find_endpoint_list_items.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/find_endpoint_list_items.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/find_endpoint_list_items.sh diff --git a/x-pack/plugins/lists/server/scripts/find_exception_list_items.sh b/x-pack/solutions/security/plugins/lists/server/scripts/find_exception_list_items.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/find_exception_list_items.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/find_exception_list_items.sh diff --git a/x-pack/plugins/lists/server/scripts/find_exception_list_items_by_filter.sh b/x-pack/solutions/security/plugins/lists/server/scripts/find_exception_list_items_by_filter.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/find_exception_list_items_by_filter.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/find_exception_list_items_by_filter.sh diff --git a/x-pack/plugins/lists/server/scripts/find_exception_lists.sh b/x-pack/solutions/security/plugins/lists/server/scripts/find_exception_lists.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/find_exception_lists.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/find_exception_lists.sh diff --git a/x-pack/plugins/lists/server/scripts/find_exception_lists_by_filter.sh b/x-pack/solutions/security/plugins/lists/server/scripts/find_exception_lists_by_filter.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/find_exception_lists_by_filter.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/find_exception_lists_by_filter.sh diff --git a/x-pack/plugins/lists/server/scripts/find_list_items.sh b/x-pack/solutions/security/plugins/lists/server/scripts/find_list_items.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/find_list_items.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/find_list_items.sh diff --git a/x-pack/plugins/lists/server/scripts/find_list_items_with_cursor.sh b/x-pack/solutions/security/plugins/lists/server/scripts/find_list_items_with_cursor.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/find_list_items_with_cursor.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/find_list_items_with_cursor.sh diff --git a/x-pack/plugins/lists/server/scripts/find_list_items_with_sort.sh b/x-pack/solutions/security/plugins/lists/server/scripts/find_list_items_with_sort.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/find_list_items_with_sort.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/find_list_items_with_sort.sh diff --git a/x-pack/plugins/lists/server/scripts/find_list_items_with_sort_cursor.sh b/x-pack/solutions/security/plugins/lists/server/scripts/find_list_items_with_sort_cursor.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/find_list_items_with_sort_cursor.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/find_list_items_with_sort_cursor.sh diff --git a/x-pack/plugins/lists/server/scripts/find_lists.sh b/x-pack/solutions/security/plugins/lists/server/scripts/find_lists.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/find_lists.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/find_lists.sh diff --git a/x-pack/plugins/lists/server/scripts/find_lists_with_cursor.sh b/x-pack/solutions/security/plugins/lists/server/scripts/find_lists_with_cursor.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/find_lists_with_cursor.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/find_lists_with_cursor.sh diff --git a/x-pack/plugins/lists/server/scripts/find_lists_with_filter.sh b/x-pack/solutions/security/plugins/lists/server/scripts/find_lists_with_filter.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/find_lists_with_filter.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/find_lists_with_filter.sh diff --git a/x-pack/plugins/lists/server/scripts/find_lists_with_sort.sh b/x-pack/solutions/security/plugins/lists/server/scripts/find_lists_with_sort.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/find_lists_with_sort.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/find_lists_with_sort.sh diff --git a/x-pack/plugins/lists/server/scripts/find_lists_with_sort_cursor.sh b/x-pack/solutions/security/plugins/lists/server/scripts/find_lists_with_sort_cursor.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/find_lists_with_sort_cursor.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/find_lists_with_sort_cursor.sh diff --git a/x-pack/plugins/lists/server/scripts/get_endpoint_list_item.sh b/x-pack/solutions/security/plugins/lists/server/scripts/get_endpoint_list_item.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/get_endpoint_list_item.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/get_endpoint_list_item.sh diff --git a/x-pack/plugins/lists/server/scripts/get_endpoint_list_item_by_id.sh b/x-pack/solutions/security/plugins/lists/server/scripts/get_endpoint_list_item_by_id.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/get_endpoint_list_item_by_id.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/get_endpoint_list_item_by_id.sh diff --git a/x-pack/plugins/lists/server/scripts/get_exception_list.sh b/x-pack/solutions/security/plugins/lists/server/scripts/get_exception_list.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/get_exception_list.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/get_exception_list.sh diff --git a/x-pack/plugins/lists/server/scripts/get_exception_list_by_id.sh b/x-pack/solutions/security/plugins/lists/server/scripts/get_exception_list_by_id.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/get_exception_list_by_id.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/get_exception_list_by_id.sh diff --git a/x-pack/plugins/lists/server/scripts/get_exception_list_item.sh b/x-pack/solutions/security/plugins/lists/server/scripts/get_exception_list_item.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/get_exception_list_item.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/get_exception_list_item.sh diff --git a/x-pack/plugins/lists/server/scripts/get_exception_list_item_by_id.sh b/x-pack/solutions/security/plugins/lists/server/scripts/get_exception_list_item_by_id.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/get_exception_list_item_by_id.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/get_exception_list_item_by_id.sh diff --git a/x-pack/plugins/lists/server/scripts/get_list.sh b/x-pack/solutions/security/plugins/lists/server/scripts/get_list.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/get_list.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/get_list.sh diff --git a/x-pack/plugins/lists/server/scripts/get_list_item_by_id.sh b/x-pack/solutions/security/plugins/lists/server/scripts/get_list_item_by_id.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/get_list_item_by_id.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/get_list_item_by_id.sh diff --git a/x-pack/plugins/lists/server/scripts/get_list_item_by_value.sh b/x-pack/solutions/security/plugins/lists/server/scripts/get_list_item_by_value.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/get_list_item_by_value.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/get_list_item_by_value.sh diff --git a/x-pack/plugins/lists/server/scripts/get_privileges.sh b/x-pack/solutions/security/plugins/lists/server/scripts/get_privileges.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/get_privileges.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/get_privileges.sh diff --git a/x-pack/plugins/lists/server/scripts/hard_reset.sh b/x-pack/solutions/security/plugins/lists/server/scripts/hard_reset.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/hard_reset.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/hard_reset.sh diff --git a/x-pack/plugins/lists/server/scripts/import_exception_lists.sh b/x-pack/solutions/security/plugins/lists/server/scripts/import_exception_lists.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/import_exception_lists.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/import_exception_lists.sh diff --git a/x-pack/plugins/lists/server/scripts/import_list_items.sh b/x-pack/solutions/security/plugins/lists/server/scripts/import_list_items.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/import_list_items.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/import_list_items.sh diff --git a/x-pack/plugins/lists/server/scripts/import_list_items_by_filename.sh b/x-pack/solutions/security/plugins/lists/server/scripts/import_list_items_by_filename.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/import_list_items_by_filename.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/import_list_items_by_filename.sh diff --git a/x-pack/plugins/lists/server/scripts/lists/files/binary.txt b/x-pack/solutions/security/plugins/lists/server/scripts/lists/files/binary.txt similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/files/binary.txt rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/files/binary.txt diff --git a/x-pack/plugins/lists/server/scripts/lists/files/boolean.txt b/x-pack/solutions/security/plugins/lists/server/scripts/lists/files/boolean.txt similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/files/boolean.txt rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/files/boolean.txt diff --git a/x-pack/plugins/lists/server/scripts/lists/files/byte.txt b/x-pack/solutions/security/plugins/lists/server/scripts/lists/files/byte.txt similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/files/byte.txt rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/files/byte.txt diff --git a/x-pack/plugins/lists/server/scripts/lists/files/date.txt b/x-pack/solutions/security/plugins/lists/server/scripts/lists/files/date.txt similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/files/date.txt rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/files/date.txt diff --git a/x-pack/plugins/lists/server/scripts/lists/files/date_nanos.txt b/x-pack/solutions/security/plugins/lists/server/scripts/lists/files/date_nanos.txt similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/files/date_nanos.txt rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/files/date_nanos.txt diff --git a/x-pack/plugins/lists/server/scripts/lists/files/date_range.txt b/x-pack/solutions/security/plugins/lists/server/scripts/lists/files/date_range.txt similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/files/date_range.txt rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/files/date_range.txt diff --git a/x-pack/plugins/lists/server/scripts/lists/files/date_range_custom_format.txt b/x-pack/solutions/security/plugins/lists/server/scripts/lists/files/date_range_custom_format.txt similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/files/date_range_custom_format.txt rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/files/date_range_custom_format.txt diff --git a/x-pack/plugins/lists/server/scripts/lists/files/double.txt b/x-pack/solutions/security/plugins/lists/server/scripts/lists/files/double.txt similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/files/double.txt rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/files/double.txt diff --git a/x-pack/plugins/lists/server/scripts/lists/files/double_range.txt b/x-pack/solutions/security/plugins/lists/server/scripts/lists/files/double_range.txt similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/files/double_range.txt rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/files/double_range.txt diff --git a/x-pack/plugins/lists/server/scripts/lists/files/float.txt b/x-pack/solutions/security/plugins/lists/server/scripts/lists/files/float.txt similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/files/float.txt rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/files/float.txt diff --git a/x-pack/plugins/lists/server/scripts/lists/files/float_range.txt b/x-pack/solutions/security/plugins/lists/server/scripts/lists/files/float_range.txt similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/files/float_range.txt rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/files/float_range.txt diff --git a/x-pack/plugins/lists/server/scripts/lists/files/geo_hash.txt b/x-pack/solutions/security/plugins/lists/server/scripts/lists/files/geo_hash.txt similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/files/geo_hash.txt rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/files/geo_hash.txt diff --git a/x-pack/plugins/lists/server/scripts/lists/files/geo_point.txt b/x-pack/solutions/security/plugins/lists/server/scripts/lists/files/geo_point.txt similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/files/geo_point.txt rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/files/geo_point.txt diff --git a/x-pack/plugins/lists/server/scripts/lists/files/geo_point_wkt.txt b/x-pack/solutions/security/plugins/lists/server/scripts/lists/files/geo_point_wkt.txt similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/files/geo_point_wkt.txt rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/files/geo_point_wkt.txt diff --git a/x-pack/plugins/lists/server/scripts/lists/files/half_float.txt b/x-pack/solutions/security/plugins/lists/server/scripts/lists/files/half_float.txt similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/files/half_float.txt rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/files/half_float.txt diff --git a/x-pack/plugins/lists/server/scripts/lists/files/hosts.txt b/x-pack/solutions/security/plugins/lists/server/scripts/lists/files/hosts.txt similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/files/hosts.txt rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/files/hosts.txt diff --git a/x-pack/plugins/lists/server/scripts/lists/files/integer.txt b/x-pack/solutions/security/plugins/lists/server/scripts/lists/files/integer.txt similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/files/integer.txt rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/files/integer.txt diff --git a/x-pack/plugins/lists/server/scripts/lists/files/integer_range.txt b/x-pack/solutions/security/plugins/lists/server/scripts/lists/files/integer_range.txt similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/files/integer_range.txt rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/files/integer_range.txt diff --git a/x-pack/plugins/lists/server/scripts/lists/files/ip_range.txt b/x-pack/solutions/security/plugins/lists/server/scripts/lists/files/ip_range.txt similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/files/ip_range.txt rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/files/ip_range.txt diff --git a/x-pack/plugins/lists/server/scripts/lists/files/ip_range_cidr.txt b/x-pack/solutions/security/plugins/lists/server/scripts/lists/files/ip_range_cidr.txt similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/files/ip_range_cidr.txt rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/files/ip_range_cidr.txt diff --git a/x-pack/plugins/lists/server/scripts/lists/files/ip_range_mixed.txt b/x-pack/solutions/security/plugins/lists/server/scripts/lists/files/ip_range_mixed.txt similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/files/ip_range_mixed.txt rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/files/ip_range_mixed.txt diff --git a/x-pack/plugins/lists/server/scripts/lists/files/ips.txt b/x-pack/solutions/security/plugins/lists/server/scripts/lists/files/ips.txt similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/files/ips.txt rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/files/ips.txt diff --git a/x-pack/plugins/lists/server/scripts/lists/files/long.txt b/x-pack/solutions/security/plugins/lists/server/scripts/lists/files/long.txt similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/files/long.txt rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/files/long.txt diff --git a/x-pack/plugins/lists/server/scripts/lists/files/long_range.txt b/x-pack/solutions/security/plugins/lists/server/scripts/lists/files/long_range.txt similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/files/long_range.txt rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/files/long_range.txt diff --git a/x-pack/plugins/lists/server/scripts/lists/files/short.txt b/x-pack/solutions/security/plugins/lists/server/scripts/lists/files/short.txt similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/files/short.txt rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/files/short.txt diff --git a/x-pack/plugins/lists/server/scripts/lists/files/text.txt b/x-pack/solutions/security/plugins/lists/server/scripts/lists/files/text.txt similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/files/text.txt rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/files/text.txt diff --git a/x-pack/plugins/lists/server/scripts/lists/new/items/binary_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/binary_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/items/binary_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/binary_item.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/items/boolean_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/boolean_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/items/boolean_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/boolean_item.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/items/byte_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/byte_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/items/byte_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/byte_item.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/items/date_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/date_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/items/date_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/date_item.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/items/date_nanos_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/date_nanos_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/items/date_nanos_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/date_nanos_item.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/items/date_range_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/date_range_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/items/date_range_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/date_range_item.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/items/double_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/double_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/items/double_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/double_item.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/items/double_range_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/double_range_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/items/double_range_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/double_range_item.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/items/float_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/float_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/items/float_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/float_item.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/items/float_range_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/float_range_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/items/float_range_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/float_range_item.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/items/geo_point_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/geo_point_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/items/geo_point_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/geo_point_item.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/items/geo_shape_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/geo_shape_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/items/geo_shape_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/geo_shape_item.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/items/half_float_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/half_float_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/items/half_float_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/half_float_item.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/items/integer_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/integer_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/items/integer_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/integer_item.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/items/integer_range_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/integer_range_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/items/integer_range_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/integer_range_item.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/items/ip_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/ip_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/items/ip_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/ip_item.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/items/ip_item_everything.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/ip_item_everything.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/items/ip_item_everything.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/ip_item_everything.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/items/ip_range_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/ip_range_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/items/ip_range_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/ip_range_item.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/items/keyword_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/keyword_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/items/keyword_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/keyword_item.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/items/long_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/long_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/items/long_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/long_item.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/items/long_range_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/long_range_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/items/long_range_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/long_range_item.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/items/shape_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/shape_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/items/shape_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/shape_item.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/items/short_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/short_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/items/short_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/short_item.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/items/text_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/text_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/items/text_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/items/text_item.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/list_ip_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/list_ip_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/list_ip_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/list_ip_item.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/list_keyword_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/list_keyword_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/list_keyword_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/list_keyword_item.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/lists/auto_id.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/auto_id.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/lists/auto_id.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/auto_id.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/lists/binary.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/binary.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/lists/binary.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/binary.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/lists/boolean.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/boolean.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/lists/boolean.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/boolean.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/lists/byte.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/byte.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/lists/byte.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/byte.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/lists/date.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/date.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/lists/date.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/date.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/lists/date_nanos.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/date_nanos.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/lists/date_nanos.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/date_nanos.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/lists/date_range.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/date_range.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/lists/date_range.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/date_range.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/lists/date_range_custom_format.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/date_range_custom_format.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/lists/date_range_custom_format.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/date_range_custom_format.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/lists/double.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/double.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/lists/double.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/double.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/lists/double_range.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/double_range.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/lists/double_range.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/double_range.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/lists/everything.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/everything.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/lists/everything.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/everything.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/lists/float.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/float.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/lists/float.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/float.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/lists/float_range.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/float_range.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/lists/float_range.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/float_range.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/lists/geo_point.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/geo_point.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/lists/geo_point.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/geo_point.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/lists/geo_shape.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/geo_shape.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/lists/geo_shape.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/geo_shape.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/lists/half_float.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/half_float.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/lists/half_float.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/half_float.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/lists/integer.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/integer.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/lists/integer.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/integer.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/lists/integer_range.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/integer_range.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/lists/integer_range.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/integer_range.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/lists/ip.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/ip.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/lists/ip.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/ip.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/lists/ip_custom_format.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/ip_custom_format.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/lists/ip_custom_format.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/ip_custom_format.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/lists/ip_no_id.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/ip_no_id.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/lists/ip_no_id.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/ip_no_id.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/lists/ip_range.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/ip_range.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/lists/ip_range.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/ip_range.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/lists/keyword.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/keyword.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/lists/keyword.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/keyword.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/lists/keyword_custom_format.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/keyword_custom_format.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/lists/keyword_custom_format.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/keyword_custom_format.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/lists/long.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/long.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/lists/long.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/long.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/lists/shape.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/shape.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/lists/shape.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/shape.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/lists/short.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/short.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/lists/short.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/short.json diff --git a/x-pack/plugins/lists/server/scripts/lists/new/lists/text.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/text.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/new/lists/text.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/new/lists/text.json diff --git a/x-pack/plugins/lists/server/scripts/lists/patches/ip_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/patches/ip_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/patches/ip_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/patches/ip_item.json diff --git a/x-pack/plugins/lists/server/scripts/lists/patches/simplest_updated_name.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/patches/simplest_updated_name.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/patches/simplest_updated_name.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/patches/simplest_updated_name.json diff --git a/x-pack/plugins/lists/server/scripts/lists/updates/ip_item.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/updates/ip_item.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/updates/ip_item.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/updates/ip_item.json diff --git a/x-pack/plugins/lists/server/scripts/lists/updates/simple_update.json b/x-pack/solutions/security/plugins/lists/server/scripts/lists/updates/simple_update.json similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists/updates/simple_update.json rename to x-pack/solutions/security/plugins/lists/server/scripts/lists/updates/simple_update.json diff --git a/x-pack/plugins/lists/server/scripts/lists_index_exists.sh b/x-pack/solutions/security/plugins/lists/server/scripts/lists_index_exists.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/lists_index_exists.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/lists_index_exists.sh diff --git a/x-pack/plugins/lists/server/scripts/patch_list.sh b/x-pack/solutions/security/plugins/lists/server/scripts/patch_list.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/patch_list.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/patch_list.sh diff --git a/x-pack/plugins/lists/server/scripts/patch_list_item.sh b/x-pack/solutions/security/plugins/lists/server/scripts/patch_list_item.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/patch_list_item.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/patch_list_item.sh diff --git a/x-pack/plugins/lists/server/scripts/post_endpoint_list.sh b/x-pack/solutions/security/plugins/lists/server/scripts/post_endpoint_list.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/post_endpoint_list.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/post_endpoint_list.sh diff --git a/x-pack/plugins/lists/server/scripts/post_endpoint_list_item.sh b/x-pack/solutions/security/plugins/lists/server/scripts/post_endpoint_list_item.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/post_endpoint_list_item.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/post_endpoint_list_item.sh diff --git a/x-pack/plugins/lists/server/scripts/post_exception_list.sh b/x-pack/solutions/security/plugins/lists/server/scripts/post_exception_list.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/post_exception_list.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/post_exception_list.sh diff --git a/x-pack/plugins/lists/server/scripts/post_exception_list_item.sh b/x-pack/solutions/security/plugins/lists/server/scripts/post_exception_list_item.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/post_exception_list_item.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/post_exception_list_item.sh diff --git a/x-pack/plugins/lists/server/scripts/post_list.sh b/x-pack/solutions/security/plugins/lists/server/scripts/post_list.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/post_list.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/post_list.sh diff --git a/x-pack/plugins/lists/server/scripts/post_list_index.sh b/x-pack/solutions/security/plugins/lists/server/scripts/post_list_index.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/post_list_index.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/post_list_index.sh diff --git a/x-pack/plugins/lists/server/scripts/post_list_item.sh b/x-pack/solutions/security/plugins/lists/server/scripts/post_list_item.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/post_list_item.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/post_list_item.sh diff --git a/x-pack/plugins/lists/server/scripts/post_x_exception_list_items.sh b/x-pack/solutions/security/plugins/lists/server/scripts/post_x_exception_list_items.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/post_x_exception_list_items.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/post_x_exception_list_items.sh diff --git a/x-pack/plugins/lists/server/scripts/quick_start.sh b/x-pack/solutions/security/plugins/lists/server/scripts/quick_start.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/quick_start.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/quick_start.sh diff --git a/x-pack/plugins/lists/server/scripts/quick_start_value_list_references.sh b/x-pack/solutions/security/plugins/lists/server/scripts/quick_start_value_list_references.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/quick_start_value_list_references.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/quick_start_value_list_references.sh diff --git a/x-pack/plugins/lists/server/scripts/summary_exception_list.sh b/x-pack/solutions/security/plugins/lists/server/scripts/summary_exception_list.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/summary_exception_list.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/summary_exception_list.sh diff --git a/x-pack/plugins/lists/server/scripts/update_endpoint_item.sh b/x-pack/solutions/security/plugins/lists/server/scripts/update_endpoint_item.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/update_endpoint_item.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/update_endpoint_item.sh diff --git a/x-pack/plugins/lists/server/scripts/update_exception_list.sh b/x-pack/solutions/security/plugins/lists/server/scripts/update_exception_list.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/update_exception_list.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/update_exception_list.sh diff --git a/x-pack/plugins/lists/server/scripts/update_exception_list_item.sh b/x-pack/solutions/security/plugins/lists/server/scripts/update_exception_list_item.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/update_exception_list_item.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/update_exception_list_item.sh diff --git a/x-pack/plugins/lists/server/scripts/update_list.sh b/x-pack/solutions/security/plugins/lists/server/scripts/update_list.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/update_list.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/update_list.sh diff --git a/x-pack/plugins/lists/server/scripts/update_list_item.sh b/x-pack/solutions/security/plugins/lists/server/scripts/update_list_item.sh similarity index 100% rename from x-pack/plugins/lists/server/scripts/update_list_item.sh rename to x-pack/solutions/security/plugins/lists/server/scripts/update_list_item.sh diff --git a/x-pack/plugins/lists/server/services/exception_lists/build_exception_filter.test.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/build_exception_filter.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/build_exception_filter.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/build_exception_filter.test.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/build_exception_filter.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/build_exception_filter.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/build_exception_filter.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/build_exception_filter.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/bulk_create_exception_list_items.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/bulk_create_exception_list_items.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/bulk_create_exception_list_items.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/bulk_create_exception_list_items.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/close_point_in_time.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/close_point_in_time.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/close_point_in_time.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/close_point_in_time.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/create_endpoint_list.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/create_endpoint_list.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/create_endpoint_list.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/create_endpoint_list.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/create_endpoint_trusted_apps_list.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/create_endpoint_trusted_apps_list.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/create_endpoint_trusted_apps_list.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/create_endpoint_trusted_apps_list.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/create_exception_list.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/create_exception_list.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/create_exception_list.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/create_exception_list.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/create_exception_list_item.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/create_exception_list_item.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/create_exception_list_item.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/create_exception_list_item.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/delete_exception_list.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/delete_exception_list.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/delete_exception_list.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/delete_exception_list.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/delete_exception_list_item.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/delete_exception_list_item.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/delete_exception_list_item.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/delete_exception_list_item.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/delete_exception_list_items_by_list.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/delete_exception_list_items_by_list.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/delete_exception_list_items_by_list.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/delete_exception_list_items_by_list.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/duplicate_exception_list.test.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/duplicate_exception_list.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/duplicate_exception_list.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/duplicate_exception_list.test.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/duplicate_exception_list.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/duplicate_exception_list.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/duplicate_exception_list.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/duplicate_exception_list.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/exception_list_client.mock.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/exception_list_client.mock.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/exception_list_client.mock.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/exception_list_client.mock.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/exception_list_client.test.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/exception_list_client.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/exception_list_client.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/exception_list_client.test.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/exception_list_client.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/exception_list_client.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/exception_list_client_types.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/exception_list_client_types.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/export_exception_list_and_items.test.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/export_exception_list_and_items.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/export_exception_list_and_items.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/export_exception_list_and_items.test.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/export_exception_list_and_items.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/export_exception_list_and_items.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/export_exception_list_and_items.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/export_exception_list_and_items.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/find_exception_list.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/find_exception_list.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/find_exception_list.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/find_exception_list.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/find_exception_list_item.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/find_exception_list_item.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/find_exception_list_item.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/find_exception_list_item.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/find_exception_list_item_point_in_time_finder.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/find_exception_list_item_point_in_time_finder.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/find_exception_list_item_point_in_time_finder.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/find_exception_list_item_point_in_time_finder.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/find_exception_list_items.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/find_exception_list_items.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/find_exception_list_items.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/find_exception_list_items.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/find_exception_list_items_point_in_time_finder.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/find_exception_list_items_point_in_time_finder.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/find_exception_list_items_point_in_time_finder.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/find_exception_list_items_point_in_time_finder.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/find_exception_list_point_in_time_finder.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/find_exception_list_point_in_time_finder.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/find_exception_list_point_in_time_finder.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/find_exception_list_point_in_time_finder.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/find_value_list_exception_list_items.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/find_value_list_exception_list_items.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/find_value_list_exception_list_items.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/find_value_list_exception_list_items.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/find_value_list_exception_list_items_point_in_time_finder.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/find_value_list_exception_list_items_point_in_time_finder.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/find_value_list_exception_list_items_point_in_time_finder.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/find_value_list_exception_list_items_point_in_time_finder.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/get_exception_list.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/get_exception_list.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/get_exception_list.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/get_exception_list.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/get_exception_list_item.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/get_exception_list_item.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/get_exception_list_item.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/get_exception_list_item.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/get_exception_list_summary.test.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/get_exception_list_summary.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/get_exception_list_summary.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/get_exception_list_summary.test.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/get_exception_list_summary.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/get_exception_list_summary.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/get_exception_list_summary.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/get_exception_list_summary.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/import_exception_list_and_items.test.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/import_exception_list_and_items.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/import_exception_list_and_items.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/import_exception_list_and_items.test.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/import_exception_list_and_items.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/import_exception_list_and_items.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/import_exception_list_and_items.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/import_exception_list_and_items.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/index.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/index.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/index.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/index.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/open_point_in_time.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/open_point_in_time.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/open_point_in_time.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/open_point_in_time.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/update_exception_list.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/update_exception_list.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/update_exception_list.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/update_exception_list.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/update_exception_list_item.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/update_exception_list_item.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/update_exception_list_item.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/update_exception_list_item.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/update_overwrite_exception_list_item.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/update_overwrite_exception_list_item.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/update_overwrite_exception_list_item.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/update_overwrite_exception_list_item.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/errors.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/errors.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/errors.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/errors.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/get_exception_list_filter.test.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/get_exception_list_filter.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/get_exception_list_filter.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/get_exception_list_filter.test.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/get_exception_list_filter.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/get_exception_list_filter.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/get_exception_list_filter.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/get_exception_list_filter.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/get_exception_lists_item_filter.test.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/get_exception_lists_item_filter.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/get_exception_lists_item_filter.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/get_exception_lists_item_filter.test.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/get_exception_lists_item_filter.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/get_exception_lists_item_filter.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/get_exception_lists_item_filter.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/get_exception_lists_item_filter.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/bulk_create_imported_items.test.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/bulk_create_imported_items.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/bulk_create_imported_items.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/bulk_create_imported_items.test.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/bulk_create_imported_items.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/bulk_create_imported_items.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/bulk_create_imported_items.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/bulk_create_imported_items.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/bulk_create_imported_lists.test.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/bulk_create_imported_lists.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/bulk_create_imported_lists.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/bulk_create_imported_lists.test.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/bulk_create_imported_lists.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/bulk_create_imported_lists.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/bulk_create_imported_lists.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/bulk_create_imported_lists.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/bulk_update_imported_items.test.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/bulk_update_imported_items.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/bulk_update_imported_items.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/bulk_update_imported_items.test.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/bulk_update_imported_items.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/bulk_update_imported_items.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/bulk_update_imported_items.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/bulk_update_imported_items.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/bulk_update_imported_lists.test.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/bulk_update_imported_lists.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/bulk_update_imported_lists.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/bulk_update_imported_lists.test.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/bulk_update_imported_lists.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/bulk_update_imported_lists.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/bulk_update_imported_lists.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/bulk_update_imported_lists.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/create_exceptions_stream_logic.test.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/create_exceptions_stream_logic.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/create_exceptions_stream_logic.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/create_exceptions_stream_logic.test.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/create_exceptions_stream_logic.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/create_exceptions_stream_logic.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/create_exceptions_stream_logic.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/create_exceptions_stream_logic.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/dedupe_incoming_items.test.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/dedupe_incoming_items.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/dedupe_incoming_items.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/dedupe_incoming_items.test.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/dedupe_incoming_items.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/dedupe_incoming_items.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/dedupe_incoming_items.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/dedupe_incoming_items.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/dedupe_incoming_lists.test.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/dedupe_incoming_lists.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/dedupe_incoming_lists.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/dedupe_incoming_lists.test.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/dedupe_incoming_lists.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/dedupe_incoming_lists.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/dedupe_incoming_lists.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/dedupe_incoming_lists.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/delete_list_items_to_overwrite.test.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/delete_list_items_to_overwrite.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/delete_list_items_to_overwrite.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/delete_list_items_to_overwrite.test.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/delete_list_items_to_overwrite.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/delete_list_items_to_overwrite.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/delete_list_items_to_overwrite.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/delete_list_items_to_overwrite.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/find_all_exception_list_item_types.test.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/find_all_exception_list_item_types.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/find_all_exception_list_item_types.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/find_all_exception_list_item_types.test.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/find_all_exception_list_item_types.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/find_all_exception_list_item_types.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/find_all_exception_list_item_types.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/find_all_exception_list_item_types.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/find_all_exception_list_types.test.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/find_all_exception_list_types.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/find_all_exception_list_types.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/find_all_exception_list_types.test.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/find_all_exception_list_types.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/find_all_exception_list_types.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/find_all_exception_list_types.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/find_all_exception_list_types.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/import_exception_list_items.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/import_exception_list_items.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/import_exception_list_items.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/import_exception_list_items.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/import_exception_lists.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/import_exception_lists.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/import_exception_lists.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/import_exception_lists.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/is_import_regular.test.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/is_import_regular.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/is_import_regular.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/is_import_regular.test.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/is_import_regular.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/is_import_regular.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/is_import_regular.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/is_import_regular.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/sort_exception_items_to_create_or_update.test.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/sort_exception_items_to_create_or_update.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/sort_exception_items_to_create_or_update.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/sort_exception_items_to_create_or_update.test.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/sort_exception_items_to_create_update.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/sort_exception_items_to_create_update.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/sort_exception_items_to_create_update.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/sort_exception_items_to_create_update.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/sort_exception_lists_to_create_or_update.test.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/sort_exception_lists_to_create_or_update.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/sort_exception_lists_to_create_or_update.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/sort_exception_lists_to_create_or_update.test.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/sort_exception_lists_to_create_update.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/sort_exception_lists_to_create_update.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/sort_exception_lists_to_create_update.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/sort_exception_lists_to_create_update.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/sort_import_by_namespace.test.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/sort_import_by_namespace.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/sort_import_by_namespace.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/sort_import_by_namespace.test.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/sort_import_by_namespace.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/sort_import_by_namespace.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/sort_import_by_namespace.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/sort_import_by_namespace.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/sort_import_responses.test.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/sort_import_responses.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/sort_import_responses.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/sort_import_responses.test.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/import/sort_import_responses.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/sort_import_responses.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/import/sort_import_responses.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/import/sort_import_responses.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/index.test.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/index.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/index.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/index.test.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/index.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/index.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/index.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/index.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/validate_data.test.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/validate_data.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/validate_data.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/validate_data.test.ts diff --git a/x-pack/plugins/lists/server/services/exception_lists/utils/validate_data.ts b/x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/validate_data.ts similarity index 100% rename from x-pack/plugins/lists/server/services/exception_lists/utils/validate_data.ts rename to x-pack/solutions/security/plugins/lists/server/services/exception_lists/utils/validate_data.ts diff --git a/x-pack/plugins/lists/server/services/extension_points/errors.ts b/x-pack/solutions/security/plugins/lists/server/services/extension_points/errors.ts similarity index 100% rename from x-pack/plugins/lists/server/services/extension_points/errors.ts rename to x-pack/solutions/security/plugins/lists/server/services/extension_points/errors.ts diff --git a/x-pack/plugins/lists/server/services/extension_points/extension_point_storage.mock.ts b/x-pack/solutions/security/plugins/lists/server/services/extension_points/extension_point_storage.mock.ts similarity index 100% rename from x-pack/plugins/lists/server/services/extension_points/extension_point_storage.mock.ts rename to x-pack/solutions/security/plugins/lists/server/services/extension_points/extension_point_storage.mock.ts diff --git a/x-pack/plugins/lists/server/services/extension_points/extension_point_storage.test.ts b/x-pack/solutions/security/plugins/lists/server/services/extension_points/extension_point_storage.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/extension_points/extension_point_storage.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/extension_points/extension_point_storage.test.ts diff --git a/x-pack/plugins/lists/server/services/extension_points/extension_point_storage.ts b/x-pack/solutions/security/plugins/lists/server/services/extension_points/extension_point_storage.ts similarity index 100% rename from x-pack/plugins/lists/server/services/extension_points/extension_point_storage.ts rename to x-pack/solutions/security/plugins/lists/server/services/extension_points/extension_point_storage.ts diff --git a/x-pack/plugins/lists/server/services/extension_points/extension_point_storage_client.test.ts b/x-pack/solutions/security/plugins/lists/server/services/extension_points/extension_point_storage_client.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/extension_points/extension_point_storage_client.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/extension_points/extension_point_storage_client.test.ts diff --git a/x-pack/plugins/lists/server/services/extension_points/extension_point_storage_client.ts b/x-pack/solutions/security/plugins/lists/server/services/extension_points/extension_point_storage_client.ts similarity index 100% rename from x-pack/plugins/lists/server/services/extension_points/extension_point_storage_client.ts rename to x-pack/solutions/security/plugins/lists/server/services/extension_points/extension_point_storage_client.ts diff --git a/x-pack/plugins/lists/server/services/extension_points/index.ts b/x-pack/solutions/security/plugins/lists/server/services/extension_points/index.ts similarity index 100% rename from x-pack/plugins/lists/server/services/extension_points/index.ts rename to x-pack/solutions/security/plugins/lists/server/services/extension_points/index.ts diff --git a/x-pack/plugins/lists/server/services/extension_points/types.ts b/x-pack/solutions/security/plugins/lists/server/services/extension_points/types.ts similarity index 100% rename from x-pack/plugins/lists/server/services/extension_points/types.ts rename to x-pack/solutions/security/plugins/lists/server/services/extension_points/types.ts diff --git a/x-pack/plugins/lists/server/services/items/buffer_lines.test.ts b/x-pack/solutions/security/plugins/lists/server/services/items/buffer_lines.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/buffer_lines.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/buffer_lines.test.ts diff --git a/x-pack/plugins/lists/server/services/items/buffer_lines.ts b/x-pack/solutions/security/plugins/lists/server/services/items/buffer_lines.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/buffer_lines.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/buffer_lines.ts diff --git a/x-pack/plugins/lists/server/services/items/create_list_item.mock.ts b/x-pack/solutions/security/plugins/lists/server/services/items/create_list_item.mock.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/create_list_item.mock.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/create_list_item.mock.ts diff --git a/x-pack/plugins/lists/server/services/items/create_list_item.test.ts b/x-pack/solutions/security/plugins/lists/server/services/items/create_list_item.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/create_list_item.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/create_list_item.test.ts diff --git a/x-pack/plugins/lists/server/services/items/create_list_item.ts b/x-pack/solutions/security/plugins/lists/server/services/items/create_list_item.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/create_list_item.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/create_list_item.ts diff --git a/x-pack/plugins/lists/server/services/items/create_list_items_bulk.mock.ts b/x-pack/solutions/security/plugins/lists/server/services/items/create_list_items_bulk.mock.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/create_list_items_bulk.mock.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/create_list_items_bulk.mock.ts diff --git a/x-pack/plugins/lists/server/services/items/create_list_items_bulk.test.ts b/x-pack/solutions/security/plugins/lists/server/services/items/create_list_items_bulk.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/create_list_items_bulk.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/create_list_items_bulk.test.ts diff --git a/x-pack/plugins/lists/server/services/items/create_list_items_bulk.ts b/x-pack/solutions/security/plugins/lists/server/services/items/create_list_items_bulk.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/create_list_items_bulk.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/create_list_items_bulk.ts diff --git a/x-pack/plugins/lists/server/services/items/delete_list_item.mock.ts b/x-pack/solutions/security/plugins/lists/server/services/items/delete_list_item.mock.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/delete_list_item.mock.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/delete_list_item.mock.ts diff --git a/x-pack/plugins/lists/server/services/items/delete_list_item.test.ts b/x-pack/solutions/security/plugins/lists/server/services/items/delete_list_item.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/delete_list_item.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/delete_list_item.test.ts diff --git a/x-pack/plugins/lists/server/services/items/delete_list_item.ts b/x-pack/solutions/security/plugins/lists/server/services/items/delete_list_item.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/delete_list_item.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/delete_list_item.ts diff --git a/x-pack/plugins/lists/server/services/items/delete_list_item_by_value.mock.ts b/x-pack/solutions/security/plugins/lists/server/services/items/delete_list_item_by_value.mock.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/delete_list_item_by_value.mock.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/delete_list_item_by_value.mock.ts diff --git a/x-pack/plugins/lists/server/services/items/delete_list_item_by_value.test.ts b/x-pack/solutions/security/plugins/lists/server/services/items/delete_list_item_by_value.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/delete_list_item_by_value.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/delete_list_item_by_value.test.ts diff --git a/x-pack/plugins/lists/server/services/items/delete_list_item_by_value.ts b/x-pack/solutions/security/plugins/lists/server/services/items/delete_list_item_by_value.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/delete_list_item_by_value.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/delete_list_item_by_value.ts diff --git a/x-pack/plugins/lists/server/services/items/find_all_list_items.mock.ts b/x-pack/solutions/security/plugins/lists/server/services/items/find_all_list_items.mock.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/find_all_list_items.mock.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/find_all_list_items.mock.ts diff --git a/x-pack/plugins/lists/server/services/items/find_all_list_items.test.ts b/x-pack/solutions/security/plugins/lists/server/services/items/find_all_list_items.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/find_all_list_items.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/find_all_list_items.test.ts diff --git a/x-pack/plugins/lists/server/services/items/find_all_list_items.ts b/x-pack/solutions/security/plugins/lists/server/services/items/find_all_list_items.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/find_all_list_items.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/find_all_list_items.ts diff --git a/x-pack/plugins/lists/server/services/items/find_list_item.mock.ts b/x-pack/solutions/security/plugins/lists/server/services/items/find_list_item.mock.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/find_list_item.mock.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/find_list_item.mock.ts diff --git a/x-pack/plugins/lists/server/services/items/find_list_item.test.ts b/x-pack/solutions/security/plugins/lists/server/services/items/find_list_item.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/find_list_item.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/find_list_item.test.ts diff --git a/x-pack/plugins/lists/server/services/items/find_list_item.ts b/x-pack/solutions/security/plugins/lists/server/services/items/find_list_item.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/find_list_item.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/find_list_item.ts diff --git a/x-pack/plugins/lists/server/services/items/get_list_item.test.ts b/x-pack/solutions/security/plugins/lists/server/services/items/get_list_item.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/get_list_item.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/get_list_item.test.ts diff --git a/x-pack/plugins/lists/server/services/items/get_list_item.ts b/x-pack/solutions/security/plugins/lists/server/services/items/get_list_item.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/get_list_item.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/get_list_item.ts diff --git a/x-pack/plugins/lists/server/services/items/get_list_item_by_value.mock.ts b/x-pack/solutions/security/plugins/lists/server/services/items/get_list_item_by_value.mock.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/get_list_item_by_value.mock.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/get_list_item_by_value.mock.ts diff --git a/x-pack/plugins/lists/server/services/items/get_list_item_by_value.test.ts b/x-pack/solutions/security/plugins/lists/server/services/items/get_list_item_by_value.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/get_list_item_by_value.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/get_list_item_by_value.test.ts diff --git a/x-pack/plugins/lists/server/services/items/get_list_item_by_value.ts b/x-pack/solutions/security/plugins/lists/server/services/items/get_list_item_by_value.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/get_list_item_by_value.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/get_list_item_by_value.ts diff --git a/x-pack/plugins/lists/server/services/items/get_list_item_by_values.mock.ts b/x-pack/solutions/security/plugins/lists/server/services/items/get_list_item_by_values.mock.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/get_list_item_by_values.mock.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/get_list_item_by_values.mock.ts diff --git a/x-pack/plugins/lists/server/services/items/get_list_item_by_values.test.ts b/x-pack/solutions/security/plugins/lists/server/services/items/get_list_item_by_values.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/get_list_item_by_values.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/get_list_item_by_values.test.ts diff --git a/x-pack/plugins/lists/server/services/items/get_list_item_by_values.ts b/x-pack/solutions/security/plugins/lists/server/services/items/get_list_item_by_values.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/get_list_item_by_values.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/get_list_item_by_values.ts diff --git a/x-pack/plugins/lists/server/services/items/get_list_item_index.test.ts b/x-pack/solutions/security/plugins/lists/server/services/items/get_list_item_index.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/get_list_item_index.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/get_list_item_index.test.ts diff --git a/x-pack/plugins/lists/server/services/items/get_list_item_index.ts b/x-pack/solutions/security/plugins/lists/server/services/items/get_list_item_index.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/get_list_item_index.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/get_list_item_index.ts diff --git a/x-pack/plugins/lists/server/services/items/get_list_item_template.test.ts b/x-pack/solutions/security/plugins/lists/server/services/items/get_list_item_template.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/get_list_item_template.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/get_list_item_template.test.ts diff --git a/x-pack/plugins/lists/server/services/items/get_list_item_template.ts b/x-pack/solutions/security/plugins/lists/server/services/items/get_list_item_template.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/get_list_item_template.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/get_list_item_template.ts diff --git a/x-pack/plugins/lists/server/services/items/index.ts b/x-pack/solutions/security/plugins/lists/server/services/items/index.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/index.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/index.ts diff --git a/x-pack/plugins/lists/server/services/items/list_item_mappings.json b/x-pack/solutions/security/plugins/lists/server/services/items/list_item_mappings.json similarity index 100% rename from x-pack/plugins/lists/server/services/items/list_item_mappings.json rename to x-pack/solutions/security/plugins/lists/server/services/items/list_item_mappings.json diff --git a/x-pack/plugins/lists/server/services/items/list_item_policy.json b/x-pack/solutions/security/plugins/lists/server/services/items/list_item_policy.json similarity index 100% rename from x-pack/plugins/lists/server/services/items/list_item_policy.json rename to x-pack/solutions/security/plugins/lists/server/services/items/list_item_policy.json diff --git a/x-pack/plugins/lists/server/services/items/search_list_item_by_values.mock.ts b/x-pack/solutions/security/plugins/lists/server/services/items/search_list_item_by_values.mock.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/search_list_item_by_values.mock.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/search_list_item_by_values.mock.ts diff --git a/x-pack/plugins/lists/server/services/items/search_list_item_by_values.test.ts b/x-pack/solutions/security/plugins/lists/server/services/items/search_list_item_by_values.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/search_list_item_by_values.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/search_list_item_by_values.test.ts diff --git a/x-pack/plugins/lists/server/services/items/search_list_item_by_values.ts b/x-pack/solutions/security/plugins/lists/server/services/items/search_list_item_by_values.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/search_list_item_by_values.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/search_list_item_by_values.ts diff --git a/x-pack/plugins/lists/server/services/items/test_readable.mock.ts b/x-pack/solutions/security/plugins/lists/server/services/items/test_readable.mock.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/test_readable.mock.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/test_readable.mock.ts diff --git a/x-pack/plugins/lists/server/services/items/update_list_item.mock.ts b/x-pack/solutions/security/plugins/lists/server/services/items/update_list_item.mock.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/update_list_item.mock.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/update_list_item.mock.ts diff --git a/x-pack/plugins/lists/server/services/items/update_list_item.test.ts b/x-pack/solutions/security/plugins/lists/server/services/items/update_list_item.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/update_list_item.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/update_list_item.test.ts diff --git a/x-pack/plugins/lists/server/services/items/update_list_item.ts b/x-pack/solutions/security/plugins/lists/server/services/items/update_list_item.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/update_list_item.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/update_list_item.ts diff --git a/x-pack/plugins/lists/server/services/items/write_lines_to_bulk_list_items.mock.ts b/x-pack/solutions/security/plugins/lists/server/services/items/write_lines_to_bulk_list_items.mock.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/write_lines_to_bulk_list_items.mock.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/write_lines_to_bulk_list_items.mock.ts diff --git a/x-pack/plugins/lists/server/services/items/write_lines_to_bulk_list_items.test.ts b/x-pack/solutions/security/plugins/lists/server/services/items/write_lines_to_bulk_list_items.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/write_lines_to_bulk_list_items.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/write_lines_to_bulk_list_items.test.ts diff --git a/x-pack/plugins/lists/server/services/items/write_lines_to_bulk_list_items.ts b/x-pack/solutions/security/plugins/lists/server/services/items/write_lines_to_bulk_list_items.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/write_lines_to_bulk_list_items.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/write_lines_to_bulk_list_items.ts diff --git a/x-pack/plugins/lists/server/services/items/write_list_items_to_stream.test.ts b/x-pack/solutions/security/plugins/lists/server/services/items/write_list_items_to_stream.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/write_list_items_to_stream.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/write_list_items_to_stream.test.ts diff --git a/x-pack/plugins/lists/server/services/items/write_list_items_to_stream.ts b/x-pack/solutions/security/plugins/lists/server/services/items/write_list_items_to_stream.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/write_list_items_to_stream.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/write_list_items_to_stream.ts diff --git a/x-pack/plugins/lists/server/services/items/write_list_items_to_streams.mock.ts b/x-pack/solutions/security/plugins/lists/server/services/items/write_list_items_to_streams.mock.ts similarity index 100% rename from x-pack/plugins/lists/server/services/items/write_list_items_to_streams.mock.ts rename to x-pack/solutions/security/plugins/lists/server/services/items/write_list_items_to_streams.mock.ts diff --git a/x-pack/plugins/lists/server/services/lists/create_list.mock.ts b/x-pack/solutions/security/plugins/lists/server/services/lists/create_list.mock.ts similarity index 100% rename from x-pack/plugins/lists/server/services/lists/create_list.mock.ts rename to x-pack/solutions/security/plugins/lists/server/services/lists/create_list.mock.ts diff --git a/x-pack/plugins/lists/server/services/lists/create_list.test.ts b/x-pack/solutions/security/plugins/lists/server/services/lists/create_list.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/lists/create_list.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/lists/create_list.test.ts diff --git a/x-pack/plugins/lists/server/services/lists/create_list.ts b/x-pack/solutions/security/plugins/lists/server/services/lists/create_list.ts similarity index 100% rename from x-pack/plugins/lists/server/services/lists/create_list.ts rename to x-pack/solutions/security/plugins/lists/server/services/lists/create_list.ts diff --git a/x-pack/plugins/lists/server/services/lists/create_list_if_it_does_not_exist.ts b/x-pack/solutions/security/plugins/lists/server/services/lists/create_list_if_it_does_not_exist.ts similarity index 100% rename from x-pack/plugins/lists/server/services/lists/create_list_if_it_does_not_exist.ts rename to x-pack/solutions/security/plugins/lists/server/services/lists/create_list_if_it_does_not_exist.ts diff --git a/x-pack/plugins/lists/server/services/lists/delete_list.mock.ts b/x-pack/solutions/security/plugins/lists/server/services/lists/delete_list.mock.ts similarity index 100% rename from x-pack/plugins/lists/server/services/lists/delete_list.mock.ts rename to x-pack/solutions/security/plugins/lists/server/services/lists/delete_list.mock.ts diff --git a/x-pack/plugins/lists/server/services/lists/delete_list.test.ts b/x-pack/solutions/security/plugins/lists/server/services/lists/delete_list.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/lists/delete_list.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/lists/delete_list.test.ts diff --git a/x-pack/plugins/lists/server/services/lists/delete_list.ts b/x-pack/solutions/security/plugins/lists/server/services/lists/delete_list.ts similarity index 100% rename from x-pack/plugins/lists/server/services/lists/delete_list.ts rename to x-pack/solutions/security/plugins/lists/server/services/lists/delete_list.ts diff --git a/x-pack/plugins/lists/server/services/lists/find_list.ts b/x-pack/solutions/security/plugins/lists/server/services/lists/find_list.ts similarity index 100% rename from x-pack/plugins/lists/server/services/lists/find_list.ts rename to x-pack/solutions/security/plugins/lists/server/services/lists/find_list.ts diff --git a/x-pack/plugins/lists/server/services/lists/get_list.test.ts b/x-pack/solutions/security/plugins/lists/server/services/lists/get_list.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/lists/get_list.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/lists/get_list.test.ts diff --git a/x-pack/plugins/lists/server/services/lists/get_list.ts b/x-pack/solutions/security/plugins/lists/server/services/lists/get_list.ts similarity index 100% rename from x-pack/plugins/lists/server/services/lists/get_list.ts rename to x-pack/solutions/security/plugins/lists/server/services/lists/get_list.ts diff --git a/x-pack/plugins/lists/server/services/lists/get_list_index.test.ts b/x-pack/solutions/security/plugins/lists/server/services/lists/get_list_index.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/lists/get_list_index.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/lists/get_list_index.test.ts diff --git a/x-pack/plugins/lists/server/services/lists/get_list_index.ts b/x-pack/solutions/security/plugins/lists/server/services/lists/get_list_index.ts similarity index 100% rename from x-pack/plugins/lists/server/services/lists/get_list_index.ts rename to x-pack/solutions/security/plugins/lists/server/services/lists/get_list_index.ts diff --git a/x-pack/plugins/lists/server/services/lists/get_list_template.test.ts b/x-pack/solutions/security/plugins/lists/server/services/lists/get_list_template.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/lists/get_list_template.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/lists/get_list_template.test.ts diff --git a/x-pack/plugins/lists/server/services/lists/get_list_template.ts b/x-pack/solutions/security/plugins/lists/server/services/lists/get_list_template.ts similarity index 100% rename from x-pack/plugins/lists/server/services/lists/get_list_template.ts rename to x-pack/solutions/security/plugins/lists/server/services/lists/get_list_template.ts diff --git a/x-pack/plugins/lists/server/services/lists/index.ts b/x-pack/solutions/security/plugins/lists/server/services/lists/index.ts similarity index 100% rename from x-pack/plugins/lists/server/services/lists/index.ts rename to x-pack/solutions/security/plugins/lists/server/services/lists/index.ts diff --git a/x-pack/plugins/lists/server/services/lists/list_client.mock.ts b/x-pack/solutions/security/plugins/lists/server/services/lists/list_client.mock.ts similarity index 100% rename from x-pack/plugins/lists/server/services/lists/list_client.mock.ts rename to x-pack/solutions/security/plugins/lists/server/services/lists/list_client.mock.ts diff --git a/x-pack/plugins/lists/server/services/lists/list_client.test.ts b/x-pack/solutions/security/plugins/lists/server/services/lists/list_client.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/lists/list_client.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/lists/list_client.test.ts diff --git a/x-pack/plugins/lists/server/services/lists/list_client.ts b/x-pack/solutions/security/plugins/lists/server/services/lists/list_client.ts similarity index 100% rename from x-pack/plugins/lists/server/services/lists/list_client.ts rename to x-pack/solutions/security/plugins/lists/server/services/lists/list_client.ts diff --git a/x-pack/plugins/lists/server/services/lists/list_client_types.ts b/x-pack/solutions/security/plugins/lists/server/services/lists/list_client_types.ts similarity index 100% rename from x-pack/plugins/lists/server/services/lists/list_client_types.ts rename to x-pack/solutions/security/plugins/lists/server/services/lists/list_client_types.ts diff --git a/x-pack/plugins/lists/server/services/lists/list_mappings.json b/x-pack/solutions/security/plugins/lists/server/services/lists/list_mappings.json similarity index 100% rename from x-pack/plugins/lists/server/services/lists/list_mappings.json rename to x-pack/solutions/security/plugins/lists/server/services/lists/list_mappings.json diff --git a/x-pack/plugins/lists/server/services/lists/list_policy.json b/x-pack/solutions/security/plugins/lists/server/services/lists/list_policy.json similarity index 100% rename from x-pack/plugins/lists/server/services/lists/list_policy.json rename to x-pack/solutions/security/plugins/lists/server/services/lists/list_policy.json diff --git a/x-pack/plugins/lists/server/services/lists/types.ts b/x-pack/solutions/security/plugins/lists/server/services/lists/types.ts similarity index 100% rename from x-pack/plugins/lists/server/services/lists/types.ts rename to x-pack/solutions/security/plugins/lists/server/services/lists/types.ts diff --git a/x-pack/plugins/lists/server/services/lists/update_list.mock.ts b/x-pack/solutions/security/plugins/lists/server/services/lists/update_list.mock.ts similarity index 100% rename from x-pack/plugins/lists/server/services/lists/update_list.mock.ts rename to x-pack/solutions/security/plugins/lists/server/services/lists/update_list.mock.ts diff --git a/x-pack/plugins/lists/server/services/lists/update_list.test.ts b/x-pack/solutions/security/plugins/lists/server/services/lists/update_list.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/lists/update_list.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/lists/update_list.test.ts diff --git a/x-pack/plugins/lists/server/services/lists/update_list.ts b/x-pack/solutions/security/plugins/lists/server/services/lists/update_list.ts similarity index 100% rename from x-pack/plugins/lists/server/services/lists/update_list.ts rename to x-pack/solutions/security/plugins/lists/server/services/lists/update_list.ts diff --git a/x-pack/plugins/lists/server/services/utils/calculate_scroll_math.ts b/x-pack/solutions/security/plugins/lists/server/services/utils/calculate_scroll_math.ts similarity index 100% rename from x-pack/plugins/lists/server/services/utils/calculate_scroll_math.ts rename to x-pack/solutions/security/plugins/lists/server/services/utils/calculate_scroll_math.ts diff --git a/x-pack/plugins/lists/server/services/utils/check_version_conflict.ts b/x-pack/solutions/security/plugins/lists/server/services/utils/check_version_conflict.ts similarity index 100% rename from x-pack/plugins/lists/server/services/utils/check_version_conflict.ts rename to x-pack/solutions/security/plugins/lists/server/services/utils/check_version_conflict.ts diff --git a/x-pack/plugins/lists/server/services/utils/encode_decode_cursor.ts b/x-pack/solutions/security/plugins/lists/server/services/utils/encode_decode_cursor.ts similarity index 100% rename from x-pack/plugins/lists/server/services/utils/encode_decode_cursor.ts rename to x-pack/solutions/security/plugins/lists/server/services/utils/encode_decode_cursor.ts diff --git a/x-pack/plugins/lists/server/services/utils/escape_query.ts b/x-pack/solutions/security/plugins/lists/server/services/utils/escape_query.ts similarity index 100% rename from x-pack/plugins/lists/server/services/utils/escape_query.ts rename to x-pack/solutions/security/plugins/lists/server/services/utils/escape_query.ts diff --git a/x-pack/plugins/lists/server/services/utils/find_source_type.test.ts b/x-pack/solutions/security/plugins/lists/server/services/utils/find_source_type.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/utils/find_source_type.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/utils/find_source_type.test.ts diff --git a/x-pack/plugins/lists/server/services/utils/find_source_type.ts b/x-pack/solutions/security/plugins/lists/server/services/utils/find_source_type.ts similarity index 100% rename from x-pack/plugins/lists/server/services/utils/find_source_type.ts rename to x-pack/solutions/security/plugins/lists/server/services/utils/find_source_type.ts diff --git a/x-pack/plugins/lists/server/services/utils/find_source_value.test.ts b/x-pack/solutions/security/plugins/lists/server/services/utils/find_source_value.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/utils/find_source_value.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/utils/find_source_value.test.ts diff --git a/x-pack/plugins/lists/server/services/utils/find_source_value.ts b/x-pack/solutions/security/plugins/lists/server/services/utils/find_source_value.ts similarity index 100% rename from x-pack/plugins/lists/server/services/utils/find_source_value.ts rename to x-pack/solutions/security/plugins/lists/server/services/utils/find_source_value.ts diff --git a/x-pack/plugins/lists/server/services/utils/get_query_filter.test.ts b/x-pack/solutions/security/plugins/lists/server/services/utils/get_query_filter.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/utils/get_query_filter.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/utils/get_query_filter.test.ts diff --git a/x-pack/plugins/lists/server/services/utils/get_query_filter.ts b/x-pack/solutions/security/plugins/lists/server/services/utils/get_query_filter.ts similarity index 100% rename from x-pack/plugins/lists/server/services/utils/get_query_filter.ts rename to x-pack/solutions/security/plugins/lists/server/services/utils/get_query_filter.ts diff --git a/x-pack/plugins/lists/server/services/utils/get_query_filter_from_type_value.test.ts b/x-pack/solutions/security/plugins/lists/server/services/utils/get_query_filter_from_type_value.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/utils/get_query_filter_from_type_value.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/utils/get_query_filter_from_type_value.test.ts diff --git a/x-pack/plugins/lists/server/services/utils/get_query_filter_from_type_value.ts b/x-pack/solutions/security/plugins/lists/server/services/utils/get_query_filter_from_type_value.ts similarity index 100% rename from x-pack/plugins/lists/server/services/utils/get_query_filter_from_type_value.ts rename to x-pack/solutions/security/plugins/lists/server/services/utils/get_query_filter_from_type_value.ts diff --git a/x-pack/plugins/lists/server/services/utils/get_search_after_scroll.ts b/x-pack/solutions/security/plugins/lists/server/services/utils/get_search_after_scroll.ts similarity index 100% rename from x-pack/plugins/lists/server/services/utils/get_search_after_scroll.ts rename to x-pack/solutions/security/plugins/lists/server/services/utils/get_search_after_scroll.ts diff --git a/x-pack/plugins/lists/server/services/utils/get_search_after_with_tie_breaker.ts b/x-pack/solutions/security/plugins/lists/server/services/utils/get_search_after_with_tie_breaker.ts similarity index 100% rename from x-pack/plugins/lists/server/services/utils/get_search_after_with_tie_breaker.ts rename to x-pack/solutions/security/plugins/lists/server/services/utils/get_search_after_with_tie_breaker.ts diff --git a/x-pack/plugins/lists/server/services/utils/get_sort_with_tie_breaker.ts b/x-pack/solutions/security/plugins/lists/server/services/utils/get_sort_with_tie_breaker.ts similarity index 100% rename from x-pack/plugins/lists/server/services/utils/get_sort_with_tie_breaker.ts rename to x-pack/solutions/security/plugins/lists/server/services/utils/get_sort_with_tie_breaker.ts diff --git a/x-pack/plugins/lists/server/services/utils/get_source_with_tie_breaker.ts b/x-pack/solutions/security/plugins/lists/server/services/utils/get_source_with_tie_breaker.ts similarity index 100% rename from x-pack/plugins/lists/server/services/utils/get_source_with_tie_breaker.ts rename to x-pack/solutions/security/plugins/lists/server/services/utils/get_source_with_tie_breaker.ts diff --git a/x-pack/plugins/lists/server/services/utils/index.ts b/x-pack/solutions/security/plugins/lists/server/services/utils/index.ts similarity index 100% rename from x-pack/plugins/lists/server/services/utils/index.ts rename to x-pack/solutions/security/plugins/lists/server/services/utils/index.ts diff --git a/x-pack/plugins/lists/server/services/utils/scroll_to_start_page.ts b/x-pack/solutions/security/plugins/lists/server/services/utils/scroll_to_start_page.ts similarity index 100% rename from x-pack/plugins/lists/server/services/utils/scroll_to_start_page.ts rename to x-pack/solutions/security/plugins/lists/server/services/utils/scroll_to_start_page.ts diff --git a/x-pack/plugins/lists/server/services/utils/transform_elastic_named_search_to_list_item.test.ts b/x-pack/solutions/security/plugins/lists/server/services/utils/transform_elastic_named_search_to_list_item.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/utils/transform_elastic_named_search_to_list_item.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/utils/transform_elastic_named_search_to_list_item.test.ts diff --git a/x-pack/plugins/lists/server/services/utils/transform_elastic_named_search_to_list_item.ts b/x-pack/solutions/security/plugins/lists/server/services/utils/transform_elastic_named_search_to_list_item.ts similarity index 100% rename from x-pack/plugins/lists/server/services/utils/transform_elastic_named_search_to_list_item.ts rename to x-pack/solutions/security/plugins/lists/server/services/utils/transform_elastic_named_search_to_list_item.ts diff --git a/x-pack/plugins/lists/server/services/utils/transform_elastic_to_list.ts b/x-pack/solutions/security/plugins/lists/server/services/utils/transform_elastic_to_list.ts similarity index 100% rename from x-pack/plugins/lists/server/services/utils/transform_elastic_to_list.ts rename to x-pack/solutions/security/plugins/lists/server/services/utils/transform_elastic_to_list.ts diff --git a/x-pack/plugins/lists/server/services/utils/transform_elastic_to_list_item.test.ts b/x-pack/solutions/security/plugins/lists/server/services/utils/transform_elastic_to_list_item.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/utils/transform_elastic_to_list_item.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/utils/transform_elastic_to_list_item.test.ts diff --git a/x-pack/plugins/lists/server/services/utils/transform_elastic_to_list_item.ts b/x-pack/solutions/security/plugins/lists/server/services/utils/transform_elastic_to_list_item.ts similarity index 100% rename from x-pack/plugins/lists/server/services/utils/transform_elastic_to_list_item.ts rename to x-pack/solutions/security/plugins/lists/server/services/utils/transform_elastic_to_list_item.ts diff --git a/x-pack/plugins/lists/server/services/utils/transform_list_item_to_elastic_query.test.ts b/x-pack/solutions/security/plugins/lists/server/services/utils/transform_list_item_to_elastic_query.test.ts similarity index 100% rename from x-pack/plugins/lists/server/services/utils/transform_list_item_to_elastic_query.test.ts rename to x-pack/solutions/security/plugins/lists/server/services/utils/transform_list_item_to_elastic_query.test.ts diff --git a/x-pack/plugins/lists/server/services/utils/transform_list_item_to_elastic_query.ts b/x-pack/solutions/security/plugins/lists/server/services/utils/transform_list_item_to_elastic_query.ts similarity index 100% rename from x-pack/plugins/lists/server/services/utils/transform_list_item_to_elastic_query.ts rename to x-pack/solutions/security/plugins/lists/server/services/utils/transform_list_item_to_elastic_query.ts diff --git a/x-pack/plugins/lists/server/services/utils/wait_until_document_indexed.ts b/x-pack/solutions/security/plugins/lists/server/services/utils/wait_until_document_indexed.ts similarity index 100% rename from x-pack/plugins/lists/server/services/utils/wait_until_document_indexed.ts rename to x-pack/solutions/security/plugins/lists/server/services/utils/wait_until_document_indexed.ts diff --git a/x-pack/plugins/lists/server/types.ts b/x-pack/solutions/security/plugins/lists/server/types.ts similarity index 100% rename from x-pack/plugins/lists/server/types.ts rename to x-pack/solutions/security/plugins/lists/server/types.ts diff --git a/x-pack/plugins/lists/tsconfig.json b/x-pack/solutions/security/plugins/lists/tsconfig.json similarity index 96% rename from x-pack/plugins/lists/tsconfig.json rename to x-pack/solutions/security/plugins/lists/tsconfig.json index 61229d39bdbd..c0f751d665ee 100644 --- a/x-pack/plugins/lists/tsconfig.json +++ b/x-pack/solutions/security/plugins/lists/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types" }, diff --git a/x-pack/solutions/security/plugins/security_solution/docs/openapi/README.md b/x-pack/solutions/security/plugins/security_solution/docs/openapi/README.md index 4c3b55c8ab23..3cbe1c1f4233 100644 --- a/x-pack/solutions/security/plugins/security_solution/docs/openapi/README.md +++ b/x-pack/solutions/security/plugins/security_solution/docs/openapi/README.md @@ -32,8 +32,8 @@ Security Solution has multiple API domains scattered across Kibana. Currently th - Security Endpoint Exceptions - - Bundling script: `packages/kbn-securitysolution-endpoint-exceptions-common/scripts/openapi_bundle.js` - - Bundles location: `packages/kbn-securitysolution-endpoint-exceptions-common/docs/openapi/{ess|serverless}` + - Bundling script: `x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/scripts/openapi_bundle.js` + - Bundles location: `x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/docs/openapi/{ess|serverless}` - Security Endpoint Management @@ -47,13 +47,13 @@ Security Solution has multiple API domains scattered across Kibana. Currently th - Security Security Exceptions - - Bundling script: `packages/kbn-securitysolution-exceptions-common/scripts/openapi_bundle.js` - - Bundles location: `packages/kbn-securitysolution-exceptions-common/docs/openapi/{ess|serverless}` + - Bundling script: `x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/scripts/openapi_bundle.js` + - Bundles location: `x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/docs/openapi/{ess|serverless}` - Security Lists - - Bundling script: `packages/kbn-securitysolution-lists-common/scripts/openapi_bundle.js` - - Bundles location: `packages/kbn-securitysolution-lists-common/docs/openapi/{ess|serverless}` + - Bundling script: `x-pack/solutions/security/packages/kbn-securitysolution-lists-common/scripts/openapi_bundle.js` + - Bundles location: `x-pack/solutions/security/packages/kbn-securitysolution-lists-common/docs/openapi/{ess|serverless}` - Security Osquery diff --git a/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/README.md b/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/README.md index f159a2c5b248..b60033b73177 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/README.md +++ b/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/README.md @@ -172,5 +172,5 @@ To test out the functionality of large lists with rules, the user will need to i * First, set the appropriate env var in order to enable exceptions features`export ELASTIC_XPACK_SECURITY_SOLUTION_LISTS_FEATURE=true` and `export ELASTIC_XPACK_SECURITY_SOLUTION_EXCEPTIONS_LISTS=true` and start kibana * Second, import a list of ips from a file called `ci-badguys.txt`. The command should look like this: -`cd $HOME/kibana/x-pack/plugins/lists/server/scripts && ./import_list_items_by_filename.sh ip ~/ci-badguys.txt` +`cd $HOME/kibana/x-pack/solutions/security/plugins/lists/server/scripts && ./import_list_items_by_filename.sh ip ~/ci-badguys.txt` * Then, from the detection engine scripts folder (`cd kibana/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/scripts`) run `./post_rule.sh rules/queries/lists/query_with_list_plugin.json` diff --git a/yarn.lock b/yarn.lock index 561c7c92280e..4e68732c9f81 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6137,7 +6137,7 @@ version "0.0.0" uid "" -"@kbn/lists-plugin@link:x-pack/plugins/lists": +"@kbn/lists-plugin@link:x-pack/solutions/security/plugins/lists": version "0.0.0" uid "" @@ -7129,7 +7129,7 @@ version "0.0.0" uid "" -"@kbn/securitysolution-autocomplete@link:packages/kbn-securitysolution-autocomplete": +"@kbn/securitysolution-autocomplete@link:x-pack/solutions/security/packages/kbn-securitysolution-autocomplete": version "0.0.0" uid "" @@ -7141,71 +7141,71 @@ version "0.0.0" uid "" -"@kbn/securitysolution-endpoint-exceptions-common@link:packages/kbn-securitysolution-endpoint-exceptions-common": +"@kbn/securitysolution-endpoint-exceptions-common@link:x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common": version "0.0.0" uid "" -"@kbn/securitysolution-es-utils@link:packages/kbn-securitysolution-es-utils": +"@kbn/securitysolution-es-utils@link:src/platform/packages/shared/kbn-securitysolution-es-utils": version "0.0.0" uid "" -"@kbn/securitysolution-exception-list-components@link:packages/kbn-securitysolution-exception-list-components": +"@kbn/securitysolution-exception-list-components@link:x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components": version "0.0.0" uid "" -"@kbn/securitysolution-exceptions-common@link:packages/kbn-securitysolution-exceptions-common": +"@kbn/securitysolution-exceptions-common@link:x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common": version "0.0.0" uid "" -"@kbn/securitysolution-hook-utils@link:packages/kbn-securitysolution-hook-utils": +"@kbn/securitysolution-hook-utils@link:x-pack/solutions/security/packages/kbn-securitysolution-hook-utils": version "0.0.0" uid "" -"@kbn/securitysolution-io-ts-alerting-types@link:packages/kbn-securitysolution-io-ts-alerting-types": +"@kbn/securitysolution-io-ts-alerting-types@link:x-pack/solutions/security/packages/kbn-securitysolution-io-ts-alerting-types": version "0.0.0" uid "" -"@kbn/securitysolution-io-ts-list-types@link:packages/kbn-securitysolution-io-ts-list-types": +"@kbn/securitysolution-io-ts-list-types@link:x-pack/solutions/security/packages/kbn-securitysolution-io-ts-list-types": version "0.0.0" uid "" -"@kbn/securitysolution-io-ts-types@link:packages/kbn-securitysolution-io-ts-types": +"@kbn/securitysolution-io-ts-types@link:src/platform/packages/shared/kbn-securitysolution-io-ts-types": version "0.0.0" uid "" -"@kbn/securitysolution-io-ts-utils@link:packages/kbn-securitysolution-io-ts-utils": +"@kbn/securitysolution-io-ts-utils@link:src/platform/packages/shared/kbn-securitysolution-io-ts-utils": version "0.0.0" uid "" -"@kbn/securitysolution-list-api@link:packages/kbn-securitysolution-list-api": +"@kbn/securitysolution-list-api@link:x-pack/solutions/security/packages/kbn-securitysolution-list-api": version "0.0.0" uid "" -"@kbn/securitysolution-list-constants@link:packages/kbn-securitysolution-list-constants": +"@kbn/securitysolution-list-constants@link:x-pack/solutions/security/packages/kbn-securitysolution-list-constants": version "0.0.0" uid "" -"@kbn/securitysolution-list-hooks@link:packages/kbn-securitysolution-list-hooks": +"@kbn/securitysolution-list-hooks@link:x-pack/solutions/security/packages/kbn-securitysolution-list-hooks": version "0.0.0" uid "" -"@kbn/securitysolution-list-utils@link:packages/kbn-securitysolution-list-utils": +"@kbn/securitysolution-list-utils@link:x-pack/solutions/security/packages/kbn-securitysolution-list-utils": version "0.0.0" uid "" -"@kbn/securitysolution-lists-common@link:packages/kbn-securitysolution-lists-common": +"@kbn/securitysolution-lists-common@link:x-pack/solutions/security/packages/kbn-securitysolution-lists-common": version "0.0.0" uid "" -"@kbn/securitysolution-rules@link:packages/kbn-securitysolution-rules": +"@kbn/securitysolution-rules@link:src/platform/packages/shared/kbn-securitysolution-rules": version "0.0.0" uid "" -"@kbn/securitysolution-t-grid@link:packages/kbn-securitysolution-t-grid": +"@kbn/securitysolution-t-grid@link:x-pack/solutions/security/packages/kbn-securitysolution-t-grid": version "0.0.0" uid "" -"@kbn/securitysolution-utils@link:packages/kbn-securitysolution-utils": +"@kbn/securitysolution-utils@link:x-pack/solutions/security/packages/kbn-securitysolution-utils": version "0.0.0" uid "" From ff64557c8f51cd2da2429649024b0f2db75683ed Mon Sep 17 00:00:00 2001 From: christineweng <18648970+christineweng@users.noreply.github.com> Date: Tue, 17 Dec 2024 16:17:50 -0600 Subject: [PATCH 16/60] [Security Solution] Remove feature flag `entityAlertPreviewDisabled` (#203171) ## Summary This PR removes the feature flag `entityAlertPreviewDisabled` and cleaned up related unit tests. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --- .../common/experimental_features.ts | 5 -- .../tabs/risk_inputs/risk_inputs.test.tsx | 31 +--------- .../tabs/risk_inputs/risk_inputs_tab.tsx | 31 ++++------ ...correlations_details_alerts_table.test.tsx | 19 ++----- .../correlations_details_alerts_table.tsx | 53 +++++++----------- .../left/components/host_details.test.tsx | 19 ++----- .../left/components/host_details.tsx | 46 ++++++--------- .../components/prevalence_details.test.tsx | 12 +--- .../left/components/prevalence_details.tsx | 11 +--- .../left/components/user_details.test.tsx | 19 ++----- .../left/components/user_details.tsx | 46 ++++++--------- .../highlighted_fields_cell.test.tsx | 33 ++--------- .../components/highlighted_fields_cell.tsx | 38 ++----------- .../components/host_entity_overview.test.tsx | 29 +--------- .../right/components/host_entity_overview.tsx | 55 ++++-------------- .../table_field_value_cell.test.tsx | 7 +-- .../components/table_field_value_cell.tsx | 4 +- .../components/user_entity_overview.test.tsx | 35 +----------- .../right/components/user_entity_overview.tsx | 56 ++++--------------- 19 files changed, 124 insertions(+), 425 deletions(-) diff --git a/x-pack/solutions/security/plugins/security_solution/common/experimental_features.ts b/x-pack/solutions/security/plugins/security_solution/common/experimental_features.ts index b09e8cae5391..56f4657500c4 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/experimental_features.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/experimental_features.ts @@ -109,11 +109,6 @@ export const allowedExperimentalValues = Object.freeze({ */ securitySolutionNotesDisabled: false, - /** - * Disables entity and alert previews - */ - entityAlertPreviewDisabled: false, - /** * Enables the Assistant Model Evaluation advanced setting and API endpoint, introduced in `8.11.0`. */ diff --git a/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs.test.tsx b/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs.test.tsx index 6995656db31a..7ff2a6feb958 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs.test.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs.test.tsx @@ -49,12 +49,6 @@ const riskScore = { }, }; -const mockUseIsExperimentalFeatureEnabled = jest.fn().mockReturnValue(false); - -jest.mock('../../../../../common/hooks/use_experimental_features', () => ({ - useIsExperimentalFeatureEnabled: () => mockUseIsExperimentalFeatureEnabled(), -})); - const riskScoreWithAssetCriticalityContribution = (contribution: number) => { const score = JSON.parse(JSON.stringify(riskScore)); score.user.risk.category_2_score = contribution; @@ -129,8 +123,7 @@ describe('RiskInputsTab', () => { expect(queryByTestId('risk-input-contexts-title')).toBeInTheDocument(); }); - it('it renders alert preview button when feature flag is enable', () => { - mockUseIsExperimentalFeatureEnabled.mockReturnValue(false); + it('it renders alert preview button', () => { mockUseRiskScore.mockReturnValue({ loading: false, error: false, @@ -151,28 +144,6 @@ describe('RiskInputsTab', () => { expect(getByTestId(EXPAND_ALERT_TEST_ID)).toBeInTheDocument(); }); - it('it does not render alert preview button when feature flag is disable', () => { - mockUseIsExperimentalFeatureEnabled.mockReturnValue(true); - mockUseRiskScore.mockReturnValue({ - loading: false, - error: false, - data: [riskScore], - }); - mockUseRiskContributingAlerts.mockReturnValue({ - loading: false, - error: false, - data: [alertInputDataMock], - }); - - const { queryByTestId } = render( - - - - ); - - expect(queryByTestId(EXPAND_ALERT_TEST_ID)).not.toBeInTheDocument(); - }); - it('Displays 0.00 for the asset criticality contribution if the contribution value is less than -0.01', () => { mockUseUiSetting.mockReturnValue([true]); diff --git a/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs_tab.tsx b/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs_tab.tsx index 78010434ee59..72a6af0fe768 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs_tab.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs_tab.tsx @@ -14,7 +14,6 @@ import { ALERT_RULE_NAME } from '@kbn/rule-data-utils'; import { get } from 'lodash/fp'; import { AlertPreviewButton } from '../../../../../flyout/shared/components/alert_preview_button'; -import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; import { useGlobalTime } from '../../../../../common/containers/use_global_time'; import { useQueryInspector } from '../../../../../common/components/page/manage_query'; import { formatRiskScore } from '../../../../common'; @@ -98,26 +97,20 @@ export const RiskInputsTab = ({ entityType, entityName, scopeId }: RiskInputsTab }), [] ); - const isPreviewEnabled = !useIsExperimentalFeatureEnabled('entityAlertPreviewDisabled'); const inputColumns: Array> = useMemo( () => [ - ...(isPreviewEnabled - ? [ - { - render: (data: InputAlert) => ( - - ), - width: '5%', - }, - ] - : []), - + { + render: (data: InputAlert) => ( + + ), + width: '5%', + }, { name: ( describe('CorrelationsDetailsAlertsTable', () => { beforeEach(() => { jest.mocked(useExpandableFlyoutApi).mockReturnValue(mockFlyoutApi); - mockUseIsExperimentalFeatureEnabled.mockReturnValue(true); jest.mocked(usePaginatedAlerts).mockReturnValue({ setPagination: jest.fn(), setSorting: jest.fn(), @@ -88,16 +84,16 @@ describe('CorrelationsDetailsAlertsTable', () => { }); it('renders EuiBasicTable with correct props', () => { - const { getByTestId, queryByTestId, queryAllByRole } = + const { getByTestId, getAllByTestId, queryAllByRole } = renderCorrelationsTable(mockContextValue); expect(getByTestId(`${TEST_ID}InvestigateInTimeline`)).toBeInTheDocument(); expect(getByTestId(`${TEST_ID}Table`)).toBeInTheDocument(); - expect(queryByTestId(`${TEST_ID}AlertPreviewButton`)).not.toBeInTheDocument(); + expect(getAllByTestId(`${TEST_ID}AlertPreviewButton`)).toHaveLength(2); expect(jest.mocked(usePaginatedAlerts)).toHaveBeenCalled(); - expect(queryAllByRole('columnheader').length).toBe(4); + expect(queryAllByRole('columnheader').length).toBe(5); expect(queryAllByRole('row').length).toBe(3); // 1 header row and 2 data rows expect(queryAllByRole('row')[1].textContent).toContain('Jan 1, 2022 @ 00:00:00.000'); expect(queryAllByRole('row')[1].textContent).toContain('Reason1'); @@ -105,8 +101,7 @@ describe('CorrelationsDetailsAlertsTable', () => { expect(queryAllByRole('row')[1].textContent).toContain('Severity1'); }); - it('renders open preview button when feature flag is on', () => { - mockUseIsExperimentalFeatureEnabled.mockReturnValue(false); + it('renders open preview button', () => { const { getByTestId, getAllByTestId } = renderCorrelationsTable({ ...mockContextValue, isPreviewMode: true, @@ -128,8 +123,7 @@ describe('CorrelationsDetailsAlertsTable', () => { }); }); - it('opens rule preview when feature flag is on and isPreview is false', () => { - mockUseIsExperimentalFeatureEnabled.mockReturnValue(false); + it('opens rule preview when isPreview is false', () => { const { getAllByTestId } = renderCorrelationsTable(mockContextValue); expect(getAllByTestId(`${TEST_ID}RulePreview`).length).toBe(2); @@ -145,8 +139,7 @@ describe('CorrelationsDetailsAlertsTable', () => { }); }); - it('does not render preview link when feature flag is on and isPreview is true', () => { - mockUseIsExperimentalFeatureEnabled.mockReturnValue(false); + it('does not render preview link when isPreview is true', () => { const { queryByTestId } = renderCorrelationsTable({ ...mockContextValue, isPreview: true }); expect(queryByTestId(`${TEST_ID}RulePreview`)).not.toBeInTheDocument(); }); diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/components/correlations_details_alerts_table.tsx b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/components/correlations_details_alerts_table.tsx index d8497ca984ea..4d757b46edb2 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/components/correlations_details_alerts_table.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/components/correlations_details_alerts_table.tsx @@ -14,7 +14,6 @@ import { isRight } from 'fp-ts/lib/Either'; import { ALERT_REASON, ALERT_RULE_NAME } from '@kbn/rule-data-utils'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; import { CellTooltipWrapper } from '../../shared/components/cell_tooltip_wrapper'; import type { DataProvider } from '../../../../../common/types'; import { SeverityBadge } from '../../../../common/components/severity_badge'; @@ -82,8 +81,6 @@ export const CorrelationsDetailsAlertsTable: FC [ - ...(isPreviewEnabled - ? [ - { - render: (row: Record) => ( - - ), - width: '5%', - }, - ] - : []), + { + render: (row: Record) => ( + + ), + width: '5%', + }, { field: '@timestamp', name: ( @@ -176,20 +169,16 @@ export const CorrelationsDetailsAlertsTable: FC - {isPreviewEnabled ? ( - - {ruleName} - - ) : ( + {ruleName} - )} + ); }, @@ -229,7 +218,7 @@ export const CorrelationsDetailsAlertsTable: FC { const actual = jest.requireActual('react-router-dom'); return { ...actual, useLocation: jest.fn().mockReturnValue({ pathname: '' }) }; @@ -180,20 +176,18 @@ describe('', () => { mockUseHostDetails.mockReturnValue(mockHostDetailsResponse); mockUseRiskScore.mockReturnValue(mockRiskScoreResponse); mockUseHostsRelatedUsers.mockReturnValue(mockRelatedUsersResponse); - mockUseIsExperimentalFeatureEnabled.mockReturnValue(true); (useMisconfigurationPreview as jest.Mock).mockReturnValue({}); (useVulnerabilitiesPreview as jest.Mock).mockReturnValue({}); (useAlertsByStatus as jest.Mock).mockReturnValue({ isLoading: false, items: {} }); }); it('should render host details correctly', () => { - const { getByTestId, queryByTestId } = renderHostDetails(mockContextValue); + const { getByTestId } = renderHostDetails(mockContextValue); expect(getByTestId(EXPANDABLE_PANEL_CONTENT_TEST_ID(HOST_DETAILS_TEST_ID))).toBeInTheDocument(); - expect(queryByTestId(HOST_DETAILS_LINK_TEST_ID)).not.toBeInTheDocument(); + expect(getByTestId(HOST_DETAILS_LINK_TEST_ID)).toBeInTheDocument(); }); - it('should render host name as clicable link when preview is not disabled', () => { - mockUseIsExperimentalFeatureEnabled.mockReturnValue(false); + it('should render host name as clicable link', () => { const { getByTestId } = renderHostDetails(mockContextValue); expect(getByTestId(HOST_DETAILS_LINK_TEST_ID)).toBeInTheDocument(); @@ -242,7 +236,7 @@ describe('', () => { describe('Related users', () => { it('should render the related user table with correct dates and indices', () => { - const { getByTestId, queryByTestId } = renderHostDetails(mockContextValue); + const { getByTestId } = renderHostDetails(mockContextValue); expect(mockUseHostsRelatedUsers).toBeCalledWith({ from: timestamp, hostName: 'test host', @@ -250,7 +244,7 @@ describe('', () => { skip: false, }); expect(getByTestId(HOST_DETAILS_RELATED_USERS_TABLE_TEST_ID)).toBeInTheDocument(); - expect(queryByTestId(HOST_DETAILS_RELATED_USERS_LINK_TEST_ID)).not.toBeInTheDocument(); + expect(getByTestId(HOST_DETAILS_RELATED_USERS_LINK_TEST_ID)).toBeInTheDocument(); }); it('should render user risk score column when license and capabilities are valid', () => { @@ -296,8 +290,7 @@ describe('', () => { ); }); - it('should render user name as clicable link when preview is not disabled', () => { - mockUseIsExperimentalFeatureEnabled.mockReturnValue(false); + it('should render user name as clicable link', () => { const { getAllByTestId } = renderHostDetails(mockContextValue); expect(getAllByTestId(HOST_DETAILS_RELATED_USERS_LINK_TEST_ID).length).toBe(1); diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/components/host_details.tsx b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/components/host_details.tsx index e3fd2fef8bc6..9555860a329b 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/components/host_details.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/components/host_details.tsx @@ -25,14 +25,12 @@ import type { EuiBasicTableColumn } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; import { ExpandablePanel } from '../../../shared/components/expandable_panel'; import type { RelatedUser } from '../../../../../common/search_strategy/security_solution/related_entities/related_users'; import type { RiskSeverity } from '../../../../../common/search_strategy'; import { HostOverview } from '../../../../overview/components/host_overview'; import { AnomalyTableProvider } from '../../../../common/components/ml/anomaly/anomaly_table_provider'; import { InspectButton, InspectButtonContainer } from '../../../../common/components/inspect'; -import { NetworkDetailsLink } from '../../../../common/components/links'; import { RiskScoreEntity } from '../../../../../common/search_strategy'; import { RiskScoreLevel } from '../../../../entity_analytics/components/severity/common'; import { DefaultFieldRenderer } from '../../../../timelines/components/field_renderers/default_renderer'; @@ -110,7 +108,6 @@ export const HostDetails: React.FC = ({ hostName, timestamp, s const isEntityAnalyticsAuthorized = isPlatinumOrTrialLicense && hasEntityAnalyticsCapability; const { openPreviewPanel } = useExpandableFlyoutApi(); - const isPreviewEnabled = !useIsExperimentalFeatureEnabled('entityAlertPreviewDisabled'); const narrowDateRange = useCallback( (score, interval) => { @@ -176,16 +173,12 @@ export const HostDetails: React.FC = ({ hostName, timestamp, s render: (user: string) => ( - {isPreviewEnabled ? ( - - ) : ( - <>{user} - )} + ), @@ -208,15 +201,13 @@ export const HostDetails: React.FC = ({ hostName, timestamp, s render={(ip) => ip == null ? ( getEmptyTagValue() - ) : isPreviewEnabled ? ( + ) : ( - ) : ( - ) } scopeId={scopeId} @@ -242,7 +233,7 @@ export const HostDetails: React.FC = ({ hostName, timestamp, s ] : []), ], - [isEntityAnalyticsAuthorized, scopeId, isPreviewEnabled] + [isEntityAnalyticsAuthorized, scopeId] ); const relatedUsersCount = useMemo( @@ -273,19 +264,14 @@ export const HostDetails: React.FC = ({ hostName, timestamp, s }; const hostLink = useMemo( - () => - isPreviewEnabled - ? { - callback: openHostPreview, - tooltip: i18n.translate( - 'xpack.securitySolution.flyout.left.insights.entities.host.hostPreviewTitle', - { - defaultMessage: 'Preview host', - } - ), - } - : undefined, - [isPreviewEnabled, openHostPreview] + () => ({ + callback: openHostPreview, + tooltip: i18n.translate( + 'xpack.securitySolution.flyout.left.insights.entities.host.hostPreviewTitle', + { defaultMessage: 'Preview host' } + ), + }), + [openHostPreview] ); return ( diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/components/prevalence_details.test.tsx b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/components/prevalence_details.test.tsx index e8b1b71e9cd0..e0bef746b213 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/components/prevalence_details.test.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/components/prevalence_details.test.tsx @@ -24,7 +24,6 @@ import { import { usePrevalence } from '../../shared/hooks/use_prevalence'; import { TestProviders } from '../../../../common/mock'; import { licenseService } from '../../../../common/hooks/use_license'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; import { mockFlyoutApi } from '../../shared/mocks/mock_flyout_context'; import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; import { HostPreviewPanelKey } from '../../../entity_details/host_right'; @@ -46,9 +45,6 @@ jest.mock('../../../../common/lib/kibana', () => { }; }); -jest.mock('../../../../common/hooks/use_experimental_features'); -const mockUseIsExperimentalFeatureEnabled = useIsExperimentalFeatureEnabled as jest.Mock; - jest.mock('../../shared/hooks/use_prevalence'); const mockDispatch = jest.fn(); @@ -138,7 +134,6 @@ describe('PrevalenceDetails', () => { jest.clearAllMocks(); licenseServiceMock.isPlatinumPlus.mockReturnValue(true); jest.mocked(useExpandableFlyoutApi).mockReturnValue(mockFlyoutApi); - mockUseIsExperimentalFeatureEnabled.mockReturnValue(true); }); it('should render the table with all data if license is platinum', () => { @@ -162,13 +157,10 @@ describe('PrevalenceDetails', () => { ).toBeGreaterThan(1); expect(queryByTestId(PREVALENCE_DETAILS_UPSELL_TEST_ID)).not.toBeInTheDocument(); expect(queryByText(NO_DATA_MESSAGE)).not.toBeInTheDocument(); - expect( - queryByTestId(PREVALENCE_DETAILS_TABLE_PREVIEW_LINK_CELL_TEST_ID) - ).not.toBeInTheDocument(); + expect(getAllByTestId(PREVALENCE_DETAILS_TABLE_PREVIEW_LINK_CELL_TEST_ID)).toHaveLength(2); }); - it('should render host and user name as clickable link if preview is enabled', () => { - mockUseIsExperimentalFeatureEnabled.mockReturnValue(false); + it('should render host and user name as clickable link', () => { (usePrevalence as jest.Mock).mockReturnValue(mockPrevelanceReturnValue); const { getAllByTestId } = renderPrevalenceDetails(); diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/components/prevalence_details.tsx b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/components/prevalence_details.tsx index 6491bc9ad274..77ab6eb66df3 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/components/prevalence_details.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/components/prevalence_details.tsx @@ -22,7 +22,6 @@ import { useEuiTheme, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; import { FormattedCount } from '../../../../common/components/formatted_number'; import { useLicense } from '../../../../common/hooks/use_license'; import { InvestigateInTimelineButton } from '../../../../common/components/event_details/investigate_in_timeline_button'; @@ -81,10 +80,6 @@ interface PrevalenceDetailsRow extends PrevalenceData { * License to drive the rendering of the last 2 prevalence columns */ isPlatinumPlus: boolean; - /** - * If enabled, clicking host or user should open an entity preview - */ - isPreviewEnabled: boolean; /** * Scope id to pass to the preview link */ @@ -115,7 +110,7 @@ const columns: Array> = [ render: (data: PrevalenceDetailsRow) => ( {data.values.map((value) => { - if (data.isPreviewEnabled && hasPreview(data.field)) { + if (hasPreview(data.field)) { return ( @@ -331,7 +326,6 @@ export const PrevalenceDetails: React.FC = () => { useDocumentDetailsContext(); const isPlatinumPlus = useLicense().isPlatinumPlus(); - const isPreviewEnabled = !useIsExperimentalFeatureEnabled('entityAlertPreviewDisabled'); // these two are used by the usePrevalence hook to fetch the data const [start, setStart] = useState(DEFAULT_FROM); @@ -382,10 +376,9 @@ export const PrevalenceDetails: React.FC = () => { from: absoluteStart, to: absoluteEnd, isPlatinumPlus, - isPreviewEnabled, scopeId, })), - [data, absoluteStart, absoluteEnd, isPlatinumPlus, isPreviewEnabled, scopeId] + [data, absoluteStart, absoluteEnd, isPlatinumPlus, scopeId] ); const upsell = ( diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/components/user_details.test.tsx b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/components/user_details.test.tsx index 5bfb8a7df50d..993e9101ba0f 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/components/user_details.test.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/components/user_details.test.tsx @@ -16,7 +16,6 @@ import { useMlCapabilities } from '../../../../common/components/ml/hooks/use_ml import { mockAnomalies } from '../../../../common/components/ml/mock'; import { useObservedUserDetails } from '../../../../explore/users/containers/users/observed_details'; import { useUserRelatedHosts } from '../../../../common/containers/related_entities/related_hosts'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; import { RiskSeverity } from '../../../../../common/search_strategy'; import { USER_DETAILS_TEST_ID, @@ -43,9 +42,6 @@ import { useAlertsByStatus } from '../../../../overview/components/detection_res jest.mock('@kbn/expandable-flyout'); jest.mock('@kbn/cloud-security-posture/src/hooks/use_misconfiguration_preview'); -jest.mock('../../../../common/hooks/use_experimental_features'); -const mockUseIsExperimentalFeatureEnabled = useIsExperimentalFeatureEnabled as jest.Mock; - jest.mock('react-router-dom', () => { const actual = jest.requireActual('react-router-dom'); return { ...actual, useLocation: jest.fn().mockReturnValue({ pathname: '' }) }; @@ -174,19 +170,17 @@ describe('', () => { mockUseObservedUserDetails.mockReturnValue(mockUserDetailsResponse); mockUseRiskScore.mockReturnValue(mockRiskScoreResponse); mockUseUsersRelatedHosts.mockReturnValue(mockRelatedHostsResponse); - mockUseIsExperimentalFeatureEnabled.mockReturnValue(true); (useMisconfigurationPreview as jest.Mock).mockReturnValue({}); (useAlertsByStatus as jest.Mock).mockReturnValue({ isLoading: false, items: {} }); }); it('should render user details correctly', () => { - const { getByTestId, queryByTestId } = renderUserDetails(mockContextValue); + const { getByTestId } = renderUserDetails(mockContextValue); expect(getByTestId(EXPANDABLE_PANEL_CONTENT_TEST_ID(USER_DETAILS_TEST_ID))).toBeInTheDocument(); - expect(queryByTestId(USER_DETAILS_LINK_TEST_ID)).not.toBeInTheDocument(); + expect(getByTestId(USER_DETAILS_LINK_TEST_ID)).toBeInTheDocument(); }); - it('should render user name as clicable link when feature flag is true', () => { - mockUseIsExperimentalFeatureEnabled.mockReturnValue(false); + it('should render user name as clicable link', () => { const { getByTestId } = renderUserDetails(mockContextValue); expect(getByTestId(USER_DETAILS_LINK_TEST_ID)).toBeInTheDocument(); @@ -233,7 +227,7 @@ describe('', () => { describe('Related hosts', () => { it('should render the related host table with correct dates and indices', () => { - const { getByTestId, queryByTestId } = renderUserDetails(mockContextValue); + const { getByTestId } = renderUserDetails(mockContextValue); expect(mockUseUsersRelatedHosts).toBeCalledWith({ from: timestamp, userName: 'test user', @@ -241,7 +235,7 @@ describe('', () => { skip: false, }); expect(getByTestId(USER_DETAILS_RELATED_HOSTS_TABLE_TEST_ID)).toBeInTheDocument(); - expect(queryByTestId(USER_DETAILS_RELATED_HOSTS_LINK_TEST_ID)).not.toBeInTheDocument(); + expect(getByTestId(USER_DETAILS_RELATED_HOSTS_LINK_TEST_ID)).toBeInTheDocument(); }); it('should render host risk score column when license is valid', () => { @@ -274,8 +268,7 @@ describe('', () => { ); }); - it('should render host name and ip as clicable link when preview is enabled', () => { - mockUseIsExperimentalFeatureEnabled.mockReturnValue(false); + it('should render host name and ip as clicable link', () => { const { getAllByTestId } = renderUserDetails(mockContextValue); expect(getAllByTestId(USER_DETAILS_RELATED_HOSTS_LINK_TEST_ID).length).toBe(1); diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/components/user_details.tsx b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/components/user_details.tsx index e88cbb54f947..00366a367a81 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/components/user_details.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/left/components/user_details.tsx @@ -25,14 +25,12 @@ import type { EuiBasicTableColumn } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; import { ExpandablePanel } from '../../../shared/components/expandable_panel'; import type { RelatedHost } from '../../../../../common/search_strategy/security_solution/related_entities/related_hosts'; import type { RiskSeverity } from '../../../../../common/search_strategy'; import { UserOverview } from '../../../../overview/components/user_overview'; import { AnomalyTableProvider } from '../../../../common/components/ml/anomaly/anomaly_table_provider'; import { InspectButton, InspectButtonContainer } from '../../../../common/components/inspect'; -import { NetworkDetailsLink } from '../../../../common/components/links'; import { RiskScoreEntity } from '../../../../../common/search_strategy'; import { RiskScoreLevel } from '../../../../entity_analytics/components/severity/common'; import { DefaultFieldRenderer } from '../../../../timelines/components/field_renderers/default_renderer'; @@ -109,7 +107,6 @@ export const UserDetails: React.FC = ({ userName, timestamp, s const isEntityAnalyticsAuthorized = isPlatinumOrTrialLicense && hasEntityAnalyticsCapability; const { openPreviewPanel } = useExpandableFlyoutApi(); - const isPreviewEnabled = !useIsExperimentalFeatureEnabled('entityAlertPreviewDisabled'); const narrowDateRange = useCallback( (score, interval) => { @@ -175,16 +172,12 @@ export const UserDetails: React.FC = ({ userName, timestamp, s render: (host: string) => ( - {isPreviewEnabled ? ( - - ) : ( - <>{host} - )} + ), @@ -207,15 +200,13 @@ export const UserDetails: React.FC = ({ userName, timestamp, s render={(ip) => ip == null ? ( getEmptyTagValue() - ) : isPreviewEnabled ? ( + ) : ( - ) : ( - ) } scopeId={scopeId} @@ -241,7 +232,7 @@ export const UserDetails: React.FC = ({ userName, timestamp, s ] : []), ], - [isEntityAnalyticsAuthorized, scopeId, isPreviewEnabled] + [isEntityAnalyticsAuthorized, scopeId] ); const relatedHostsCount = useMemo( @@ -272,19 +263,14 @@ export const UserDetails: React.FC = ({ userName, timestamp, s }; const userLink = useMemo( - () => - isPreviewEnabled - ? { - callback: openUserPreview, - tooltip: i18n.translate( - 'xpack.securitySolution.flyout.left.insights.entities.user.userPreviewTitle', - { - defaultMessage: 'Preview user', - } - ), - } - : undefined, - [isPreviewEnabled, openUserPreview] + () => ({ + callback: openUserPreview, + tooltip: i18n.translate( + 'xpack.securitySolution.flyout.left.insights.entities.user.userPreviewTitle', + { defaultMessage: 'Preview user' } + ), + }), + [openUserPreview] ); return ( diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/highlighted_fields_cell.test.tsx b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/highlighted_fields_cell.test.tsx index ff003813f260..e6f88498b260 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/highlighted_fields_cell.test.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/highlighted_fields_cell.test.tsx @@ -14,11 +14,7 @@ import { } from './test_ids'; import { HighlightedFieldsCell } from './highlighted_fields_cell'; import { DocumentDetailsContext } from '../../shared/context'; -import { DocumentDetailsLeftPanelKey } from '../../shared/constants/panel_keys'; -import { LeftPanelInsightsTab } from '../../left'; import { TestProviders } from '../../../../common/mock'; -import { ENTITIES_TAB_ID } from '../../left/components/entities_details'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; import { useGetAgentStatus } from '../../../../management/hooks/agents/use_get_agent_status'; import { mockFlyoutApi } from '../../shared/mocks/mock_flyout_context'; import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; @@ -47,9 +43,6 @@ jest.mock('../../../../common/lib/kibana', () => { const useGetAgentStatusMock = useGetAgentStatus as jest.Mock; -jest.mock('../../../../common/hooks/use_experimental_features'); -const mockUseIsExperimentalFeatureEnabled = useIsExperimentalFeatureEnabled as jest.Mock; - const panelContextValue = { eventId: 'event id', indexName: 'indexName', @@ -68,7 +61,6 @@ const renderHighlightedFieldsCell = (values: string[], field: string) => describe('', () => { beforeAll(() => { jest.mocked(useExpandableFlyoutApi).mockReturnValue(mockFlyoutApi); - mockUseIsExperimentalFeatureEnabled.mockReturnValue(true); }); it('should render a basic cell', () => { @@ -83,23 +75,7 @@ describe('', () => { expect(getByTestId(HIGHLIGHTED_FIELDS_BASIC_CELL_TEST_ID)).toBeInTheDocument(); }); - it('should open left panel when clicking on the link within a a link cell when preview is disabled', () => { - const { getByTestId } = renderHighlightedFieldsCell(['value'], 'user.name'); - - getByTestId(HIGHLIGHTED_FIELDS_LINKED_CELL_TEST_ID).click(); - expect(mockFlyoutApi.openLeftPanel).toHaveBeenCalledWith({ - id: DocumentDetailsLeftPanelKey, - path: { tab: LeftPanelInsightsTab, subTab: ENTITIES_TAB_ID }, - params: { - id: panelContextValue.eventId, - indexName: panelContextValue.indexName, - scopeId: panelContextValue.scopeId, - }, - }); - }); - - it('should open host preview when click on host when preview is not disabled', () => { - mockUseIsExperimentalFeatureEnabled.mockReturnValue(false); + it('should open host preview when click on host', () => { const { getByTestId } = renderHighlightedFieldsCell(['test host'], 'host.name'); expect(getByTestId(HIGHLIGHTED_FIELDS_LINKED_CELL_TEST_ID)).toBeInTheDocument(); @@ -114,8 +90,7 @@ describe('', () => { }); }); - it('should open user preview when click on user when preview is not disabled', () => { - mockUseIsExperimentalFeatureEnabled.mockReturnValue(false); + it('should open user preview when click on user', () => { const { getByTestId } = renderHighlightedFieldsCell(['test user'], 'user.name'); expect(getByTestId(HIGHLIGHTED_FIELDS_LINKED_CELL_TEST_ID)).toBeInTheDocument(); @@ -130,8 +105,7 @@ describe('', () => { }); }); - it('should open ip preview when click on ip when preview is not disabled', () => { - mockUseIsExperimentalFeatureEnabled.mockReturnValue(false); + it('should open ip preview when click on ip', () => { const { getByTestId } = renderHighlightedFieldsCell(['100:XXX:XXX'], 'source.ip'); expect(getByTestId(HIGHLIGHTED_FIELDS_LINKED_CELL_TEST_ID)).toBeInTheDocument(); @@ -204,6 +178,7 @@ describe('', () => { expect(getByTestId(HIGHLIGHTED_FIELDS_AGENT_STATUS_CELL_TEST_ID)).toBeInTheDocument(); }); + it('should not render if values is null', () => { const { container } = render( diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/highlighted_fields_cell.tsx b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/highlighted_fields_cell.tsx index e11dee4a74ad..b6fc98653f89 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/highlighted_fields_cell.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/highlighted_fields_cell.tsx @@ -5,19 +5,14 @@ * 2.0. */ -import type { VFC } from 'react'; -import React, { useCallback, useMemo } from 'react'; -import { EuiFlexItem, EuiLink } from '@elastic/eui'; -import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; +import type { FC } from 'react'; +import React, { useMemo } from 'react'; +import { EuiFlexItem } from '@elastic/eui'; import { getAgentTypeForAgentIdField } from '../../../../common/lib/endpoint/utils/get_agent_type_for_agent_id_field'; import type { ResponseActionAgentType } from '../../../../../common/endpoint/service/response_actions/constants'; import { AgentStatus } from '../../../../common/components/endpoint/agents/agent_status'; import { useDocumentDetailsContext } from '../../shared/context'; import { AGENT_STATUS_FIELD_NAME } from '../../../../timelines/components/timeline/body/renderers/constants'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; -import { DocumentDetailsLeftPanelKey } from '../../shared/constants/panel_keys'; -import { LeftPanelInsightsTab } from '../../left'; -import { ENTITIES_TAB_ID } from '../../left/components/entities_details'; import { HIGHLIGHTED_FIELDS_AGENT_STATUS_CELL_TEST_ID, HIGHLIGHTED_FIELDS_BASIC_CELL_TEST_ID, @@ -44,26 +39,12 @@ export interface HighlightedFieldsCellProps { /** * Renders a component in the highlighted fields table cell based on the field name */ -export const HighlightedFieldsCell: VFC = ({ +export const HighlightedFieldsCell: FC = ({ values, field, originalField = '', }) => { - const { scopeId, eventId, indexName } = useDocumentDetailsContext(); - const { openLeftPanel } = useExpandableFlyoutApi(); - const isPreviewEnabled = !useIsExperimentalFeatureEnabled('entityAlertPreviewDisabled'); - - const goToInsightsEntities = useCallback(() => { - openLeftPanel({ - id: DocumentDetailsLeftPanelKey, - path: { tab: LeftPanelInsightsTab, subTab: ENTITIES_TAB_ID }, - params: { - id: eventId, - indexName, - scopeId, - }, - }); - }, [eventId, indexName, openLeftPanel, scopeId]); + const { scopeId } = useDocumentDetailsContext(); const agentType: ResponseActionAgentType = useMemo(() => { return getAgentTypeForAgentIdField(originalField); @@ -79,20 +60,13 @@ export const HighlightedFieldsCell: VFC = ({ key={`${i}-${value}`} data-test-subj={`${value}-${HIGHLIGHTED_FIELDS_CELL_TEST_ID}`} > - {isPreviewEnabled && hasPreview(field) ? ( + {hasPreview(field) ? ( - ) : hasPreview(field) ? ( - - {value} - ) : field === AGENT_STATUS_FIELD_NAME ? ( { }; }); -jest.mock('../../../../common/hooks/use_experimental_features'); -const mockUseIsExperimentalFeatureEnabled = useIsExperimentalFeatureEnabled as jest.Mock; - const mockUseGlobalTime = jest.fn().mockReturnValue({ from, to }); jest.mock('../../../../common/containers/use_global_time', () => { return { @@ -124,7 +117,6 @@ const renderHostEntityContent = () => describe('', () => { beforeAll(() => { jest.mocked(useExpandableFlyoutApi).mockReturnValue(mockFlyoutApi); - mockUseIsExperimentalFeatureEnabled.mockReturnValue(true); (useMisconfigurationPreview as jest.Mock).mockReturnValue({}); (useVulnerabilitiesPreview as jest.Mock).mockReturnValue({}); (useAlertsByStatus as jest.Mock).mockReturnValue({ isLoading: false, items: {} }); @@ -204,28 +196,9 @@ describe('', () => { expect(getByTestId(ENTITIES_HOST_OVERVIEW_LAST_SEEN_TEST_ID)).toHaveTextContent('—'); }); - it('should navigate to left panel entities tab when clicking on title when feature flag is off', () => { - mockUseHostDetails.mockReturnValue([false, { hostDetails: hostData }]); - mockUseRiskScore.mockReturnValue({ data: riskLevel, isAuthorized: true }); - - const { getByTestId } = renderHostEntityContent(); - - getByTestId(ENTITIES_HOST_OVERVIEW_LINK_TEST_ID).click(); - expect(mockFlyoutApi.openLeftPanel).toHaveBeenCalledWith({ - id: DocumentDetailsLeftPanelKey, - path: { tab: LeftPanelInsightsTab, subTab: ENTITIES_TAB_ID }, - params: { - id: panelContextValue.eventId, - indexName: panelContextValue.indexName, - scopeId: panelContextValue.scopeId, - }, - }); - }); - - it('should open host preview when clicking on title when feature flag is on', () => { + it('should open host preview when clicking on title', () => { mockUseHostDetails.mockReturnValue([false, { hostDetails: hostData }]); mockUseRiskScore.mockReturnValue({ data: riskLevel, isAuthorized: true }); - mockUseIsExperimentalFeatureEnabled.mockReturnValue(false); const { getByTestId } = renderHostEntityContent(); diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/host_entity_overview.tsx b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/host_entity_overview.tsx index 9b60eefbb5f6..eb1ca093fbb0 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/host_entity_overview.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/host_entity_overview.tsx @@ -5,11 +5,10 @@ * 2.0. */ -import React, { useCallback, useMemo } from 'react'; +import React, { useMemo } from 'react'; import { EuiFlexGroup, EuiFlexItem, - EuiLink, EuiText, EuiIcon, useEuiTheme, @@ -19,8 +18,6 @@ import { import { css } from '@emotion/css'; import { getOr } from 'lodash/fp'; import { i18n } from '@kbn/i18n'; -import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; import { HOST_NAME_FIELD_NAME } from '../../../../timelines/components/timeline/body/renderers/constants'; import { useRiskScore } from '../../../../entity_analytics/api/hooks/use_risk_score'; import { useDocumentDetailsContext } from '../../shared/context'; @@ -44,7 +41,6 @@ import { LAST_SEEN, HOST_RISK_LEVEL, } from '../../../../overview/components/host_overview/translations'; -import { ENTITIES_TAB_ID } from '../../left/components/entities_details'; import { ENTITIES_HOST_OVERVIEW_TEST_ID, ENTITIES_HOST_OVERVIEW_OS_FAMILY_TEST_ID, @@ -56,8 +52,6 @@ import { ENTITIES_HOST_OVERVIEW_MISCONFIGURATIONS_TEST_ID, ENTITIES_HOST_OVERVIEW_VULNERABILITIES_TEST_ID, } from './test_ids'; -import { DocumentDetailsLeftPanelKey } from '../../shared/constants/panel_keys'; -import { LeftPanelInsightsTab } from '../../left'; import { RiskScoreDocTooltip } from '../../../../overview/components/common'; import { PreviewLink } from '../../../shared/components/preview_link'; import { MisconfigurationsInsight } from '../../shared/components/misconfiguration_insight'; @@ -85,21 +79,7 @@ export const HOST_PREVIEW_BANNER = { * Host preview content for the entities preview in right flyout. It contains ip addresses and risk level */ export const HostEntityOverview: React.FC = ({ hostName }) => { - const { eventId, indexName, scopeId } = useDocumentDetailsContext(); - const { openLeftPanel } = useExpandableFlyoutApi(); - const isPreviewEnabled = !useIsExperimentalFeatureEnabled('entityAlertPreviewDisabled'); - - const goToEntitiesTab = useCallback(() => { - openLeftPanel({ - id: DocumentDetailsLeftPanelKey, - path: { tab: LeftPanelInsightsTab, subTab: ENTITIES_TAB_ID }, - params: { - id: eventId, - indexName, - scopeId, - }, - }); - }, [eventId, openLeftPanel, indexName, scopeId]); + const { scopeId } = useDocumentDetailsContext(); const { from, to } = useGlobalTime(); const { selectedPatterns } = useSourcererDataView(); @@ -212,34 +192,21 @@ export const HostEntityOverview: React.FC = ({ hostName - {isPreviewEnabled ? ( - - - {hostName} - - - ) : ( - + {hostName} - - )} + +
diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/table_field_value_cell.test.tsx b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/table_field_value_cell.test.tsx index eec53dbe3d26..2c7abe5bb1d2 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/table_field_value_cell.test.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/table_field_value_cell.test.tsx @@ -9,7 +9,6 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; import type { FieldSpec } from '@kbn/data-plugin/common'; import { DocumentDetailsContext } from '../../shared/context'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; import type { EventFieldsData } from '../../../../common/components/event_details/types'; import { TableFieldValueCell } from './table_field_value_cell'; @@ -35,9 +34,6 @@ jest.mock('../../../../common/lib/kibana', () => { }; }); -jest.mock('../../../../common/hooks/use_experimental_features'); -const mockUseIsExperimentalFeatureEnabled = useIsExperimentalFeatureEnabled as jest.Mock; - const panelContextValue = { eventId: 'event id', indexName: 'indexName', @@ -66,7 +62,6 @@ describe('TableFieldValueCell', () => { beforeAll(() => { jest.clearAllMocks(); jest.mocked(useExpandableFlyoutApi).mockReturnValue(mockFlyoutApi); - mockUseIsExperimentalFeatureEnabled.mockReturnValue(false); }); describe('common behavior', () => { @@ -213,7 +208,7 @@ describe('TableFieldValueCell', () => { }); }); - it('should open preview when preview is not disabled', () => { + it('should open preview', () => { screen.getByTestId(`${FLYOUT_TABLE_PREVIEW_LINK_FIELD_TEST_ID}-0`).click(); expect(mockFlyoutApi.openPreviewPanel).toHaveBeenCalledWith({ diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/table_field_value_cell.tsx b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/table_field_value_cell.tsx index a0095bb8eadf..17ea9980f1ee 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/table_field_value_cell.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/table_field_value_cell.tsx @@ -8,7 +8,6 @@ import React, { memo } from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui'; import type { FieldSpec } from '@kbn/data-plugin/common'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; import { getFieldFormat } from '../utils/get_field_format'; import type { EventFieldsData } from '../../../../common/components/event_details/types'; import { OverflowField } from '../../../../common/components/tables/helpers'; @@ -66,7 +65,6 @@ export const TableFieldValueCell = memo( values, isPreview, }: FieldValueCellProps) => { - const isPreviewEnabled = !useIsExperimentalFeatureEnabled('entityAlertPreviewDisabled'); if (values == null) { return null; } @@ -92,7 +90,7 @@ export const TableFieldValueCell = memo( {data.field === MESSAGE_FIELD_NAME ? ( - ) : isPreviewEnabled && hasPreview(data.field) ? ( + ) : hasPreview(data.field) ? ( { return { @@ -109,7 +102,6 @@ const renderUserEntityOverview = () => describe('', () => { beforeAll(() => { jest.mocked(useExpandableFlyoutApi).mockReturnValue(mockFlyoutApi); - mockUseIsExperimentalFeatureEnabled.mockReturnValue(true); (useMisconfigurationPreview as jest.Mock).mockReturnValue({}); (useAlertsByStatus as jest.Mock).mockReturnValue({ isLoading: false, items: {} }); }); @@ -190,34 +182,9 @@ describe('', () => { expect(queryByTestId(ENTITIES_USER_OVERVIEW_DOMAIN_TEST_ID)).not.toBeInTheDocument(); }); - it('should navigate to left panel entities tab when clicking on title when feature flag is off', () => { - mockUseUserDetails.mockReturnValue([false, { userDetails: userData }]); - mockUseRiskScore.mockReturnValue({ data: riskLevel, isAuthorized: true }); - - const { getByTestId } = render( - - - - - - ); - - getByTestId(ENTITIES_USER_OVERVIEW_LINK_TEST_ID).click(); - expect(mockFlyoutApi.openLeftPanel).toHaveBeenCalledWith({ - id: DocumentDetailsLeftPanelKey, - path: { tab: LeftPanelInsightsTab, subTab: ENTITIES_TAB_ID }, - params: { - id: panelContextValue.eventId, - indexName: panelContextValue.indexName, - scopeId: panelContextValue.scopeId, - }, - }); - }); - - it('should open user preview if feature flag is true', () => { + it('should open user preview', () => { mockUseUserDetails.mockReturnValue([false, { userDetails: userData }]); mockUseRiskScore.mockReturnValue({ data: riskLevel, isAuthorized: true }); - mockUseIsExperimentalFeatureEnabled.mockReturnValue(false); const { getByTestId } = render( diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/user_entity_overview.tsx b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/user_entity_overview.tsx index 1008f6139cd6..22f889a61c54 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/user_entity_overview.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/document_details/right/components/user_entity_overview.tsx @@ -5,13 +5,12 @@ * 2.0. */ -import React, { useCallback, useMemo } from 'react'; +import React, { useMemo } from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiText, - EuiLink, useEuiTheme, useEuiFontSize, EuiSkeletonText, @@ -19,11 +18,6 @@ import { import { css } from '@emotion/css'; import { getOr } from 'lodash/fp'; import { i18n } from '@kbn/i18n'; -import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; -import { DocumentDetailsLeftPanelKey } from '../../shared/constants/panel_keys'; -import { LeftPanelInsightsTab } from '../../left'; -import { ENTITIES_TAB_ID } from '../../left/components/entities_details'; import { useDocumentDetailsContext } from '../../shared/context'; import type { DescriptionList } from '../../../../../common/utility_types'; import { USER_NAME_FIELD_NAME } from '../../../../timelines/components/timeline/body/renderers/constants'; @@ -83,22 +77,7 @@ export const USER_PREVIEW_BANNER = { * User preview content for the entities preview in right flyout. It contains ip addresses and risk level */ export const UserEntityOverview: React.FC = ({ userName }) => { - const { eventId, indexName, scopeId } = useDocumentDetailsContext(); - const { openLeftPanel } = useExpandableFlyoutApi(); - - const isPreviewEnabled = !useIsExperimentalFeatureEnabled('entityAlertPreviewDisabled'); - - const goToEntitiesTab = useCallback(() => { - openLeftPanel({ - id: DocumentDetailsLeftPanelKey, - path: { tab: LeftPanelInsightsTab, subTab: ENTITIES_TAB_ID }, - params: { - id: eventId, - indexName, - scopeId, - }, - }); - }, [eventId, openLeftPanel, indexName, scopeId]); + const { scopeId } = useDocumentDetailsContext(); const { from, to } = useGlobalTime(); const { selectedPatterns } = useSourcererDataView(); @@ -210,34 +189,21 @@ export const UserEntityOverview: React.FC = ({ userName - {isPreviewEnabled ? ( - - - {userName} - - - ) : ( - + {userName} - - )} + + From ccdd662a053f9d02fe1ea04afe2bdd80827459c0 Mon Sep 17 00:00:00 2001 From: Ying Mao Date: Tue, 17 Dec 2024 17:41:20 -0500 Subject: [PATCH 17/60] [Response Ops][Task Manager] Changing task manager `schedule.interval` schema to string from duration (#204413) ## Summary Currently, when task manager schema changes are migrated down (which can occur during a release when there are multiple Kibana nodes running and they get updated one after another), we are running into this bug: https://github.com/elastic/kibana/issues/204395 where the task `schedule.interval` gets mutated from expected values (like `60s`) to unallowed (but still valid for the schema) values (like `PT1M`). This changes the schema for `schedule.interval` to use a string with validation function. ## To verify 1. Run Kibana on `main` and create some rules that run frequently. 2. "Upgrade" to this PR branch and verify that rules continue to run. 3. "Downgrade" back to `main` and verify that rules continue to run. --- .../model_versions/task_model_versions.ts | 4 ++++ .../server/saved_objects/schemas/task.test.ts | 24 +++++++++++++++++++ .../server/saved_objects/schemas/task.ts | 9 ++++++- 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 x-pack/plugins/task_manager/server/saved_objects/schemas/task.test.ts diff --git a/x-pack/plugins/task_manager/server/saved_objects/model_versions/task_model_versions.ts b/x-pack/plugins/task_manager/server/saved_objects/model_versions/task_model_versions.ts index 775b3ea2f8ca..a86aed7e358f 100644 --- a/x-pack/plugins/task_manager/server/saved_objects/model_versions/task_model_versions.ts +++ b/x-pack/plugins/task_manager/server/saved_objects/model_versions/task_model_versions.ts @@ -8,6 +8,10 @@ import { SavedObjectsModelVersionMap } from '@kbn/core-saved-objects-server'; import { taskSchemaV1, taskSchemaV2 } from '../schemas/task'; +// IMPORTANT!!! +// When adding new model versions, make sure to manually test +// downgrading to the previous version. This is a gap in our +// automated test coverage so manual testing is needed. export const taskModelVersions: SavedObjectsModelVersionMap = { '1': { changes: [ diff --git a/x-pack/plugins/task_manager/server/saved_objects/schemas/task.test.ts b/x-pack/plugins/task_manager/server/saved_objects/schemas/task.test.ts new file mode 100644 index 000000000000..709e50bc54bf --- /dev/null +++ b/x-pack/plugins/task_manager/server/saved_objects/schemas/task.test.ts @@ -0,0 +1,24 @@ +/* + * 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 { validateDuration } from './task'; + +test('allows valid duration', () => { + expect(validateDuration('1s')).toBeUndefined(); + expect(validateDuration('45346s')).toBeUndefined(); + expect(validateDuration('10m')).toBeUndefined(); + expect(validateDuration('30000000h')).toBeUndefined(); + expect(validateDuration('3245d')).toBeUndefined(); +}); + +test('returns error message for invalid duration', () => { + expect(validateDuration('10x')).toBe('string is not a valid duration: 10x'); + expect(validateDuration('PT1M')).toBe('string is not a valid duration: PT1M'); + expect(validateDuration('foo')).toBe('string is not a valid duration: foo'); + expect(validateDuration('1 minute')).toBe('string is not a valid duration: 1 minute'); + expect(validateDuration('1hr')).toBe('string is not a valid duration: 1hr'); +}); diff --git a/x-pack/plugins/task_manager/server/saved_objects/schemas/task.ts b/x-pack/plugins/task_manager/server/saved_objects/schemas/task.ts index 2a6ee5c92198..25b6a1cb079d 100644 --- a/x-pack/plugins/task_manager/server/saved_objects/schemas/task.ts +++ b/x-pack/plugins/task_manager/server/saved_objects/schemas/task.ts @@ -6,6 +6,13 @@ */ import { schema } from '@kbn/config-schema'; +import { isInterval } from '../../lib/intervals'; + +export function validateDuration(duration: string) { + if (!isInterval(duration)) { + return 'string is not a valid duration: ' + duration; + } +} export const taskSchemaV1 = schema.object({ taskType: schema.string(), @@ -15,7 +22,7 @@ export const taskSchemaV1 = schema.object({ runAt: schema.string(), schedule: schema.maybe( schema.object({ - interval: schema.duration(), + interval: schema.string({ validate: validateDuration }), }) ), params: schema.string(), From 8011cbfc8b281fffe89a2c2254f26043ddef5235 Mon Sep 17 00:00:00 2001 From: Rudolf Meijering Date: Wed, 18 Dec 2024 01:04:01 +0100 Subject: [PATCH 18/60] Fix UA fixtures after ES 9 deprecation fields had breaking change (#203418) ## Summary Adapt UA test fixtures to be compatible with the upstream breaking change https://github.com/elastic/elasticsearch/pull/117933 --- .../apis/upgrade_assistant/es_deprecation_logs.helpers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/test/api_integration/apis/upgrade_assistant/es_deprecation_logs.helpers.ts b/x-pack/test/api_integration/apis/upgrade_assistant/es_deprecation_logs.helpers.ts index 59077c9ac216..ec2454fdea14 100644 --- a/x-pack/test/api_integration/apis/upgrade_assistant/es_deprecation_logs.helpers.ts +++ b/x-pack/test/api_integration/apis/upgrade_assistant/es_deprecation_logs.helpers.ts @@ -18,7 +18,7 @@ const CHARS_POOL = 'abcdefghijklmnopqrstuvwxyz'; const getRandomString = () => `${chance.string({ pool: CHARS_POOL })}-${Date.now()}`; const deprecationMock = { - 'event.dataset': 'deprecation.elasticsearch', + 'event.dataset': 'elasticsearch.deprecation', '@timestamp': '2021-12-06T16:28:11,104Z', 'log.level': 'CRITICAL', 'log.logger': @@ -30,7 +30,7 @@ const deprecationMock = { message: '[types removal] Specifying include_type_name in get index template requests is deprecated.', 'data_stream.type': 'logs', - 'data_stream.dataset': 'deprecation.elasticsearch', + 'data_stream.dataset': 'elasticsearch.deprecation', 'data_stream.namespace': 'default', 'ecs.version': '1.7', 'elasticsearch.event.category': 'types', From 7f7d354dd1e67664c4267694b243aa13e4936df6 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 18 Dec 2024 01:13:19 +0000 Subject: [PATCH 19/60] chore(NA): update versions after v8.16.3 bump (#204640) This PR is a simple update of our versions file after the recent bumps. --- versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions.json b/versions.json index 126e39ed0bad..e7ca2b8539bf 100644 --- a/versions.json +++ b/versions.json @@ -19,7 +19,7 @@ "previousMajor": true }, { - "version": "8.16.2", + "version": "8.16.3", "branch": "8.16", "previousMajor": true }, From 0e2fc8f4e22a9dd41fc0b0f3c0ea2bd448a6c73e Mon Sep 17 00:00:00 2001 From: Gerard Soldevila Date: Wed, 18 Dec 2024 02:49:07 +0100 Subject: [PATCH 20/60] Sustainable Kibana Architecture: Move modules owned by `@elastic/kibana-reporting-services` (#202741) ## Summary This PR aims at relocating some of the Kibana modules (plugins and packages) into a new folder structure, according to the _Sustainable Kibana Architecture_ initiative. > [!IMPORTANT] > * We kindly ask you to: > * Manually fix the errors in the error section below (if there are any). > * Search for the `packages[\/\\]` and `plugins[\/\\]` patterns in the source code (Babel and Eslint config files), and update them appropriately. > * Manually review `.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that any CI pipeline customizations continue to be correctly applied after the changed path names > * Review all of the updated files, specially the `.ts` and `.js` files listed in the sections below, as some of them contain relative paths that have been updated. > * Think of potential impact of the move, including tooling and configuration files that can be pointing to the relocated modules. E.g.: > * customised eslint rules > * docs pointing to source code > [!NOTE] > This PR has been auto-generated. > Do not attempt to push any changes unless you know what you are doing. > Please use [#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E) Slack channel for feedback. #### 1 plugin(s) are going to be relocated: | Id | Target folder | | -- | ------------- | | `@kbn/screenshotting-plugin` | `x-pack/platform/plugins/shared/screenshotting` |
Updated references ``` ./docs/developer/plugin-list.asciidoc ./package.json ./packages/kbn-cli-dev-mode/src/watcher.ts ./packages/kbn-repo-packages/package-map.json ./packages/kbn-ts-projects/config-paths.json ./src/dev/code_coverage/ingest_coverage/__tests__/enumerate_patterns.test.js ./src/dev/precommit_hook/casing_check_config.js ./tsconfig.base.json ./x-pack/.gitignore ./x-pack/.i18nrc.json ./x-pack/platform/plugins/shared/screenshotting/README.md ./x-pack/platform/plugins/shared/screenshotting/jest.config.js ./x-pack/platform/plugins/shared/screenshotting/jest.integration.config.js ./x-pack/platform/plugins/shared/screenshotting/server/screenshots/screenshots.test.ts ./x-pack/plugins/lens/public/app_plugin/share_action.ts ./yarn.lock ```
Updated relative paths ``` x-pack/platform/plugins/shared/screenshotting/jest.config.js:10 x-pack/platform/plugins/shared/screenshotting/jest.integration.config.js:10 x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/worker_src_harness.js:14 x-pack/platform/plugins/shared/screenshotting/tsconfig.json:10 x-pack/platform/plugins/shared/screenshotting/tsconfig.json:14 x-pack/platform/plugins/shared/screenshotting/tsconfig.json:2 ```
Script errors ``` ```
--------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .github/CODEOWNERS | 2 +- docs/developer/plugin-list.asciidoc | 2 +- package.json | 2 +- packages/kbn-cli-dev-mode/src/watcher.ts | 2 +- .../__tests__/enumerate_patterns.test.js | 6 +++--- src/dev/precommit_hook/casing_check_config.js | 12 ++++++------ tsconfig.base.json | 4 ++-- x-pack/.gitignore | 2 +- x-pack/.i18nrc.json | 2 +- .../plugins/shared}/screenshotting/README.md | 2 +- .../plugins/shared}/screenshotting/common/errors.ts | 0 .../shared}/screenshotting/common/expression.ts | 0 .../plugins/shared}/screenshotting/common/index.ts | 0 .../plugins/shared}/screenshotting/common/layout.ts | 0 .../plugins/shared}/screenshotting/common/types.ts | 0 .../plugins/shared}/screenshotting/jest.config.js | 9 +++++---- .../screenshotting/jest.integration.config.js | 4 ++-- .../plugins/shared}/screenshotting/kibana.jsonc | 0 .../shared}/screenshotting/public/app/app.scss | 0 .../shared}/screenshotting/public/app/app.tsx | 0 .../shared}/screenshotting/public/app/index.ts | 0 .../public/app/screenshot_mode_context.ts | 0 .../plugins/shared}/screenshotting/public/index.ts | 0 .../shared}/screenshotting/public/plugin.tsx | 0 .../screenshotting/server/__mocks__/puppeteer.ts | 0 .../server/assets/fonts/noto/LICENSE_OFL.txt | 0 .../assets/fonts/noto/NotoSansCJKtc-Medium.ttf | Bin .../assets/fonts/noto/NotoSansCJKtc-Regular.ttf | Bin .../server/assets/fonts/noto/index.js | 0 .../server/assets/fonts/roboto/LICENSE.txt | 0 .../server/assets/fonts/roboto/Roboto-Italic.ttf | Bin .../server/assets/fonts/roboto/Roboto-Medium.ttf | Bin .../server/assets/fonts/roboto/Roboto-Regular.ttf | Bin .../screenshotting/server/assets/img/logo-grey.png | Bin .../server/browsers/chromium/driver.test.ts | 0 .../server/browsers/chromium/driver.ts | 0 .../browsers/chromium/driver_factory/index.test.ts | 0 .../browsers/chromium/driver_factory/index.ts | 0 .../chromium/driver_factory/metrics.test.ts | 0 .../browsers/chromium/driver_factory/metrics.ts | 0 .../server/browsers/chromium/index.ts | 0 .../chromium/integration_tests/downloads.test.ts | 0 .../browsers/chromium/strip_unsafe_headers.test.ts | 0 .../browsers/chromium/strip_unsafe_headers.ts | 0 .../chromium/templates/footer.handlebars.html | 0 .../chromium/templates/header.handlebars.html | 0 .../server/browsers/chromium/templates/index.ts | 0 .../server/browsers/download/checksum.test.ts | 0 .../server/browsers/download/checksum.ts | 0 .../server/browsers/download/fetch.test.ts | 0 .../server/browsers/download/fetch.ts | 0 .../server/browsers/download/index.test.ts | 0 .../server/browsers/download/index.ts | 0 .../server/browsers/extract/__fixtures__/file.md | 0 .../browsers/extract/__fixtures__/file.md.zip | Bin .../server/browsers/extract/extract.test.ts | 0 .../server/browsers/extract/extract.ts | 0 .../server/browsers/extract/extract_error.ts | 0 .../screenshotting/server/browsers/extract/index.ts | 0 .../server/browsers/extract/unzip.test.ts | 0 .../screenshotting/server/browsers/extract/unzip.ts | 0 .../shared}/screenshotting/server/browsers/index.ts | 0 .../screenshotting/server/browsers/install.ts | 0 .../shared}/screenshotting/server/browsers/mock.ts | 0 .../server/browsers/network_policy.test.ts | 0 .../server/browsers/network_policy.ts | 0 .../server/browsers/safe_child_process.ts | 0 .../shared}/screenshotting/server/cloud/index.ts | 0 .../screenshotting/server/config/schema.test.ts | 0 .../shared}/screenshotting/server/constants.ts | 0 .../shared}/screenshotting/server/formats/index.ts | 0 .../screenshotting/server/formats/pdf/index.ts | 0 .../server/formats/pdf/pdf_maker/README.md | 0 .../server/formats/pdf/pdf_maker/constants.ts | 0 .../server/formats/pdf/pdf_maker/get_doc_options.ts | 0 .../server/formats/pdf/pdf_maker/get_font.test.ts | 0 .../server/formats/pdf/pdf_maker/get_font.ts | 0 .../server/formats/pdf/pdf_maker/get_template.ts | 0 .../server/formats/pdf/pdf_maker/index.ts | 0 .../pdf/pdf_maker/integration_tests/buggy_worker.js | 0 .../integration_tests/memory_leak_worker.js | 0 .../pdf_maker/integration_tests/pdfmaker.test.ts | 0 .../server/formats/pdf/pdf_maker/pdfmaker.ts | 0 .../server/formats/pdf/pdf_maker/types.ts | 0 .../server/formats/pdf/pdf_maker/worker.ts | 0 .../formats/pdf/pdf_maker/worker_dependencies.ts | 0 .../formats/pdf/pdf_maker/worker_src_harness.js | 2 +- .../shared}/screenshotting/server/formats/png.ts | 0 .../plugins/shared}/screenshotting/server/index.ts | 0 .../screenshotting/server/layouts/base_layout.ts | 0 .../screenshotting/server/layouts/canvas_layout.ts | 0 .../server/layouts/create_layout.test.ts | 0 .../screenshotting/server/layouts/create_layout.ts | 0 .../shared}/screenshotting/server/layouts/index.ts | 0 .../shared}/screenshotting/server/layouts/mock.ts | 0 .../server/layouts/preserve_layout.css | 0 .../server/layouts/preserve_layout.test.ts | 0 .../server/layouts/preserve_layout.ts | 0 .../screenshotting/server/layouts/print_layout.ts | 0 .../plugins/shared}/screenshotting/server/mock.ts | 0 .../shared}/screenshotting/server/plugin.test.ts | 0 .../plugins/shared}/screenshotting/server/plugin.ts | 0 .../screenshots/__snapshots__/index.test.ts.snap | 0 .../screenshotting/server/screenshots/constants.ts | 0 .../server/screenshots/event_logger/index.test.ts | 0 .../server/screenshots/event_logger/index.ts | 0 .../screenshots/get_element_position_data.test.ts | 0 .../server/screenshots/get_element_position_data.ts | 0 .../server/screenshots/get_number_of_items.test.ts | 0 .../server/screenshots/get_number_of_items.ts | 0 .../screenshotting/server/screenshots/get_pdf.ts | 0 .../server/screenshots/get_render_errors.test.ts | 0 .../server/screenshots/get_render_errors.ts | 0 .../server/screenshots/get_screenshots.test.ts | 0 .../server/screenshots/get_screenshots.ts | 0 .../server/screenshots/get_time_range.test.ts | 0 .../server/screenshots/get_time_range.ts | 0 .../screenshotting/server/screenshots/index.test.ts | 0 .../screenshotting/server/screenshots/index.ts | 0 .../screenshotting/server/screenshots/inject_css.ts | 0 .../screenshotting/server/screenshots/mock.ts | 0 .../server/screenshots/observable.test.ts | 0 .../screenshotting/server/screenshots/observable.ts | 0 .../screenshotting/server/screenshots/open_url.ts | 0 .../server/screenshots/screenshots.test.ts | 3 ++- .../server/screenshots/screenshots.ts | 0 .../screenshotting/server/screenshots/types.ts | 0 .../server/screenshots/wait_for_render.ts | 0 .../server/screenshots/wait_for_visualizations.ts | 0 .../plugins/shared}/screenshotting/server/utils.ts | 0 .../plugins/shared}/screenshotting/tsconfig.json | 6 +++--- .../plugins/lens/public/app_plugin/share_action.ts | 2 +- yarn.lock | 2 +- 133 files changed, 33 insertions(+), 31 deletions(-) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/README.md (98%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/common/errors.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/common/expression.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/common/index.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/common/layout.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/common/types.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/jest.config.js (52%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/jest.integration.config.js (76%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/kibana.jsonc (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/public/app/app.scss (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/public/app/app.tsx (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/public/app/index.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/public/app/screenshot_mode_context.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/public/index.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/public/plugin.tsx (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/__mocks__/puppeteer.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/assets/fonts/noto/LICENSE_OFL.txt (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/assets/fonts/noto/NotoSansCJKtc-Medium.ttf (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/assets/fonts/noto/NotoSansCJKtc-Regular.ttf (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/assets/fonts/noto/index.js (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/assets/fonts/roboto/LICENSE.txt (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/assets/fonts/roboto/Roboto-Italic.ttf (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/assets/fonts/roboto/Roboto-Medium.ttf (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/assets/fonts/roboto/Roboto-Regular.ttf (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/assets/img/logo-grey.png (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/chromium/driver.test.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/chromium/driver.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/chromium/driver_factory/index.test.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/chromium/driver_factory/index.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/chromium/driver_factory/metrics.test.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/chromium/driver_factory/metrics.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/chromium/index.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/chromium/integration_tests/downloads.test.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/chromium/strip_unsafe_headers.test.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/chromium/strip_unsafe_headers.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/chromium/templates/footer.handlebars.html (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/chromium/templates/header.handlebars.html (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/chromium/templates/index.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/download/checksum.test.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/download/checksum.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/download/fetch.test.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/download/fetch.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/download/index.test.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/download/index.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/extract/__fixtures__/file.md (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/extract/__fixtures__/file.md.zip (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/extract/extract.test.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/extract/extract.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/extract/extract_error.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/extract/index.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/extract/unzip.test.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/extract/unzip.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/index.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/install.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/mock.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/network_policy.test.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/network_policy.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/browsers/safe_child_process.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/cloud/index.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/config/schema.test.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/constants.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/formats/index.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/formats/pdf/index.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/formats/pdf/pdf_maker/README.md (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/formats/pdf/pdf_maker/constants.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/formats/pdf/pdf_maker/get_doc_options.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/formats/pdf/pdf_maker/get_font.test.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/formats/pdf/pdf_maker/get_font.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/formats/pdf/pdf_maker/get_template.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/formats/pdf/pdf_maker/index.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/formats/pdf/pdf_maker/integration_tests/buggy_worker.js (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/formats/pdf/pdf_maker/integration_tests/memory_leak_worker.js (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/formats/pdf/pdf_maker/integration_tests/pdfmaker.test.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/formats/pdf/pdf_maker/pdfmaker.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/formats/pdf/pdf_maker/types.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/formats/pdf/pdf_maker/worker.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/formats/pdf/pdf_maker/worker_dependencies.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/formats/pdf/pdf_maker/worker_src_harness.js (90%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/formats/png.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/index.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/layouts/base_layout.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/layouts/canvas_layout.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/layouts/create_layout.test.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/layouts/create_layout.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/layouts/index.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/layouts/mock.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/layouts/preserve_layout.css (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/layouts/preserve_layout.test.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/layouts/preserve_layout.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/layouts/print_layout.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/mock.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/plugin.test.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/plugin.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/screenshots/__snapshots__/index.test.ts.snap (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/screenshots/constants.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/screenshots/event_logger/index.test.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/screenshots/event_logger/index.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/screenshots/get_element_position_data.test.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/screenshots/get_element_position_data.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/screenshots/get_number_of_items.test.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/screenshots/get_number_of_items.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/screenshots/get_pdf.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/screenshots/get_render_errors.test.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/screenshots/get_render_errors.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/screenshots/get_screenshots.test.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/screenshots/get_screenshots.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/screenshots/get_time_range.test.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/screenshots/get_time_range.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/screenshots/index.test.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/screenshots/index.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/screenshots/inject_css.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/screenshots/mock.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/screenshots/observable.test.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/screenshots/observable.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/screenshots/open_url.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/screenshots/screenshots.test.ts (98%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/screenshots/screenshots.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/screenshots/types.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/screenshots/wait_for_render.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/screenshots/wait_for_visualizations.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/server/utils.ts (100%) rename x-pack/{plugins => platform/plugins/shared}/screenshotting/tsconfig.json (79%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 882ff38a38b0..05ba8d0ac18a 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -864,6 +864,7 @@ x-pack/platform/plugins/shared/license_management @elastic/kibana-management x-pack/platform/plugins/shared/ml @elastic/ml-ui x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant @elastic/obs-ai-assistant x-pack/platform/plugins/shared/osquery @elastic/security-defend-workflows +x-pack/platform/plugins/shared/screenshotting @elastic/kibana-reporting-services x-pack/platform/plugins/shared/searchprofiler @elastic/kibana-management x-pack/plugins/actions @elastic/response-ops x-pack/plugins/alerting @elastic/response-ops @@ -920,7 +921,6 @@ x-pack/plugins/observability_solution/profiling_data_access @elastic/obs-ux-infr x-pack/plugins/reporting @elastic/appex-sharedux x-pack/plugins/rule_registry @elastic/response-ops @elastic/obs-ux-management-team x-pack/plugins/saved_objects_tagging @elastic/appex-sharedux -x-pack/plugins/screenshotting @elastic/kibana-reporting-services x-pack/plugins/search_assistant @elastic/search-kibana x-pack/plugins/search_connectors @elastic/search-kibana x-pack/plugins/search_homepage @elastic/search-kibana diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index 9da7cdbdceee..2a44a4d4f793 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -815,7 +815,7 @@ Elastic. |Add tagging capability to saved objects -|{kib-repo}blob/{branch}/x-pack/plugins/screenshotting/README.md[screenshotting] +|{kib-repo}blob/{branch}/x-pack/platform/plugins/shared/screenshotting/README.md[screenshotting] |This plugin provides functionality to take screenshots of the Kibana pages. It uses Chromium and Puppeteer underneath to run the browser in headless mode. diff --git a/package.json b/package.json index d4f8f9a4c689..7ac4a95fe563 100644 --- a/package.json +++ b/package.json @@ -796,7 +796,7 @@ "@kbn/screenshot-mode-example-plugin": "link:examples/screenshot_mode_example", "@kbn/screenshot-mode-plugin": "link:src/plugins/screenshot_mode", "@kbn/screenshotting-example-plugin": "link:x-pack/examples/screenshotting_example", - "@kbn/screenshotting-plugin": "link:x-pack/plugins/screenshotting", + "@kbn/screenshotting-plugin": "link:x-pack/platform/plugins/shared/screenshotting", "@kbn/screenshotting-server": "link:packages/kbn-screenshotting-server", "@kbn/search-api-keys-components": "link:packages/kbn-search-api-keys-components", "@kbn/search-api-keys-server": "link:packages/kbn-search-api-keys-server", diff --git a/packages/kbn-cli-dev-mode/src/watcher.ts b/packages/kbn-cli-dev-mode/src/watcher.ts index 6dc11371d958..193458495aa2 100644 --- a/packages/kbn-cli-dev-mode/src/watcher.ts +++ b/packages/kbn-cli-dev-mode/src/watcher.ts @@ -19,7 +19,7 @@ import { Log } from './log'; const packageMatcher = makeMatcher([ '**/*', '!**/.*', - '!x-pack/plugins/screenshotting/chromium/**', + '!x-pack/platform/plugins/shared/screenshotting/chromium/**', '!x-pack/plugins/canvas/shareable_runtime/**', ]); diff --git a/src/dev/code_coverage/ingest_coverage/__tests__/enumerate_patterns.test.js b/src/dev/code_coverage/ingest_coverage/__tests__/enumerate_patterns.test.js index 5faeab1acb53..540b51a29498 100644 --- a/src/dev/code_coverage/ingest_coverage/__tests__/enumerate_patterns.test.js +++ b/src/dev/code_coverage/ingest_coverage/__tests__/enumerate_patterns.test.js @@ -17,13 +17,13 @@ const log = new ToolingLog({ }); describe(`enumeratePatterns`, () => { - it(`should resolve x-pack/plugins/screenshotting/server/browsers/extract/unzip.ts to kibana-screenshotting`, () => { + it(`should resolve x-pack/platform/plugins/shared/screenshotting/server/browsers/extract/unzip.ts to kibana-screenshotting`, () => { const actual = enumeratePatterns(REPO_ROOT)(log)( - new Map([['x-pack/plugins/screenshotting', ['kibana-screenshotting']]]) + new Map([['x-pack/platform/plugins/shared/screenshotting', ['kibana-screenshotting']]]) ); expect(actual.flat()).toContain( - 'x-pack/plugins/screenshotting/server/browsers/extract/unzip.ts kibana-screenshotting' + 'x-pack/platform/plugins/shared/screenshotting/server/browsers/extract/unzip.ts kibana-screenshotting' ); }); it(`should resolve src/plugins/charts/common/static/color_maps/color_maps.ts to kibana-app`, () => { diff --git a/src/dev/precommit_hook/casing_check_config.js b/src/dev/precommit_hook/casing_check_config.js index b437c15688b9..30383559e7fe 100644 --- a/src/dev/precommit_hook/casing_check_config.js +++ b/src/dev/precommit_hook/casing_check_config.js @@ -182,10 +182,10 @@ export const TEMPORARILY_IGNORED_PATHS = [ 'x-pack/plugins/monitoring/public/icons/health-green.svg', 'x-pack/plugins/monitoring/public/icons/health-red.svg', 'x-pack/plugins/monitoring/public/icons/health-yellow.svg', - 'x-pack/plugins/screenshotting/server/assets/fonts/noto/NotoSansCJKtc-Medium.ttf', - 'x-pack/plugins/screenshotting/server/assets/fonts/noto/NotoSansCJKtc-Regular.ttf', - 'x-pack/plugins/screenshotting/server/assets/fonts/roboto/Roboto-Italic.ttf', - 'x-pack/plugins/screenshotting/server/assets/fonts/roboto/Roboto-Medium.ttf', - 'x-pack/plugins/screenshotting/server/assets/fonts/roboto/Roboto-Regular.ttf', - 'x-pack/plugins/screenshotting/server/assets/img/logo-grey.png', + 'x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/noto/NotoSansCJKtc-Medium.ttf', + 'x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/noto/NotoSansCJKtc-Regular.ttf', + 'x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/roboto/Roboto-Italic.ttf', + 'x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/roboto/Roboto-Medium.ttf', + 'x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/roboto/Roboto-Regular.ttf', + 'x-pack/platform/plugins/shared/screenshotting/server/assets/img/logo-grey.png', ]; diff --git a/tsconfig.base.json b/tsconfig.base.json index e8b6704a950d..15e2e250e0d0 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1568,8 +1568,8 @@ "@kbn/screenshot-mode-plugin/*": ["src/plugins/screenshot_mode/*"], "@kbn/screenshotting-example-plugin": ["x-pack/examples/screenshotting_example"], "@kbn/screenshotting-example-plugin/*": ["x-pack/examples/screenshotting_example/*"], - "@kbn/screenshotting-plugin": ["x-pack/plugins/screenshotting"], - "@kbn/screenshotting-plugin/*": ["x-pack/plugins/screenshotting/*"], + "@kbn/screenshotting-plugin": ["x-pack/platform/plugins/shared/screenshotting"], + "@kbn/screenshotting-plugin/*": ["x-pack/platform/plugins/shared/screenshotting/*"], "@kbn/screenshotting-server": ["packages/kbn-screenshotting-server"], "@kbn/screenshotting-server/*": ["packages/kbn-screenshotting-server/*"], "@kbn/search-api-keys-components": ["packages/kbn-search-api-keys-components"], diff --git a/x-pack/.gitignore b/x-pack/.gitignore index 97efbef318c9..918a6a7d1c38 100644 --- a/x-pack/.gitignore +++ b/x-pack/.gitignore @@ -6,7 +6,7 @@ /test/functional/apps/**/reports/session /test/reporting/configs/failure_debug/ /plugins/reporting/.chromium/ -/plugins/screenshotting/chromium/ +/platform/plugins/shared/screenshotting/chromium/ /plugins/reporting/.phantom/ /.aws-config.json /.env diff --git a/x-pack/.i18nrc.json b/x-pack/.i18nrc.json index dca0f526a823..c01b9ef40aed 100644 --- a/x-pack/.i18nrc.json +++ b/x-pack/.i18nrc.json @@ -128,7 +128,7 @@ "platform/plugins/private/rollup" ], "xpack.runtimeFields": "platform/plugins/private/runtime_fields", - "xpack.screenshotting": "plugins/screenshotting", + "xpack.screenshotting": "platform/plugins/shared/screenshotting", "xpack.searchSharedUI": "packages/search/shared_ui", "xpack.searchHomepage": "plugins/search_homepage", "xpack.searchIndices": "plugins/search_indices", diff --git a/x-pack/plugins/screenshotting/README.md b/x-pack/platform/plugins/shared/screenshotting/README.md similarity index 98% rename from x-pack/plugins/screenshotting/README.md rename to x-pack/platform/plugins/shared/screenshotting/README.md index 8138be53dc8f..b129bbb5ad9a 100644 --- a/x-pack/plugins/screenshotting/README.md +++ b/x-pack/platform/plugins/shared/screenshotting/README.md @@ -24,7 +24,7 @@ Here is an example of how you can take a screenshot of a Kibana URL. ```typescript import { lastValueFrom } from 'rxjs'; import type { CoreSetup, Plugin } from 'src/core/server'; -import type { ScreenshottingStart } from 'x-pack/plugins/screenshotting/server'; +import type { ScreenshottingStart } from 'x-pack/platform/plugins/shared/screenshotting/server'; interface StartDeps { diff --git a/x-pack/plugins/screenshotting/common/errors.ts b/x-pack/platform/plugins/shared/screenshotting/common/errors.ts similarity index 100% rename from x-pack/plugins/screenshotting/common/errors.ts rename to x-pack/platform/plugins/shared/screenshotting/common/errors.ts diff --git a/x-pack/plugins/screenshotting/common/expression.ts b/x-pack/platform/plugins/shared/screenshotting/common/expression.ts similarity index 100% rename from x-pack/plugins/screenshotting/common/expression.ts rename to x-pack/platform/plugins/shared/screenshotting/common/expression.ts diff --git a/x-pack/plugins/screenshotting/common/index.ts b/x-pack/platform/plugins/shared/screenshotting/common/index.ts similarity index 100% rename from x-pack/plugins/screenshotting/common/index.ts rename to x-pack/platform/plugins/shared/screenshotting/common/index.ts diff --git a/x-pack/plugins/screenshotting/common/layout.ts b/x-pack/platform/plugins/shared/screenshotting/common/layout.ts similarity index 100% rename from x-pack/plugins/screenshotting/common/layout.ts rename to x-pack/platform/plugins/shared/screenshotting/common/layout.ts diff --git a/x-pack/plugins/screenshotting/common/types.ts b/x-pack/platform/plugins/shared/screenshotting/common/types.ts similarity index 100% rename from x-pack/plugins/screenshotting/common/types.ts rename to x-pack/platform/plugins/shared/screenshotting/common/types.ts diff --git a/x-pack/plugins/screenshotting/jest.config.js b/x-pack/platform/plugins/shared/screenshotting/jest.config.js similarity index 52% rename from x-pack/plugins/screenshotting/jest.config.js rename to x-pack/platform/plugins/shared/screenshotting/jest.config.js index a02d667f86a1..0fd6d74a1d65 100644 --- a/x-pack/plugins/screenshotting/jest.config.js +++ b/x-pack/platform/plugins/shared/screenshotting/jest.config.js @@ -7,9 +7,10 @@ module.exports = { preset: '@kbn/test', - rootDir: '../../..', - roots: ['/x-pack/plugins/screenshotting'], - coverageDirectory: '/target/kibana-coverage/jest/x-pack/plugins/screenshotting', + rootDir: '../../../../..', + roots: ['/x-pack/platform/plugins/shared/screenshotting'], + coverageDirectory: + '/target/kibana-coverage/jest/x-pack/platform/plugins/shared/screenshotting', coverageReporters: ['text', 'html'], - collectCoverageFrom: ['/x-pack/plugins/screenshotting/server/**/*.{ts}'], + collectCoverageFrom: ['/x-pack/platform/plugins/shared/screenshotting/server/**/*.{ts}'], }; diff --git a/x-pack/plugins/screenshotting/jest.integration.config.js b/x-pack/platform/plugins/shared/screenshotting/jest.integration.config.js similarity index 76% rename from x-pack/plugins/screenshotting/jest.integration.config.js rename to x-pack/platform/plugins/shared/screenshotting/jest.integration.config.js index 45a65c93c6af..d0694061ed92 100644 --- a/x-pack/plugins/screenshotting/jest.integration.config.js +++ b/x-pack/platform/plugins/shared/screenshotting/jest.integration.config.js @@ -7,6 +7,6 @@ module.exports = { preset: '@kbn/test/jest_integration', - rootDir: '../../..', - roots: ['/x-pack/plugins/screenshotting'], + rootDir: '../../../../..', + roots: ['/x-pack/platform/plugins/shared/screenshotting'], }; diff --git a/x-pack/plugins/screenshotting/kibana.jsonc b/x-pack/platform/plugins/shared/screenshotting/kibana.jsonc similarity index 100% rename from x-pack/plugins/screenshotting/kibana.jsonc rename to x-pack/platform/plugins/shared/screenshotting/kibana.jsonc diff --git a/x-pack/plugins/screenshotting/public/app/app.scss b/x-pack/platform/plugins/shared/screenshotting/public/app/app.scss similarity index 100% rename from x-pack/plugins/screenshotting/public/app/app.scss rename to x-pack/platform/plugins/shared/screenshotting/public/app/app.scss diff --git a/x-pack/plugins/screenshotting/public/app/app.tsx b/x-pack/platform/plugins/shared/screenshotting/public/app/app.tsx similarity index 100% rename from x-pack/plugins/screenshotting/public/app/app.tsx rename to x-pack/platform/plugins/shared/screenshotting/public/app/app.tsx diff --git a/x-pack/plugins/screenshotting/public/app/index.ts b/x-pack/platform/plugins/shared/screenshotting/public/app/index.ts similarity index 100% rename from x-pack/plugins/screenshotting/public/app/index.ts rename to x-pack/platform/plugins/shared/screenshotting/public/app/index.ts diff --git a/x-pack/plugins/screenshotting/public/app/screenshot_mode_context.ts b/x-pack/platform/plugins/shared/screenshotting/public/app/screenshot_mode_context.ts similarity index 100% rename from x-pack/plugins/screenshotting/public/app/screenshot_mode_context.ts rename to x-pack/platform/plugins/shared/screenshotting/public/app/screenshot_mode_context.ts diff --git a/x-pack/plugins/screenshotting/public/index.ts b/x-pack/platform/plugins/shared/screenshotting/public/index.ts similarity index 100% rename from x-pack/plugins/screenshotting/public/index.ts rename to x-pack/platform/plugins/shared/screenshotting/public/index.ts diff --git a/x-pack/plugins/screenshotting/public/plugin.tsx b/x-pack/platform/plugins/shared/screenshotting/public/plugin.tsx similarity index 100% rename from x-pack/plugins/screenshotting/public/plugin.tsx rename to x-pack/platform/plugins/shared/screenshotting/public/plugin.tsx diff --git a/x-pack/plugins/screenshotting/server/__mocks__/puppeteer.ts b/x-pack/platform/plugins/shared/screenshotting/server/__mocks__/puppeteer.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/__mocks__/puppeteer.ts rename to x-pack/platform/plugins/shared/screenshotting/server/__mocks__/puppeteer.ts diff --git a/x-pack/plugins/screenshotting/server/assets/fonts/noto/LICENSE_OFL.txt b/x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/noto/LICENSE_OFL.txt similarity index 100% rename from x-pack/plugins/screenshotting/server/assets/fonts/noto/LICENSE_OFL.txt rename to x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/noto/LICENSE_OFL.txt diff --git a/x-pack/plugins/screenshotting/server/assets/fonts/noto/NotoSansCJKtc-Medium.ttf b/x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/noto/NotoSansCJKtc-Medium.ttf similarity index 100% rename from x-pack/plugins/screenshotting/server/assets/fonts/noto/NotoSansCJKtc-Medium.ttf rename to x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/noto/NotoSansCJKtc-Medium.ttf diff --git a/x-pack/plugins/screenshotting/server/assets/fonts/noto/NotoSansCJKtc-Regular.ttf b/x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/noto/NotoSansCJKtc-Regular.ttf similarity index 100% rename from x-pack/plugins/screenshotting/server/assets/fonts/noto/NotoSansCJKtc-Regular.ttf rename to x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/noto/NotoSansCJKtc-Regular.ttf diff --git a/x-pack/plugins/screenshotting/server/assets/fonts/noto/index.js b/x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/noto/index.js similarity index 100% rename from x-pack/plugins/screenshotting/server/assets/fonts/noto/index.js rename to x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/noto/index.js diff --git a/x-pack/plugins/screenshotting/server/assets/fonts/roboto/LICENSE.txt b/x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/roboto/LICENSE.txt similarity index 100% rename from x-pack/plugins/screenshotting/server/assets/fonts/roboto/LICENSE.txt rename to x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/roboto/LICENSE.txt diff --git a/x-pack/plugins/screenshotting/server/assets/fonts/roboto/Roboto-Italic.ttf b/x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/roboto/Roboto-Italic.ttf similarity index 100% rename from x-pack/plugins/screenshotting/server/assets/fonts/roboto/Roboto-Italic.ttf rename to x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/roboto/Roboto-Italic.ttf diff --git a/x-pack/plugins/screenshotting/server/assets/fonts/roboto/Roboto-Medium.ttf b/x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/roboto/Roboto-Medium.ttf similarity index 100% rename from x-pack/plugins/screenshotting/server/assets/fonts/roboto/Roboto-Medium.ttf rename to x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/roboto/Roboto-Medium.ttf diff --git a/x-pack/plugins/screenshotting/server/assets/fonts/roboto/Roboto-Regular.ttf b/x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/roboto/Roboto-Regular.ttf similarity index 100% rename from x-pack/plugins/screenshotting/server/assets/fonts/roboto/Roboto-Regular.ttf rename to x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/roboto/Roboto-Regular.ttf diff --git a/x-pack/plugins/screenshotting/server/assets/img/logo-grey.png b/x-pack/platform/plugins/shared/screenshotting/server/assets/img/logo-grey.png similarity index 100% rename from x-pack/plugins/screenshotting/server/assets/img/logo-grey.png rename to x-pack/platform/plugins/shared/screenshotting/server/assets/img/logo-grey.png diff --git a/x-pack/plugins/screenshotting/server/browsers/chromium/driver.test.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/chromium/driver.test.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/chromium/driver.test.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/chromium/driver.test.ts diff --git a/x-pack/plugins/screenshotting/server/browsers/chromium/driver.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/chromium/driver.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/chromium/driver.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/chromium/driver.ts diff --git a/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/index.test.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/chromium/driver_factory/index.test.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/index.test.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/chromium/driver_factory/index.test.ts diff --git a/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/index.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/chromium/driver_factory/index.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/index.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/chromium/driver_factory/index.ts diff --git a/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/metrics.test.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/chromium/driver_factory/metrics.test.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/metrics.test.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/chromium/driver_factory/metrics.test.ts diff --git a/x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/metrics.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/chromium/driver_factory/metrics.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/metrics.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/chromium/driver_factory/metrics.ts diff --git a/x-pack/plugins/screenshotting/server/browsers/chromium/index.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/chromium/index.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/chromium/index.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/chromium/index.ts diff --git a/x-pack/plugins/screenshotting/server/browsers/chromium/integration_tests/downloads.test.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/chromium/integration_tests/downloads.test.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/chromium/integration_tests/downloads.test.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/chromium/integration_tests/downloads.test.ts diff --git a/x-pack/plugins/screenshotting/server/browsers/chromium/strip_unsafe_headers.test.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/chromium/strip_unsafe_headers.test.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/chromium/strip_unsafe_headers.test.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/chromium/strip_unsafe_headers.test.ts diff --git a/x-pack/plugins/screenshotting/server/browsers/chromium/strip_unsafe_headers.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/chromium/strip_unsafe_headers.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/chromium/strip_unsafe_headers.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/chromium/strip_unsafe_headers.ts diff --git a/x-pack/plugins/screenshotting/server/browsers/chromium/templates/footer.handlebars.html b/x-pack/platform/plugins/shared/screenshotting/server/browsers/chromium/templates/footer.handlebars.html similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/chromium/templates/footer.handlebars.html rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/chromium/templates/footer.handlebars.html diff --git a/x-pack/plugins/screenshotting/server/browsers/chromium/templates/header.handlebars.html b/x-pack/platform/plugins/shared/screenshotting/server/browsers/chromium/templates/header.handlebars.html similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/chromium/templates/header.handlebars.html rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/chromium/templates/header.handlebars.html diff --git a/x-pack/plugins/screenshotting/server/browsers/chromium/templates/index.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/chromium/templates/index.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/chromium/templates/index.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/chromium/templates/index.ts diff --git a/x-pack/plugins/screenshotting/server/browsers/download/checksum.test.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/download/checksum.test.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/download/checksum.test.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/download/checksum.test.ts diff --git a/x-pack/plugins/screenshotting/server/browsers/download/checksum.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/download/checksum.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/download/checksum.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/download/checksum.ts diff --git a/x-pack/plugins/screenshotting/server/browsers/download/fetch.test.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/download/fetch.test.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/download/fetch.test.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/download/fetch.test.ts diff --git a/x-pack/plugins/screenshotting/server/browsers/download/fetch.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/download/fetch.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/download/fetch.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/download/fetch.ts diff --git a/x-pack/plugins/screenshotting/server/browsers/download/index.test.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/download/index.test.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/download/index.test.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/download/index.test.ts diff --git a/x-pack/plugins/screenshotting/server/browsers/download/index.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/download/index.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/download/index.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/download/index.ts diff --git a/x-pack/plugins/screenshotting/server/browsers/extract/__fixtures__/file.md b/x-pack/platform/plugins/shared/screenshotting/server/browsers/extract/__fixtures__/file.md similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/extract/__fixtures__/file.md rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/extract/__fixtures__/file.md diff --git a/x-pack/plugins/screenshotting/server/browsers/extract/__fixtures__/file.md.zip b/x-pack/platform/plugins/shared/screenshotting/server/browsers/extract/__fixtures__/file.md.zip similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/extract/__fixtures__/file.md.zip rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/extract/__fixtures__/file.md.zip diff --git a/x-pack/plugins/screenshotting/server/browsers/extract/extract.test.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/extract/extract.test.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/extract/extract.test.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/extract/extract.test.ts diff --git a/x-pack/plugins/screenshotting/server/browsers/extract/extract.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/extract/extract.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/extract/extract.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/extract/extract.ts diff --git a/x-pack/plugins/screenshotting/server/browsers/extract/extract_error.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/extract/extract_error.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/extract/extract_error.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/extract/extract_error.ts diff --git a/x-pack/plugins/screenshotting/server/browsers/extract/index.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/extract/index.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/extract/index.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/extract/index.ts diff --git a/x-pack/plugins/screenshotting/server/browsers/extract/unzip.test.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/extract/unzip.test.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/extract/unzip.test.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/extract/unzip.test.ts diff --git a/x-pack/plugins/screenshotting/server/browsers/extract/unzip.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/extract/unzip.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/extract/unzip.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/extract/unzip.ts diff --git a/x-pack/plugins/screenshotting/server/browsers/index.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/index.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/index.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/index.ts diff --git a/x-pack/plugins/screenshotting/server/browsers/install.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/install.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/install.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/install.ts diff --git a/x-pack/plugins/screenshotting/server/browsers/mock.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/mock.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/mock.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/mock.ts diff --git a/x-pack/plugins/screenshotting/server/browsers/network_policy.test.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/network_policy.test.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/network_policy.test.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/network_policy.test.ts diff --git a/x-pack/plugins/screenshotting/server/browsers/network_policy.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/network_policy.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/network_policy.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/network_policy.ts diff --git a/x-pack/plugins/screenshotting/server/browsers/safe_child_process.ts b/x-pack/platform/plugins/shared/screenshotting/server/browsers/safe_child_process.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/browsers/safe_child_process.ts rename to x-pack/platform/plugins/shared/screenshotting/server/browsers/safe_child_process.ts diff --git a/x-pack/plugins/screenshotting/server/cloud/index.ts b/x-pack/platform/plugins/shared/screenshotting/server/cloud/index.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/cloud/index.ts rename to x-pack/platform/plugins/shared/screenshotting/server/cloud/index.ts diff --git a/x-pack/plugins/screenshotting/server/config/schema.test.ts b/x-pack/platform/plugins/shared/screenshotting/server/config/schema.test.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/config/schema.test.ts rename to x-pack/platform/plugins/shared/screenshotting/server/config/schema.test.ts diff --git a/x-pack/plugins/screenshotting/server/constants.ts b/x-pack/platform/plugins/shared/screenshotting/server/constants.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/constants.ts rename to x-pack/platform/plugins/shared/screenshotting/server/constants.ts diff --git a/x-pack/plugins/screenshotting/server/formats/index.ts b/x-pack/platform/plugins/shared/screenshotting/server/formats/index.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/formats/index.ts rename to x-pack/platform/plugins/shared/screenshotting/server/formats/index.ts diff --git a/x-pack/plugins/screenshotting/server/formats/pdf/index.ts b/x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/index.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/formats/pdf/index.ts rename to x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/index.ts diff --git a/x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/README.md b/x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/README.md similarity index 100% rename from x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/README.md rename to x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/README.md diff --git a/x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/constants.ts b/x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/constants.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/constants.ts rename to x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/constants.ts diff --git a/x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/get_doc_options.ts b/x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/get_doc_options.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/get_doc_options.ts rename to x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/get_doc_options.ts diff --git a/x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/get_font.test.ts b/x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/get_font.test.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/get_font.test.ts rename to x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/get_font.test.ts diff --git a/x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/get_font.ts b/x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/get_font.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/get_font.ts rename to x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/get_font.ts diff --git a/x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/get_template.ts b/x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/get_template.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/get_template.ts rename to x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/get_template.ts diff --git a/x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/index.ts b/x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/index.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/index.ts rename to x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/index.ts diff --git a/x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/integration_tests/buggy_worker.js b/x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/integration_tests/buggy_worker.js similarity index 100% rename from x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/integration_tests/buggy_worker.js rename to x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/integration_tests/buggy_worker.js diff --git a/x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/integration_tests/memory_leak_worker.js b/x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/integration_tests/memory_leak_worker.js similarity index 100% rename from x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/integration_tests/memory_leak_worker.js rename to x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/integration_tests/memory_leak_worker.js diff --git a/x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/integration_tests/pdfmaker.test.ts b/x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/integration_tests/pdfmaker.test.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/integration_tests/pdfmaker.test.ts rename to x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/integration_tests/pdfmaker.test.ts diff --git a/x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/pdfmaker.ts b/x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/pdfmaker.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/pdfmaker.ts rename to x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/pdfmaker.ts diff --git a/x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/types.ts b/x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/types.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/types.ts rename to x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/types.ts diff --git a/x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/worker.ts b/x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/worker.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/worker.ts rename to x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/worker.ts diff --git a/x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/worker_dependencies.ts b/x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/worker_dependencies.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/worker_dependencies.ts rename to x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/worker_dependencies.ts diff --git a/x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/worker_src_harness.js b/x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/worker_src_harness.js similarity index 90% rename from x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/worker_src_harness.js rename to x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/worker_src_harness.js index ca319ace9d02..05a6c8eaa975 100644 --- a/x-pack/plugins/screenshotting/server/formats/pdf/pdf_maker/worker_src_harness.js +++ b/x-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/worker_src_harness.js @@ -11,6 +11,6 @@ */ // eslint-disable-next-line @kbn/imports/no_boundary_crossing -require('../../../../../../../src/setup_node_env'); +require('../../../../../../../../../src/setup_node_env'); // eslint-disable-next-line @kbn/imports/uniform_imports require('./worker.ts'); diff --git a/x-pack/plugins/screenshotting/server/formats/png.ts b/x-pack/platform/plugins/shared/screenshotting/server/formats/png.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/formats/png.ts rename to x-pack/platform/plugins/shared/screenshotting/server/formats/png.ts diff --git a/x-pack/plugins/screenshotting/server/index.ts b/x-pack/platform/plugins/shared/screenshotting/server/index.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/index.ts rename to x-pack/platform/plugins/shared/screenshotting/server/index.ts diff --git a/x-pack/plugins/screenshotting/server/layouts/base_layout.ts b/x-pack/platform/plugins/shared/screenshotting/server/layouts/base_layout.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/layouts/base_layout.ts rename to x-pack/platform/plugins/shared/screenshotting/server/layouts/base_layout.ts diff --git a/x-pack/plugins/screenshotting/server/layouts/canvas_layout.ts b/x-pack/platform/plugins/shared/screenshotting/server/layouts/canvas_layout.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/layouts/canvas_layout.ts rename to x-pack/platform/plugins/shared/screenshotting/server/layouts/canvas_layout.ts diff --git a/x-pack/plugins/screenshotting/server/layouts/create_layout.test.ts b/x-pack/platform/plugins/shared/screenshotting/server/layouts/create_layout.test.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/layouts/create_layout.test.ts rename to x-pack/platform/plugins/shared/screenshotting/server/layouts/create_layout.test.ts diff --git a/x-pack/plugins/screenshotting/server/layouts/create_layout.ts b/x-pack/platform/plugins/shared/screenshotting/server/layouts/create_layout.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/layouts/create_layout.ts rename to x-pack/platform/plugins/shared/screenshotting/server/layouts/create_layout.ts diff --git a/x-pack/plugins/screenshotting/server/layouts/index.ts b/x-pack/platform/plugins/shared/screenshotting/server/layouts/index.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/layouts/index.ts rename to x-pack/platform/plugins/shared/screenshotting/server/layouts/index.ts diff --git a/x-pack/plugins/screenshotting/server/layouts/mock.ts b/x-pack/platform/plugins/shared/screenshotting/server/layouts/mock.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/layouts/mock.ts rename to x-pack/platform/plugins/shared/screenshotting/server/layouts/mock.ts diff --git a/x-pack/plugins/screenshotting/server/layouts/preserve_layout.css b/x-pack/platform/plugins/shared/screenshotting/server/layouts/preserve_layout.css similarity index 100% rename from x-pack/plugins/screenshotting/server/layouts/preserve_layout.css rename to x-pack/platform/plugins/shared/screenshotting/server/layouts/preserve_layout.css diff --git a/x-pack/plugins/screenshotting/server/layouts/preserve_layout.test.ts b/x-pack/platform/plugins/shared/screenshotting/server/layouts/preserve_layout.test.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/layouts/preserve_layout.test.ts rename to x-pack/platform/plugins/shared/screenshotting/server/layouts/preserve_layout.test.ts diff --git a/x-pack/plugins/screenshotting/server/layouts/preserve_layout.ts b/x-pack/platform/plugins/shared/screenshotting/server/layouts/preserve_layout.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/layouts/preserve_layout.ts rename to x-pack/platform/plugins/shared/screenshotting/server/layouts/preserve_layout.ts diff --git a/x-pack/plugins/screenshotting/server/layouts/print_layout.ts b/x-pack/platform/plugins/shared/screenshotting/server/layouts/print_layout.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/layouts/print_layout.ts rename to x-pack/platform/plugins/shared/screenshotting/server/layouts/print_layout.ts diff --git a/x-pack/plugins/screenshotting/server/mock.ts b/x-pack/platform/plugins/shared/screenshotting/server/mock.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/mock.ts rename to x-pack/platform/plugins/shared/screenshotting/server/mock.ts diff --git a/x-pack/plugins/screenshotting/server/plugin.test.ts b/x-pack/platform/plugins/shared/screenshotting/server/plugin.test.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/plugin.test.ts rename to x-pack/platform/plugins/shared/screenshotting/server/plugin.test.ts diff --git a/x-pack/plugins/screenshotting/server/plugin.ts b/x-pack/platform/plugins/shared/screenshotting/server/plugin.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/plugin.ts rename to x-pack/platform/plugins/shared/screenshotting/server/plugin.ts diff --git a/x-pack/plugins/screenshotting/server/screenshots/__snapshots__/index.test.ts.snap b/x-pack/platform/plugins/shared/screenshotting/server/screenshots/__snapshots__/index.test.ts.snap similarity index 100% rename from x-pack/plugins/screenshotting/server/screenshots/__snapshots__/index.test.ts.snap rename to x-pack/platform/plugins/shared/screenshotting/server/screenshots/__snapshots__/index.test.ts.snap diff --git a/x-pack/plugins/screenshotting/server/screenshots/constants.ts b/x-pack/platform/plugins/shared/screenshotting/server/screenshots/constants.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/screenshots/constants.ts rename to x-pack/platform/plugins/shared/screenshotting/server/screenshots/constants.ts diff --git a/x-pack/plugins/screenshotting/server/screenshots/event_logger/index.test.ts b/x-pack/platform/plugins/shared/screenshotting/server/screenshots/event_logger/index.test.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/screenshots/event_logger/index.test.ts rename to x-pack/platform/plugins/shared/screenshotting/server/screenshots/event_logger/index.test.ts diff --git a/x-pack/plugins/screenshotting/server/screenshots/event_logger/index.ts b/x-pack/platform/plugins/shared/screenshotting/server/screenshots/event_logger/index.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/screenshots/event_logger/index.ts rename to x-pack/platform/plugins/shared/screenshotting/server/screenshots/event_logger/index.ts diff --git a/x-pack/plugins/screenshotting/server/screenshots/get_element_position_data.test.ts b/x-pack/platform/plugins/shared/screenshotting/server/screenshots/get_element_position_data.test.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/screenshots/get_element_position_data.test.ts rename to x-pack/platform/plugins/shared/screenshotting/server/screenshots/get_element_position_data.test.ts diff --git a/x-pack/plugins/screenshotting/server/screenshots/get_element_position_data.ts b/x-pack/platform/plugins/shared/screenshotting/server/screenshots/get_element_position_data.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/screenshots/get_element_position_data.ts rename to x-pack/platform/plugins/shared/screenshotting/server/screenshots/get_element_position_data.ts diff --git a/x-pack/plugins/screenshotting/server/screenshots/get_number_of_items.test.ts b/x-pack/platform/plugins/shared/screenshotting/server/screenshots/get_number_of_items.test.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/screenshots/get_number_of_items.test.ts rename to x-pack/platform/plugins/shared/screenshotting/server/screenshots/get_number_of_items.test.ts diff --git a/x-pack/plugins/screenshotting/server/screenshots/get_number_of_items.ts b/x-pack/platform/plugins/shared/screenshotting/server/screenshots/get_number_of_items.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/screenshots/get_number_of_items.ts rename to x-pack/platform/plugins/shared/screenshotting/server/screenshots/get_number_of_items.ts diff --git a/x-pack/plugins/screenshotting/server/screenshots/get_pdf.ts b/x-pack/platform/plugins/shared/screenshotting/server/screenshots/get_pdf.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/screenshots/get_pdf.ts rename to x-pack/platform/plugins/shared/screenshotting/server/screenshots/get_pdf.ts diff --git a/x-pack/plugins/screenshotting/server/screenshots/get_render_errors.test.ts b/x-pack/platform/plugins/shared/screenshotting/server/screenshots/get_render_errors.test.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/screenshots/get_render_errors.test.ts rename to x-pack/platform/plugins/shared/screenshotting/server/screenshots/get_render_errors.test.ts diff --git a/x-pack/plugins/screenshotting/server/screenshots/get_render_errors.ts b/x-pack/platform/plugins/shared/screenshotting/server/screenshots/get_render_errors.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/screenshots/get_render_errors.ts rename to x-pack/platform/plugins/shared/screenshotting/server/screenshots/get_render_errors.ts diff --git a/x-pack/plugins/screenshotting/server/screenshots/get_screenshots.test.ts b/x-pack/platform/plugins/shared/screenshotting/server/screenshots/get_screenshots.test.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/screenshots/get_screenshots.test.ts rename to x-pack/platform/plugins/shared/screenshotting/server/screenshots/get_screenshots.test.ts diff --git a/x-pack/plugins/screenshotting/server/screenshots/get_screenshots.ts b/x-pack/platform/plugins/shared/screenshotting/server/screenshots/get_screenshots.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/screenshots/get_screenshots.ts rename to x-pack/platform/plugins/shared/screenshotting/server/screenshots/get_screenshots.ts diff --git a/x-pack/plugins/screenshotting/server/screenshots/get_time_range.test.ts b/x-pack/platform/plugins/shared/screenshotting/server/screenshots/get_time_range.test.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/screenshots/get_time_range.test.ts rename to x-pack/platform/plugins/shared/screenshotting/server/screenshots/get_time_range.test.ts diff --git a/x-pack/plugins/screenshotting/server/screenshots/get_time_range.ts b/x-pack/platform/plugins/shared/screenshotting/server/screenshots/get_time_range.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/screenshots/get_time_range.ts rename to x-pack/platform/plugins/shared/screenshotting/server/screenshots/get_time_range.ts diff --git a/x-pack/plugins/screenshotting/server/screenshots/index.test.ts b/x-pack/platform/plugins/shared/screenshotting/server/screenshots/index.test.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/screenshots/index.test.ts rename to x-pack/platform/plugins/shared/screenshotting/server/screenshots/index.test.ts diff --git a/x-pack/plugins/screenshotting/server/screenshots/index.ts b/x-pack/platform/plugins/shared/screenshotting/server/screenshots/index.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/screenshots/index.ts rename to x-pack/platform/plugins/shared/screenshotting/server/screenshots/index.ts diff --git a/x-pack/plugins/screenshotting/server/screenshots/inject_css.ts b/x-pack/platform/plugins/shared/screenshotting/server/screenshots/inject_css.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/screenshots/inject_css.ts rename to x-pack/platform/plugins/shared/screenshotting/server/screenshots/inject_css.ts diff --git a/x-pack/plugins/screenshotting/server/screenshots/mock.ts b/x-pack/platform/plugins/shared/screenshotting/server/screenshots/mock.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/screenshots/mock.ts rename to x-pack/platform/plugins/shared/screenshotting/server/screenshots/mock.ts diff --git a/x-pack/plugins/screenshotting/server/screenshots/observable.test.ts b/x-pack/platform/plugins/shared/screenshotting/server/screenshots/observable.test.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/screenshots/observable.test.ts rename to x-pack/platform/plugins/shared/screenshotting/server/screenshots/observable.test.ts diff --git a/x-pack/plugins/screenshotting/server/screenshots/observable.ts b/x-pack/platform/plugins/shared/screenshotting/server/screenshots/observable.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/screenshots/observable.ts rename to x-pack/platform/plugins/shared/screenshotting/server/screenshots/observable.ts diff --git a/x-pack/plugins/screenshotting/server/screenshots/open_url.ts b/x-pack/platform/plugins/shared/screenshotting/server/screenshots/open_url.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/screenshots/open_url.ts rename to x-pack/platform/plugins/shared/screenshotting/server/screenshots/open_url.ts diff --git a/x-pack/plugins/screenshotting/server/screenshots/screenshots.test.ts b/x-pack/platform/plugins/shared/screenshotting/server/screenshots/screenshots.test.ts similarity index 98% rename from x-pack/plugins/screenshotting/server/screenshots/screenshots.test.ts rename to x-pack/platform/plugins/shared/screenshotting/server/screenshots/screenshots.test.ts index 4f217ef96c61..95261626e15f 100644 --- a/x-pack/plugins/screenshotting/server/screenshots/screenshots.test.ts +++ b/x-pack/platform/plugins/shared/screenshotting/server/screenshots/screenshots.test.ts @@ -30,7 +30,8 @@ describe('class Screenshots', () => { let mockLogger: Logger; let mockScreenshotModeSetup: ScreenshotModePluginSetup; - const mockBinaryPath = '/kibana/x-pack/plugins/screenshotting/chromium/linux/headless_shell'; + const mockBinaryPath = + '/kibana/x-pack/platform/plugins/shared/screenshotting/chromium/linux/headless_shell'; const mockBasePath = '/kibanaTest1'; beforeEach(() => { diff --git a/x-pack/plugins/screenshotting/server/screenshots/screenshots.ts b/x-pack/platform/plugins/shared/screenshotting/server/screenshots/screenshots.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/screenshots/screenshots.ts rename to x-pack/platform/plugins/shared/screenshotting/server/screenshots/screenshots.ts diff --git a/x-pack/plugins/screenshotting/server/screenshots/types.ts b/x-pack/platform/plugins/shared/screenshotting/server/screenshots/types.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/screenshots/types.ts rename to x-pack/platform/plugins/shared/screenshotting/server/screenshots/types.ts diff --git a/x-pack/plugins/screenshotting/server/screenshots/wait_for_render.ts b/x-pack/platform/plugins/shared/screenshotting/server/screenshots/wait_for_render.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/screenshots/wait_for_render.ts rename to x-pack/platform/plugins/shared/screenshotting/server/screenshots/wait_for_render.ts diff --git a/x-pack/plugins/screenshotting/server/screenshots/wait_for_visualizations.ts b/x-pack/platform/plugins/shared/screenshotting/server/screenshots/wait_for_visualizations.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/screenshots/wait_for_visualizations.ts rename to x-pack/platform/plugins/shared/screenshotting/server/screenshots/wait_for_visualizations.ts diff --git a/x-pack/plugins/screenshotting/server/utils.ts b/x-pack/platform/plugins/shared/screenshotting/server/utils.ts similarity index 100% rename from x-pack/plugins/screenshotting/server/utils.ts rename to x-pack/platform/plugins/shared/screenshotting/server/utils.ts diff --git a/x-pack/plugins/screenshotting/tsconfig.json b/x-pack/platform/plugins/shared/screenshotting/tsconfig.json similarity index 79% rename from x-pack/plugins/screenshotting/tsconfig.json rename to x-pack/platform/plugins/shared/screenshotting/tsconfig.json index 5e37b84bbf2e..200c6d9c2592 100644 --- a/x-pack/plugins/screenshotting/tsconfig.json +++ b/x-pack/platform/plugins/shared/screenshotting/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", }, @@ -7,11 +7,11 @@ "common/**/*", "public/**/*", "server/**/*", - "../../../typings/**/*" + "../../../../../typings/**/*" ], "kbn_references": [ "@kbn/core", - { "path": "../../../src/setup_node_env/tsconfig.json" }, + { "path": "../../../../../src/setup_node_env/tsconfig.json" }, "@kbn/expressions-plugin", "@kbn/screenshot-mode-plugin", "@kbn/cloud-plugin", diff --git a/x-pack/plugins/lens/public/app_plugin/share_action.ts b/x-pack/plugins/lens/public/app_plugin/share_action.ts index dbb5d9d61eda..e9e0c73cd5d6 100644 --- a/x-pack/plugins/lens/public/app_plugin/share_action.ts +++ b/x-pack/plugins/lens/public/app_plugin/share_action.ts @@ -31,7 +31,7 @@ interface ShareableConfiguration export const DEFAULT_LENS_LAYOUT_DIMENSIONS = { width: 1793, // this is a magic number from the reporting tool implementation - // see: x-pack/plugins/screenshotting/server/browsers/chromium/driver_factory/index.ts#L146 + // see: x-pack/platform/plugins/shared/screenshotting/server/browsers/chromium/driver_factory/index.ts#L146 height: 1086, }; diff --git a/yarn.lock b/yarn.lock index 4e68732c9f81..90597fb5545c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6953,7 +6953,7 @@ version "0.0.0" uid "" -"@kbn/screenshotting-plugin@link:x-pack/plugins/screenshotting": +"@kbn/screenshotting-plugin@link:x-pack/platform/plugins/shared/screenshotting": version "0.0.0" uid "" From 8ad2d505ce22e0afc80ae278803d5f479429fbdb Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 18 Dec 2024 05:11:58 +0000 Subject: [PATCH 21/60] skip flaky suite (#203307) --- .../components/steps/step_select_hosts.test.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_select_hosts.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_select_hosts.test.tsx index dd3945664bd6..a0329a1c9ce0 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_select_hosts.test.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_select_hosts.test.tsx @@ -42,7 +42,8 @@ jest.mock('../../../../../hooks', () => { }; }); -describe('StepSelectHosts', () => { +// FLAKY: https://github.com/elastic/kibana/issues/203307 +describe.skip('StepSelectHosts', () => { const packageInfo: PackageInfo = { name: 'apache', version: '1.0.0', From 6eaa1d0633f20c9c45cff2b758da5881c0922f3e Mon Sep 17 00:00:00 2001 From: Yuliia Naumenko Date: Tue, 17 Dec 2024 21:13:10 -0800 Subject: [PATCH 22/60] [AI Connector] Change completion subAction schema to be OpenAI compatible (#200249) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … ## Summary Summarize your PR. If it involves visual changes include a screenshot or gif. ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_node:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) ### Identify risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [See some risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) - [ ] ... --- .../server/lib/gen_ai_token_tracking.ts | 5 +- .../common/inference/constants.ts | 3 + .../common/inference/schema.ts | 179 ++++++++++++++ .../common/inference/types.ts | 10 + .../connector_types/inference/constants.tsx | 16 +- .../inference/inference.test.tsx | 32 ++- .../connector_types/inference/inference.tsx | 22 +- .../connector_types/inference/params.test.tsx | 25 +- .../connector_types/inference/params.tsx | 76 +++++- .../public/connector_types/inference/types.ts | 7 + .../connector_types/inference/helpers.ts | 111 +++++++++ .../server/connector_types/inference/index.ts | 5 +- .../inference/inference.test.ts | 103 +++++--- .../connector_types/inference/inference.ts | 224 ++++++++++++++---- 14 files changed, 721 insertions(+), 97 deletions(-) create mode 100644 x-pack/plugins/stack_connectors/server/connector_types/inference/helpers.ts diff --git a/x-pack/plugins/actions/server/lib/gen_ai_token_tracking.ts b/x-pack/plugins/actions/server/lib/gen_ai_token_tracking.ts index d73610892098..ff73095ac242 100644 --- a/x-pack/plugins/actions/server/lib/gen_ai_token_tracking.ts +++ b/x-pack/plugins/actions/server/lib/gen_ai_token_tracking.ts @@ -295,4 +295,7 @@ export const getGenAiTokenTracking = async ({ }; export const shouldTrackGenAiToken = (actionTypeId: string) => - actionTypeId === '.gen-ai' || actionTypeId === '.bedrock' || actionTypeId === '.gemini'; + actionTypeId === '.gen-ai' || + actionTypeId === '.bedrock' || + actionTypeId === '.gemini' || + actionTypeId === '.inference'; diff --git a/x-pack/plugins/stack_connectors/common/inference/constants.ts b/x-pack/plugins/stack_connectors/common/inference/constants.ts index b795e54f5d32..c2f2e6713270 100644 --- a/x-pack/plugins/stack_connectors/common/inference/constants.ts +++ b/x-pack/plugins/stack_connectors/common/inference/constants.ts @@ -32,6 +32,9 @@ export enum ServiceProviderKeys { export const INFERENCE_CONNECTOR_ID = '.inference'; export enum SUB_ACTION { + UNIFIED_COMPLETION_ASYNC_ITERATOR = 'unified_completion_async_iterator', + UNIFIED_COMPLETION_STREAM = 'unified_completion_stream', + UNIFIED_COMPLETION = 'unified_completion', COMPLETION = 'completion', RERANK = 'rerank', TEXT_EMBEDDING = 'text_embedding', diff --git a/x-pack/plugins/stack_connectors/common/inference/schema.ts b/x-pack/plugins/stack_connectors/common/inference/schema.ts index 07b51cf9a5aa..c62e9782bb51 100644 --- a/x-pack/plugins/stack_connectors/common/inference/schema.ts +++ b/x-pack/plugins/stack_connectors/common/inference/schema.ts @@ -23,6 +23,176 @@ export const ChatCompleteParamsSchema = schema.object({ input: schema.string(), }); +// subset of OpenAI.ChatCompletionMessageParam https://github.com/openai/openai-node/blob/master/src/resources/chat/completions.ts +const AIMessage = schema.object({ + role: schema.string(), + content: schema.maybe(schema.string()), + name: schema.maybe(schema.string()), + tool_calls: schema.maybe( + schema.arrayOf( + schema.object({ + id: schema.string(), + function: schema.object({ + arguments: schema.maybe(schema.string()), + name: schema.maybe(schema.string()), + }), + type: schema.string(), + }) + ) + ), + tool_call_id: schema.maybe(schema.string()), +}); + +const AITool = schema.object({ + type: schema.string(), + function: schema.object({ + name: schema.string(), + description: schema.maybe(schema.string()), + parameters: schema.maybe(schema.recordOf(schema.string(), schema.any())), + }), +}); + +// subset of OpenAI.ChatCompletionCreateParamsBase https://github.com/openai/openai-node/blob/master/src/resources/chat/completions.ts +export const UnifiedChatCompleteParamsSchema = schema.object({ + body: schema.object({ + messages: schema.arrayOf(AIMessage, { defaultValue: [] }), + model: schema.maybe(schema.string()), + /** + * The maximum number of [tokens](/tokenizer) that can be generated in the chat + * completion. This value can be used to control + * [costs](https://openai.com/api/pricing/) for text generated via API. + * + * This value is now deprecated in favor of `max_completion_tokens`, and is not + * compatible with + * [o1 series models](https://platform.openai.com/docs/guides/reasoning). + */ + max_tokens: schema.maybe(schema.number()), + /** + * Developer-defined tags and values used for filtering completions in the + * [dashboard](https://platform.openai.com/chat-completions). + */ + metadata: schema.maybe(schema.recordOf(schema.string(), schema.string())), + /** + * How many chat completion choices to generate for each input message. Note that + * you will be charged based on the number of generated tokens across all of the + * choices. Keep `n` as `1` to minimize costs. + */ + n: schema.maybe(schema.number()), + /** + * Up to 4 sequences where the API will stop generating further tokens. + */ + stop: schema.maybe( + schema.nullable(schema.oneOf([schema.string(), schema.arrayOf(schema.string())])) + ), + /** + * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will + * make the output more random, while lower values like 0.2 will make it more + * focused and deterministic. + * + * We generally recommend altering this or `top_p` but not both. + */ + temperature: schema.maybe(schema.number()), + /** + * Controls which (if any) tool is called by the model. `none` means the model will + * not call any tool and instead generates a message. `auto` means the model can + * pick between generating a message or calling one or more tools. `required` means + * the model must call one or more tools. Specifying a particular tool via + * `{"type": "function", "function": {"name": "my_function"}}` forces the model to + * call that tool. + * + * `none` is the default when no tools are present. `auto` is the default if tools + * are present. + */ + tool_choice: schema.maybe( + schema.oneOf([ + schema.string(), + schema.object({ + type: schema.string(), + function: schema.object({ + name: schema.string(), + }), + }), + ]) + ), + /** + * A list of tools the model may call. Currently, only functions are supported as a + * tool. Use this to provide a list of functions the model may generate JSON inputs + * for. A max of 128 functions are supported. + */ + tools: schema.maybe(schema.arrayOf(AITool)), + /** + * An alternative to sampling with temperature, called nucleus sampling, where the + * model considers the results of the tokens with top_p probability mass. So 0.1 + * means only the tokens comprising the top 10% probability mass are considered. + * + * We generally recommend altering this or `temperature` but not both. + */ + top_p: schema.maybe(schema.number()), + /** + * A unique identifier representing your end-user, which can help OpenAI to monitor + * and detect abuse. + * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids). + */ + user: schema.maybe(schema.string()), + }), + // abort signal from client + signal: schema.maybe(schema.any()), +}); + +export const UnifiedChatCompleteResponseSchema = schema.object({ + id: schema.string(), + choices: schema.arrayOf( + schema.object({ + finish_reason: schema.maybe( + schema.nullable( + schema.oneOf([ + schema.literal('stop'), + schema.literal('length'), + schema.literal('tool_calls'), + schema.literal('content_filter'), + schema.literal('function_call'), + ]) + ) + ), + index: schema.maybe(schema.number()), + message: schema.object({ + content: schema.maybe(schema.nullable(schema.string())), + refusal: schema.maybe(schema.nullable(schema.string())), + role: schema.maybe(schema.string()), + tool_calls: schema.maybe( + schema.arrayOf( + schema.object({ + id: schema.maybe(schema.string()), + index: schema.maybe(schema.number()), + function: schema.maybe( + schema.object({ + arguments: schema.maybe(schema.string()), + name: schema.maybe(schema.string()), + }) + ), + type: schema.maybe(schema.string()), + }), + { defaultValue: [] } + ) + ), + }), + }), + { defaultValue: [] } + ), + created: schema.maybe(schema.number()), + model: schema.maybe(schema.string()), + object: schema.maybe(schema.string()), + usage: schema.maybe( + schema.nullable( + schema.object({ + completion_tokens: schema.maybe(schema.number()), + prompt_tokens: schema.maybe(schema.number()), + total_tokens: schema.maybe(schema.number()), + }) + ) + ), +}); + export const ChatCompleteResponseSchema = schema.arrayOf( schema.object({ result: schema.string(), @@ -66,3 +236,12 @@ export const TextEmbeddingResponseSchema = schema.arrayOf( ); export const StreamingResponseSchema = schema.stream(); + +// Run action schema +export const DashboardActionParamsSchema = schema.object({ + dashboardId: schema.string(), +}); + +export const DashboardActionResponseSchema = schema.object({ + available: schema.boolean(), +}); diff --git a/x-pack/plugins/stack_connectors/common/inference/types.ts b/x-pack/plugins/stack_connectors/common/inference/types.ts index d8b846ce1942..1593429792e0 100644 --- a/x-pack/plugins/stack_connectors/common/inference/types.ts +++ b/x-pack/plugins/stack_connectors/common/inference/types.ts @@ -18,12 +18,19 @@ import { SparseEmbeddingResponseSchema, TextEmbeddingParamsSchema, TextEmbeddingResponseSchema, + UnifiedChatCompleteParamsSchema, + UnifiedChatCompleteResponseSchema, + DashboardActionParamsSchema, + DashboardActionResponseSchema, } from './schema'; import { ConfigProperties } from '../dynamic_config/types'; export type Config = TypeOf; export type Secrets = TypeOf; +export type UnifiedChatCompleteParams = TypeOf; +export type UnifiedChatCompleteResponse = TypeOf; + export type ChatCompleteParams = TypeOf; export type ChatCompleteResponse = TypeOf; @@ -38,6 +45,9 @@ export type TextEmbeddingResponse = TypeOf; export type StreamingResponse = TypeOf; +export type DashboardActionParams = TypeOf; +export type DashboardActionResponse = TypeOf; + export type FieldsConfiguration = Record; export interface InferenceProvider { diff --git a/x-pack/plugins/stack_connectors/public/connector_types/inference/constants.tsx b/x-pack/plugins/stack_connectors/public/connector_types/inference/constants.tsx index 8427caaf49ff..1b635ca8fe88 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/inference/constants.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/inference/constants.tsx @@ -25,13 +25,27 @@ export const DEFAULT_TEXT_EMBEDDING_BODY = { inputType: 'ingest', }; +export const DEFAULT_UNIFIED_CHAT_COMPLETE_BODY = { + body: { + messages: [ + { + role: 'user', + content: 'Hello world', + }, + ], + }, +}; + export const DEFAULTS_BY_TASK_TYPE: Record = { [SUB_ACTION.COMPLETION]: DEFAULT_CHAT_COMPLETE_BODY, + [SUB_ACTION.UNIFIED_COMPLETION]: DEFAULT_UNIFIED_CHAT_COMPLETE_BODY, + [SUB_ACTION.UNIFIED_COMPLETION_STREAM]: DEFAULT_UNIFIED_CHAT_COMPLETE_BODY, + [SUB_ACTION.UNIFIED_COMPLETION_ASYNC_ITERATOR]: DEFAULT_UNIFIED_CHAT_COMPLETE_BODY, [SUB_ACTION.RERANK]: DEFAULT_RERANK_BODY, [SUB_ACTION.SPARSE_EMBEDDING]: DEFAULT_SPARSE_EMBEDDING_BODY, [SUB_ACTION.TEXT_EMBEDDING]: DEFAULT_TEXT_EMBEDDING_BODY, }; -export const DEFAULT_TASK_TYPE = 'completion'; +export const DEFAULT_TASK_TYPE = 'unified_completion'; export const DEFAULT_PROVIDER = 'elasticsearch'; diff --git a/x-pack/plugins/stack_connectors/public/connector_types/inference/inference.test.tsx b/x-pack/plugins/stack_connectors/public/connector_types/inference/inference.test.tsx index 76dc50a316e6..b67264674aeb 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/inference/inference.test.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/inference/inference.test.tsx @@ -44,8 +44,16 @@ describe('OpenAI action params validation', () => { subActionParams: { input: ['message test'], query: 'foobar' }, }, { - subAction: SUB_ACTION.COMPLETION, - subActionParams: { input: 'message test' }, + subAction: SUB_ACTION.UNIFIED_COMPLETION, + subActionParams: { body: { messages: [{ role: 'user', content: 'What is Elastic?' }] } }, + }, + { + subAction: SUB_ACTION.UNIFIED_COMPLETION_STREAM, + subActionParams: { body: { messages: [{ role: 'user', content: 'What is Elastic?' }] } }, + }, + { + subAction: SUB_ACTION.UNIFIED_COMPLETION_ASYNC_ITERATOR, + subActionParams: { body: { messages: [{ role: 'user', content: 'What is Elastic?' }] } }, }, { subAction: SUB_ACTION.TEXT_EMBEDDING, @@ -55,6 +63,10 @@ describe('OpenAI action params validation', () => { subAction: SUB_ACTION.SPARSE_EMBEDDING, subActionParams: { input: 'message test' }, }, + { + subAction: SUB_ACTION.COMPLETION, + subActionParams: { input: 'message test' }, + }, ])( 'validation succeeds when params are valid for subAction $subAction', async ({ subAction, subActionParams }) => { @@ -63,19 +75,25 @@ describe('OpenAI action params validation', () => { subActionParams, }; expect(await actionTypeModel.validateParams(actionParams)).toEqual({ - errors: { input: [], subAction: [], inputType: [], query: [] }, + errors: { body: [], input: [], subAction: [], inputType: [], query: [] }, }); } ); test('params validation fails when params is a wrong object', async () => { const actionParams = { - subAction: SUB_ACTION.COMPLETION, + subAction: SUB_ACTION.UNIFIED_COMPLETION, subActionParams: { body: 'message {test}' }, }; expect(await actionTypeModel.validateParams(actionParams)).toEqual({ - errors: { input: ['Input is required.'], inputType: [], query: [], subAction: [] }, + errors: { + body: ['Messages is required.'], + inputType: [], + query: [], + subAction: [], + input: [], + }, }); }); @@ -86,6 +104,7 @@ describe('OpenAI action params validation', () => { expect(await actionTypeModel.validateParams(actionParams)).toEqual({ errors: { + body: [], input: [], inputType: [], query: [], @@ -102,6 +121,7 @@ describe('OpenAI action params validation', () => { expect(await actionTypeModel.validateParams(actionParams)).toEqual({ errors: { + body: [], input: [], inputType: [], query: [], @@ -118,6 +138,7 @@ describe('OpenAI action params validation', () => { expect(await actionTypeModel.validateParams(actionParams)).toEqual({ errors: { + body: [], input: ['Input is required.', 'Input does not have a valid Array format.'], inputType: [], query: ['Query is required.'], @@ -134,6 +155,7 @@ describe('OpenAI action params validation', () => { expect(await actionTypeModel.validateParams(actionParams)).toEqual({ errors: { + body: [], input: [], inputType: ['Input type is required.'], query: [], diff --git a/x-pack/plugins/stack_connectors/public/connector_types/inference/inference.tsx b/x-pack/plugins/stack_connectors/public/connector_types/inference/inference.tsx index e16d03306c16..388da0556801 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/inference/inference.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/inference/inference.tsx @@ -19,6 +19,7 @@ import { InferenceActionParams, InferenceConnector } from './types'; interface ValidationErrors { subAction: string[]; input: string[]; + body: string[]; // rerank only query: string[]; // text_embedding only @@ -40,14 +41,28 @@ export function getConnectorType(): InferenceConnector { const translations = await import('./translations'); const errors: ValidationErrors = { input: [], + body: [], subAction: [], inputType: [], query: [], }; if ( - subAction === SUB_ACTION.RERANK || + subAction === SUB_ACTION.UNIFIED_COMPLETION || + subAction === SUB_ACTION.UNIFIED_COMPLETION_STREAM || + subAction === SUB_ACTION.UNIFIED_COMPLETION_ASYNC_ITERATOR + ) { + if ( + !Array.isArray(subActionParams.body.messages) || + !subActionParams.body.messages.length + ) { + errors.body.push(translations.getRequiredMessage('Messages')); + } + } + + if ( subAction === SUB_ACTION.COMPLETION || + subAction === SUB_ACTION.RERANK || subAction === SUB_ACTION.TEXT_EMBEDDING || subAction === SUB_ACTION.SPARSE_EMBEDDING ) { @@ -76,10 +91,13 @@ export function getConnectorType(): InferenceConnector { errors.subAction.push(translations.getRequiredMessage('Action')); } else if ( ![ - SUB_ACTION.COMPLETION, + SUB_ACTION.UNIFIED_COMPLETION, + SUB_ACTION.UNIFIED_COMPLETION_STREAM, + SUB_ACTION.UNIFIED_COMPLETION_ASYNC_ITERATOR, SUB_ACTION.SPARSE_EMBEDDING, SUB_ACTION.RERANK, SUB_ACTION.TEXT_EMBEDDING, + SUB_ACTION.COMPLETION, ].includes(subAction) ) { errors.subAction.push(translations.INVALID_ACTION); diff --git a/x-pack/plugins/stack_connectors/public/connector_types/inference/params.test.tsx b/x-pack/plugins/stack_connectors/public/connector_types/inference/params.test.tsx index 49773edc2246..ba094ec64f6b 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/inference/params.test.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/inference/params.test.tsx @@ -15,8 +15,8 @@ describe('Inference Params Fields renders', () => { const { getByTestId } = render( { index={0} /> ); - expect(getByTestId('inferenceInput')).toBeInTheDocument(); - expect(getByTestId('inferenceInput')).toHaveProperty('value', 'What is Elastic?'); + expect(getByTestId('inference-bodyJsonEditor')).toBeInTheDocument(); + expect(getByTestId('bodyJsonEditor')).toHaveProperty( + 'value', + `{\"messages\":[{\"role\":\"user\",\"content\":\"What is Elastic?\"}]}` + ); }); test.each(['openai', 'googleaistudio'])( @@ -76,15 +79,25 @@ describe('Inference Params Fields renders', () => { /> ); expect(editAction).toHaveBeenCalledTimes(2); - expect(editAction).toHaveBeenCalledWith('subAction', SUB_ACTION.COMPLETION, 0); if (provider === 'openai') { + expect(editAction).toHaveBeenCalledWith('subAction', SUB_ACTION.UNIFIED_COMPLETION, 0); expect(editAction).toHaveBeenCalledWith( 'subActionParams', - { input: 'What is Elastic?' }, + { + body: { + messages: [ + { + content: 'Hello world', + role: 'user', + }, + ], + }, + }, 0 ); } if (provider === 'googleaistudio') { + expect(editAction).toHaveBeenCalledWith('subAction', SUB_ACTION.COMPLETION, 0); expect(editAction).toHaveBeenCalledWith( 'subActionParams', { input: 'What is Elastic?' }, diff --git a/x-pack/plugins/stack_connectors/public/connector_types/inference/params.tsx b/x-pack/plugins/stack_connectors/public/connector_types/inference/params.tsx index c24fff24c33f..be162e70493b 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/inference/params.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/inference/params.tsx @@ -12,11 +12,13 @@ import { } from '@kbn/triggers-actions-ui-plugin/public'; import { EuiTextArea, EuiFormRow, EuiSpacer, EuiSelect } from '@elastic/eui'; import type { RuleFormParamsErrors } from '@kbn/response-ops-rule-form'; +import { ActionVariable } from '@kbn/alerting-types'; import { ChatCompleteParams, RerankParams, SparseEmbeddingParams, TextEmbeddingParams, + UnifiedChatCompleteParams, } from '../../../common/inference/types'; import { DEFAULTS_BY_TASK_TYPE } from './constants'; import * as i18n from './translations'; @@ -25,28 +27,38 @@ import { InferenceActionConnector, InferenceActionParams } from './types'; const InferenceServiceParamsFields: React.FunctionComponent< ActionParamsProps -> = ({ actionParams, editAction, index, errors, actionConnector }) => { +> = ({ actionParams, editAction, index, errors, actionConnector, messageVariables }) => { const { subAction, subActionParams } = actionParams; - const { taskType } = (actionConnector as unknown as InferenceActionConnector).config; + const { taskType, provider } = (actionConnector as unknown as InferenceActionConnector).config; useEffect(() => { if (!subAction) { - editAction('subAction', taskType, index); + editAction( + 'subAction', + provider === 'openai' && taskType === 'completion' + ? SUB_ACTION.UNIFIED_COMPLETION + : taskType, + index + ); } - }, [editAction, index, subAction, taskType]); + }, [editAction, index, provider, subAction, taskType]); useEffect(() => { if (!subActionParams) { editAction( 'subActionParams', { - ...(DEFAULTS_BY_TASK_TYPE[taskType] ?? {}), + ...(DEFAULTS_BY_TASK_TYPE[ + provider === 'openai' && taskType === 'completion' + ? SUB_ACTION.UNIFIED_COMPLETION + : taskType + ] ?? {}), }, index ); } - }, [editAction, index, subActionParams, taskType]); + }, [editAction, index, provider, subActionParams, taskType]); const editSubActionParams = useCallback( (params: Partial) => { @@ -55,6 +67,28 @@ const InferenceServiceParamsFields: React.FunctionComponent< [editAction, index, subActionParams] ); + if (subAction === SUB_ACTION.UNIFIED_COMPLETION) { + return ( + + ); + } + + if (subAction === SUB_ACTION.UNIFIED_COMPLETION_ASYNC_ITERATOR) { + return ( + + ); + } + if (subAction === SUB_ACTION.COMPLETION) { return ( ) => void; + messageVariables: ActionVariable[] | undefined; +}> = ({ subActionParams, editSubActionParams, errors, messageVariables }) => { + const { body } = subActionParams ?? {}; + + return ( + <> + { + editSubActionParams({ body: JSON.parse(json) }); + }} + onBlur={() => { + if (!subActionParams.body) { + editSubActionParams({ body: { messages: [] } }); + } + }} + dataTestSubj="inference-bodyJsonEditor" + /> + + ); +}; + const CompletionParamsFields: React.FunctionComponent<{ subActionParams: ChatCompleteParams; errors: RuleFormParamsErrors; diff --git a/x-pack/plugins/stack_connectors/public/connector_types/inference/types.ts b/x-pack/plugins/stack_connectors/public/connector_types/inference/types.ts index 1bd55793bc46..1756e213a1a7 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/inference/types.ts +++ b/x-pack/plugins/stack_connectors/public/connector_types/inference/types.ts @@ -13,9 +13,16 @@ import { RerankParams, SparseEmbeddingParams, TextEmbeddingParams, + UnifiedChatCompleteParams, } from '../../../common/inference/types'; export type InferenceActionParams = + | { subAction: SUB_ACTION.UNIFIED_COMPLETION_STREAM; subActionParams: UnifiedChatCompleteParams } + | { subAction: SUB_ACTION.UNIFIED_COMPLETION; subActionParams: UnifiedChatCompleteParams } + | { + subAction: SUB_ACTION.UNIFIED_COMPLETION_ASYNC_ITERATOR; + subActionParams: UnifiedChatCompleteParams; + } | { subAction: SUB_ACTION.COMPLETION; subActionParams: ChatCompleteParams } | { subAction: SUB_ACTION.RERANK; subActionParams: RerankParams } | { subAction: SUB_ACTION.SPARSE_EMBEDDING; subActionParams: SparseEmbeddingParams } diff --git a/x-pack/plugins/stack_connectors/server/connector_types/inference/helpers.ts b/x-pack/plugins/stack_connectors/server/connector_types/inference/helpers.ts new file mode 100644 index 000000000000..7c6bfab9c639 --- /dev/null +++ b/x-pack/plugins/stack_connectors/server/connector_types/inference/helpers.ts @@ -0,0 +1,111 @@ +/* + * 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 { last, lastValueFrom, map, merge, Observable, scan, share } from 'rxjs'; +import type { Readable } from 'node:stream'; +import { createParser } from 'eventsource-parser'; +import { UnifiedChatCompleteResponse } from '../../../common/inference/types'; + +// TODO: Extract to the common package with appex-ai +export function eventSourceStreamIntoObservable(readable: Readable) { + return new Observable((subscriber) => { + const parser = createParser({ + onEvent: (event) => { + subscriber.next(event.data); + }, + }); + + async function processStream() { + for await (const chunk of readable) { + parser.feed(chunk.toString()); + } + } + + processStream().then( + () => { + subscriber.complete(); + }, + (error) => { + subscriber.error(error); + } + ); + }); +} + +export function chunksIntoMessage(obs$: Observable) { + const shared$ = obs$.pipe(share()); + + return lastValueFrom( + merge( + shared$, + shared$.pipe( + scan( + (prev, chunk) => { + if (chunk.choices.length > 0 && !chunk.usage) { + prev.choices[0].message.content += chunk.choices[0].message.content ?? ''; + + chunk.choices[0].message.tool_calls?.forEach((toolCall) => { + if (toolCall.index !== undefined) { + const prevToolCallLength = prev.choices[0].message.tool_calls?.length ?? 0; + if (prevToolCallLength - 1 !== toolCall.index) { + if (!prev.choices[0].message.tool_calls) { + prev.choices[0].message.tool_calls = []; + } + prev.choices[0].message.tool_calls.push({ + function: { + name: '', + arguments: '', + }, + id: '', + }); + } + const prevToolCall = prev.choices[0].message.tool_calls[toolCall.index]; + + if (toolCall.function?.name) { + prevToolCall.function.name += toolCall.function?.name; + } + if (toolCall.function?.arguments) { + prevToolCall.function.arguments += toolCall.function?.arguments; + } + if (toolCall.id) { + prevToolCall.id += toolCall.id; + } + if (toolCall.type) { + prevToolCall.type = toolCall.type; + } + } + }); + } else if (chunk.usage) { + prev.usage = chunk.usage; + } + return { ...prev, id: chunk.id, model: chunk.model }; + }, + { + choices: [ + { + message: { + content: '', + role: 'assistant', + }, + }, + ], + object: 'chat.completion', + // eslint-disable-next-line @typescript-eslint/no-explicit-any + } as any + ), + last(), + map((concatenatedChunk): UnifiedChatCompleteResponse => { + // TODO: const validatedToolCalls = validateToolCalls(concatenatedChunk.choices[0].message.tool_calls); + if (concatenatedChunk.choices[0].message.content === '') { + concatenatedChunk.choices[0].message.content = null; + } + return concatenatedChunk; + }) + ) + ) + ); +} diff --git a/x-pack/plugins/stack_connectors/server/connector_types/inference/index.ts b/x-pack/plugins/stack_connectors/server/connector_types/inference/index.ts index 18af48bc18a5..5af6773d15fe 100644 --- a/x-pack/plugins/stack_connectors/server/connector_types/inference/index.ts +++ b/x-pack/plugins/stack_connectors/server/connector_types/inference/index.ts @@ -161,7 +161,10 @@ export const configValidator = (configObject: Config, validatorServices: Validat ); } - if (!Object.keys(SUB_ACTION).includes(taskType.toUpperCase())) { + if ( + !taskType.includes('completion') && + !Object.keys(SUB_ACTION).includes(taskType.toUpperCase()) + ) { throw new Error( `Task type is not supported${ taskType && taskType.length ? `: ${taskType}` : `` diff --git a/x-pack/plugins/stack_connectors/server/connector_types/inference/inference.test.ts b/x-pack/plugins/stack_connectors/server/connector_types/inference/inference.test.ts index a79bd0360598..4aa28d2952db 100644 --- a/x-pack/plugins/stack_connectors/server/connector_types/inference/inference.test.ts +++ b/x-pack/plugins/stack_connectors/server/connector_types/inference/inference.test.ts @@ -9,7 +9,7 @@ import { InferenceConnector } from './inference'; import { actionsConfigMock } from '@kbn/actions-plugin/server/actions_config.mock'; import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; import { actionsMock } from '@kbn/actions-plugin/server/mocks'; -import { PassThrough, Transform } from 'stream'; +import { Readable, Transform } from 'stream'; import {} from '@kbn/actions-plugin/server/types'; import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { InferenceInferenceResponse } from '@elastic/elasticsearch/lib/api/types'; @@ -29,7 +29,7 @@ describe('InferenceConnector', () => { ], }; - describe('performApiCompletion', () => { + describe('performApiUnifiedCompletion', () => { const mockEsClient = elasticsearchClientMock.createClusterClient().asScoped().asInternalUser; beforeEach(() => { @@ -60,28 +60,44 @@ describe('InferenceConnector', () => { }); it('uses the completion task_type is supplied', async () => { - const response = await connector.performApiCompletion({ - input: 'What is Elastic?', + const stream = Readable.from([ + `data: {"id":"chatcmpl-AbLKRuRMZCAcMMQdl96KMTUgAfZNg","choices":[{"delta":{"content":" you"},"index":0}],"model":"gpt-4o-2024-08-06","object":"chat.completion.chunk"}\n\n`, + `data: [DONE]\n\n`, + ]); + mockEsClient.transport.request.mockResolvedValue(stream); + + const response = await connector.performApiUnifiedCompletion({ + body: { messages: [{ content: 'What is Elastic?', role: 'user' }] }, }); - expect(mockEsClient.inference.inference).toBeCalledTimes(1); - expect(mockEsClient.inference.inference).toHaveBeenCalledWith( + expect(mockEsClient.transport.request).toBeCalledTimes(1); + expect(mockEsClient.transport.request).toHaveBeenCalledWith( { - inference_id: 'test', - input: 'What is Elastic?', - task_type: 'completion', + body: { + messages: [ + { + content: 'What is Elastic?', + role: 'user', + }, + ], + n: undefined, + }, + method: 'POST', + path: '_inference/completion/test/_unified', }, - { asStream: false } + { asStream: true } ); - expect(response).toEqual(mockResponse.completion); + expect(response.choices[0].message.content).toEqual(' you'); }); it('errors during API calls are properly handled', async () => { // @ts-ignore - mockEsClient.inference.inference = mockError; + mockEsClient.transport.request = mockError; - await expect(connector.performApiCompletion({ input: 'What is Elastic?' })).rejects.toThrow( - 'API Error' - ); + await expect( + connector.performApiUnifiedCompletion({ + body: { messages: [{ content: 'What is Elastic?', role: 'user' }] }, + }) + ).rejects.toThrow('API Error'); }); }); @@ -223,6 +239,7 @@ describe('InferenceConnector', () => { }; beforeEach(() => { + jest.clearAllMocks(); // @ts-ignore mockStream(); }); @@ -238,7 +255,7 @@ describe('InferenceConnector', () => { }, provider: 'elasticsearch', taskType: 'completion', - inferenceId: '', + inferenceId: 'test', taskTypeConfig: {}, }, secrets: { providerSecrets: {} }, @@ -247,13 +264,23 @@ describe('InferenceConnector', () => { }); it('the API call is successful with correct request parameters', async () => { - await connector.performApiCompletionStream({ input: 'Hello world' }); - expect(mockEsClient.inference.inference).toBeCalledTimes(1); - expect(mockEsClient.inference.inference).toHaveBeenCalledWith( + await connector.performApiUnifiedCompletionStream({ + body: { messages: [{ content: 'Hello world', role: 'user' }] }, + }); + expect(mockEsClient.transport.request).toBeCalledTimes(1); + expect(mockEsClient.transport.request).toHaveBeenCalledWith( { - inference_id: '', - input: 'Hello world', - task_type: 'completion', + body: { + messages: [ + { + content: 'Hello world', + role: 'user', + }, + ], + n: undefined, + }, + method: 'POST', + path: '_inference/completion/test/_unified', }, { asStream: true } ); @@ -261,32 +288,42 @@ describe('InferenceConnector', () => { it('signal is properly passed to streamApi', async () => { const signal = jest.fn() as unknown as AbortSignal; - await connector.performApiCompletionStream({ input: 'Hello world', signal }); + await connector.performApiUnifiedCompletionStream({ + body: { messages: [{ content: 'Hello world', role: 'user' }] }, + signal, + }); - expect(mockEsClient.inference.inference).toHaveBeenCalledWith( + expect(mockEsClient.transport.request).toHaveBeenCalledWith( { - inference_id: '', - input: 'Hello world', - task_type: 'completion', + body: { messages: [{ content: 'Hello world', role: 'user' }], n: undefined }, + method: 'POST', + path: '_inference/completion/test/_unified', }, - { asStream: true, signal } + { asStream: true } ); }); it('errors during API calls are properly handled', async () => { // @ts-ignore - mockEsClient.inference.inference = mockError; + mockEsClient.transport.request = mockError; await expect( - connector.performApiCompletionStream({ input: 'What is Elastic?' }) + connector.performApiUnifiedCompletionStream({ + body: { messages: [{ content: 'What is Elastic?', role: 'user' }] }, + }) ).rejects.toThrow('API Error'); }); it('responds with a readable stream', async () => { - const response = await connector.performApiCompletionStream({ - input: 'What is Elastic?', + const stream = Readable.from([ + `data: {"id":"chatcmpl-AbLKRuRMZCAcMMQdl96KMTUgAfZNg","choices":[{"delta":{"content":" you"},"index":0}],"model":"gpt-4o-2024-08-06","object":"chat.completion.chunk"}\n\n`, + `data: [DONE]\n\n`, + ]); + mockEsClient.transport.request.mockResolvedValue(stream); + const response = await connector.performApiUnifiedCompletionStream({ + body: { messages: [{ content: 'What is Elastic?', role: 'user' }] }, }); - expect(response instanceof PassThrough).toEqual(true); + expect(response instanceof Readable).toEqual(true); }); }); }); diff --git a/x-pack/plugins/stack_connectors/server/connector_types/inference/inference.ts b/x-pack/plugins/stack_connectors/server/connector_types/inference/inference.ts index d9aa4bf044e1..d6c9af0e1365 100644 --- a/x-pack/plugins/stack_connectors/server/connector_types/inference/inference.ts +++ b/x-pack/plugins/stack_connectors/server/connector_types/inference/inference.ts @@ -6,36 +6,44 @@ */ import { ServiceParams, SubActionConnector } from '@kbn/actions-plugin/server'; - -import { PassThrough, Stream } from 'stream'; -import { IncomingMessage } from 'http'; +import { Stream } from 'openai/streaming'; +import { Readable } from 'stream'; import { AxiosError } from 'axios'; import { InferenceInferenceRequest, InferenceInferenceResponse, - InferenceTaskType, } from '@elastic/elasticsearch/lib/api/types'; +import { ConnectorUsageCollector } from '@kbn/actions-plugin/server/usage'; +import { filter, from, identity, map, mergeMap, Observable, tap } from 'rxjs'; +import OpenAI from 'openai'; +import { ChatCompletionChunk } from 'openai/resources'; import { ChatCompleteParamsSchema, RerankParamsSchema, SparseEmbeddingParamsSchema, TextEmbeddingParamsSchema, + UnifiedChatCompleteParamsSchema, } from '../../../common/inference/schema'; import { Config, Secrets, - ChatCompleteParams, - ChatCompleteResponse, - StreamingResponse, RerankParams, RerankResponse, SparseEmbeddingParams, SparseEmbeddingResponse, TextEmbeddingParams, TextEmbeddingResponse, + UnifiedChatCompleteParams, + UnifiedChatCompleteResponse, + DashboardActionParams, + DashboardActionResponse, + ChatCompleteParams, + ChatCompleteResponse, } from '../../../common/inference/types'; import { SUB_ACTION } from '../../../common/inference/constants'; +import { initDashboard } from '../lib/gen_ai/create_gen_ai_dashboard'; +import { chunksIntoMessage, eventSourceStreamIntoObservable } from './helpers'; export class InferenceConnector extends SubActionConnector { // Not using Axios @@ -60,10 +68,25 @@ export class InferenceConnector extends SubActionConnector { } private registerSubActions() { + // non-streaming unified completion task this.registerSubAction({ - name: SUB_ACTION.COMPLETION, - method: 'performApiCompletion', - schema: ChatCompleteParamsSchema, + name: SUB_ACTION.UNIFIED_COMPLETION, + method: 'performApiUnifiedCompletion', + schema: UnifiedChatCompleteParamsSchema, + }); + + // streaming unified completion task + this.registerSubAction({ + name: SUB_ACTION.UNIFIED_COMPLETION_STREAM, + method: 'performApiUnifiedCompletionStream', + schema: UnifiedChatCompleteParamsSchema, + }); + + // streaming unified completion task for langchain + this.registerSubAction({ + name: SUB_ACTION.UNIFIED_COMPLETION_ASYNC_ITERATOR, + method: 'performApiUnifiedCompletionAsyncIterator', + schema: UnifiedChatCompleteParamsSchema, }); this.registerSubAction({ @@ -85,8 +108,8 @@ export class InferenceConnector extends SubActionConnector { }); this.registerSubAction({ - name: SUB_ACTION.COMPLETION_STREAM, - method: 'performApiCompletionStream', + name: SUB_ACTION.COMPLETION, + method: 'performApiCompletion', schema: ChatCompleteParamsSchema, }); } @@ -96,16 +119,112 @@ export class InferenceConnector extends SubActionConnector { * @param input the text on which you want to perform the inference task. * @signal abort signal */ - public async performApiCompletion({ - input, - signal, - }: ChatCompleteParams & { signal?: AbortSignal }): Promise { - const response = await this.performInferenceApi( - { inference_id: this.inferenceId, input, task_type: 'completion' }, - false, - signal + public async performApiUnifiedCompletion( + params: UnifiedChatCompleteParams + ): Promise { + const res = await this.performApiUnifiedCompletionStream(params); + + const obs$ = from(eventSourceStreamIntoObservable(res as unknown as Readable)).pipe( + filter((line) => !!line && line !== '[DONE]'), + map((line) => { + return JSON.parse(line) as OpenAI.ChatCompletionChunk | { error: { message: string } }; + }), + tap((line) => { + if ('error' in line) { + throw new Error(line.error.message); + } + if ( + 'choices' in line && + line.choices.length && + line.choices[0].finish_reason === 'length' + ) { + throw new Error('createTokenLimitReachedError()'); + } + }), + filter((line): line is OpenAI.ChatCompletionChunk => { + return 'object' in line && line.object === 'chat.completion.chunk'; + }), + mergeMap((chunk): Observable => { + const events: UnifiedChatCompleteResponse[] = []; + events.push({ + choices: chunk.choices.map((c) => ({ + message: { + tool_calls: c.delta.tool_calls?.map((t) => ({ + index: t.index, + id: t.id, + function: t.function, + type: t.type, + })), + content: c.delta.content, + refusal: c.delta.refusal, + role: c.delta.role, + }, + finish_reason: c.finish_reason, + index: c.index, + })), + id: chunk.id, + model: chunk.model, + object: chunk.object, + usage: chunk.usage, + }); + return from(events); + }), + identity + ); + + return chunksIntoMessage(obs$); + } + + /** + * responsible for making a esClient inference method to perform chat completetion task endpoint and returning the service response data + * @param input the text on which you want to perform the inference task. + * @signal abort signal + */ + public async performApiUnifiedCompletionStream(params: UnifiedChatCompleteParams) { + return await this.esClient.transport.request( + { + method: 'POST', + path: `_inference/completion/${this.inferenceId}/_unified`, + body: { ...params.body, n: undefined }, // exclude n param for now, constant is used on the inference API side + }, + { + asStream: true, + } ); - return response.completion!; + } + + /** + * Streamed requests (langchain) + * @param params - the request body + * @returns { + * consumerStream: Stream; the result to be read/transformed on the server and sent to the client via Server Sent Events + * tokenCountStream: Stream; the result for token counting stream + * } + */ + public async performApiUnifiedCompletionAsyncIterator( + params: UnifiedChatCompleteParams & { signal?: AbortSignal }, + connectorUsageCollector: ConnectorUsageCollector + ): Promise<{ + consumerStream: Stream; + tokenCountStream: Stream; + }> { + try { + connectorUsageCollector.addRequestBodyBytes(undefined, params.body); + const res = await this.performApiUnifiedCompletionStream(params); + const controller = new AbortController(); + // splits the stream in two, one is used for the UI and other for token tracking + + const stream = Stream.fromSSEResponse( + { body: res } as unknown as Response, + controller + ); + const teed = stream.tee(); + return { consumerStream: teed[0], tokenCountStream: teed[1] }; + // since we do not use the sub action connector request method, we need to do our own error handling + } catch (e) { + const errorMessage = this.getResponseErrorMessage(e); + throw new Error(errorMessage); + } } /** @@ -198,35 +317,56 @@ export class InferenceConnector extends SubActionConnector { } } - private async streamAPI({ + /** + * responsible for making a esClient inference method to perform chat completetion task endpoint and returning the service response data + * @param input the text on which you want to perform the inference task. + * @signal abort signal + */ + public async performApiCompletion({ input, signal, - }: ChatCompleteParams & { signal?: AbortSignal }): Promise { + }: ChatCompleteParams & { signal?: AbortSignal }): Promise { const response = await this.performInferenceApi( - { inference_id: this.inferenceId, input, task_type: this.taskType as InferenceTaskType }, - true, + { inference_id: this.inferenceId, input, task_type: 'completion' }, + false, signal ); - - return (response as unknown as Stream).pipe(new PassThrough()); + return response.completion!; } /** - * takes input. It calls the streamApi method to make a - * request to the Inference API with the message. It then returns a Transform stream - * that pipes the response from the API through the transformToString function, - * which parses the proprietary response into a string of the response text alone - * @param input A message to be sent to the API - * @signal abort signal + * retrieves a dashboard from the Kibana server and checks if the + * user has the necessary privileges to access it. + * @param dashboardId The ID of the dashboard to retrieve. */ - public async performApiCompletionStream({ - input, - signal, - }: ChatCompleteParams & { signal?: AbortSignal }): Promise { - const res = (await this.streamAPI({ - input, - signal, - })) as unknown as IncomingMessage; - return res; + public async getDashboard({ + dashboardId, + }: DashboardActionParams): Promise { + const privilege = (await this.esClient.transport.request({ + path: '/_security/user/_has_privileges', + method: 'POST', + body: { + index: [ + { + names: ['.kibana-event-log-*'], + allow_restricted_indices: true, + privileges: ['read'], + }, + ], + }, + })) as { has_all_requested: boolean }; + + if (!privilege?.has_all_requested) { + return { available: false }; + } + + const response = await initDashboard({ + logger: this.logger, + savedObjectsClient: this.savedObjectsClient, + dashboardId, + genAIProvider: 'Inference', + }); + + return { available: response.success }; } } From 4ed0d854d3000dec23fa1e0c797d4fe0d417192a Mon Sep 17 00:00:00 2001 From: Sonia Sanz Vivas Date: Wed, 18 Dec 2024 08:53:57 +0100 Subject: [PATCH 23/60] Update docs link for ip location processor (#204340) Closes [#199755](https://github.com/elastic/kibana/issues/199755) ## Summary This PR updates the documentation for the IP Location processor --- .../components/shared/map_processor_type_to_form.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/platform/plugins/shared/ingest_pipelines/public/application/components/pipeline_editor/components/shared/map_processor_type_to_form.tsx b/x-pack/platform/plugins/shared/ingest_pipelines/public/application/components/pipeline_editor/components/shared/map_processor_type_to_form.tsx index 4d4e244ac25a..31dec6ab573d 100644 --- a/x-pack/platform/plugins/shared/ingest_pipelines/public/application/components/pipeline_editor/components/shared/map_processor_type_to_form.tsx +++ b/x-pack/platform/plugins/shared/ingest_pipelines/public/application/components/pipeline_editor/components/shared/map_processor_type_to_form.tsx @@ -481,7 +481,7 @@ export const mapProcessorTypeToDescriptor: MapProcessorTypeToDescriptor = { ip_location: { category: processorCategories.DATA_ENRICHMENT, FieldsComponent: IpLocation, - docLinkPath: '/geoip-processor.html', + docLinkPath: '/ip-location-processor.html', label: i18n.translate('xpack.ingestPipelines.processors.label.ipLocation', { defaultMessage: 'IP Location', }), From a1b3b8858edc1d335de697d21930bccec84dda74 Mon Sep 17 00:00:00 2001 From: Jill Guyonnet Date: Wed, 18 Dec 2024 09:07:46 +0100 Subject: [PATCH 24/60] [Fleet][Eui Visual Refresh] Update text color tokens (#204537) ## Summary Closes https://github.com/elastic/kibana/issues/201989 This PR updates color variables to the up-to-date naming per https://github.com/elastic/kibana/issues/199715#renamed. Impacted elements: 1. Read-only icon buttons in Fleet and Integrations top bar. 2. Danger-styled context menu item for deleting package policy from agent policy. I have also reviews [all occurrences](https://github.com/search?q=repo%3Aelastic%2Fkibana+path%3Ax-pack%2Fplugins%2Ffleet%2Fpublic+color%3D%22text&type=code) of `color="text` throughout fleet and found these to be part of the following components: - `EuiButton` - `EuiButtonEmpty` - `EuiButtonIcon` - `EuiIcon` The use of `color="text"` seems to be valid for these cases. ## Screenshots ### Amsterdam Read-only Fleet top bar: fleet-readonly-amsterdam Read-only Integrations top bar: integrations-readonly-amsterdam Delete integration context menu item: delete-integration-amsterdam ### Borealis Read-only Fleet top bar: fleet-readonly-borealis Read-only Integrations top bar: integrations-readonly-borealis Delete integration context menu item: delete-integration-borealis --- .../fleet/public/applications/fleet/app.tsx | 2 +- .../integrations/components/header/header.tsx | 2 +- .../danger_eui_context_menu_item.tsx | 20 ++++++++++++++----- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/x-pack/plugins/fleet/public/applications/fleet/app.tsx b/x-pack/plugins/fleet/public/applications/fleet/app.tsx index 8a4edef8dc87..0041ffa09105 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/app.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/app.tsx @@ -247,7 +247,7 @@ const FleetTopNav = memo( const readOnlyBtnClass = React.useMemo(() => { return css` - color: ${euiTheme.colors.text}; + color: ${euiTheme.colors.textParagraph}; `; }, [euiTheme]); diff --git a/x-pack/plugins/fleet/public/applications/integrations/components/header/header.tsx b/x-pack/plugins/fleet/public/applications/integrations/components/header/header.tsx index 30fc0f0d4965..f9a8ad22cddc 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/components/header/header.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/components/header/header.tsx @@ -34,7 +34,7 @@ export const IntegrationsHeader = ({ const { euiTheme } = useEuiTheme(); const readOnlyBtnClass = React.useMemo(() => { return css` - color: ${euiTheme.colors.text}; + color: ${euiTheme.colors.textParagraph}; `; }, [euiTheme]); const isReadOnly = useIsReadOnly(); diff --git a/x-pack/plugins/fleet/public/components/danger_eui_context_menu_item.tsx b/x-pack/plugins/fleet/public/components/danger_eui_context_menu_item.tsx index 87fb523121cf..b7983ac255fb 100644 --- a/x-pack/plugins/fleet/public/components/danger_eui_context_menu_item.tsx +++ b/x-pack/plugins/fleet/public/components/danger_eui_context_menu_item.tsx @@ -5,9 +5,19 @@ * 2.0. */ -import styled from 'styled-components'; -import { EuiContextMenuItem } from '@elastic/eui'; +import React from 'react'; +import { css } from '@emotion/react'; +import type { EuiContextMenuItemProps } from '@elastic/eui'; +import { EuiContextMenuItem, useEuiTheme } from '@elastic/eui'; -export const DangerEuiContextMenuItem = styled(EuiContextMenuItem)` - color: ${(props) => props.theme.eui.euiColorDangerText}; -`; +export const DangerEuiContextMenuItem = (props: EuiContextMenuItemProps) => { + const theme = useEuiTheme(); + return ( + + ); +}; From 1550c90d3769ff27b0613b8004b9193a888c8236 Mon Sep 17 00:00:00 2001 From: Pablo Machado Date: Wed, 18 Dec 2024 09:24:04 +0100 Subject: [PATCH 25/60] [SecuritySolution] Entity store status page - Add health status to transform (#202523) ## Summary Add the actual transform status to the Entity Store status page. Before, it just showed green whenever the transform was installed. ### How to test it? * Install the Engine * Break the transform by updating it on the stack management page * The status change should be reflected in the engine status page ![Screenshot 2024-12-16 at 11 05 30](https://github.com/user-attachments/assets/a288a037-e1ea-4747-a2bb-266300dad946) --- .../entity_store_data_client.test.ts | 145 ++++++++++++++++++ .../entity_store/entity_store_data_client.ts | 12 +- 2 files changed, 154 insertions(+), 3 deletions(-) diff --git a/x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/entity_store/entity_store_data_client.test.ts b/x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/entity_store/entity_store_data_client.test.ts index 86ac7d136d22..b7cacea3c375 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/entity_store/entity_store_data_client.test.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/entity_store/entity_store_data_client.test.ts @@ -17,6 +17,18 @@ import type { DataViewsService } from '@kbn/data-views-plugin/common'; import type { AppClient } from '../../..'; import type { EntityStoreConfig } from './types'; import { mockGlobalState } from '../../../../public/common/mock'; +import type { EntityDefinition } from '@kbn/entities-schema'; +import { getUnitedEntityDefinition } from './united_entity_definitions'; + +const unitedDefinition = getUnitedEntityDefinition({ + entityType: 'host', + namespace: 'test', + fieldHistoryLength: 10, + indexPatterns: [], + syncDelay: '1m', + frequency: '1m', +}); +const definition: EntityDefinition = unitedDefinition.entityManagerDefinition; describe('EntityStoreDataClient', () => { const mockSavedObjectClient = savedObjectsClientMock.create(); @@ -182,4 +194,137 @@ describe('EntityStoreDataClient', () => { expect(response.records[0]).toEqual(fakeEntityRecord); }); }); + + describe('getComponentFromEntityDefinition', () => { + it('returns installed false if no definition is provided', () => { + const result = dataClient.getComponentFromEntityDefinition('security_host_test', undefined); + expect(result).toEqual([ + { + id: 'security_host_test', + installed: false, + resource: 'entity_definition', + }, + ]); + }); + + it('returns correct components for EntityDefinitionWithState', () => { + const definitionWithState = { + ...definition, + state: { + installed: true, + running: true, + components: { + transforms: [ + { + id: 'transforms_id', + installed: true, + running: true, + }, + ], + ingestPipelines: [ + { + id: 'pipeline-1', + installed: true, + }, + ], + indexTemplates: [ + { + id: 'indexTemplates_id', + installed: true, + }, + ], + }, + }, + }; + + const result = dataClient.getComponentFromEntityDefinition( + 'security_host_test', + definitionWithState + ); + expect(result).toEqual([ + { + id: 'security_host_test', + installed: true, + resource: 'entity_definition', + }, + { + id: 'security_host_test', + resource: 'transform', + installed: true, + health: 'unknown', + errors: undefined, + }, + { + resource: 'ingest_pipeline', + id: 'pipeline-1', + installed: true, + }, + { + id: 'security_host_test', + installed: true, + resource: 'index_template', + }, + ]); + }); + + it('returns empty array for EntityDefinition without state', () => { + const result = dataClient.getComponentFromEntityDefinition('security_host_test', definition); + expect(result).toEqual([]); + }); + + it('handles transform health issues correctly', () => { + const definitionWithState = { + ...definition, + state: { + installed: true, + components: { + transforms: [ + { + installed: true, + stats: { + health: { + status: 'yellow', + issues: [ + { + type: 'issue-type', + issue: 'issue-message', + details: 'issue-details', + count: 1, + }, + ], + }, + }, + }, + ], + ingestPipelines: [], + indexTemplates: [], + }, + }, + }; + + const result = dataClient.getComponentFromEntityDefinition( + 'security_host_test', + definitionWithState + ); + expect(result).toEqual([ + { + id: 'security_host_test', + installed: true, + resource: 'entity_definition', + }, + { + id: 'security_host_test', + resource: 'transform', + installed: true, + health: 'yellow', + errors: [ + { + title: 'issue-message', + message: 'issue-details', + }, + ], + }, + ]); + }); + }); }); diff --git a/x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/entity_store/entity_store_data_client.ts b/x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/entity_store/entity_store_data_client.ts index c18dc1863a8d..faf2edc15419 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/entity_store/entity_store_data_client.ts +++ b/x-pack/solutions/security/plugins/security_solution/server/lib/entity_analytics/entity_store/entity_store_data_client.ts @@ -15,7 +15,7 @@ import type { AnalyticsServiceSetup, } from '@kbn/core/server'; import { EntityClient } from '@kbn/entityManager-plugin/server/lib/entity_client'; -import type { SortOrder } from '@elastic/elasticsearch/lib/api/types'; +import type { HealthStatus, SortOrder } from '@elastic/elasticsearch/lib/api/types'; import type { TaskManagerStartContract } from '@kbn/task-manager-plugin/server'; import type { DataViewsService } from '@kbn/data-views-plugin/common'; import { isEqual } from 'lodash/fp'; @@ -465,7 +465,7 @@ export class EntityStoreDataClient { public getComponentFromEntityDefinition( id: string, - definition: EntityDefinitionWithState | EntityDefinition + definition: EntityDefinitionWithState | EntityDefinition | undefined ): EngineComponentStatus[] { if (!definition) { return [ @@ -478,16 +478,22 @@ export class EntityStoreDataClient { } if ('state' in definition) { + const transformHealthToComponentHealth = ( + health: HealthStatus | undefined + ): EngineComponentStatus['health'] => + health ? (health.toLowerCase() as Lowercase) : 'unknown'; + return [ { id: definition.id, installed: definition.state.installed, resource: EngineComponentResourceEnum.entity_definition, }, - ...definition.state.components.transforms.map(({ installed, running, stats }) => ({ + ...definition.state.components.transforms.map(({ installed, stats }) => ({ id, resource: EngineComponentResourceEnum.transform, installed, + health: transformHealthToComponentHealth(stats?.health?.status), errors: (stats?.health as TransformHealth)?.issues?.map(({ issue, details }) => ({ title: issue, message: details, From 87440cf335e59032c05c883d467d01a367aaa0cf Mon Sep 17 00:00:00 2001 From: "Eyo O. Eyo" <7893459+eokoneyo@users.noreply.github.com> Date: Wed, 18 Dec 2024 09:12:12 +0000 Subject: [PATCH 26/60] includes liberation fonts in dockerfile (#204368) ## Summary This PR includes liberations fonts in the docker file for Kibana. informed by https://github.com/elastic/sdh-kibana/issues/5097, we previously used to package liberation fonts within Dockerfile but this was removed in https://github.com/elastic/kibana/pull/183334, it's however required for reporting on linux especially that these fonts aren't provided by default, resulting in not so optimal rendering of users reports. Co-authored-by: Elastic Machine --- .../os_packages/docker_generator/templates/base/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dev/build/tasks/os_packages/docker_generator/templates/base/Dockerfile b/src/dev/build/tasks/os_packages/docker_generator/templates/base/Dockerfile index e868cb73cb8d..7d9eaac88696 100644 --- a/src/dev/build/tasks/os_packages/docker_generator/templates/base/Dockerfile +++ b/src/dev/build/tasks/os_packages/docker_generator/templates/base/Dockerfile @@ -114,7 +114,7 @@ EXPOSE 5601 RUN for iter in {1..10}; do \ microdnf update --setopt=tsflags=nodocs -y && \ microdnf install --setopt=tsflags=nodocs -y \ - fontconfig freetype shadow-utils nss findutils && \ + fontconfig liberation-fonts-common freetype shadow-utils nss findutils && \ microdnf clean all && exit_code=0 && break || exit_code=$? && echo "microdnf error: retry $iter in 10s" && \ sleep 10; \ done; \ @@ -126,7 +126,7 @@ RUN for iter in {1..10}; do \ apt-get update && \ apt-get upgrade -y && \ apt-get install -y --no-install-recommends \ - fontconfig libnss3 curl ca-certificates && \ + fontconfig fonts-liberation libnss3 curl ca-certificates && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* && exit_code=0 && break || exit_code=$? && echo "apt-get error: retry $iter in 10s" && \ sleep 10; \ @@ -134,7 +134,7 @@ RUN for iter in {1..10}; do \ (exit $exit_code) {{/ubuntu}} {{#wolfi}} -RUN apk --no-cache add bash curl fontconfig libstdc++ libnss findutils shadow ca-certificates +RUN apk --no-cache add bash curl fontconfig font-liberation libstdc++ libnss findutils shadow ca-certificates {{/wolfi}} # Bring in Kibana from the initial stage. From 2e3a74829d953e3a968c75e0edaed21dce332c03 Mon Sep 17 00:00:00 2001 From: Jacek Kolezynski Date: Wed, 18 Dec 2024 10:47:05 +0100 Subject: [PATCH 27/60] [Security Solution] Remove warning for rule filter (#201776) **Resolves: #178908** ## Summary This PR fixes a warning displayed for the rule when certain filter is present. I followed the suggestion from @nikitaindik in the original ticket and pulled his fix and tested that it works, but it also needed some modification borrowed from QueryBar component, namely to update the filters before displaying the FilterItems component. Note: This PR only covers the Rule Creation / Rules Details page. Two new tickets have been created to cover issues found in other places: #203600 and #203615 # BEFORE image # AFTER image ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed --------- Co-authored-by: Nikita Indik --- .../rule_details/rule_definition_section.tsx | 41 +++++++++++++------ .../final_edit/fields/hooks/use_data_view.ts | 3 +- 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_definition_section.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_definition_section.tsx index 3e08f4ce3acc..177ff4e18d42 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_definition_section.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_definition_section.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import React from 'react'; +import React, { useMemo } from 'react'; import { isEmpty } from 'lodash/fp'; import { EuiDescriptionList, @@ -23,8 +23,8 @@ import type { import type { Filter } from '@kbn/es-query'; import type { SavedQuery } from '@kbn/data-plugin/public'; import { mapAndFlattenFilters } from '@kbn/data-plugin/public'; -import type { DataView } from '@kbn/data-views-plugin/public'; import { FilterItems } from '@kbn/unified-search-plugin/public'; +import { isDataView } from '../../../../common/components/query_bar'; import type { AlertSuppressionMissingFieldsStrategy, EqlOptionalFields, @@ -40,8 +40,6 @@ import { AlertSuppressionLabel } from '../../../rule_creation_ui/components/desc import { useGetSavedQuery } from '../../../../detections/pages/detection_engine/rules/use_get_saved_query'; import * as threatMatchI18n from '../../../../common/components/threat_match/translations'; import * as timelinesI18n from '../../../../timelines/components/timeline/translations'; -import { useRuleIndexPattern } from '../../../rule_creation_ui/pages/form'; -import { DataSourceType } from '../../../../detections/pages/detection_engine/rules/types'; import type { Duration } from '../../../../detections/pages/detection_engine/rules/types'; import { convertHistoryStartToSize } from '../../../../detections/pages/detection_engine/rules/helpers'; import { MlJobsDescription } from '../../../rule_creation/components/ml_jobs_description/ml_jobs_description'; @@ -65,6 +63,7 @@ import { EQL_OPTIONS_EVENT_TIEBREAKER_FIELD_LABEL, EQL_OPTIONS_EVENT_TIMESTAMP_FIELD_LABEL, } from '../../../rule_creation/components/eql_query_edit/translations'; +import { useDataView } from './three_way_diff/final_edit/fields/hooks/use_data_view'; interface SavedQueryNameProps { savedQueryName: string; @@ -89,16 +88,34 @@ export const Filters = ({ index, 'data-test-subj': dataTestSubj, }: FiltersProps) => { - const flattenedFilters = mapAndFlattenFilters(filters); - const defaultIndexPattern = useDefaultIndexPattern(); + const useDataViewParams = dataViewId + ? { dataViewId } + : { indexPatterns: index ?? defaultIndexPattern }; + const { dataView } = useDataView(useDataViewParams); + const isEsql = filters.some((filter) => filter?.query?.language === 'esql'); + const searchBarFilters = useMemo(() => { + if (!index || isDataView(index) || isEsql) { + return filters; + } + const filtersWithUpdatedMetaIndex = filters.map((filter) => { + return { + ...filter, + meta: { + ...filter.meta, + index: index.join(','), + }, + }; + }); - const { indexPattern } = useRuleIndexPattern({ - dataSourceType: dataViewId ? DataSourceType.DataView : DataSourceType.IndexPatterns, - index: index ?? defaultIndexPattern, - dataViewId, - }); + return filtersWithUpdatedMetaIndex; + }, [filters, index, isEsql]); + + if (!dataView) { + return null; + } + const flattenedFilters = mapAndFlattenFilters(searchBarFilters); const styles = filtersStyles; return ( @@ -109,7 +126,7 @@ export const Filters = ({ responsive={false} gutterSize="xs" > - + ); }; diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/hooks/use_data_view.ts b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/hooks/use_data_view.ts index 4cfb30766530..123a7b3cffb5 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/hooks/use_data_view.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/hooks/use_data_view.ts @@ -9,7 +9,7 @@ import { useEffect, useState } from 'react'; import type { DataView } from '@kbn/data-views-plugin/common'; import { useKibana } from '../../../../../../../../common/lib/kibana'; -type UseDataViewParams = +export type UseDataViewParams = | { indexPatterns: string[]; dataViewId?: never } | { indexPatterns?: never; dataViewId: string }; @@ -33,6 +33,7 @@ export function useDataView(indexPatternsOrDataViewId: UseDataViewParams): UseDa if (indexPatternsOrDataViewId.indexPatterns) { const indexPatternsDataView = await dataViewsService.create({ title: indexPatternsOrDataViewId.indexPatterns.join(','), + id: indexPatternsOrDataViewId.indexPatterns.join(','), allowNoIndex: true, }); From 65bc6bc2e68256b3dc768d3ad914b6659fb53fb2 Mon Sep 17 00:00:00 2001 From: Nikita Indik Date: Wed, 18 Dec 2024 11:07:16 +0100 Subject: [PATCH 28/60] [Security Solution] Remove the word "custom" from bulk action modals (#204313) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Resolves: https://github.com/elastic/kibana/issues/203149** ## Summary This PR updates the bulk action modal dialogs by removing the term "custom." With prebuilt rules now being editable, the use of the word "custom" is no longer accurate or appropriate. ## Screenshots **Before** Scherm­afbeelding 2024-12-14 om 12 09 58 **After** Scherm­afbeelding 2024-12-14 om 11 56 04 Work started on 14-Dec-2024 --- .../translations/translations/fr-FR.json | 4 --- .../translations/translations/ja-JP.json | 4 --- .../translations/translations/zh-CN.json | 4 --- .../comparison_side_help_info.tsx | 2 +- .../bulk_action_rule_errors_list.test.tsx | 4 +-- .../bulk_action_rule_errors_list.tsx | 4 +-- .../detection_engine/rules/translations.ts | 26 +++++++++---------- .../bulk_actions/bulk_edit_rules.cy.ts | 2 +- .../import_export/export_rule.cy.ts | 4 +-- .../cypress/tasks/rules_bulk_actions.ts | 10 +++---- 10 files changed, 25 insertions(+), 39 deletions(-) diff --git a/x-pack/platform/plugins/private/translations/translations/fr-FR.json b/x-pack/platform/plugins/private/translations/translations/fr-FR.json index 162b2b57ab64..be3609545671 100644 --- a/x-pack/platform/plugins/private/translations/translations/fr-FR.json +++ b/x-pack/platform/plugins/private/translations/translations/fr-FR.json @@ -37591,7 +37591,6 @@ "xpack.securitySolution.detectionEngine.body.summary.message": "La règle {ruleName} a généré {signalsCount} alertes", "xpack.securitySolution.detectionEngine.buttonManageRules": "Gérer les règles", "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkActionConfirmationCloseButtonLabel": "Fermer", - "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditConfirmation.confirmButtonLabel": "Modifier {customRulesCount, plural, =1 {# règle personnalisée} other {# règles personnalisées}}", "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditConfirmationCancelButtonLabel": "Annuler", "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.addIndexPatternsComboboxHelpText": "Entrez le modèle des index Elasticsearch que vous souhaitez ajouter. Par défaut, le menu déroulant comprend des modèles d'indexation définis dans les paramètres avancés de la solution Security.", "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.addIndexPatternsComboboxLabel": "Ajouter des modèles d'indexation pour les règles sélectionnées", @@ -37625,8 +37624,6 @@ "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.setInvestigationFieldsWarningCallout": "Vous êtes sur le point d'écraser des champs en surbrillance personnalisés pour {rulesCount, plural, one {la règle sélectionnée} other {les # règles sélectionnées}}. Pour appliquer et enregistrer les modifications, cliquez sur Enregistrer.", "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.setTagsWarningCallout": "Vous êtes sur le point d'écraser les balises pour {rulesCount, plural, one {# règle sélectionnée} other {# règles sélectionnées}}. Sélectionnez Enregistrer pour appliquer les modifications.", "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.tagsComoboxRequiredErrorMessage": "Au moins une balise est requise.", - "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkExportConfirmation.confirmButtonLabel": "Exporter {customRulesCount, plural, =1 {# règle personnalisée} other {# règles personnalisées}}", - "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkManualRuleRunConfirmation.confirmButtonLabel": "Planifier {customRulesCount, plural, =1 {# règle personnalisée} other {# règles personnalisées}}", "xpack.securitySolution.detectionEngine.components.allRules.bulkDeleteConfirmationTitle": "Confirmer la suppression groupée", "xpack.securitySolution.detectionEngine.components.allRules.deleteConfirmationCancel": "Annuler", "xpack.securitySolution.detectionEngine.components.allRules.deleteConfirmationConfirm": "Supprimer", @@ -38848,7 +38845,6 @@ "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.addRuleActionsTitle": "Ajouter des actions sur les règles", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.addTagsTitle": "Ajouter des balises", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.applyTimelineTemplateTitle": "Appliquer le modèle de chronologie", - "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkActionConfirmationPartlyTitle": "L'action peut être appliquée uniquement à {customRulesCount, plural, =1 {# règle personnalisée} other {# règles personnalisées}}", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditConfirmationDeniedTitle": "Impossible de modifier {rulesCount, plural, =1 {# règle} other {# règles}}.", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditWarningToastDescription": "{rulesCount, plural, =1 {# règle est} other {# règles sont}} en cours de mise à jour.", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditWarningToastNotifyButtonLabel": "M'envoyer une notification à la fin", diff --git a/x-pack/platform/plugins/private/translations/translations/ja-JP.json b/x-pack/platform/plugins/private/translations/translations/ja-JP.json index b2bd6e25ec1f..faeb7636282f 100644 --- a/x-pack/platform/plugins/private/translations/translations/ja-JP.json +++ b/x-pack/platform/plugins/private/translations/translations/ja-JP.json @@ -37449,7 +37449,6 @@ "xpack.securitySolution.detectionEngine.body.summary.message": "ルール{ruleName}は{signalsCount}件のアラートを生成しました", "xpack.securitySolution.detectionEngine.buttonManageRules": "ルールの管理", "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkActionConfirmationCloseButtonLabel": "閉じる", - "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditConfirmation.confirmButtonLabel": "{customRulesCount, plural, other {# 個のカスタムルール}}を編集", "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditConfirmationCancelButtonLabel": "キャンセル", "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.addIndexPatternsComboboxHelpText": "追加するElasticsearchインデックスのパターンを入力します。デフォルトでは、ドロップダウンには、セキュリティソリューション詳細設定で定義されたインデックスパターンが含まれます。", "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.addIndexPatternsComboboxLabel": "選択したルールのインデックスパターンを追加", @@ -37483,8 +37482,6 @@ "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.setInvestigationFieldsWarningCallout": "選択した{rulesCount, plural, other {#個のルール}}のカスタムハイライトされたフィールドを上書きしようとしています。変更を適用して、保存するには、[保存]をクリックします。", "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.setTagsWarningCallout": "{rulesCount, plural, other {# 個の選択したルール}}のタグを上書きしようとしています。[保存]をクリックすると、変更が適用されます。\n", "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.tagsComoboxRequiredErrorMessage": "1つ以上のタグが必要です。", - "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkExportConfirmation.confirmButtonLabel": "{customRulesCount, plural, other {# 個のカスタムルール}}をエクスポート", - "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkManualRuleRunConfirmation.confirmButtonLabel": "{customRulesCount, plural, other {# 個のカスタムルール}}をスケジュール", "xpack.securitySolution.detectionEngine.components.allRules.bulkDeleteConfirmationTitle": "一括削除の確認", "xpack.securitySolution.detectionEngine.components.allRules.deleteConfirmationCancel": "キャンセル", "xpack.securitySolution.detectionEngine.components.allRules.deleteConfirmationConfirm": "削除", @@ -38705,7 +38702,6 @@ "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.addRuleActionsTitle": "ルールアクションを追加", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.addTagsTitle": "タグを追加", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.applyTimelineTemplateTitle": "タイムラインテンプレートを適用", - "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkActionConfirmationPartlyTitle": "このアクションは、{customRulesCount, plural, other {#個のカスタムルール}}にのみ適用できます", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditConfirmationDeniedTitle": "{rulesCount, plural, other {# 個のルール}}を編集できません", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditWarningToastDescription": "{rulesCount, plural, other {#個のルール}}を更新しています。", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditWarningToastNotifyButtonLabel": "完了時に通知", diff --git a/x-pack/platform/plugins/private/translations/translations/zh-CN.json b/x-pack/platform/plugins/private/translations/translations/zh-CN.json index 479e9acd6a26..d466cda357f4 100644 --- a/x-pack/platform/plugins/private/translations/translations/zh-CN.json +++ b/x-pack/platform/plugins/private/translations/translations/zh-CN.json @@ -36878,7 +36878,6 @@ "xpack.securitySolution.detectionEngine.body.summary.message": "规则 {ruleName} 生成了 {signalsCount} 个告警", "xpack.securitySolution.detectionEngine.buttonManageRules": "管理规则", "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkActionConfirmationCloseButtonLabel": "关闭", - "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditConfirmation.confirmButtonLabel": "编辑 {customRulesCount, plural, other {# 个定制规则}}", "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditConfirmationCancelButtonLabel": "取消", "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.addIndexPatternsComboboxHelpText": "输入要添加的 Elasticsearch 索引的模式。默认情况下,下拉列表将包括 Security Solution 高级设置中定义的索引模式。", "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.addIndexPatternsComboboxLabel": "为选定规则添加索引模式", @@ -36912,8 +36911,6 @@ "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.setInvestigationFieldsWarningCallout": "您即将覆盖选定的 {rulesCount, plural, other {# 个规则}}的突出显示的定制字段。要应用并保存更改,请单击'保存'。", "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.setTagsWarningCallout": "您即将覆盖 {rulesCount, plural, other {# 个选定规则}}的标签,按'保存'可应用更改。", "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditFlyoutForm.tagsComoboxRequiredErrorMessage": "至少需要一个标签。", - "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkExportConfirmation.confirmButtonLabel": "导出 {customRulesCount, plural, other {# 个定制规则}}", - "xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkManualRuleRunConfirmation.confirmButtonLabel": "计划 {customRulesCount, plural, other {# 个定制规则}}", "xpack.securitySolution.detectionEngine.components.allRules.bulkDeleteConfirmationTitle": "确认批量删除", "xpack.securitySolution.detectionEngine.components.allRules.deleteConfirmationCancel": "取消", "xpack.securitySolution.detectionEngine.components.allRules.deleteConfirmationConfirm": "删除", @@ -38131,7 +38128,6 @@ "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.addRuleActionsTitle": "添加规则操作", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.addTagsTitle": "添加标签", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.applyTimelineTemplateTitle": "应用时间线模板", - "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkActionConfirmationPartlyTitle": "只能对 {customRulesCount, plural, other {# 个定制规则}}应用此操作", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditConfirmationDeniedTitle": "无法编辑 {rulesCount, plural, other {# 个规则}}", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditWarningToastDescription": "{rulesCount, plural, other {# 个规则}}正在更新。", "xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkEditWarningToastNotifyButtonLabel": "在完成时通知我", diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/comparison_side/comparison_side_help_info.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/comparison_side/comparison_side_help_info.tsx index 37b23652bfcb..1f4e6a255fb8 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/comparison_side/comparison_side_help_info.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/comparison_side/comparison_side_help_info.tsx @@ -57,7 +57,7 @@ export function ComparisonSideHelpInfo({ options }: ComparisonSideHelpInfoProps)
    {optionsWithDescriptions.map( ({ title: displayName, description: explanation }) => ( -
  • +
  • {displayName} {'-'} {explanation}
  • ) diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_rule_errors_list.test.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_rule_errors_list.test.tsx index 7354bd306d6e..f1f79e911ec4 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_rule_errors_list.test.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_rule_errors_list.test.tsx @@ -64,11 +64,11 @@ describe('Component BulkEditRuleErrorsList', () => { ], [ BulkActionsDryRunErrCode.MACHINE_LEARNING_INDEX_PATTERN, - "2 custom machine learning rules (these rules don't have index patterns)", + "2 machine learning rules (these rules don't have index patterns)", ], [ BulkActionsDryRunErrCode.ESQL_INDEX_PATTERN, - "2 custom ES|QL rules (these rules don't have index patterns)", + "2 ES|QL rules (these rules don't have index patterns)", ], [ BulkActionsDryRunErrCode.MACHINE_LEARNING_AUTH, diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_rule_errors_list.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_rule_errors_list.tsx index 72e380a1a7d5..ce6be3edbf14 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_rule_errors_list.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_rule_errors_list.tsx @@ -41,7 +41,7 @@ const BulkEditRuleErrorItem = ({
  • @@ -61,7 +61,7 @@ const BulkEditRuleErrorItem = ({
  • diff --git a/x-pack/solutions/security/plugins/security_solution/public/detections/pages/detection_engine/rules/translations.ts b/x-pack/solutions/security/plugins/security_solution/public/detections/pages/detection_engine/rules/translations.ts index cb0570855dab..b12355c10987 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detections/pages/detection_engine/rules/translations.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/detections/pages/detection_engine/rules/translations.ts @@ -265,13 +265,13 @@ export const BULK_EDIT_CONFIRMATION_REJECTED_TITLE = (rulesCount: number) => } ); -export const BULK_ACTION_CONFIRMATION_PARTLY_TITLE = (customRulesCount: number) => +export const BULK_ACTION_CONFIRMATION_PARTLY_TITLE = (rulesCount: number) => i18n.translate( 'xpack.securitySolution.detectionEngine.rules.allRules.bulkActions.bulkActionConfirmationPartlyTitle', { - values: { customRulesCount }, + values: { rulesCount }, defaultMessage: - 'This action can only be applied to {customRulesCount, plural, =1 {# custom rule} other {# custom rules}}', + 'This action can only be applied to {rulesCount, plural, =1 {# rule} other {# rules}}', } ); @@ -289,32 +289,30 @@ export const BULK_ACTION_CONFIRMATION_CLOSE = i18n.translate( } ); -export const BULK_EDIT_CONFIRMATION_CONFIRM = (customRulesCount: number) => +export const BULK_EDIT_CONFIRMATION_CONFIRM = (rulesCount: number) => i18n.translate( 'xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkEditConfirmation.confirmButtonLabel', { - values: { customRulesCount }, - defaultMessage: 'Edit {customRulesCount, plural, =1 {# custom rule} other {# custom rules}}', + values: { rulesCount }, + defaultMessage: 'Edit {rulesCount, plural, =1 {# rule} other {# rules}}', } ); -export const BULK_EXPORT_CONFIRMATION_CONFIRM = (customRulesCount: number) => +export const BULK_EXPORT_CONFIRMATION_CONFIRM = (rulesCount: number) => i18n.translate( 'xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkExportConfirmation.confirmButtonLabel', { - values: { customRulesCount }, - defaultMessage: - 'Export {customRulesCount, plural, =1 {# custom rule} other {# custom rules}}', + values: { rulesCount }, + defaultMessage: 'Export {rulesCount, plural, =1 {# rule} other {# rules}}', } ); -export const BULK_MANUAL_RULE_RUN_CONFIRMATION_CONFIRM = (customRulesCount: number) => +export const BULK_MANUAL_RULE_RUN_CONFIRMATION_CONFIRM = (rulesCount: number) => i18n.translate( 'xpack.securitySolution.detectionEngine.components.allRules.bulkActions.bulkManualRuleRunConfirmation.confirmButtonLabel', { - values: { customRulesCount }, - defaultMessage: - 'Schedule {customRulesCount, plural, =1 {# custom rule} other {# custom rules}}', + values: { rulesCount }, + defaultMessage: 'Schedule {rulesCount, plural, =1 {# rule} other {# rules}}', } ); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules.cy.ts index 5583842ca944..dcc0cebc32ca 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules.cy.ts @@ -240,7 +240,7 @@ describe( // user can proceed with custom rule editing cy.get(MODAL_CONFIRMATION_BTN) - .should('have.text', `Edit ${existedRulesRows.length} custom rules`) + .should('have.text', `Edit ${existedRulesRows.length} rules`) .click(); // action should finish diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/import_export/export_rule.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/import_export/export_rule.cy.ts index 855c4e17afe0..7f313793866a 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/import_export/export_rule.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/import_export/export_rule.cy.ts @@ -127,7 +127,7 @@ describe('Export rules', { tags: ['@ess', '@serverless', '@skipInServerlessMKI'] // proceed with exporting only custom rules cy.get(MODAL_CONFIRMATION_BTN) - .should('have.text', `Export ${expectedNumberCustomRulesToBeExported} custom rule`) + .should('have.text', `Export ${expectedNumberCustomRulesToBeExported} rule`) .click(); getAvailablePrebuiltRulesCount().then((availablePrebuiltRulesCount) => { @@ -175,7 +175,7 @@ describe('Export rules', { tags: ['@ess', '@serverless', '@skipInServerlessMKI'] // should display correct number of custom rules when one of them has exceptions cy.get(MODAL_CONFIRMATION_BTN) - .should('have.text', `Export ${expectedNumberCustomRulesToBeExported} custom rules`) + .should('have.text', `Export ${expectedNumberCustomRulesToBeExported} rules`) .click(); cy.get(TOASTER_BODY).should( diff --git a/x-pack/test/security_solution_cypress/cypress/tasks/rules_bulk_actions.ts b/x-pack/test/security_solution_cypress/cypress/tasks/rules_bulk_actions.ts index c551054fbc6c..501989f6c5b6 100644 --- a/x-pack/test/security_solution_cypress/cypress/tasks/rules_bulk_actions.ts +++ b/x-pack/test/security_solution_cypress/cypress/tasks/rules_bulk_actions.ts @@ -417,20 +417,20 @@ export const checkPrebuiltRulesCannotBeModified = (rulesCount: number) => { export const checkMachineLearningRulesCannotBeModified = (rulesCount: number) => { cy.get(MODAL_CONFIRMATION_BODY).contains( - `${rulesCount} custom machine learning rule (these rules don't have index patterns)` + `${rulesCount} machine learning rule (these rules don't have index patterns)` ); }; export const checkEsqlRulesCannotBeModified = (rulesCount: number) => { cy.get(MODAL_CONFIRMATION_BODY).contains( - `${rulesCount} custom ES|QL rule (these rules don't have index patterns)` + `${rulesCount} ES|QL rule (these rules don't have index patterns)` ); }; -export const waitForMixedRulesBulkEditModal = (customRulesCount: number) => { +export const waitForMixedRulesBulkEditModal = (rulesCount: number) => { cy.get(MODAL_CONFIRMATION_TITLE).should( 'have.text', - `This action can only be applied to ${customRulesCount} custom rules` + `This action can only be applied to ${rulesCount} rules` ); }; @@ -445,7 +445,7 @@ export const scheduleManualRuleRunForSelectedRules = ( if (disabledCount > 0) { cy.get(BULK_MANUAL_RULE_RUN_WARNING_MODAL).should( 'have.text', - `This action can only be applied to ${enabledCount} custom rulesThis action can't be applied to the following rules in your selection:${disabledCount} rules (Cannot schedule manual rule run for disabled rules)CancelSchedule ${enabledCount} custom rules` + `This action can only be applied to ${enabledCount} rulesThis action can't be applied to the following rules in your selection:${disabledCount} rules (Cannot schedule manual rule run for disabled rules)CancelSchedule ${enabledCount} rules` ); cy.get(CONFIRM_MANUAL_RULE_RUN_WARNING_BTN).click(); } From 9b0879cb302e9251a47c95393799e90683076c2a Mon Sep 17 00:00:00 2001 From: Marco Liberati Date: Wed, 18 Dec 2024 12:15:56 +0100 Subject: [PATCH 29/60] [SecuritySolutions][Lens][Embeddable] Use the correct Lens typeguard for the new embeddable (#204189) ## Summary Fixes #180726 Use the new `isLensApi` helper in place of the previous system. Co-authored-by: Angela Chuang --- .../actions/copy_to_clipboard/lens/copy_to_clipboard.ts | 5 +++-- .../public/app/actions/filter/lens/create_action.ts | 5 +++-- .../plugins/security_solution/public/app/actions/utils.ts | 8 -------- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/x-pack/solutions/security/plugins/security_solution/public/app/actions/copy_to_clipboard/lens/copy_to_clipboard.ts b/x-pack/solutions/security/plugins/security_solution/public/app/actions/copy_to_clipboard/lens/copy_to_clipboard.ts index f4c61c1e7bf7..1666a2e65f9c 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/app/actions/copy_to_clipboard/lens/copy_to_clipboard.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/app/actions/copy_to_clipboard/lens/copy_to_clipboard.ts @@ -9,9 +9,10 @@ import type { CellValueContext, IEmbeddable } from '@kbn/embeddable-plugin/publi import { isErrorEmbeddable } from '@kbn/embeddable-plugin/public'; import { createAction } from '@kbn/ui-actions-plugin/public'; import copy from 'copy-to-clipboard'; +import { isLensApi } from '@kbn/lens-plugin/public'; import { isInSecurityApp } from '../../../../common/hooks/is_in_security_app'; import { KibanaServices } from '../../../../common/lib/kibana'; -import { fieldHasCellActions, isCountField, isLensEmbeddable } from '../../utils'; +import { fieldHasCellActions, isCountField } from '../../utils'; import { COPY_TO_CLIPBOARD, COPY_TO_CLIPBOARD_ICON, COPY_TO_CLIPBOARD_SUCCESS } from '../constants'; export const ACTION_ID = 'embeddable_copyToClipboard'; @@ -39,7 +40,7 @@ export const createCopyToClipboardLensAction = ({ order }: { order?: number }) = getDisplayName: () => COPY_TO_CLIPBOARD, isCompatible: async ({ embeddable, data }) => !isErrorEmbeddable(embeddable as IEmbeddable) && - isLensEmbeddable(embeddable as IEmbeddable) && + isLensApi(embeddable) && isDataColumnsValid(data) && isInSecurityApp(currentAppId), execute: async ({ data }) => { diff --git a/x-pack/solutions/security/plugins/security_solution/public/app/actions/filter/lens/create_action.ts b/x-pack/solutions/security/plugins/security_solution/public/app/actions/filter/lens/create_action.ts index e26446676728..79bcd0e87ced 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/app/actions/filter/lens/create_action.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/app/actions/filter/lens/create_action.ts @@ -16,9 +16,10 @@ import type { CellValueContext, IEmbeddable } from '@kbn/embeddable-plugin/publi import { createAction } from '@kbn/ui-actions-plugin/public'; import { ACTION_INCOMPATIBLE_VALUE_WARNING } from '@kbn/cell-actions/src/actions/translations'; import { i18n } from '@kbn/i18n'; +import { isLensApi } from '@kbn/lens-plugin/public'; import { isInSecurityApp } from '../../../../common/hooks/is_in_security_app'; import { timelineSelectors } from '../../../../timelines/store'; -import { fieldHasCellActions, isLensEmbeddable } from '../../utils'; +import { fieldHasCellActions } from '../../utils'; import { TimelineId } from '../../../../../common/types'; import { DefaultCellActionTypes } from '../../constants'; import type { SecurityAppStore } from '../../../../common/store'; @@ -79,7 +80,7 @@ export const createFilterLensAction = ({ type: DefaultCellActionTypes.FILTER, isCompatible: async ({ embeddable, data }) => !isErrorEmbeddable(embeddable as IEmbeddable) && - isLensEmbeddable(embeddable as IEmbeddable) && + isLensApi(embeddable) && isDataColumnsValid(data) && isInSecurityApp(currentAppId), execute: async ({ data }) => { diff --git a/x-pack/solutions/security/plugins/security_solution/public/app/actions/utils.ts b/x-pack/solutions/security/plugins/security_solution/public/app/actions/utils.ts index 3da597db60c0..568a5f10f31e 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/app/actions/utils.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/app/actions/utils.ts @@ -4,8 +4,6 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import type { IEmbeddable } from '@kbn/embeddable-plugin/public'; -import { isLensApi } from '@kbn/lens-plugin/public'; import type { Serializable } from '@kbn/utility-types'; // All cell actions are disabled for these fields in Security @@ -16,12 +14,6 @@ const FIELDS_WITHOUT_CELL_ACTIONS = [ 'kibana.alert.reason', ]; -// @TODO: this is a temporary fix. It needs a better refactor on the consumer side here to -// adapt to the new Embeddable architecture -export const isLensEmbeddable = (embeddable: IEmbeddable): embeddable is IEmbeddable => { - return isLensApi(embeddable); -}; - export const fieldHasCellActions = (field?: string): boolean => { return !!field && !FIELDS_WITHOUT_CELL_ACTIONS.includes(field); }; From 759b9dc523c213fb5a7b9cebcc697228f978aa0c Mon Sep 17 00:00:00 2001 From: Matthew Kime Date: Wed, 18 Dec 2024 05:39:47 -0600 Subject: [PATCH 30/60] [dev tools] Theme var - update usage for borealis (#204636) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Short and simple EUI theme update. Only affects the padding to the left of the `Console` text. Its unchanged. Screenshot 2024-12-17 at 12 15 00 PM --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .../plugins/shared/dev_tools/public/application.tsx | 6 +++--- src/platform/plugins/shared/dev_tools/tsconfig.json | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/platform/plugins/shared/dev_tools/public/application.tsx b/src/platform/plugins/shared/dev_tools/public/application.tsx index 0b66621fb2e9..3acbaa21ed5a 100644 --- a/src/platform/plugins/shared/dev_tools/public/application.tsx +++ b/src/platform/plugins/shared/dev_tools/public/application.tsx @@ -11,9 +11,8 @@ import React, { useEffect, useRef } from 'react'; import ReactDOM from 'react-dom'; import { Redirect, RouteComponentProps } from 'react-router-dom'; import { HashRouter as Router, Routes, Route } from '@kbn/shared-ux-router'; -import { EuiTab, EuiTabs, EuiToolTip, EuiBetaBadge } from '@elastic/eui'; +import { EuiTab, EuiTabs, EuiToolTip, EuiBetaBadge, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { euiThemeVars } from '@kbn/ui-theme'; import type { ApplicationStart, @@ -56,6 +55,7 @@ function DevToolsWrapper({ location, startServices, }: DevToolsWrapperProps) { + const { euiTheme } = useEuiTheme(); const { docTitleService, breadcrumbService } = appServices; const mountedTool = useRef(null); @@ -75,7 +75,7 @@ function DevToolsWrapper({ return (
    - + {devTools.map((currentDevTool) => ( Date: Wed, 18 Dec 2024 07:09:38 -0500 Subject: [PATCH 31/60] [Cloud Security] Move @kbn/cloud-security-posture-storybook-config for Kibana sustainability (#204500) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Move @kbn/cloud-security-posture-storybook-config package to `x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook` Renamed removed the `config` folder to align with the `.storybook` [naming convention](https://github.com/elastic/kibana/pull/204500/files#diff-91918a63f6365a8f40f674ab54a8df7ce9aeb313f77fe8eda76284d712ef5425R21). ![Screenshot 2024-12-16 at 5 50 53 PM](https://github.com/user-attachments/assets/de1d0a81-353f-434c-bb2d-989210b35b43) ### Related Issues - https://github.com/elastic/kibana/pull/202862 --------- Co-authored-by: Brad White --- src/dev/storybook/aliases.ts | 3 ++- .../storybook/config/tsconfig.json | 20 ------------------- .../.storybook}/README.mdx | 0 .../.storybook}/babel_with_emotion.ts | 0 .../.storybook}/constants.ts | 0 .../.storybook}/index.ts | 0 .../.storybook}/main.ts | 2 +- .../.storybook}/manager.ts | 0 .../.storybook}/package.json | 0 .../.storybook}/preview.ts | 0 .../.storybook}/styles.css | 0 .../.storybook/tsconfig.json | 10 ++++++++++ .../kbn-cloud-security-posture/README.md | 0 .../graph/jest.config.js | 2 +- 14 files changed, 14 insertions(+), 23 deletions(-) delete mode 100644 x-pack/packages/kbn-cloud-security-posture/storybook/config/tsconfig.json rename x-pack/{packages/kbn-cloud-security-posture/storybook/config => solutions/security/packages/kbn-cloud-security-posture/.storybook}/README.mdx (100%) rename x-pack/{packages/kbn-cloud-security-posture/storybook/config => solutions/security/packages/kbn-cloud-security-posture/.storybook}/babel_with_emotion.ts (100%) rename x-pack/{packages/kbn-cloud-security-posture/storybook/config => solutions/security/packages/kbn-cloud-security-posture/.storybook}/constants.ts (100%) rename x-pack/{packages/kbn-cloud-security-posture/storybook/config => solutions/security/packages/kbn-cloud-security-posture/.storybook}/index.ts (100%) rename x-pack/{packages/kbn-cloud-security-posture/storybook/config => solutions/security/packages/kbn-cloud-security-posture/.storybook}/main.ts (89%) rename x-pack/{packages/kbn-cloud-security-posture/storybook/config => solutions/security/packages/kbn-cloud-security-posture/.storybook}/manager.ts (100%) rename x-pack/{packages/kbn-cloud-security-posture/storybook/config => solutions/security/packages/kbn-cloud-security-posture/.storybook}/package.json (100%) rename x-pack/{packages/kbn-cloud-security-posture/storybook/config => solutions/security/packages/kbn-cloud-security-posture/.storybook}/preview.ts (100%) rename x-pack/{packages/kbn-cloud-security-posture/storybook/config => solutions/security/packages/kbn-cloud-security-posture/.storybook}/styles.css (100%) create mode 100644 x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/tsconfig.json rename x-pack/{ => solutions/security}/packages/kbn-cloud-security-posture/README.md (100%) diff --git a/src/dev/storybook/aliases.ts b/src/dev/storybook/aliases.ts index c2c24528e3dc..2bf3888ce6cb 100644 --- a/src/dev/storybook/aliases.ts +++ b/src/dev/storybook/aliases.ts @@ -17,7 +17,8 @@ export const storybookAliases = { canvas: 'x-pack/plugins/canvas/storybook', cases: 'packages/kbn-cases-components/.storybook', cell_actions: 'src/platform/packages/shared/kbn-cell-actions/.storybook', - cloud_security_posture_packages: 'x-pack/packages/kbn-cloud-security-posture/storybook/config', + cloud_security_posture_packages: + 'x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook', cloud: 'packages/cloud/.storybook', coloring: 'packages/kbn-coloring/.storybook', language_documentation_popover: diff --git a/x-pack/packages/kbn-cloud-security-posture/storybook/config/tsconfig.json b/x-pack/packages/kbn-cloud-security-posture/storybook/config/tsconfig.json deleted file mode 100644 index 1f8b2275f519..000000000000 --- a/x-pack/packages/kbn-cloud-security-posture/storybook/config/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": "../../../../../tsconfig.base.json", - "compilerOptions": { - "outDir": "target/types", - "types": [ - "jest", - "node", - "@kbn/ambient-storybook-types", - ] - }, - "include": [ - "**/*.ts" - ], - "kbn_references": [ - "@kbn/storybook", - ], - "exclude": [ - "target/**/*", - ] -} diff --git a/x-pack/packages/kbn-cloud-security-posture/storybook/config/README.mdx b/x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/README.mdx similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/storybook/config/README.mdx rename to x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/README.mdx diff --git a/x-pack/packages/kbn-cloud-security-posture/storybook/config/babel_with_emotion.ts b/x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/babel_with_emotion.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/storybook/config/babel_with_emotion.ts rename to x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/babel_with_emotion.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/storybook/config/constants.ts b/x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/constants.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/storybook/config/constants.ts rename to x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/constants.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/storybook/config/index.ts b/x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/index.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/storybook/config/index.ts rename to x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/index.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/storybook/config/main.ts b/x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/main.ts similarity index 89% rename from x-pack/packages/kbn-cloud-security-posture/storybook/config/main.ts rename to x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/main.ts index 4e7fca030c2f..2d455283571a 100644 --- a/x-pack/packages/kbn-cloud-security-posture/storybook/config/main.ts +++ b/x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/main.ts @@ -9,7 +9,7 @@ import { defaultConfig } from '@kbn/storybook'; module.exports = { ...defaultConfig, - stories: ['../../**/*.stories.+(tsx|mdx)'], + stories: ['../**/*.stories.+(tsx|mdx)'], reactOptions: { strictMode: true, }, diff --git a/x-pack/packages/kbn-cloud-security-posture/storybook/config/manager.ts b/x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/manager.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/storybook/config/manager.ts rename to x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/manager.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/storybook/config/package.json b/x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/package.json similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/storybook/config/package.json rename to x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/package.json diff --git a/x-pack/packages/kbn-cloud-security-posture/storybook/config/preview.ts b/x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/preview.ts similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/storybook/config/preview.ts rename to x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/preview.ts diff --git a/x-pack/packages/kbn-cloud-security-posture/storybook/config/styles.css b/x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/styles.css similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/storybook/config/styles.css rename to x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/styles.css diff --git a/x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/tsconfig.json b/x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/tsconfig.json new file mode 100644 index 000000000000..6126ec1825c9 --- /dev/null +++ b/x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types", + "types": ["jest", "node", "@kbn/ambient-storybook-types"] + }, + "include": ["**/*.ts"], + "kbn_references": ["@kbn/storybook"], + "exclude": ["target/**/*"] +} diff --git a/x-pack/packages/kbn-cloud-security-posture/README.md b/x-pack/solutions/security/packages/kbn-cloud-security-posture/README.md similarity index 100% rename from x-pack/packages/kbn-cloud-security-posture/README.md rename to x-pack/solutions/security/packages/kbn-cloud-security-posture/README.md diff --git a/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/jest.config.js b/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/jest.config.js index 0448a8a11bc8..3933698808c1 100644 --- a/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/jest.config.js +++ b/x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/jest.config.js @@ -11,7 +11,7 @@ module.exports = { rootDir: '../../../../../..', transform: { '^.+\\.(js|tsx?)$': - '/x-pack/packages/kbn-cloud-security-posture/storybook/config/babel_with_emotion.ts', + '/x-pack/solutions/security/packages/kbn-cloud-security-posture/.storybook/babel_with_emotion.ts', }, setupFiles: ['jest-canvas-mock'], setupFilesAfterEnv: [ From ecd4567ac6d0663756724f7a4ed34401a0873389 Mon Sep 17 00:00:00 2001 From: Brad White Date: Wed, 18 Dec 2024 05:35:36 -0700 Subject: [PATCH 32/60] Fix/renovate pipeline (#204672) ## Summary Renovate pipeline isn't being uploaded to Buildkite properly and `pre` and `post` build steps were not necessary and create errors with CI stats. [Successful CI run](https://buildkite.com/elastic/kibana-pull-request/builds/261627) --- .buildkite/pipelines/pull_request/renovate.yml | 8 -------- .buildkite/scripts/pipelines/pull_request/pipeline.ts | 7 ++++--- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.buildkite/pipelines/pull_request/renovate.yml b/.buildkite/pipelines/pull_request/renovate.yml index 3b441cfe5375..98302a8d7912 100644 --- a/.buildkite/pipelines/pull_request/renovate.yml +++ b/.buildkite/pipelines/pull_request/renovate.yml @@ -1,12 +1,4 @@ steps: - - command: .buildkite/scripts/lifecycle/pre_build.sh - label: Pre-Build - timeout_in_minutes: 10 - agents: - machineType: n2-standard-2 - - - wait - - command: .buildkite/scripts/steps/renovate.sh label: 'Renovate validation' agents: diff --git a/.buildkite/scripts/pipelines/pull_request/pipeline.ts b/.buildkite/scripts/pipelines/pull_request/pipeline.ts index b1c877bb3db0..51587280c4ed 100644 --- a/.buildkite/scripts/pipelines/pull_request/pipeline.ts +++ b/.buildkite/scripts/pipelines/pull_request/pipeline.ts @@ -39,15 +39,16 @@ const getPipeline = (filename: string, removeSteps = true) => { return; } + pipeline.push(getAgentImageConfig({ returnYaml: true })); + const onlyRunQuickChecks = await areChangesSkippable([/^renovate\.json$/], REQUIRED_PATHS); if (onlyRunQuickChecks) { pipeline.push(getPipeline('.buildkite/pipelines/pull_request/renovate.yml', false)); - pipeline.push(getPipeline('.buildkite/pipelines/pull_request/post_build.yml')); - console.log('Isolated changes to renovate.json. Skipping main PR pipeline.'); + + console.log([...new Set(pipeline)].join('\n')); return; } - pipeline.push(getAgentImageConfig({ returnYaml: true })); pipeline.push(getPipeline('.buildkite/pipelines/pull_request/base.yml', false)); if (await doAnyChangesMatch([/^packages\/kbn-handlebars/])) { From 40c90550f12f99f23e6b7d545c7427e30d648dab Mon Sep 17 00:00:00 2001 From: Julia Rechkunova Date: Wed, 18 Dec 2024 13:45:32 +0100 Subject: [PATCH 33/60] [Discover] Rename Saved Search to Discover Session (#202217) - Closes https://github.com/elastic/kibana/issues/174144 ## Summary This PR renames Saved Search into Discover Session in UI. - [x] Discover - [x] Saved Objects page and modal - [x] Docs - [x] Other occurrences Screenshot 2024-12-16 at 15 20 10 Screenshot 2024-12-11 at 14 40 15 Screenshot 2024-12-16 at 14 57 39 ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: wajihaparvez Co-authored-by: Davis McPhee Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com> --- dev_docs/key_concepts/building_blocks.mdx | 2 +- docs/concepts/data-views.asciidoc | 2 +- docs/concepts/esql.asciidoc | 2 +- docs/concepts/save-query.asciidoc | 4 +- docs/developer/plugin-list.asciidoc | 1 + docs/discover/document-explorer.asciidoc | 2 +- docs/discover/get-started-discover.asciidoc | 12 ++-- docs/discover/save-search.asciidoc | 36 +++++----- docs/discover/search-sessions.asciidoc | 2 +- docs/discover/search.asciidoc | 28 ++++---- docs/fleet/fleet.asciidoc | 4 +- docs/management/advanced-options.asciidoc | 6 +- docs/setup/configuring-reporting.asciidoc | 8 +-- .../user/dashboard/aggregation-based.asciidoc | 4 +- .../dashboard/create-visualizations.asciidoc | 4 +- docs/user/dashboard/lens.asciidoc | 4 +- docs/user/dashboard/tsvb.asciidoc | 2 +- docs/user/management.asciidoc | 2 +- docs/user/ml/index.asciidoc | 6 +- .../automating-report-generation.asciidoc | 4 +- docs/user/reporting/index.asciidoc | 16 ++--- .../public/examples/finder/finder_app.tsx | 2 +- oas_docs/bundle.json | 2 +- oas_docs/output/kibana.yaml | 2 +- packages/kbn-saved-search-component/README.md | 2 +- .../src/components/data_table.tsx | 4 +- .../plugins/shared/esql/server/ui_settings.ts | 2 +- src/plugins/dashboard/public/plugin.tsx | 2 +- src/plugins/data/server/ui_settings.ts | 2 +- .../header/__snapshots__/header.test.tsx.snap | 2 +- .../components/header/header.tsx | 2 +- src/plugins/discover/README.md | 2 +- .../discover/public/application/index.tsx | 2 +- .../open_search_panel.test.tsx.snap | 10 +-- .../app_menu_actions/get_new_search.tsx | 7 +- .../app_menu_actions/get_open_search.tsx | 7 +- .../top_nav/app_menu_actions/get_share.tsx | 6 +- .../esql_dataview_transition_modal.tsx | 2 +- .../components/top_nav/get_top_nav_badges.tsx | 2 +- .../components/top_nav/on_save_search.tsx | 10 +-- .../components/top_nav/open_search_panel.tsx | 15 ++-- .../top_nav/use_top_nav_links.test.tsx | 24 +++---- .../components/top_nav/use_top_nav_links.tsx | 2 +- .../saved_search_url_conflict_callout.ts | 2 +- .../public/context_awareness/README.md | 2 +- .../discover/public/embeddable/constants.ts | 4 +- .../get_search_embeddable_factory.tsx | 2 +- .../public/embeddable/initialize_edit_api.ts | 2 +- .../saved_search_alias_match_redirect.test.ts | 2 +- .../saved_search_alias_match_redirect.ts | 2 +- src/plugins/discover/public/plugin.tsx | 2 +- src/plugins/discover/server/ui_settings.ts | 5 +- .../feature_catalogue_registry.test.ts | 2 +- src/plugins/inspector/README.md | 2 +- .../not_found_errors.test.tsx.snap | 2 +- .../components/not_found_errors.test.tsx | 2 +- .../components/not_found_errors.tsx | 2 +- src/plugins/saved_search/README.md | 1 + src/plugins/saved_search/common/constants.ts | 2 + src/plugins/saved_search/common/index.ts | 1 + src/plugins/saved_search/public/plugin.ts | 2 +- .../check_for_duplicate_title.ts | 2 +- .../server/saved_objects/search.ts | 2 + .../components/sidebar/sidebar_title.tsx | 10 +-- .../utils/use/use_linked_search_updates.ts | 2 +- .../search_selection/search_selection.tsx | 6 +- .../index_data_visualizer.tsx | 2 +- .../use_search_items/use_search_items.ts | 2 +- .../step_define/step_define_form.tsx | 4 +- .../step_define/step_define_summary.tsx | 4 +- .../search_selection/search_selection.tsx | 8 +-- .../translations/translations/fr-FR.json | 72 ------------------- .../translations/translations/ja-JP.json | 72 ------------------- .../translations/translations/zh-CN.json | 68 ------------------ .../aiops/public/hooks/use_data_source.tsx | 2 +- .../contexts/ml/data_source_context.tsx | 2 +- .../configuration_step_form.tsx | 4 +- .../source_selection.test.tsx | 2 +- .../source_selection/source_selection.tsx | 12 ++-- .../data_drift/index_patterns_picker.tsx | 10 +-- .../json_editor_flyout/json_editor_flyout.tsx | 2 +- .../components/data_view/change_data_view.tsx | 2 +- .../new_job/pages/index_or_search/page.tsx | 10 +-- .../jobs/new_job/pages/job_type/page.tsx | 4 +- .../new_job/pages/new_job/wizard_steps.tsx | 2 +- .../jobs/new_job/recognize/page.tsx | 4 +- .../plugins/shared/ml/server/plugin.ts | 2 +- .../i18n/functions/dict/saved_search.ts | 4 +- .../__snapshots__/oss_features.test.ts.snap | 2 +- .../plugins/features/server/oss_features.ts | 2 +- .../fleet/dev_docs/integrations_overview.md | 2 +- .../integrations/sections/epm/constants.tsx | 2 +- .../log_stream_react_embeddable.tsx | 4 +- .../infra/public/plugin.ts | 2 +- .../components/copy_mode_control.tsx | 2 +- .../routes/api/external/copy_to_space.ts | 2 +- .../timeline/tabs/esql/translations.ts | 4 +- 97 files changed, 214 insertions(+), 425 deletions(-) diff --git a/dev_docs/key_concepts/building_blocks.mdx b/dev_docs/key_concepts/building_blocks.mdx index 29cf2df7a764..1afac686d1ad 100644 --- a/dev_docs/key_concepts/building_blocks.mdx +++ b/dev_docs/key_concepts/building_blocks.mdx @@ -42,7 +42,7 @@ and . Every feature that is added to a registered (Lens, Maps, Saved Searches and more) will be available automatically, as well as any that are added to the Embeddable context menu panel (for example, drilldowns, custom panel time ranges, and "share to" features). +with the . Every feature that is added to a registered (Lens, Maps, Discover sessions and more) will be available automatically, as well as any that are added to the Embeddable context menu panel (for example, drilldowns, custom panel time ranges, and "share to" features). The Dashboard Embeddable is one of the highest-level UI components you can add to your application. diff --git a/docs/concepts/data-views.asciidoc b/docs/concepts/data-views.asciidoc index 02922b298976..eb090554186a 100644 --- a/docs/concepts/data-views.asciidoc +++ b/docs/concepts/data-views.asciidoc @@ -166,7 +166,7 @@ clusters or indicies from cross-cluster search]. When you delete a {data-source}, you cannot recover the associated field formatters, runtime fields, source filters, and field popularity data. Deleting a {data-source} does not remove any indices or data documents from {es}. -WARNING: Deleting a {data-source} breaks all visualizations, saved searches, and other saved objects that reference the data view. +WARNING: Deleting a {data-source} breaks all visualizations, saved Discover sessions, and other saved objects that reference the data view. . Go to the **Data Views** management page using the navigation menu or the <>. diff --git a/docs/concepts/esql.asciidoc b/docs/concepts/esql.asciidoc index a3a091a4c6d0..0b9af290c2d8 100644 --- a/docs/concepts/esql.asciidoc +++ b/docs/concepts/esql.asciidoc @@ -26,7 +26,7 @@ disabled using the `enableESQL` setting from the {kibana-ref}/advanced-options.html[Advanced Settings]. This will hide the {esql} user interface from various applications. -However, users will be able to access existing {esql} artifacts like saved searches and visualizations. +However, users will be able to access existing {esql} artifacts like saved Discover sessions and visualizations. ==== [float] diff --git a/docs/concepts/save-query.asciidoc b/docs/concepts/save-query.asciidoc index b249f7e9aea2..a4d6dd28ea6e 100644 --- a/docs/concepts/save-query.asciidoc +++ b/docs/concepts/save-query.asciidoc @@ -11,10 +11,10 @@ Save this query, and you can embed the search results in dashboards, use them as a foundation for building a visualization, and share them in a link or CVS form. -Saved queries are different than <>, +Saved queries are different than <>, which include the *Discover* configuration—selected columns in the document table, sort order, and {data-source}—in addition to the query. -Saved searches are primarily used for adding search results to a dashboard. +Discover sessions are primarily used for adding search results to a dashboard. [role="xpack"] ==== Read-only access diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index 2a44a4d4f793..80511095a000 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -309,6 +309,7 @@ oss plugins. |{kib-repo}blob/{branch}/src/plugins/saved_search/README.md[savedSearch] |Contains the saved search saved object definition and helpers. +This object is created when a user saves their current session in the Discover app. |{kib-repo}blob/{branch}/src/plugins/screenshot_mode/README.md[screenshotMode] diff --git a/docs/discover/document-explorer.asciidoc b/docs/discover/document-explorer.asciidoc index 47b4a5bc3fcf..d026cf2930f1 100644 --- a/docs/discover/document-explorer.asciidoc +++ b/docs/discover/document-explorer.asciidoc @@ -36,7 +36,7 @@ In the pop-up, drag the column names to their new order. * To resize a column, drag the right edge of the column header until the column is the width that you want. + -Column widths are stored with a saved search. When you visualize saved searches on dashboards, the saved search appears the same as in **Discover**. +Column widths are stored with a Discover session. When you add a Discover session as a dashboard panel, it appears the same as in **Discover**. [float] [[document-explorer-density]] diff --git a/docs/discover/get-started-discover.asciidoc b/docs/discover/get-started-discover.asciidoc index ec44f977f4aa..f3ffcc92b582 100644 --- a/docs/discover/get-started-discover.asciidoc +++ b/docs/discover/get-started-discover.asciidoc @@ -293,24 +293,24 @@ Learn more about how to use ES|QL queries in <>. [float] [[save-discover-search]] -==== Save your search for later use +==== Save your Discover session for later use -Save your search so you can use it later, generate a CSV report, or use it to create visualizations, dashboards, and Canvas workpads. -Saving a search saves the query text, filters, +Save your Discover session so you can use it later, generate a CSV report, or use it to create visualizations, dashboards, and Canvas workpads. +Saving a Discover session saves the query text, filters, and current view of *Discover*, including the columns selected in the document table, the sort order, and the {data-source}. . In the application menu bar, click **Save**. -. Give your search a title and a description. +. Give your session a title and a description. -. Optionally store <> and the time range with the search. +. Optionally store <> and the time range with the session. . Click **Save**. [float] [[share-your-findings]] -==== Share your search +==== Share your Discover session To share your search and **Discover** view with a larger audience, click *Share* in the application menu bar. For detailed information about the sharing options, refer to <>. diff --git a/docs/discover/save-search.asciidoc b/docs/discover/save-search.asciidoc index 024fd97ab107..d661e8c01b83 100644 --- a/docs/discover/save-search.asciidoc +++ b/docs/discover/save-search.asciidoc @@ -1,9 +1,9 @@ [[save-open-search]] -== Save a search for reuse +== Save a Discover session for reuse -A saved search is a convenient way to reuse a search +A saved Discover session is a convenient way to reuse a search that you've created in *Discover*. -Saved searches are good for adding search results to a dashboard, +Discover sessions are good for saving a configured view of Discover to use later or adding search results to a dashboard, and can also serve as a foundation for building visualizations. [role="xpack"] @@ -16,27 +16,27 @@ displayed and the *Save* button is not visible. For more information, refer to < [role="screenshot"] image::discover/images/read-only-badge.png[Example of Discover's read only access indicator in Kibana's header] [float] -=== Save a search +=== Save a Discover session -By default, a saved search stores the query text, filters, and +By default, a Discover session stores the query text, filters, and current view of *Discover*, including the columns and sort order in the document table, and the {data-source}. -. Once you've created a search worth saving, click *Save* in the toolbar. -. Enter a name for the search. -. Optionally store <> and the time range with the search. +. Once you've created a view worth saving, click *Save* in the toolbar. +. Enter a name for the session. +. Optionally store <> and the time range with the session. . Click *Save*. -. To reload your search results in *Discover*, click *Open* in the toolbar, and select the saved search. +. To reload your search results in *Discover*, click *Open* in the toolbar, and select the saved Discover session. + -If the saved search is associated with a different {data-source} than is currently -selected, opening the saved search changes the selected {data-source}. The query language -used for the saved search is also automatically selected. +If the saved Discover session is associated with a different {data-source} than is currently +selected, opening the saved Discover session changes the selected {data-source}. The query language +used for the saved Discover session is also automatically selected. [float] -=== Duplicate a search -. In **Discover**, open the search that you want to duplicate. +=== Duplicate a Discover session +. In **Discover**, open the Discover session that you want to duplicate. . In the toolbar, click *Save*. -. Give the search a new name. -. Turn on **Save as new search**. +. Give the session a new name. +. Turn on **Save as new Discover session**. . Click *Save*. @@ -46,5 +46,5 @@ used for the saved search is also automatically selected. . Go to *Dashboards*. . Open or create the dashboard, then click *Edit*. . Click *Add from library*. -. From the *Types* dropdown, select *Saved search*. -. Select the saved search that you want to visualize, then click *X* to close the list. +. From the *Types* dropdown, select *Discover session*. +. Select the Discover session that you want to add, then click *X* to close the list. diff --git a/docs/discover/search-sessions.asciidoc b/docs/discover/search-sessions.asciidoc index fe1e945e676f..5d6b4a2d0043 100644 --- a/docs/discover/search-sessions.asciidoc +++ b/docs/discover/search-sessions.asciidoc @@ -52,7 +52,7 @@ image::images/search-session-awhile.png[Search Session indicator displaying the Once you save a search session, you can start a new search, navigate to a different application, or close the browser. -. To view your saved searches, go to the +. To view your saved search sessions, go to the *Search Sessions* management page using the navigation menu or the <>. For a saved or completed session, you can also open this view from the search sessions popup. diff --git a/docs/discover/search.asciidoc b/docs/discover/search.asciidoc index 439c5c443cc0..c7fde4159ec9 100644 --- a/docs/discover/search.asciidoc +++ b/docs/discover/search.asciidoc @@ -92,10 +92,10 @@ status:[400 TO 499] AND (extension:php OR extension:html) [[save-open-search]] -=== Save a search -A saved search persists your current view of Discover for later retrieval and reuse. You can reload a saved search into Discover, add it to a dashboard, and use it as the basis for a visualization. +=== Save a Discover session +A saved Discover session persists your current view of Discover for later retrieval and reuse. You can reload a saved session into Discover, add it to a dashboard, and use it as the basis for a visualization. -A saved search includes the query text, filters, and optionally, the time filter. A saved search also includes the selected columns in the document table, the sort order, and the current index pattern. +A Discover session includes the query text, filters, and optionally, the time filter. A Discover session also includes the selected columns in the document table, the sort order, and the current {data-source}. [role="xpack"] [[discover-read-only-access]] @@ -107,23 +107,23 @@ Kibana see <>. [role="screenshot"] image::discover/images/read-only-badge.png[Example of Discover's read only access indicator in Kibana's header] -==== Save a search -To save the current search: +==== Save a Discover session +To save the current session: . Click *Save* in the toolbar. -. Enter a name for the search and click *Save*. +. Enter a name for the session and click *Save*. -To import, export, and delete saved searches, go to the *Saved Objects* management page using the navigation menu or the <>. +To import, export, and delete saved Discover sessions, go to the *Saved Objects* management page using the navigation menu or the <>. -==== Open a saved search -To load a saved search into Discover: +==== Open a saved Discover session +To load a saved session into Discover: . Click *Open* in the toolbar. -. Select the search you want to open. +. Select the session you want to open. -If the saved search is associated with a different index pattern than is currently -selected, opening the saved search changes the selected index pattern. The query language -used for the saved search will also be automatically selected. +If the saved Discover session is associated with a different {data-source} than is currently +selected, opening the saved Discover session changes the selected {data-source}. The query language +used for the saved Discover session will also be automatically selected. [[save-load-delete-query]] === Save a query @@ -133,7 +133,7 @@ A saved query is a portable collection of query text and filters that you can re * View the results of the same query in multiple apps * Share your query -Saved queries don't include information specific to Discover, such as the currently selected columns in the document table, the sort order, and the index pattern. If you want to save your current view of Discover for later retrieval and reuse, create a <> instead. +Saved queries don't include information specific to Discover, such as the currently selected columns in the document table, the sort order, and the {data-source}. If you want to save your current view of Discover for later retrieval and reuse, create a <> instead. [role="xpack"] ==== Read-only access diff --git a/docs/fleet/fleet.asciidoc b/docs/fleet/fleet.asciidoc index 52c282555700..366d28fae3f5 100644 --- a/docs/fleet/fleet.asciidoc +++ b/docs/fleet/fleet.asciidoc @@ -18,7 +18,7 @@ It is recommended for advanced users only. [role="screenshot"] image::fleet/images/fleet-start.png[{fleet} app in {kib}] -Most integration content installed by {fleet} isn’t editable. This content is tagged with a **Managed** badge in the {kib} UI. Managed content itself cannot be edited or deleted, however managed visualizations, dashboards, and saved searches can be cloned. +Most integration content installed by {fleet} isn’t editable. This content is tagged with a **Managed** badge in the {kib} UI. Managed content itself cannot be edited or deleted, however managed visualizations, dashboards, and Discover sessions can be cloned. [role="screenshot"] image::fleet/images/system-managed.png[An image of the new managed badge.] @@ -37,7 +37,7 @@ To clone a dashboard: . Click *Save and return* after editing the dashboard. . Click *Save*. -To clone managed content relating to specific visualization editors, such as Lens, TSVB, and Maps, view the visualization in the editor then begin to make edits. Unlike cloning dashboards, and dashboard panels, the cloned content retains the original configurations. Once finished you are prompted to save the edits as a new visualization. The same applies for altering any saved searches in a managed visualization. +To clone managed content relating to specific visualization editors, such as Lens, TSVB, and Maps, view the visualization in the editor then begin to make edits. Unlike cloning dashboards, and dashboard panels, the cloned content retains the original configurations. Once finished you are prompted to save the edits as a new visualization. The same applies for altering any linked Discover sessions in a managed visualization. [float] == Get started diff --git a/docs/management/advanced-options.asciidoc b/docs/management/advanced-options.asciidoc index ef6d6306792b..5f51a86b01ae 100644 --- a/docs/management/advanced-options.asciidoc +++ b/docs/management/advanced-options.asciidoc @@ -311,7 +311,7 @@ Sets the maximum number of rows for the entire document table. This is the maxim [[discover-searchonpageload]]`discover:searchOnPageLoad`:: Controls whether a search is executed when *Discover* first loads. This setting -does not have an effect when loading a saved search. +does not have an effect when loading a saved Discover session. [[discover:showFieldStatistics]]`discover:showFieldStatistics`:: beta[] Enables the Field statistics view. Examine details such as @@ -324,10 +324,10 @@ Controls the display of multi-fields in the expanded document view. The default sort direction for time-based data views. [[doctable-hidetimecolumn]]`doc_table:hideTimeColumn`:: -Hides the "Time" column in *Discover* and in all saved searches on dashboards. +Hides the "Time" column in *Discover* and in all Discover session panels on dashboards. [[doctable-highlight]]`doc_table:highlight`:: -Highlights results in *Discover* and saved searches on dashboards. Highlighting +Highlights search results in *Discover* and Discover session panels on dashboards. Highlighting slows requests when working on big documents. diff --git a/docs/setup/configuring-reporting.asciidoc b/docs/setup/configuring-reporting.asciidoc index bcef6a026625..8711185dbc1b 100644 --- a/docs/setup/configuring-reporting.asciidoc +++ b/docs/setup/configuring-reporting.asciidoc @@ -121,8 +121,8 @@ PUT :/api/security/role/custom_reporting_user // CONSOLE <1> Grants access to generate PNG and PDF reports in *Dashboard*. -<2> Grants access to generate CSV reports from saved search panels in *Dashboard*. -<3> Grants access to generate CSV reports from saved searches in *Discover*. +<2> Grants access to generate CSV reports from saved Discover session panels in *Dashboard*. +<3> Grants access to generate CSV reports from saved Discover sessions in *Discover*. <4> Grants access to generate PDF reports in *Canvas*. <5> Grants access to generate PNG and PDF reports in *Visualize Library*. @@ -157,8 +157,8 @@ PUT localhost:5601/api/security/role/custom_reporting_user --------------------------------------------------------------- // CONSOLE -<1> Grants access to generate CSV reports from saved searches in *Discover*. -<2> Grants access to generate CSV reports from saved search panels in *Dashboard*. +<1> Grants access to generate CSV reports from saved Discover sessions in *Discover*. +<2> Grants access to generate CSV reports from saved Discover session panels in *Dashboard*. [float] [[grant-user-access-external-provider]] diff --git a/docs/user/dashboard/aggregation-based.asciidoc b/docs/user/dashboard/aggregation-based.asciidoc index f27d60928e6f..e3f1f0bea671 100644 --- a/docs/user/dashboard/aggregation-based.asciidoc +++ b/docs/user/dashboard/aggregation-based.asciidoc @@ -7,7 +7,7 @@ With aggregation-based visualizations, you can: * Split charts up to three aggregation levels, which is more than *Lens* and *TSVB* * Create visualization with non-time series data -* Use a <> as an input +* Use a <> as an input * Sort data tables and use the summary row and percentage column features * Assign colors to data series * Extend features with plugins @@ -112,7 +112,7 @@ Choose the type of visualization you want to create, then use the editor to conf .. Select the data source you want to visualize. + -NOTE: There is no performance impact on the data source you select. For example, *Discover* saved searches perform the same as {data-sources}. +NOTE: There is no performance impact on the data source you select. For example, saved Discover sessions perform the same as {data-sources}. . Add the <> you want to visualize using the editor, then click *Update*. + diff --git a/docs/user/dashboard/create-visualizations.asciidoc b/docs/user/dashboard/create-visualizations.asciidoc index 815f46d5711e..f0cf95733a97 100644 --- a/docs/user/dashboard/create-visualizations.asciidoc +++ b/docs/user/dashboard/create-visualizations.asciidoc @@ -163,9 +163,9 @@ To enable series data interactions, configure <> data in *Discover*. +* *Discover session interactions* — Opens <> data in *Discover*. + -To use saved search interactions, open the panel menu, then click *More > View saved search*. +To use saved Discover session interactions, open the panel menu, then click *More > View Discover session*. [[edit-panels]] === Edit panels diff --git a/docs/user/dashboard/lens.asciidoc b/docs/user/dashboard/lens.asciidoc index 3c2a120d167d..525ff8d7bfb6 100644 --- a/docs/user/dashboard/lens.asciidoc +++ b/docs/user/dashboard/lens.asciidoc @@ -668,10 +668,10 @@ For area, line, and bar charts, press Shift, then click the series in the legend [discrete] [[is-it-possible-to-use-saved-serches-in-lens]] -.*How do I visualize saved searches?* +.*How do I visualize saved Discover sessions?* [%collapsible] ==== -Visualizing saved searches in unsupported. +Visualizing saved Discover sessions in unsupported. ==== [discrete] diff --git a/docs/user/dashboard/tsvb.asciidoc b/docs/user/dashboard/tsvb.asciidoc index e8e7cec48800..15433b19b6fc 100644 --- a/docs/user/dashboard/tsvb.asciidoc +++ b/docs/user/dashboard/tsvb.asciidoc @@ -233,7 +233,7 @@ For example `https://example.org/{{key}}` This instructs TSVB to substitute the value from your visualization wherever it sees `{{key}}`. -If your data contain reserved or invalid URL characters such as "#" or "&", you should apply a transform to URL-encode the key like this `{{encodeURIComponent key}}`. If you are dynamically constructing a drilldown to another location in Kibana (for example, clicking a table row takes to you a value-scoped saved search), you will likely want to Rison-encode your key as it may contain invalid Rison characters. (https://github.com/Nanonid/rison#rison---compact-data-in-uris[Rison] is the serialization format many parts of Kibana use to store information in their URL.) +If your data contain reserved or invalid URL characters such as "#" or "&", you should apply a transform to URL-encode the key like this `{{encodeURIComponent key}}`. If you are dynamically constructing a drilldown to another location in Kibana (for example, clicking a table row takes to you a value-scoped Discover session), you will likely want to Rison-encode your key as it may contain invalid Rison characters. (https://github.com/Nanonid/rison#rison---compact-data-in-uris[Rison] is the serialization format many parts of Kibana use to store information in their URL.) For example: `discover#/view/0ac50180-82d9-11ec-9f4a-55de56b00cc0?_a=(filters:!((query:(match_phrase:(foo.keyword:{{rison key}})))))` diff --git a/docs/user/management.asciidoc b/docs/user/management.asciidoc index c46786b98829..b503dbdc2d0e 100644 --- a/docs/user/management.asciidoc +++ b/docs/user/management.asciidoc @@ -85,7 +85,7 @@ You can add and remove remote clusters, and check their connectivity. | <> | Monitor the generation of reports—PDF, PNG, and CSV—and download reports that you previously generated. -A report can contain a dashboard, visualization, saved search, or Canvas workpad. +A report can contain a dashboard, visualization, table with Discover search results, or Canvas workpad. | Machine Learning Jobs | View, export, and import your <> and diff --git a/docs/user/ml/index.asciidoc b/docs/user/ml/index.asciidoc index 91227055fa8a..92a28a1fdb0c 100644 --- a/docs/user/ml/index.asciidoc +++ b/docs/user/ml/index.asciidoc @@ -168,7 +168,7 @@ It makes it easy to find and investigate causes of unusual spikes or drops by us Examine the histogram chart of the log rates for a given {data-source}, and find the reason behind a particular change possibly in millions of log events across multiple fields and values. You can find log rate analysis embedded in multiple applications. -In {kib}, you can find it under **{ml-app}** > **AIOps Labs** or by using the <>. Here, you can select the {data-source} or saved search that you want to analyze. +In {kib}, you can find it under **{ml-app}** > **AIOps Labs** or by using the <>. Here, you can select the {data-source} or saved Discover session that you want to analyze. [role="screenshot"] image::user/ml/images/ml-log-rate-analysis-before.png[Log event histogram chart] @@ -203,7 +203,7 @@ and an example document that matches the category. //end::log-pattern-analysis-intro[] You can find log pattern analysis under **{ml-app}** > **AIOps Labs** or by using the <>. -Here, you can select the {data-source} or saved search that you want to analyze, or in +Here, you can select the {data-source} or saved Discover session that you want to analyze, or in **Discover** as an available action for any text field. [role="screenshot"] @@ -228,7 +228,7 @@ to detect distribution changes, trend changes, and other statistically significant change points in a metric of your time series data. You can find change point detection under **{ml-app}** > **AIOps Labs** or by using the <>. -Here, you can select the {data-source} or saved search that you want to analyze. +Here, you can select the {data-source} or saved Discover session that you want to analyze. [role="screenshot"] image::user/ml/images/ml-change-point-detection.png[Change point detection UI] diff --git a/docs/user/reporting/automating-report-generation.asciidoc b/docs/user/reporting/automating-report-generation.asciidoc index b4334b7c7ea8..0b773decd60a 100644 --- a/docs/user/reporting/automating-report-generation.asciidoc +++ b/docs/user/reporting/automating-report-generation.asciidoc @@ -24,7 +24,7 @@ To create the POST URL for CSV reports: . Go to *Discover*. -. Open the saved search you want to share. +. Open the saved Discover session you want to share. . In the toolbar, click *Share > Export > Copy POST URL*. @@ -54,7 +54,7 @@ If you experience issues with the deprecated report URLs after you upgrade {kib} * *Dashboard* reports: `/api/reporting/generate/dashboard/` * *Visualize Library* reports: `/api/reporting/generate/visualization/` -* *Discover* saved search reports: `/api/reporting/generate/search/` +* *Discover* reports: `/api/reporting/generate/search/` IMPORTANT: In earlier {kib} versions, you could use the `&sync` parameter to append to report URLs that held the request open until the document was fully generated. The `&sync` parameter is now unsupported. If you use the `&sync` parameter in Watcher, you must update the parameter. diff --git a/docs/user/reporting/index.asciidoc b/docs/user/reporting/index.asciidoc index 4425cc45d9b4..7a52f5d77b10 100644 --- a/docs/user/reporting/index.asciidoc +++ b/docs/user/reporting/index.asciidoc @@ -4,16 +4,16 @@ [partintro] -- -:frontmatter-description: {kib} provides you with several options to share *Discover* saved searches, dashboards, *Visualize Library* visualizations, and *Canvas* workpads with others, or on a website. +:frontmatter-description: {kib} provides you with several options to share *Discover* sessions, dashboards, *Visualize Library* visualizations, and *Canvas* workpads with others, or on a website. :frontmatter-tags-products: [kibana] -{kib} provides you with several options to share *Discover* saved searches, dashboards, *Visualize Library* visualizations, and *Canvas* workpads. These sharing options are available from the *Share* menu in the toolbar. +{kib} provides you with several options to share *Discover* sessions, dashboards, *Visualize Library* visualizations, and *Canvas* workpads. These sharing options are available from the *Share* menu in the toolbar. [float] [[share-a-direct-link]] == Share with a direct link -You can share direct links to saved searches, dashboards, and visualizations. When clicking **Share**, look for the **Links** tab to get the shareable link and copy it. +You can share direct links to saved Discover sessions, dashboards, and visualizations. When clicking **Share**, look for the **Links** tab to get the shareable link and copy it. TIP: When sharing an object with unsaved changes, you get a temporary link that might break in the future, for example in case of upgrade. Save the object to get a permanent link instead. @@ -29,13 +29,13 @@ image::https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/blt49f2b5a80 NOTE: For more information on how to configure reporting in {kib}, refer to <> -Create and download PDF, PNG, or CSV reports of saved searches, dashboards, visualizations, and workpads. +Create and download PDF, PNG, or CSV reports of saved Discover sessions, dashboards, visualizations, and workpads. * *PDF* — Generate and download PDF files of dashboards, visualizations, and *Canvas* workpads. PDF reports are a link:https://www.elastic.co/subscriptions[subscription feature]. * *PNG* — Generate and download PNG files of dashboards and visualizations. PNG reports are a link:https://www.elastic.co/subscriptions[subscription feature]. -* *CSV Reports* — Generate CSV reports of saved searches. <>. +* *CSV Reports* — Generate CSV reports of saved Discover sessions. <>. * *CSV Download* — Generate and download CSV files of *Lens* visualizations. @@ -44,7 +44,7 @@ Create and download PDF, PNG, or CSV reports of saved searches, dashboards, visu [[reporting-layout-sizing]] The layout and size of the report depends on what you are sharing. -For saved searches, dashboards, and visualizations, the layout depends on the size of the panels. +For saved Discover sessions, dashboards, and visualizations, the layout depends on the size of the panels. For workpads, the layout depends on the size of the worksheet dimensions. To change the output size, change the size of the browser, which resizes the shareable container before the report generates. It might take some trial and error before you're satisfied. @@ -54,13 +54,13 @@ In the following dashboard, the shareable container is highlighted: [role="screenshot"] image::user/reporting/images/shareable-container.png["Shareable Container"] -. Open the saved search, dashboard, visualization, or workpad you want to share. +. Open the saved Discover session, dashboard, visualization, or workpad you want to share. . From the toolbar, click *Share*, then select the report option. * If you are creating dashboard PDFs, select *For printing* to create printer-friendly PDFs with multiple A4 portrait pages and two visualizations per page. + -NOTE: When you create a dashboard report that includes a data table or saved search, the PDF includes only the visible data. +NOTE: When you create a dashboard report that includes a data table or Discover session, the PDF includes only the visible data. * If you are creating workpad PDFs, select *Full page layout* to create PDFs without margins that surround the workpad. diff --git a/examples/content_management_examples/public/examples/finder/finder_app.tsx b/examples/content_management_examples/public/examples/finder/finder_app.tsx index b8aaa6fe5f34..dda034e71118 100644 --- a/examples/content_management_examples/public/examples/finder/finder_app.tsx +++ b/examples/content_management_examples/public/examples/finder/finder_app.tsx @@ -37,7 +37,7 @@ export const FinderApp = (props: { { type: `search`, getIconForSavedObject: () => 'discoverApp', - name: 'Saved search', + name: 'Discover session', }, { type: 'index-pattern', diff --git a/oas_docs/bundle.json b/oas_docs/bundle.json index 320730edc972..3e3d47df0166 100644 --- a/oas_docs/bundle.json +++ b/oas_docs/bundle.json @@ -39790,7 +39790,7 @@ }, "/api/spaces/_copy_saved_objects": { "post": { - "description": "It also allows you to automatically copy related objects, so when you copy a dashboard, this can automatically copy over the associated visualizations, data views, and saved searches, as required. You can request to overwrite any objects that already exist in the target space if they share an identifier or you can use the resolve copy saved objects conflicts API to do this on a per-object basis.

    [Required authorization] Route required privileges: ALL of [copySavedObjectsToSpaces].", + "description": "It also allows you to automatically copy related objects, so when you copy a dashboard, this can automatically copy over the associated visualizations, data views, and saved Discover sessions, as required. You can request to overwrite any objects that already exist in the target space if they share an identifier or you can use the resolve copy saved objects conflicts API to do this on a per-object basis.

    [Required authorization] Route required privileges: ALL of [copySavedObjectsToSpaces].", "operationId": "post-spaces-copy-saved-objects", "parameters": [ { diff --git a/oas_docs/output/kibana.yaml b/oas_docs/output/kibana.yaml index f12014443bb0..5845ba56ae89 100644 --- a/oas_docs/output/kibana.yaml +++ b/oas_docs/output/kibana.yaml @@ -37372,7 +37372,7 @@ paths: - roles /api/spaces/_copy_saved_objects: post: - description: 'It also allows you to automatically copy related objects, so when you copy a dashboard, this can automatically copy over the associated visualizations, data views, and saved searches, as required. You can request to overwrite any objects that already exist in the target space if they share an identifier or you can use the resolve copy saved objects conflicts API to do this on a per-object basis.

    [Required authorization] Route required privileges: ALL of [copySavedObjectsToSpaces].' + description: 'It also allows you to automatically copy related objects, so when you copy a dashboard, this can automatically copy over the associated visualizations, data views, and saved Discover sessions, as required. You can request to overwrite any objects that already exist in the target space if they share an identifier or you can use the resolve copy saved objects conflicts API to do this on a per-object basis.

    [Required authorization] Route required privileges: ALL of [copySavedObjectsToSpaces].' operationId: post-spaces-copy-saved-objects parameters: - description: A required header to protect against CSRF attacks diff --git a/packages/kbn-saved-search-component/README.md b/packages/kbn-saved-search-component/README.md index 296ddb9079bc..61ec5a6cd8a9 100644 --- a/packages/kbn-saved-search-component/README.md +++ b/packages/kbn-saved-search-component/README.md @@ -1,6 +1,6 @@ # @kbn/saved-search-component -A component wrapper around Discover's Saved Search embeddable. This can be used in solutions without being within a Dasboard context. +A component wrapper around Discover session embeddable. This can be used in solutions without being within a Dasboard context. This can be used to render a context-aware (logs etc) "document table". diff --git a/packages/kbn-unified-data-table/src/components/data_table.tsx b/packages/kbn-unified-data-table/src/components/data_table.tsx index abaec0f6a98e..e7680ccc9175 100644 --- a/packages/kbn-unified-data-table/src/components/data_table.tsx +++ b/packages/kbn-unified-data-table/src/components/data_table.tsx @@ -1198,13 +1198,13 @@ export const UnifiedDataTable = ({ {searchDescription ? ( ) : ( )} diff --git a/src/platform/plugins/shared/esql/server/ui_settings.ts b/src/platform/plugins/shared/esql/server/ui_settings.ts index 1ddae41c9b24..c3520f7adc2a 100644 --- a/src/platform/plugins/shared/esql/server/ui_settings.ts +++ b/src/platform/plugins/shared/esql/server/ui_settings.ts @@ -21,7 +21,7 @@ export const getUiSettings: () => Record = () => ({ value: true, description: i18n.translate('esql.advancedSettings.enableESQLDescription', { defaultMessage: - 'This setting enables ES|QL in Kibana. By switching it off you will hide the ES|QL user interface from various applications. However, users will be able to access existing ES|QL saved searches, visualizations, etc.', + 'This setting enables ES|QL in Kibana. By switching it off you will hide the ES|QL user interface from various applications. However, users will be able to access existing ES|QL based Discover sessions, visualizations, etc.', }), requiresPageReload: true, schema: schema.boolean(), diff --git a/src/plugins/dashboard/public/plugin.tsx b/src/plugins/dashboard/public/plugin.tsx index a8e7cd96f38d..c8b2244d6865 100644 --- a/src/plugins/dashboard/public/plugin.tsx +++ b/src/plugins/dashboard/public/plugin.tsx @@ -298,7 +298,7 @@ export class DashboardPlugin defaultMessage: 'Analyze data in dashboards.', }), description: i18n.translate('dashboard.featureCatalogue.dashboardDescription', { - defaultMessage: 'Display and share a collection of visualizations and saved searches.', + defaultMessage: 'Display and share a collection of visualizations and search results.', }), icon: 'dashboardApp', path: `/app/${DASHBOARD_APP_ID}#${LANDING_PAGE_PATH}`, diff --git a/src/plugins/data/server/ui_settings.ts b/src/plugins/data/server/ui_settings.ts index 8dc58c3ffd63..857de03d4dbd 100644 --- a/src/plugins/data/server/ui_settings.ts +++ b/src/plugins/data/server/ui_settings.ts @@ -55,7 +55,7 @@ export function getUiSettings( value: true, description: i18n.translate('data.advancedSettings.docTableHighlightText', { defaultMessage: - 'Highlight results in Discover and Saved Searches Dashboard. ' + + 'Highlights search results in Discover and Discover session panels on dashboards. ' + 'Highlighting makes requests slow when working on big documents.', }), category: ['discover'], diff --git a/src/plugins/data_view_management/public/components/edit_index_pattern/source_filters_table/components/header/__snapshots__/header.test.tsx.snap b/src/plugins/data_view_management/public/components/edit_index_pattern/source_filters_table/components/header/__snapshots__/header.test.tsx.snap index 83a272d88d15..97486302553f 100644 --- a/src/plugins/data_view_management/public/components/edit_index_pattern/source_filters_table/components/header/__snapshots__/header.test.tsx.snap +++ b/src/plugins/data_view_management/public/components/edit_index_pattern/source_filters_table/components/header/__snapshots__/header.test.tsx.snap @@ -7,7 +7,7 @@ exports[`Header should render normally 1`] = ` >

    diff --git a/src/plugins/data_view_management/public/components/edit_index_pattern/source_filters_table/components/header/header.tsx b/src/plugins/data_view_management/public/components/edit_index_pattern/source_filters_table/components/header/header.tsx index 3530493a7490..86a77e6512af 100644 --- a/src/plugins/data_view_management/public/components/edit_index_pattern/source_filters_table/components/header/header.tsx +++ b/src/plugins/data_view_management/public/components/edit_index_pattern/source_filters_table/components/header/header.tsx @@ -19,7 +19,7 @@ export const Header = () => (

    diff --git a/src/plugins/discover/README.md b/src/plugins/discover/README.md index 6240cd63f3ea..6f3f17c97e7a 100644 --- a/src/plugins/discover/README.md +++ b/src/plugins/discover/README.md @@ -16,7 +16,7 @@ One folder for every "route", each folder contains files and folders related onl * **[/not_found](./public/application/not_found)** (Rendered when a route can't be found) * **[/view_alert](./public/application/view_alert)** (Forwarding links in alert notifications) * **[/components](./public/components)** (All React components used in more than just one app) -* **[/embeddable](./public/embeddable)** (Code related to the saved search embeddable, rendered on dashboards) +* **[/embeddable](./public/embeddable)** (Code related to the Discover session embeddable, rendered on dashboards) * **[/hooks](./public/hooks)** (Code containing React hooks) * **[/services](./public/services)** (Services either for external or internal use) * **[/utils](./public/utils)** (All utility functions used across more than one application) diff --git a/src/plugins/discover/public/application/index.tsx b/src/plugins/discover/public/application/index.tsx index 426e38881172..99fc03170a9b 100644 --- a/src/plugins/discover/public/application/index.tsx +++ b/src/plugins/discover/public/application/index.tsx @@ -37,7 +37,7 @@ export const renderApp = ({ defaultMessage: 'Read only', }), tooltip: i18n.translate('discover.badge.readOnly.tooltip', { - defaultMessage: 'Unable to save searches', + defaultMessage: 'Unable to save Discover sessions', }), iconType: 'glasses', }); diff --git a/src/plugins/discover/public/application/main/components/top_nav/__snapshots__/open_search_panel.test.tsx.snap b/src/plugins/discover/public/application/main/components/top_nav/__snapshots__/open_search_panel.test.tsx.snap index b1b399d1bd73..934e7068e78d 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/__snapshots__/open_search_panel.test.tsx.snap +++ b/src/plugins/discover/public/application/main/components/top_nav/__snapshots__/open_search_panel.test.tsx.snap @@ -14,7 +14,7 @@ exports[`OpenSearchPanel render 1`] = ` >

    @@ -25,7 +25,7 @@ exports[`OpenSearchPanel render 1`] = ` id="discoverOpenSearch" noItemsMessage={ } @@ -34,7 +34,7 @@ exports[`OpenSearchPanel render 1`] = ` Array [ Object { "getIconForSavedObject": [Function], - "name": "Saved search", + "name": "Discover session", "type": "search", }, ] @@ -59,11 +59,11 @@ exports[`OpenSearchPanel render 1`] = ` diff --git a/src/plugins/discover/public/application/main/components/top_nav/app_menu_actions/get_new_search.tsx b/src/plugins/discover/public/application/main/components/top_nav/app_menu_actions/get_new_search.tsx index b67f14f31c56..a27b1f5753e2 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/app_menu_actions/get_new_search.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/app_menu_actions/get_new_search.tsx @@ -19,11 +19,8 @@ export const getNewSearchAppMenuItem = ({ id: AppMenuActionId.new, type: AppMenuActionType.primary, controlProps: { - label: i18n.translate('discover.localMenu.localMenu.newSearchTitle', { - defaultMessage: 'New', - }), - description: i18n.translate('discover.localMenu.newSearchDescription', { - defaultMessage: 'New Search', + label: i18n.translate('discover.localMenu.localMenu.newDiscoverSessionTitle', { + defaultMessage: 'New session', }), iconType: 'plus', testId: 'discoverNewButton', diff --git a/src/plugins/discover/public/application/main/components/top_nav/app_menu_actions/get_open_search.tsx b/src/plugins/discover/public/application/main/components/top_nav/app_menu_actions/get_open_search.tsx index e8f6c5448d60..0a3d75af893c 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/app_menu_actions/get_open_search.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/app_menu_actions/get_open_search.tsx @@ -21,11 +21,8 @@ export const getOpenSearchAppMenuItem = ({ id: AppMenuActionId.open, type: AppMenuActionType.primary, controlProps: { - label: i18n.translate('discover.localMenu.openTitle', { - defaultMessage: 'Open', - }), - description: i18n.translate('discover.localMenu.openSavedSearchDescription', { - defaultMessage: 'Open Saved Search', + label: i18n.translate('discover.localMenu.openDiscoverSessionTitle', { + defaultMessage: 'Open session', }), iconType: 'folderOpen', testId: 'discoverOpenButton', diff --git a/src/plugins/discover/public/application/main/components/top_nav/app_menu_actions/get_share.tsx b/src/plugins/discover/public/application/main/components/top_nav/app_menu_actions/get_share.tsx index f1a030a40ea0..87514e81a063 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/app_menu_actions/get_share.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/app_menu_actions/get_share.tsx @@ -34,7 +34,7 @@ export const getShareAppMenuItem = ({ defaultMessage: 'Share', }), description: i18n.translate('discover.localMenu.shareSearchDescription', { - defaultMessage: 'Share Search', + defaultMessage: 'Share Discover session', }), iconType: 'share', testId: 'shareTopNavButton', @@ -108,7 +108,7 @@ export const getShareAppMenuItem = ({ objectType: 'search', objectTypeMeta: { title: i18n.translate('discover.share.shareModal.title', { - defaultMessage: 'Share this search', + defaultMessage: 'Share this Discover session', }), }, sharingData: { @@ -119,7 +119,7 @@ export const getShareAppMenuItem = ({ title: savedSearch.title || i18n.translate('discover.localMenu.fallbackReportTitle', { - defaultMessage: 'Untitled discover search', + defaultMessage: 'Untitled Discover session', }), }, isDirty: !savedSearch.id || stateContainer.appState.hasChanged(), diff --git a/src/plugins/discover/public/application/main/components/top_nav/esql_dataview_transition/esql_dataview_transition_modal.tsx b/src/plugins/discover/public/application/main/components/top_nav/esql_dataview_transition/esql_dataview_transition_modal.tsx index 342d8c4f1684..d52d25064d30 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/esql_dataview_transition/esql_dataview_transition_modal.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/esql_dataview_transition/esql_dataview_transition_modal.tsx @@ -57,7 +57,7 @@ export default function ESQLToDataViewTransitionModal({ {i18n.translate('discover.esqlToDataviewTransitionModalBody', { defaultMessage: - 'Switching data views removes the current ES|QL query. Save this search to avoid losing work.', + 'Switching data views removes the current ES|QL query. Save this session to avoid losing work.', })} diff --git a/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_badges.tsx b/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_badges.tsx index 13544f7f28de..9d6a3c8a9912 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_badges.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_badges.tsx @@ -71,7 +71,7 @@ export const getTopNavBadges = ({ getManagedContentBadge( i18n.translate('discover.topNav.managedContentLabel', { defaultMessage: - 'This saved search is managed by Elastic. Changes here must be saved to a new saved search.', + 'This Discover session is managed by Elastic. Changes here must be saved to a new Discover session.', }) ) ); diff --git a/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx b/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx index 63997c0d7b97..f1a2eff160db 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx @@ -35,7 +35,7 @@ async function saveDataSource({ if (id) { services.toastNotifications.addSuccess({ title: i18n.translate('discover.notifications.savedSearchTitle', { - defaultMessage: `Search ''{savedSearchTitle}'' was saved`, + defaultMessage: `Discover session ''{savedSearchTitle}'' was saved`, values: { savedSearchTitle: savedSearch.title, }, @@ -56,7 +56,7 @@ async function saveDataSource({ function onError(error: Error) { services.toastNotifications.addDanger({ title: i18n.translate('discover.notifications.notSavedSearchTitle', { - defaultMessage: `Search ''{savedSearchTitle}'' was not saved.`, + defaultMessage: `Discover session ''{savedSearchTitle}'' was not saved.`, values: { savedSearchTitle: savedSearch.title, }, @@ -266,7 +266,7 @@ const SaveSearchObjectModal: React.FC<{ label={ } /> @@ -289,7 +289,7 @@ const SaveSearchObjectModal: React.FC<{ initialCopyOnSave={initialCopyOnSave} description={description} objectType={i18n.translate('discover.localMenu.saveSaveSearchObjectType', { - defaultMessage: 'search', + defaultMessage: 'Discover session', })} showDescription={true} options={options} @@ -299,7 +299,7 @@ const SaveSearchObjectModal: React.FC<{ managed ? i18n.translate('discover.localMenu.mustCopyOnSave', { defaultMessage: - 'Elastic manages this saved search. Save any changes to a new saved search.', + 'Elastic manages this Discover session. Save any changes to a new Discover session.', }) : undefined } diff --git a/src/plugins/discover/public/application/main/components/top_nav/open_search_panel.tsx b/src/plugins/discover/public/application/main/components/top_nav/open_search_panel.tsx index 7633bea3612b..bd4163a20d4d 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/open_search_panel.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/open_search_panel.tsx @@ -20,11 +20,10 @@ import { EuiFlyoutBody, EuiTitle, } from '@elastic/eui'; +import { SavedSearchType, SavedSearchTypeDisplayName } from '@kbn/saved-search-plugin/common'; import { SavedObjectFinder } from '@kbn/saved-objects-finder-plugin/public'; import { useDiscoverServices } from '../../../../hooks/use_discover_services'; -const SEARCH_OBJECT_TYPE = 'search'; - interface OpenSearchPanelProps { onClose: () => void; onOpenSavedSearch: (id: string) => void; @@ -43,7 +42,7 @@ export function OpenSearchPanel(props: OpenSearchPanelProps) {

    @@ -59,15 +58,15 @@ export function OpenSearchPanel(props: OpenSearchPanelProps) { noItemsMessage={ } savedObjectMetaData={[ { - type: SEARCH_OBJECT_TYPE, + type: SavedSearchType, getIconForSavedObject: () => 'discoverApp', name: i18n.translate('discover.savedSearch.savedObjectName', { - defaultMessage: 'Saved search', + defaultMessage: 'Discover session', }), }, ]} @@ -88,12 +87,12 @@ export function OpenSearchPanel(props: OpenSearchPanelProps) { onClick={props.onClose} data-test-subj="manageSearchesBtn" href={addBasePath( - `/app/management/kibana/objects?initialQuery=type:(${SEARCH_OBJECT_TYPE})` + `/app/management/kibana/objects?initialQuery=type:("${SavedSearchTypeDisplayName}")` )} > diff --git a/src/plugins/discover/public/application/main/components/top_nav/use_top_nav_links.test.tsx b/src/plugins/discover/public/application/main/components/top_nav/use_top_nav_links.test.tsx index a70b200a7434..3db9fb74f0ea 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/use_top_nav_links.test.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/use_top_nav_links.test.tsx @@ -73,25 +73,25 @@ describe('useTopNavLinks', () => { "testId": "openInspectorButton", }, Object { - "description": "New Search", + "description": "New session", "iconOnly": true, "iconType": "plus", "id": "new", - "label": "New", + "label": "New session", "run": [Function], "testId": "discoverNewButton", }, Object { - "description": "Open Saved Search", + "description": "Open session", "iconOnly": true, "iconType": "folderOpen", "id": "open", - "label": "Open", + "label": "Open session", "run": [Function], "testId": "discoverOpenButton", }, Object { - "description": "Share Search", + "description": "Share Discover session", "iconOnly": true, "iconType": "share", "id": "share", @@ -100,7 +100,7 @@ describe('useTopNavLinks', () => { "testId": "shareTopNavButton", }, Object { - "description": "Save Search", + "description": "Save session", "emphasize": true, "iconType": "save", "id": "save", @@ -149,25 +149,25 @@ describe('useTopNavLinks', () => { "testId": "openInspectorButton", }, Object { - "description": "New Search", + "description": "New session", "iconOnly": true, "iconType": "plus", "id": "new", - "label": "New", + "label": "New session", "run": [Function], "testId": "discoverNewButton", }, Object { - "description": "Open Saved Search", + "description": "Open session", "iconOnly": true, "iconType": "folderOpen", "id": "open", - "label": "Open", + "label": "Open session", "run": [Function], "testId": "discoverOpenButton", }, Object { - "description": "Share Search", + "description": "Share Discover session", "iconOnly": true, "iconType": "share", "id": "share", @@ -176,7 +176,7 @@ describe('useTopNavLinks', () => { "testId": "shareTopNavButton", }, Object { - "description": "Save Search", + "description": "Save session", "emphasize": true, "iconType": "save", "id": "save", diff --git a/src/plugins/discover/public/application/main/components/top_nav/use_top_nav_links.tsx b/src/plugins/discover/public/application/main/components/top_nav/use_top_nav_links.tsx index de9686711d10..608442da1408 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/use_top_nav_links.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/use_top_nav_links.tsx @@ -192,7 +192,7 @@ export const useTopNavLinks = ({ defaultMessage: 'Save', }), description: i18n.translate('discover.localMenu.saveSearchDescription', { - defaultMessage: 'Save Search', + defaultMessage: 'Save session', }), testId: 'discoverSaveButton', iconType: 'save', diff --git a/src/plugins/discover/public/components/saved_search_url_conflict_callout/saved_search_url_conflict_callout.ts b/src/plugins/discover/public/components/saved_search_url_conflict_callout/saved_search_url_conflict_callout.ts index 3c42d0301e6d..4a49a6cb2e07 100644 --- a/src/plugins/discover/public/components/saved_search_url_conflict_callout/saved_search_url_conflict_callout.ts +++ b/src/plugins/discover/public/components/saved_search_url_conflict_callout/saved_search_url_conflict_callout.ts @@ -29,7 +29,7 @@ export const SavedSearchURLConflictCallout = ({ if (otherObjectId) { return spaces.ui.components.getLegacyUrlConflict({ objectNoun: i18n.translate('discover.savedSearchURLConflictCallout.objectNoun', { - defaultMessage: '{savedSearch} search', + defaultMessage: `''{savedSearch}'' Discover session`, values: { savedSearch: savedSearch.title, }, diff --git a/src/plugins/discover/public/context_awareness/README.md b/src/plugins/discover/public/context_awareness/README.md index 31fa5ff9bfcd..ae42038b77aa 100644 --- a/src/plugins/discover/public/context_awareness/README.md +++ b/src/plugins/discover/public/context_awareness/README.md @@ -54,7 +54,7 @@ The context awareness framework is driven by two main supporting services called Each context level has a dedicated profile service, e.g. `RootProfileService`, which is responsible for accepting profile provider registrations and looping over each provider in order during context resolution to identify a matching profile. Each resolution call can result in only one matching profile, which is the first to return a match based on execution order. -A single `ProfilesManager` is instantiated on Discover load, or one per saved search panel in a dashboard. The profiles manager is responsible for the following: +A single `ProfilesManager` is instantiated on Discover load, or one per Discover session panel in a dashboard. The profiles manager is responsible for the following: - Managing state associated with the current Discover context. - Coordinating profile services and exposing resolution methods for each context level. diff --git a/src/plugins/discover/public/embeddable/constants.ts b/src/plugins/discover/public/embeddable/constants.ts index 313f2bbb99ed..938caa233b43 100644 --- a/src/plugins/discover/public/embeddable/constants.ts +++ b/src/plugins/discover/public/embeddable/constants.ts @@ -17,9 +17,9 @@ export const SEARCH_EMBEDDABLE_CELL_ACTIONS_TRIGGER_ID = export const SEARCH_EMBEDDABLE_CELL_ACTIONS_TRIGGER: Trigger = { id: SEARCH_EMBEDDABLE_CELL_ACTIONS_TRIGGER_ID, - title: 'Discover saved searches embeddable cell actions', + title: 'Discover session embeddable cell actions', description: - 'This trigger is used to replace the cell actions for Discover saved search embeddable grid.', + 'This trigger is used to replace the cell actions for Discover session embeddable grid.', } as const; export const DEFAULT_HEADER_ROW_HEIGHT_LINES = 3; diff --git a/src/plugins/discover/public/embeddable/get_search_embeddable_factory.tsx b/src/plugins/discover/public/embeddable/get_search_embeddable_factory.tsx index 1f97e2de6639..7c08cdc95e58 100644 --- a/src/plugins/discover/public/embeddable/get_search_embeddable_factory.tsx +++ b/src/plugins/discover/public/embeddable/get_search_embeddable_factory.tsx @@ -152,7 +152,7 @@ export const getSearchEmbeddableFactory = ({ }, getTypeDisplayName: () => i18n.translate('discover.embeddable.search.displayName', { - defaultMessage: 'search', + defaultMessage: 'Discover session', }), canLinkToLibrary: async () => { return ( diff --git a/src/plugins/discover/public/embeddable/initialize_edit_api.ts b/src/plugins/discover/public/embeddable/initialize_edit_api.ts index a99cea051962..acb489735d05 100644 --- a/src/plugins/discover/public/embeddable/initialize_edit_api.ts +++ b/src/plugins/discover/public/embeddable/initialize_edit_api.ts @@ -75,7 +75,7 @@ export function initializeEditApi< return { getTypeDisplayName: () => i18n.translate('discover.embeddable.search.displayName', { - defaultMessage: 'search', + defaultMessage: 'Discover session', }), onEdit: async () => { const appTarget = await getAppTarget(partialApi, discoverServices); diff --git a/src/plugins/discover/public/hooks/saved_search_alias_match_redirect.test.ts b/src/plugins/discover/public/hooks/saved_search_alias_match_redirect.test.ts index 4e4469188d0b..81f0ce8e1537 100644 --- a/src/plugins/discover/public/hooks/saved_search_alias_match_redirect.test.ts +++ b/src/plugins/discover/public/hooks/saved_search_alias_match_redirect.test.ts @@ -44,7 +44,7 @@ describe('useSavedSearchAliasMatchRedirect', () => { expect(spaces.ui.redirectLegacyUrl).toHaveBeenCalledWith({ path: '#/view/aliasTargetId?_g=foo', aliasPurpose: 'savedObjectConversion', - objectNoun: 'my-title search', + objectNoun: `'my-title' Discover session`, }); }); diff --git a/src/plugins/discover/public/hooks/saved_search_alias_match_redirect.ts b/src/plugins/discover/public/hooks/saved_search_alias_match_redirect.ts index c4234e40612b..9bbfebe613c0 100644 --- a/src/plugins/discover/public/hooks/saved_search_alias_match_redirect.ts +++ b/src/plugins/discover/public/hooks/saved_search_alias_match_redirect.ts @@ -35,7 +35,7 @@ export const useSavedSearchAliasMatchRedirect = ({ path: `${getSavedSearchUrl(aliasTargetId)}${history.location.search}`, aliasPurpose, objectNoun: i18n.translate('discover.savedSearchAliasMatchRedirect.objectNoun', { - defaultMessage: '{savedSearch} search', + defaultMessage: `''{savedSearch}'' Discover session`, values: { savedSearch: savedSearch.title, }, diff --git a/src/plugins/discover/public/plugin.tsx b/src/plugins/discover/public/plugin.tsx index 2529b4824610..08d6f9f6c741 100644 --- a/src/plugins/discover/public/plugin.tsx +++ b/src/plugins/discover/public/plugin.tsx @@ -429,7 +429,7 @@ export class DiscoverPlugin }, savedObjectType: SavedSearchType, savedObjectName: i18n.translate('discover.savedSearch.savedObjectName', { - defaultMessage: 'Saved search', + defaultMessage: 'Discover session', }), getIconForSavedObject: () => 'discoverApp', }); diff --git a/src/plugins/discover/server/ui_settings.ts b/src/plugins/discover/server/ui_settings.ts index 03625807a838..9d2b86e57342 100644 --- a/src/plugins/discover/server/ui_settings.ts +++ b/src/plugins/discover/server/ui_settings.ts @@ -118,7 +118,7 @@ export const getUiSettings: ( description: i18n.translate('discover.advancedSettings.searchOnPageLoadText', { defaultMessage: 'Controls whether a search is executed when Discover first loads. This setting does not ' + - 'have an effect when loading a saved search.', + 'have an effect when loading a Discover session.', }), category: ['discover'], schema: schema.boolean(), @@ -129,7 +129,8 @@ export const getUiSettings: ( }), value: false, description: i18n.translate('discover.advancedSettings.docTableHideTimeColumnText', { - defaultMessage: "Hide the 'Time' column in Discover and in all Saved Searches on Dashboards.", + defaultMessage: + "Hide the 'Time' column in Discover and in all Discover session panels on Dashboards.", }), category: ['discover'], schema: schema.boolean(), diff --git a/src/plugins/home/public/services/feature_catalogue/feature_catalogue_registry.test.ts b/src/plugins/home/public/services/feature_catalogue/feature_catalogue_registry.test.ts index ab264d6ff1d1..a9463ca5083f 100644 --- a/src/plugins/home/public/services/feature_catalogue/feature_catalogue_registry.test.ts +++ b/src/plugins/home/public/services/feature_catalogue/feature_catalogue_registry.test.ts @@ -17,7 +17,7 @@ import { const DASHBOARD_FEATURE: FeatureCatalogueEntry = { id: 'dashboard', title: 'Dashboard', - description: 'Display and share a collection of visualizations and saved searches.', + description: 'Display and share a collection of visualizations and search results.', icon: 'dashboardApp', path: `/app/kibana#dashboard`, showOnHomePage: true, diff --git a/src/plugins/inspector/README.md b/src/plugins/inspector/README.md index 99984b53065a..f9eace25a25c 100644 --- a/src/plugins/inspector/README.md +++ b/src/plugins/inspector/README.md @@ -14,7 +14,7 @@ a specific view is available depends on the used adapters. ## Inspector Adapters Since the Inspector panel itself is not tied to a specific type of elements (visualizations, -saved searches, etc.), everything you need to open the inspector is a collection +Discover sessions, etc.), everything you need to open the inspector is a collection of so called inspector adapters. A single adapter can be any type of JavaScript class. Most likely an adapter offers some kind of logging capabilities for the element, that diff --git a/src/plugins/saved_objects_management/public/management_section/object_view/components/__snapshots__/not_found_errors.test.tsx.snap b/src/plugins/saved_objects_management/public/management_section/object_view/components/__snapshots__/not_found_errors.test.tsx.snap index 0c5045a1c866..6e96c51be7be 100644 --- a/src/plugins/saved_objects_management/public/management_section/object_view/components/__snapshots__/not_found_errors.test.tsx.snap +++ b/src/plugins/saved_objects_management/public/management_section/object_view/components/__snapshots__/not_found_errors.test.tsx.snap @@ -124,7 +124,7 @@ exports[`NotFoundErrors component renders correctly for search type 1`] = ` class="euiText emotion-euiText-s-euiTextColor-default" >
    - The saved search associated with this object no longer exists. + The Discover session associated with this object no longer exists.
    If you know what this error means, you can use the diff --git a/src/plugins/saved_objects_management/public/management_section/object_view/components/not_found_errors.test.tsx b/src/plugins/saved_objects_management/public/management_section/object_view/components/not_found_errors.test.tsx index 41919c9172e5..d1d53c0807ba 100644 --- a/src/plugins/saved_objects_management/public/management_section/object_view/components/not_found_errors.test.tsx +++ b/src/plugins/saved_objects_management/public/management_section/object_view/components/not_found_errors.test.tsx @@ -26,7 +26,7 @@ describe('NotFoundErrors component', () => { const callOut = mounted.find('EuiCallOut'); expect(callOut.render()).toMatchSnapshot(); expect(mounted.text()).toMatchInlineSnapshot( - `"There is a problem with this saved objectThe saved search associated with this object no longer exists.If you know what this error means, you can use the Saved objects APIs(external, opens in a new tab or window) to fix it — otherwise click the delete button above."` + `"There is a problem with this saved objectThe Discover session associated with this object no longer exists.If you know what this error means, you can use the Saved objects APIs(external, opens in a new tab or window) to fix it — otherwise click the delete button above."` ); }); diff --git a/src/plugins/saved_objects_management/public/management_section/object_view/components/not_found_errors.tsx b/src/plugins/saved_objects_management/public/management_section/object_view/components/not_found_errors.tsx index e89762bd2105..ddee0bb9ee38 100644 --- a/src/plugins/saved_objects_management/public/management_section/object_view/components/not_found_errors.tsx +++ b/src/plugins/saved_objects_management/public/management_section/object_view/components/not_found_errors.tsx @@ -32,7 +32,7 @@ export const NotFoundErrors = ({ type, docLinks }: NotFoundErrors) => { return ( ); case 'index-pattern': diff --git a/src/plugins/saved_search/README.md b/src/plugins/saved_search/README.md index d2234f04494a..cf2762c23d23 100644 --- a/src/plugins/saved_search/README.md +++ b/src/plugins/saved_search/README.md @@ -1,3 +1,4 @@ # Saved search Contains the saved search saved object definition and helpers. +This object is created when a user saves their current session in the Discover app. diff --git a/src/plugins/saved_search/common/constants.ts b/src/plugins/saved_search/common/constants.ts index f30466d22096..cc5fdcebc6da 100644 --- a/src/plugins/saved_search/common/constants.ts +++ b/src/plugins/saved_search/common/constants.ts @@ -8,6 +8,8 @@ */ export const SavedSearchType = 'search'; +// While the legacy SO name has to stay "search" the display name can be customized. +export const SavedSearchTypeDisplayName = 'discover session'; // visible on Saved Objects page export const LATEST_VERSION = 1; diff --git a/src/plugins/saved_search/common/index.ts b/src/plugins/saved_search/common/index.ts index 1900a7e90d16..c29caaf9bcde 100644 --- a/src/plugins/saved_search/common/index.ts +++ b/src/plugins/saved_search/common/index.ts @@ -25,6 +25,7 @@ export enum VIEW_MODE { export { SavedSearchType, + SavedSearchTypeDisplayName, LATEST_VERSION, MIN_SAVED_SEARCH_SAMPLE_SIZE, MAX_SAVED_SEARCH_SAMPLE_SIZE, diff --git a/src/plugins/saved_search/public/plugin.ts b/src/plugins/saved_search/public/plugin.ts index 5570e0fc8d5a..17132a1a7a41 100644 --- a/src/plugins/saved_search/public/plugin.ts +++ b/src/plugins/saved_search/public/plugin.ts @@ -102,7 +102,7 @@ export class SavedSearchPublicPlugin latest: LATEST_VERSION, }, name: i18n.translate('savedSearch.contentManagementType', { - defaultMessage: 'Saved search', + defaultMessage: 'Discover session', }), }); diff --git a/src/plugins/saved_search/public/services/saved_searches/check_for_duplicate_title.ts b/src/plugins/saved_search/public/services/saved_searches/check_for_duplicate_title.ts index 0efc945a867e..6eb364afec12 100644 --- a/src/plugins/saved_search/public/services/saved_searches/check_for_duplicate_title.ts +++ b/src/plugins/saved_search/public/services/saved_searches/check_for_duplicate_title.ts @@ -54,7 +54,7 @@ export const checkForDuplicateTitle = async ({ (await hasDuplicatedTitle(title, contentManagement)) ) { onTitleDuplicate(); - return Promise.reject(new Error(`Saved search title already exists: ${title}`)); + return Promise.reject(new Error(`Saved Discover session title already exists: ${title}`)); } return; diff --git a/src/plugins/saved_search/server/saved_objects/search.ts b/src/plugins/saved_search/server/saved_objects/search.ts index 153d95c6d7cb..90dbd6fbe620 100644 --- a/src/plugins/saved_search/server/saved_objects/search.ts +++ b/src/plugins/saved_search/server/saved_objects/search.ts @@ -11,6 +11,7 @@ import { ANALYTICS_SAVED_OBJECT_INDEX } from '@kbn/core-saved-objects-server'; import { SavedObjectsType } from '@kbn/core/server'; import { MigrateFunctionsObject } from '@kbn/kibana-utils-plugin/common'; import { getAllMigrations } from './search_migrations'; +import { SavedSearchTypeDisplayName } from '../../common/constants'; import { SCHEMA_SEARCH_V8_8_0, SCHEMA_SEARCH_MODEL_VERSION_1, @@ -32,6 +33,7 @@ export function getSavedSearchObjectType( management: { icon: 'discoverApp', defaultSearchField: 'title', + displayName: SavedSearchTypeDisplayName, importableAndExportable: true, getTitle(obj) { return obj.attributes.title; diff --git a/src/plugins/vis_default_editor/public/components/sidebar/sidebar_title.tsx b/src/plugins/vis_default_editor/public/components/sidebar/sidebar_title.tsx index b83a3330cce2..41199116837c 100644 --- a/src/plugins/vis_default_editor/public/components/sidebar/sidebar_title.tsx +++ b/src/plugins/vis_default_editor/public/components/sidebar/sidebar_title.tsx @@ -63,7 +63,7 @@ export function LinkedSearch({ savedSearch, eventEmitter }: LinkedSearchProps) { const linkButtonAriaLabel = i18n.translate( 'visDefaultEditor.sidebar.savedSearch.linkButtonAriaLabel', { - defaultMessage: 'Link to saved search. Click to learn more or break link.', + defaultMessage: 'Link to Discover session. Click to learn more or break link.', } ); @@ -82,7 +82,7 @@ export function LinkedSearch({ savedSearch, eventEmitter }: LinkedSearchProps) {

    @@ -134,7 +134,7 @@ export function LinkedSearch({ savedSearch, eventEmitter }: LinkedSearchProps) {

    @@ -147,7 +147,7 @@ export function LinkedSearch({ savedSearch, eventEmitter }: LinkedSearchProps) { >

    diff --git a/src/plugins/visualizations/public/visualize_app/utils/use/use_linked_search_updates.ts b/src/plugins/visualizations/public/visualize_app/utils/use/use_linked_search_updates.ts index 9a5ade9c4c26..ab2a51b2beef 100644 --- a/src/plugins/visualizations/public/visualize_app/utils/use/use_linked_search_updates.ts +++ b/src/plugins/visualizations/public/visualize_app/utils/use/use_linked_search_updates.ts @@ -48,7 +48,7 @@ export const useLinkedSearchUpdates = ( if (showToast) { services.toastNotifications.addSuccess( i18n.translate('visualizations.linkedToSearch.unlinkSuccessNotificationText', { - defaultMessage: `Unlinked from saved search ''{searchTitle}''`, + defaultMessage: `Unlinked from Discover session ''{searchTitle}''`, values: { searchTitle: savedSearch.title, }, diff --git a/src/plugins/visualizations/public/wizard/search_selection/search_selection.tsx b/src/plugins/visualizations/public/wizard/search_selection/search_selection.tsx index 62d775dbdc07..e0647737acb8 100644 --- a/src/plugins/visualizations/public/wizard/search_selection/search_selection.tsx +++ b/src/plugins/visualizations/public/wizard/search_selection/search_selection.tsx @@ -55,17 +55,17 @@ export class SearchSelection extends React.Component { noItemsMessage={i18n.translate( 'visualizations.newVisWizard.searchSelection.notFoundLabel', { - defaultMessage: 'No matching indices or saved searches found.', + defaultMessage: 'No matching indices or Discover sessions found.', } )} savedObjectMetaData={[ { type: 'search', - getIconForSavedObject: () => 'search', + getIconForSavedObject: () => 'discoverApp', name: i18n.translate( 'visualizations.newVisWizard.searchSelection.savedObjectType.search', { - defaultMessage: 'Saved search', + defaultMessage: 'Discover session', } ), // ignore the saved searches that have text-based languages queries diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx b/x-pack/platform/plugins/private/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx index 8a5e34f58a10..68fdc51f92f3 100644 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx +++ b/x-pack/platform/plugins/private/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx @@ -200,7 +200,7 @@ const DataVisualizerStateContextProvider: FC { if (!isDataView(fetchedDataView) && fetchedSavedSearch === undefined) { setError( i18n.translate('xpack.transform.searchItems.errorInitializationTitle', { - defaultMessage: `An error occurred initializing the Kibana data view or saved search.`, + defaultMessage: `An error occurred initializing the Kibana data view or Discover session.`, }) ); return; diff --git a/x-pack/platform/plugins/private/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx b/x-pack/platform/plugins/private/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx index 92300d5580cb..43efc8b1b4ca 100644 --- a/x-pack/platform/plugins/private/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx +++ b/x-pack/platform/plugins/private/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx @@ -377,8 +377,8 @@ export const StepDefineForm: FC = React.memo((props) => { fullWidth label={ searchItems?.savedSearch?.id !== undefined - ? i18n.translate('xpack.transform.stepDefineForm.savedSearchLabel', { - defaultMessage: 'Saved search', + ? i18n.translate('xpack.transform.stepDefineForm.discoverSessionLabel', { + defaultMessage: 'Discover session', }) : i18n.translate('xpack.transform.stepDefineForm.searchFilterLabel', { defaultMessage: 'Search filter', diff --git a/x-pack/platform/plugins/private/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx b/x-pack/platform/plugins/private/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx index b284eb3e1a02..9fc938cd2028 100644 --- a/x-pack/platform/plugins/private/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx +++ b/x-pack/platform/plugins/private/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx @@ -141,8 +141,8 @@ export const StepDefineSummary: FC = ({ {searchItems.savedSearch !== undefined && searchItems.savedSearch.id !== undefined && ( {searchItems.savedSearch.title} diff --git a/x-pack/platform/plugins/private/transform/public/app/sections/transform_management/components/search_selection/search_selection.tsx b/x-pack/platform/plugins/private/transform/public/app/sections/transform_management/components/search_selection/search_selection.tsx index 7ebb8702669b..1d4c120db052 100644 --- a/x-pack/platform/plugins/private/transform/public/app/sections/transform_management/components/search_selection/search_selection.tsx +++ b/x-pack/platform/plugins/private/transform/public/app/sections/transform_management/components/search_selection/search_selection.tsx @@ -55,17 +55,17 @@ export const SearchSelection: FC = ({ noItemsMessage={i18n.translate( 'xpack.transform.newTransform.searchSelection.notFoundLabel', { - defaultMessage: 'No matching indices or saved searches found.', + defaultMessage: 'No matching indices or saved Discover sessions found.', } )} savedObjectMetaData={[ { type: 'search', - getIconForSavedObject: () => 'search', + getIconForSavedObject: () => 'discoverApp', name: i18n.translate( - 'xpack.transform.newTransform.searchSelection.savedObjectType.search', + 'xpack.transform.newTransform.searchSelection.savedObjectType.discoverSession', { - defaultMessage: 'Saved search', + defaultMessage: 'Discover session', } ), showSavedObject: (savedObject: SavedObject) => diff --git a/x-pack/platform/plugins/private/translations/translations/fr-FR.json b/x-pack/platform/plugins/private/translations/translations/fr-FR.json index be3609545671..65bff9f9ca69 100644 --- a/x-pack/platform/plugins/private/translations/translations/fr-FR.json +++ b/x-pack/platform/plugins/private/translations/translations/fr-FR.json @@ -1454,7 +1454,6 @@ "dashboard.emptyScreen.noPermissionsTitle": "Ce tableau de bord est vide.", "dashboard.emptyScreen.viewModeSubtitle": "Accédez au mode de modification, puis commencez à ajouter vos visualisations.", "dashboard.emptyScreen.viewModeTitle": "Ajouter des visualisations à votre tableau de bord", - "dashboard.featureCatalogue.dashboardDescription": "Affichez et partagez une collection de visualisations et de recherches enregistrées.", "dashboard.featureCatalogue.dashboardSubtitle": "Analysez des données à l’aide de tableaux de bord.", "dashboard.featureCatalogue.dashboardTitle": "Dashboard", "dashboard.labs.enableLabsDescription": "Cet indicateur détermine si l'utilisateur a accès au bouton Ateliers, moyen rapide d'activer et de désactiver les fonctionnalités de la version d'évaluation technique dans le tableau de bord.", @@ -1582,7 +1581,6 @@ "data.advancedSettings.courier.requestPreferenceTitle": "Préférence de requête", "data.advancedSettings.defaultIndexText": "Utilisé par Discover et Visualisations lorsqu'une vue de données n'est pas définie.", "data.advancedSettings.defaultIndexTitle": "Vue de données par défaut", - "data.advancedSettings.docTableHighlightText": "Cela permet de mettre les résultats en surbrillance dans le tableau de bord Discover ainsi que dans les recherches enregistrées. À noter que la mise en surbrillance ralentit les requêtes dans le cas de documents volumineux.", "data.advancedSettings.docTableHighlightTitle": "Mettre les résultats en surbrillance", "data.advancedSettings.histogram.barTargetText": "Tente de générer ce nombre de compartiments lorsque l’intervalle \"auto\" est utilisé dans des histogrammes numériques et de date.", "data.advancedSettings.histogram.barTargetTitle": "Nombre de compartiments cible", @@ -2511,7 +2509,6 @@ "discover.advancedSettings.discover.showFieldStatisticsDescription": "Activez le {fieldStatisticsDocs} pour afficher des détails tels que les valeurs minimale et maximale d'un champ numérique ou une carte d'un champ géographique. Cette fonctionnalité est en version bêta et susceptible d'être modifiée.", "discover.advancedSettings.discover.showMultifields": "Afficher les champs multiples", "discover.advancedSettings.discover.showMultifieldsDescription": "Détermine si les {multiFields} doivent s'afficher dans la fenêtre de document étendue. Dans la plupart des cas, les champs multiples sont les mêmes que les champs d'origine. Cette option est uniquement disponible lorsque le paramètre `searchFieldsFromSource` est désactivé.", - "discover.advancedSettings.docTableHideTimeColumnText": "Permet de masquer la colonne ''Time'' dans Discover et dans toutes les recherches enregistrées des tableaux de bord.", "discover.advancedSettings.docTableHideTimeColumnTitle": "Masquer la colonne ''Time''", "discover.advancedSettings.fieldsPopularLimitText": "Les N champs les plus populaires à afficher", "discover.advancedSettings.fieldsPopularLimitTitle": "Limite de champs populaires", @@ -2523,7 +2520,6 @@ "discover.advancedSettings.sampleRowsPerPageTitle": "Lignes par page", "discover.advancedSettings.sampleSizeText": "Définit le nombre maximum de lignes pour l'ensemble du tableau de documents.", "discover.advancedSettings.sampleSizeTitle": "Lignes max. par tableau", - "discover.advancedSettings.searchOnPageLoadText": "Détermine si une recherche est exécutée lors du premier chargement de Discover. Ce paramètre n'a pas d'effet lors du chargement d’une recherche enregistrée.", "discover.advancedSettings.searchOnPageLoadTitle": "Recherche au chargement de la page", "discover.advancedSettings.sortDefaultOrderText": "Détermine le sens de tri par défaut pour les vues de données temporelles dans l'application Discover.", "discover.advancedSettings.sortDefaultOrderTitle": "Sens de tri par défaut", @@ -2533,7 +2529,6 @@ "discover.alerts.manageRulesAndConnectors": "Gérer les règles et les connecteurs", "discover.alerts.missedTimeFieldToolTip": "La vue de données ne possède pas de champ temporel.", "discover.badge.readOnly.text": "Lecture seule", - "discover.badge.readOnly.tooltip": "Impossible d’enregistrer les recherches", "discover.context.breadcrumb": "Documents relatifs", "discover.context.contextOfTitle": "Les documents relatifs à #{anchorId}", "discover.context.failedToLoadAnchorDocumentDescription": "Échec de chargement du document ancré", @@ -2581,7 +2576,6 @@ "discover.dropZoneTableLabel": "Abandonner la zone pour ajouter un champ en tant que colonne dans la table", "discover.embeddable.inspectorRequestDescription": "Cette requête interroge Elasticsearch afin de récupérer les données pour la recherche.", "discover.embeddable.search.dataViewError": "Vue de données {indexPatternId} manquante", - "discover.embeddable.search.displayName": "rechercher", "discover.errorCalloutESQLReferenceButtonLabel": "Ouvrir la référence ES|QL", "discover.errorCalloutShowErrorMessage": "Afficher les détails", "discover.esqlMode.selectedColumnsCallout": "Affichage de {selectedColumnsNumber} champs sur {esqlQueryColumnsNumber}. Ajoutez-en d’autres depuis la liste des champs disponibles.", @@ -2590,7 +2584,6 @@ "discover.esqlToDataViewTransitionModal.feedbackLink": "Soumettre des commentaires ES|QL", "discover.esqlToDataViewTransitionModal.saveButtonLabel": "Sauvegarder et basculer", "discover.esqlToDataViewTransitionModal.title": "Modifications non enregistrées", - "discover.esqlToDataviewTransitionModalBody": "Un changement de vue de données supprime la requête ES|QL en cours. Sauvegardez cette recherche pour éviter de perdre votre travail.", "discover.fieldChooser.availableFieldsTooltip": "Champs disponibles pour l'affichage dans le tableau.", "discover.fieldChooser.discoverField.addFieldTooltip": "Ajouter le champ en tant que colonne", "discover.fieldChooser.discoverField.removeFieldTooltip": "Supprimer le champ du tableau", @@ -2618,19 +2611,10 @@ "discover.loadingDocuments": "Chargement des documents", "discover.localMenu.alertsDescription": "Alertes", "discover.localMenu.esqlTooltipLabel": "ES|QL est le nouveau langage de requête canalisé puissant d'Elastic.", - "discover.localMenu.fallbackReportTitle": "Recherche Discover sans titre", "discover.localMenu.inspectTitle": "Inspecter", "discover.localMenu.localMenu.alertsTitle": "Alertes", - "discover.localMenu.localMenu.newSearchTitle": "Nouveauté", - "discover.localMenu.mustCopyOnSave": "Elastic gère cette recherche enregistrée. Enregistrez les modifications dans une nouvelle recherche enregistrée.", - "discover.localMenu.newSearchDescription": "Nouvelle recherche", "discover.localMenu.openInspectorForSearchDescription": "Ouvrir l'inspecteur de recherche", - "discover.localMenu.openSavedSearchDescription": "Ouvrir une recherche enregistrée", - "discover.localMenu.openTitle": "Ouvrir", - "discover.localMenu.saveSaveSearchObjectType": "rechercher", - "discover.localMenu.saveSearchDescription": "Enregistrer la recherche", "discover.localMenu.saveTitle": "Enregistrer", - "discover.localMenu.shareSearchDescription": "Partager la recherche", "discover.localMenu.shareTitle": "Partager", "discover.localMenu.switchToClassicTitle": "Basculer vers le classique", "discover.localMenu.switchToClassicTooltipLabel": "Passez à la syntaxe KQL ou Lucene.", @@ -2696,8 +2680,6 @@ "discover.noResults.suggestion.tryText": "Voici quelques solutions à essayer :", "discover.notifications.invalidTimeRangeText": "La plage temporelle spécifiée n'est pas valide. (de : \"{from}\" à \"{to}\")", "discover.notifications.invalidTimeRangeTitle": "Plage temporelle non valide", - "discover.notifications.notSavedSearchTitle": "La recherche \"{savedSearchTitle}\" n'a pas été enregistrée.", - "discover.notifications.savedSearchTitle": "La recherche \"{savedSearchTitle}\" a été enregistrée", "discover.pageTitleWithoutSavedSearch": "Discover - Recherche non encore enregistrée", "discover.pageTitleWithSavedSearch": "Discover - {savedSearchTitle}", "discover.panelsToggle.hideChartButton": "Masquer le graphique", @@ -2706,24 +2688,15 @@ "discover.panelsToggle.showSidebarButton": "Afficher la barre latérale", "discover.rootBreadcrumb": "Discover", "discover.sampleData.viewLinkLabel": "Discover", - "discover.savedSearch.savedObjectName": "Recherche enregistrée", - "discover.savedSearchAliasMatchRedirect.objectNoun": "Recherche {savedSearch}", "discover.savedSearchEmbeddable.action.viewSavedSearch.displayName": "Ouvrir dans Discover", - "discover.savedSearchURLConflictCallout.objectNoun": "Recherche {savedSearch}", "discover.searchingTitle": "Recherche", "discover.serverLocatorExtension.titleFromLocatorUnknown": "Recherche inconnue", - "discover.share.shareModal.title": "Partager cette recherche", "discover.showingDefaultDataViewWarningDescription": "Affichage de la vue de données par défaut : \"{loadedDataViewTitle}\" ({loadedDataViewId})", "discover.showingSavedDataViewWarningDescription": "Affichage de la vue de données enregistrée : \"{ownDataViewTitle}\" ({ownDataViewId})", "discover.singleDocRoute.errorMessage": "Aucune donnée correspondante pour l'ID {dataViewId}", "discover.singleDocRoute.errorTitle": "Une erreur s'est produite", "discover.skipToBottomButtonLabel": "Atteindre la fin du tableau", - "discover.topNav.managedContentLabel": "Cette recherche sauvegardée est gérée par Elastic. Les modifications effectuées ici doivent être enregistrées dans une nouvelle recherche sauvegardée.", - "discover.topNav.openSearchPanel.manageSearchesButtonLabel": "Gérer les recherches", - "discover.topNav.openSearchPanel.noSearchesFoundDescription": "Aucune recherche correspondante trouvée.", - "discover.topNav.openSearchPanel.openSearchTitle": "Ouvrir une recherche", "discover.topNav.saveModal.storeTimeWithSearchToggleDescription": "Mettez à jour le filtre temporel et actualisez l'intervalle pour afficher la sélection actuelle lors de l'utilisation de cette recherche.", - "discover.topNav.saveModal.storeTimeWithSearchToggleLabel": "Stocker la durée avec la recherche enregistrée", "discover.uninitializedRefreshButtonText": "Actualiser les données", "discover.uninitializedText": "Saisissez une requête, ajoutez quelques filtres, ou cliquez simplement sur Actualiser afin d’extraire les résultats pour la requête en cours.", "discover.uninitializedTitle": "Commencer la recherche", @@ -2844,7 +2817,6 @@ "embeddableExamples.unifiedFieldList.displayName": "Liste des champs", "embeddableExamples.unifiedFieldList.noDefaultDataViewErrorMessage": "La liste de champs doit être utilisée avec au moins une vue de données présente", "embeddableExamples.unifiedFieldList.selectDataViewMessage": "Veuillez sélectionner une vue de données", - "esql.advancedSettings.enableESQLDescription": "Ce paramètre active ES|QL dans Kibana. En le désactivant, vous cacherez l'interface utilisateur ES|QL de diverses applications. Cependant, les utilisateurs pourront accéder aux recherches enregistrées ES|QL, en plus des visualisations, etc.", "esql.advancedSettings.enableESQLTitle": "Activer ES|QL", "esql.triggers.updateEsqlQueryTrigger": "Mettre à jour la requête ES|QL", "esql.triggers.updateEsqlQueryTriggerDescription": "Mettre à jour la requête ES|QL en utilisant une nouvelle requête", @@ -5074,7 +5046,6 @@ "indexPatternManagement.editIndexPattern.source.table.matchesHeader": "Correspondances", "indexPatternManagement.editIndexPattern.source.table.notMatchedLabel": "Le filtre source ne correspond à aucun champ connu.", "indexPatternManagement.editIndexPattern.source.table.saveAria": "Enregistrer", - "indexPatternManagement.editIndexPattern.sourceLabel": "Les filtres de champ peuvent être utilisés pour exclure un ou plusieurs champs lors de la récupération d'un document. Cela se produit lors de l'affichage d'un document dans l'application Discover ou avec un tableau affichant les résultats d'une recherche enregistrée dans l'application Dashboard. Si vous avez des documents avec des champs de grande taille ou peu importants, il pourrait être utile de filtrer ces champs à ce niveau plus bas.", "indexPatternManagement.editIndexPattern.sourcePlaceholder": "filtre de champ, accepte les caractères génériques (par ex. `user*` pour filtrer les champs commençant par `user`)", "indexPatternManagement.editIndexPattern.tabs.fieldsHeader": "Champs", "indexPatternManagement.editIndexPattern.tabs.relationshipsHeader": "Relations ({count})", @@ -6667,9 +6638,7 @@ "savedObjectsManagement.view.inspectCodeEditorAriaLabel": "inspecter { title }", "savedObjectsManagement.view.inspectItemTitle": "Inspecter {title}", "savedObjectsManagement.view.savedObjectProblemErrorMessage": "Un problème est survenu avec cet objet enregistré.", - "savedObjectsManagement.view.savedSearchDoesNotExistErrorMessage": "La recherche enregistrée associée à cet objet n'existe plus.", "savedObjectsManagement.view.viewItemButtonLabel": "Afficher {title}", - "savedSearch.contentManagementType": "Recherche enregistrée", "savedSearch.kibana_context.filters.help": "Spécifier des filtres génériques Kibana", "savedSearch.kibana_context.help": "Met à jour le contexte général de Kibana.", "savedSearch.kibana_context.q.help": "Spécifier une recherche en texte libre Kibana", @@ -8073,8 +8042,6 @@ "unifiedDataTable.rowHeight.single": "Unique", "unifiedDataTable.rowHeightLabel": "Hauteur de ligne de cellule", "unifiedDataTable.sampleSizeSettings.sampleSizeLabel": "Taille de l'échantillon", - "unifiedDataTable.searchGenerationWithDescription": "Tableau généré par la recherche {searchTitle}", - "unifiedDataTable.searchGenerationWithDescriptionGrid": "Tableau généré par la recherche {searchTitle} ({searchDescription})", "unifiedDataTable.selectAllDocs": "Tout sélectionner ({rowsCount})", "unifiedDataTable.selectAllRowsOnPageColumnHeader": "Sélectionner toutes les lignes visibles", "unifiedDataTable.selectColumnHeader": "Sélectionner la colonne", @@ -8645,11 +8612,6 @@ "visDefaultEditor.sidebar.errorButtonTooltip": "Les erreurs dans les champs mis en évidence doivent être corrigées.", "visDefaultEditor.sidebar.indexPatternAriaLabel": "Modèle d'indexation : {title}", "visDefaultEditor.sidebar.savedSearch.goToDiscoverButtonText": "Afficher cette recherche dans Discover", - "visDefaultEditor.sidebar.savedSearch.linkButtonAriaLabel": "Lier à la recherche enregistrée. Cliquez pour en savoir plus ou rompre le lien.", - "visDefaultEditor.sidebar.savedSearch.popoverHelpText": "Les modifications apportées ultérieurement à cette recherche enregistrée sont reflétées dans la visualisation. Pour désactiver les mises à jour automatiques, supprimez le lien.", - "visDefaultEditor.sidebar.savedSearch.popoverTitle": "Lié à la recherche enregistrée", - "visDefaultEditor.sidebar.savedSearch.titleAriaLabel": "Recherche enregistrée : {title}", - "visDefaultEditor.sidebar.savedSearch.unlinkSavedSearchButtonText": "Supprimer le lien avec la recherche enregistrée", "visDefaultEditor.sidebar.tabs.dataLabel": "Données", "visDefaultEditor.sidebar.tabs.optionsLabel": "Options", "visDefaultEditor.sidebar.updateChartButtonLabel": "Mettre à jour", @@ -9640,7 +9602,6 @@ "visualizations.helpMenu.appName": "Bibliothèque Visualize", "visualizations.legacyCharts.conditionalMessage.noPermissions": "Contactez votre administrateur système pour passer à l'ancienne bibliothèque.", "visualizations.legacyUrlConflict.objectNoun": "Visualisation {visName}", - "visualizations.linkedToSearch.unlinkSuccessNotificationText": "Dissocié de la recherche enregistrée \"{searchTitle}\"", "visualizations.listing.betaTitle": "Bêta", "visualizations.listing.betaTooltip": "Cette visualisation est en version bêta et susceptible d'être modifiée. La conception et le code sont moins matures que les fonctionnalités officielles en disponibilité générale et sont fournis tels quels sans aucune garantie. Les fonctionnalités bêta ne sont pas soumises aux accords de niveau de service d'assistance des fonctionnalités officielles en disponibilité générale", "visualizations.listing.breadcrumb": "Bibliothèque Visualize", @@ -9673,9 +9634,7 @@ "visualizations.newVisWizard.learnMoreText": "Envie d'en savoir plus ?", "visualizations.newVisWizard.newVisTypeTitle": "Nouveau {visTypeName}", "visualizations.newVisWizard.resultsFound": "{resultCount, plural, one {type trouvé} other {types trouvés}}", - "visualizations.newVisWizard.searchSelection.notFoundLabel": "Aucun recherche enregistrée ni aucun index correspondants n'ont été trouvés.", "visualizations.newVisWizard.searchSelection.savedObjectType.dataView": "Vue de données", - "visualizations.newVisWizard.searchSelection.savedObjectType.search": "Recherche enregistrée", "visualizations.newVisWizard.title": "Nouvelle visualisation", "visualizations.noDataView.label": "vue de données", "visualizations.noMatchRoute.bannerText": "L'application Visualize ne reconnaît pas cet itinéraire : {route}.", @@ -9981,7 +9940,6 @@ "xpack.aiops.correlations.veryLowImpactText": "Très bas", "xpack.aiops.dataGrid.field.documentCountChart.seriesLabel": "compte du document", "xpack.aiops.dataGrid.field.documentCountChartSplit.seriesLabel": "Autre compte du document", - "xpack.aiops.dataSourceContext.errorTitle": "Impossible de récupérer la vue de données ou la recherche enregistrée", "xpack.aiops.dataViewNotBasedOnTimeSeriesWarning.title": "La vue de données \"{dataViewTitle}\" n'est pas basée sur une série temporelle.", "xpack.aiops.documentCountChart.baselineBadgeLabel": "Référence de base", "xpack.aiops.documentCountChart.deviationBadgeLabel": "général", @@ -12674,7 +12632,6 @@ "xpack.canvas.functions.savedMap.args.titleHelpText": "Titre de la carte", "xpack.canvas.functions.savedMap.args.zoomHelpText": "Niveau de zoom de la carte", "xpack.canvas.functions.savedMapHelpText": "Renvoie un objet incorporable pour un objet de carte enregistré.", - "xpack.canvas.functions.savedSearchHelpText": "Renvoie un objet incorporable pour un objet de recherche enregistré", "xpack.canvas.functions.savedVisualization.args.colorsHelpText": "Définit la couleur à utiliser pour une série spécifique", "xpack.canvas.functions.savedVisualization.args.hideLegendHelpText": "Spécifie l'option pour masquer la légende", "xpack.canvas.functions.savedVisualization.args.idHelpText": "ID de l'objet de visualisation enregistré", @@ -15575,7 +15532,6 @@ "xpack.dataVisualizer.index.lensChart.countLabel": "Décompte", "xpack.dataVisualizer.index.lensChart.maximumOfLabel": "Maximum de {fieldName}", "xpack.dataVisualizer.index.lensChart.topValuesLabel": "Valeurs les plus élevées", - "xpack.dataVisualizer.index.savedSearchErrorMessage": "Erreur lors de la récupération de la recherche enregistrée {savedSearchId}", "xpack.dataVisualizer.multiSelectPicker.NoFiltersFoundMessage": "Aucun filtre trouvé", "xpack.dataVisualizer.nameCollisionMsg": "\"{name}\" existe déjà, veuillez fournir un nom unique", "xpack.dataVisualizer.noData": "Aucune donnée", @@ -19775,7 +19731,6 @@ "xpack.features.ossFeatures.discoverSearchSessionsFeatureName": "Stocker les sessions de recherche", "xpack.features.ossFeatures.discoverShortUrlSubFeatureName": "URL courtes", "xpack.features.ossFeatures.discoverStoreSearchSessionsPrivilegeName": "Stocker les sessions de recherche", - "xpack.features.ossFeatures.reporting.dashboardDownloadCSV": "Générer les rapports CSV depuis les panneaux des recherches enregistrées", "xpack.features.ossFeatures.reporting.dashboardGenerateScreenshot": "Générer des rapports PDF ou PNG", "xpack.features.ossFeatures.reporting.discoverGenerateCSV": "Générer des rapports CSV", "xpack.features.ossFeatures.reporting.reportingTitle": "Reporting", @@ -20760,7 +20715,6 @@ "xpack.fleet.epm.assetTitles.mlModules": "Configurations de la détection d'anomalies", "xpack.fleet.epm.assetTitles.osqueryPackAssets": "Packs Osquery", "xpack.fleet.epm.assetTitles.osquerySavedQuery": "Requêtes Osquery enregistrées", - "xpack.fleet.epm.assetTitles.savedSearches": "Recherches enregistrées", "xpack.fleet.epm.assetTitles.securityRules": "Règles de sécurité", "xpack.fleet.epm.assetTitles.tag": "Balises", "xpack.fleet.epm.assetTitles.transforms": "Transformations", @@ -24333,8 +24287,6 @@ "xpack.infra.logsPage.toolbar.logFilterErrorToastTitle": "Erreur de filtrage du log", "xpack.infra.logsSettingsPage.loadingButtonLabel": "Chargement", "xpack.infra.logsStreamEmbeddable.deprecationWarningDescription": "La maintenance des panneaux de flux de logs n'est plus assurée. Essayez d'utiliser {savedSearchDocsLink} pour une visualisation similaire.", - "xpack.infra.logsStreamEmbeddable.deprecationWarningDescription.savedSearchesLinkLabel": "recherches enregistrées", - "xpack.infra.logStreamEmbeddable.description": "Ajoutez un tableau de logs de diffusion en direct. Pour une expérience plus efficace, nous vous recommandons d'utiliser la page Découvrir pour créer une recherche enregistrée au lieu d'utiliser Logs Stream.", "xpack.infra.logStreamEmbeddable.displayName": "Logs Stream (déclassé)", "xpack.infra.logStreamEmbeddable.title": "Flux de log", "xpack.infra.logStreamPageTemplate.backtoLogsStream": "Retour au flux de logs", @@ -29111,15 +29063,10 @@ "xpack.ml.dataframe.analytics.create.resultsFieldHelpText": "Définissez le nom du champ dans lequel les résultats de l'analyse doivent être stockés. La valeur par défaut est ml.", "xpack.ml.dataframe.analytics.create.resultsFieldInputAriaLabel": "Nom du champ dans lequel les résultats de l'analyse doivent être stockés.", "xpack.ml.dataframe.analytics.create.resultsFieldLabel": "Champ de résultats", - "xpack.ml.dataframe.analytics.create.savedSearchLabel": "Recherche enregistrée", "xpack.ml.dataframe.analytics.create.scatterplotMatrixLabel": "Matrice de nuages de points", "xpack.ml.dataframe.analytics.create.scatterplotMatrixLabelHelpText": "Permet de visualiser les relations entre les paires de champs inclus sélectionnés.", - "xpack.ml.dataFrame.analytics.create.searchSelection.CcsErrorCallOutBody": "La recherche enregistrée \"{savedSearchTitle}\" utilise la vue de données \"{dataViewName}\".", "xpack.ml.dataFrame.analytics.create.searchSelection.CcsErrorCallOutTitle": "Les vues de données utilisant la recherche inter-clusters ne sont pas prises en charge.", - "xpack.ml.dataFrame.analytics.create.searchSelection.errorGettingDataViewTitle": "Erreur lors du chargement de la vue de données utilisée par la recherche enregistrée", - "xpack.ml.dataFrame.analytics.create.searchSelection.notFoundLabel": "Aucun recherche enregistrée ni aucun index correspondants n'ont été trouvés.", "xpack.ml.dataFrame.analytics.create.searchSelection.savedObjectType.dataView": "Vue de données", - "xpack.ml.dataFrame.analytics.create.searchSelection.savedObjectType.search": "Recherche enregistrée", "xpack.ml.dataframe.analytics.create.softTreeDepthLimitInputAriaLabel": "Les arbres de décision dépassant cette profondeur sont pénalisés dans les calculs de perte.", "xpack.ml.dataframe.analytics.create.softTreeDepthLimitLabel": "Limite de profondeur d'arborescence non stricte", "xpack.ml.dataframe.analytics.create.softTreeDepthLimitText": "Les arbres de décision dépassant cette profondeur sont pénalisés dans les calculs de perte. Doit être supérieur ou égal à 0.", @@ -29412,7 +29359,6 @@ "xpack.ml.dataGridChart.notEnoughData": "0 document contient le champ.", "xpack.ml.dataGridChart.singleCategoryLegend": "{cardinality, plural, one {# catégorie} other {# catégories}}", "xpack.ml.dataGridChart.topCategoriesLegend": "Premières {maxChartColumns} des catégories {cardinality}", - "xpack.ml.dataSourceContext.errorTitle": "Impossible de récupérer la vue de données ou la recherche enregistrée", "xpack.ml.dataViewNotBasedOnTimeSeriesNotificationDescription": "La détection des anomalies ne s'exécute que sur des index temporels", "xpack.ml.dataViewNotBasedOnTimeSeriesNotificationTitle": "La vue de données {dataViewIndexPattern} n'est pas basée sur une série temporelle", "xpack.ml.dataViewUtils.createDataViewSwitchLabel": "Créer une vue de données", @@ -29655,7 +29601,6 @@ "xpack.ml.feature.reserved.description": "Pour accorder l'accès aux utilisateurs, vous devez également affecter le rôle machine_learning_user ou machine_learning_admin.", "xpack.ml.featureFeedbackButton.tellUsWhatYouThinkLink": "Dites-nous ce que vous pensez !", "xpack.ml.featureRegistry.mlFeatureName": "Machine Learning", - "xpack.ml.featureRegistry.privilegesTooltip": "L'octroi des privilèges de fonctionnalité Tout ou Lire au Machine Learning accordera également les privilèges de fonctionnalité équivalents à certains types d'objets Kibana enregistrés, à savoir les modèles d'indexation, les tableaux de bord, les recherches et visualisations enregistrées ainsi que les tâches de Machine Learning, les modèles entraînés et les objets de modules enregistrés.", "xpack.ml.fieldTypeIcon.booleanTypeAriaLabel": "type booléen", "xpack.ml.fieldTypeIcon.dateTypeAriaLabel": "type de données", "xpack.ml.fieldTypeIcon.geoPointTypeAriaLabel": "Type {geoPointParam}", @@ -30456,7 +30401,6 @@ "xpack.ml.newJob.recognize.running.startedAriaLabel": "Démarré", "xpack.ml.newJob.recognize.running.startFailedAriaLabel": "Échec du démarrage", "xpack.ml.newJob.recognize.runningLabel": "En cours d'exécution", - "xpack.ml.newJob.recognize.savedSearchPageTitle": "recherche enregistrée {savedSearchTitle}", "xpack.ml.newJob.recognize.saveJobOverrideLabel": "Enregistrer", "xpack.ml.newJob.recognize.searchesLabel": "Recherches", "xpack.ml.newJob.recognize.searchWillBeOverwrittenLabel": "La recherche sera écrasée", @@ -30465,7 +30409,6 @@ "xpack.ml.newJob.recognize.startDatafeedAfterSaveLabel": "Démarrer le flux de données après l'enregistrement", "xpack.ml.newJob.recognize.useDedicatedIndexLabel": "Utiliser l'index dédié", "xpack.ml.newJob.recognize.useFullDataLabel": "Utiliser l'ensemble des données {dataViewIndexPattern}", - "xpack.ml.newJob.recognize.usingSavedSearchDescription": "L'utilisation d'une recherche enregistrée signifie que la recherche utilisée dans les flux de données sera différente de celles par défaut que nous fournissons dans le module {moduleId}.", "xpack.ml.newJob.recognize.viewResultsAriaLabel": "Afficher les résultats", "xpack.ml.newJob.recognize.viewResultsLinkText": "Afficher les résultats", "xpack.ml.newJob.recognize.visualizationsLabel": "Visualisations", @@ -30485,7 +30428,6 @@ "xpack.ml.newJob.wizard.datafeedStep.dataView.description": "La vue de données actuellement utilisée pour cette tâche.", "xpack.ml.newJob.wizard.datafeedStep.dataView.step0.title": "Changer de vue de données", "xpack.ml.newJob.wizard.datafeedStep.dataView.step1.dataView": "Vue de données", - "xpack.ml.newJob.wizard.datafeedStep.dataView.step1.noMatchingError": "Aucun recherche enregistrée ni aucun index correspondants n'ont été trouvés.", "xpack.ml.newJob.wizard.datafeedStep.dataView.step1.title": "Sélectionner une nouvelle vue de données pour la tâche", "xpack.ml.newJob.wizard.datafeedStep.dataView.step2.ApplyButton": "Appliquer", "xpack.ml.newJob.wizard.datafeedStep.dataView.step2.backButton": "Retour", @@ -30595,8 +30537,6 @@ "xpack.ml.newJob.wizard.jobType.rareAriaLabel": "Tâche rare", "xpack.ml.newJob.wizard.jobType.rareDescription": "Détectez les valeurs rares dans les données temporelles.", "xpack.ml.newJob.wizard.jobType.rareTitle": "Rare", - "xpack.ml.newJob.wizard.jobType.savedSearchPageTitleLabel": "recherche enregistrée {savedSearchTitle}", - "xpack.ml.newJob.wizard.jobType.selectDifferentIndexLinkText": "Sélectionnez une autre vue de données ou une autre recherche enregistrée.", "xpack.ml.newJob.wizard.jobType.singleMetricAriaLabel": "Tâche à indicateur unique", "xpack.ml.newJob.wizard.jobType.singleMetricDescription": "Détectez les anomalies dans une série temporelle unique.", "xpack.ml.newJob.wizard.jobType.singleMetricTitle": "Indicateur unique", @@ -30606,7 +30546,6 @@ "xpack.ml.newJob.wizard.jsonFlyout.autoSetJobCreatorTimeRange.error": "Erreur lors de la récupération des heures de début et de fin de l'index", "xpack.ml.newJob.wizard.jsonFlyout.closeButton": "Fermer", "xpack.ml.newJob.wizard.jsonFlyout.datafeed.title": "JSON de configuration du flux de données", - "xpack.ml.newJob.wizard.jsonFlyout.indicesChange.calloutText": "Vous ne pouvez pas altérer les index utilisés par le flux de données. Pour sélectionner une autre vue de données ou une autre recherche enregistrée, accédez à l’étape 1 de l’assistant et sélectionnez l’option permettant de changer de vue de données.", "xpack.ml.newJob.wizard.jsonFlyout.indicesChange.calloutTitle": "Les index ont été modifiés", "xpack.ml.newJob.wizard.jsonFlyout.job.title": "JSON de configuration de la tâche", "xpack.ml.newJob.wizard.jsonFlyout.saveButton": "Enregistrer", @@ -30738,10 +30677,7 @@ "xpack.ml.newJob.wizard.revertModelSnapshotFlyout.title": "Restaurer le snapshot du modèle {ssId}", "xpack.ml.newJob.wizard.revertModelSnapshotFlyout.warningCallout.contents": "Tous les résultats de détection des anomalies postérieurs au {date} seront supprimés.", "xpack.ml.newJob.wizard.revertModelSnapshotFlyout.warningCallout.title": "Les données d'anomalie seront supprimées", - "xpack.ml.newJob.wizard.searchSelection.notFoundLabel": "Aucune vue de données ni recherche enregistrée correspondante détectée.", "xpack.ml.newJob.wizard.searchSelection.savedObjectType.dataView": "Vue de données", - "xpack.ml.newJob.wizard.searchSelection.savedObjectType.search": "Recherche enregistrée", - "xpack.ml.newJob.wizard.selectDataViewOrSavedSearch": "Sélectionner une vue de données ou une recherche enregistrée", "xpack.ml.newJob.wizard.shopValidationButton": "Ignorer la validation", "xpack.ml.newJob.wizard.step.configureDatafeedTitle": "Configurer le flux de données", "xpack.ml.newJob.wizard.step.jobDetailsTitle": "Détails de la tâche", @@ -30753,7 +30689,6 @@ "xpack.ml.newJob.wizard.stepComponentWrapper.jobDetailsTitle": "Détails de la tâche", "xpack.ml.newJob.wizard.stepComponentWrapper.pickFieldsTitle": "Choisir les champs", "xpack.ml.newJob.wizard.stepComponentWrapper.summaryTitleDataView": "Nouvelle tâche de la vue de données {dataViewName}", - "xpack.ml.newJob.wizard.stepComponentWrapper.summaryTitleSavedSearch": "Nouvelle tâche de la recherche enregistrée {title}", "xpack.ml.newJob.wizard.stepComponentWrapper.timeRangeTitle": "Plage temporelle", "xpack.ml.newJob.wizard.stepComponentWrapper.validationTitle": "Validation", "xpack.ml.newJob.wizard.summaryStep.convertToAdvancedButton": "Convertir en tâche avancée", @@ -42378,7 +42313,6 @@ "xpack.securitySolution.timelines.components.templateFilter.elasticTitle": "Modèles Elastic", "xpack.securitySolution.timelines.discoverInTimeline.save_saved_search_error": "Erreur pendant l'enregistrement de la recherche Discover", "xpack.securitySolution.timelines.discoverInTimeline.save_saved_search_unknown_error": "Erreur inconnue pendant l'enregistrement de la recherche Discover", - "xpack.securitySolution.timelines.discoverInTimeline.savedSearchTitle": "Recherche sauvegardée pour la chronologie – {title}", "xpack.securitySolution.timelines.newTemplateTimelineButtonLabel": "Créer un nouveau modèle de chronologie", "xpack.securitySolution.timelines.newTimelineButtonLabel": "Créer une nouvelle chronologie", "xpack.securitySolution.timelines.pageTitle": "Chronologies", @@ -44379,7 +44313,6 @@ "xpack.spaces.management.copyToSpace.copyModeControl.createNewCopies.disabledTitle": "Rechercher les objets existants", "xpack.spaces.management.copyToSpace.copyModeControl.createNewCopies.enabledText": "Utilisez cette option pour créer une ou plusieurs copies de l'objet dans le même espace.", "xpack.spaces.management.copyToSpace.copyModeControl.createNewCopies.enabledTitle": "Créer de nouveaux objets avec des ID aléatoires", - "xpack.spaces.management.copyToSpace.copyModeControl.includeRelated.text": "Copier cet objet et ses objets associés. Pour les tableaux de bord, les visualisations associées, modèles d'indexation et recherches enregistrées sont également copiés.", "xpack.spaces.management.copyToSpace.copyModeControl.includeRelated.title": "Inclure les objets associés", "xpack.spaces.management.copyToSpace.copyModeControl.overwrite.disabledLabel": "Demander une action en cas de conflit", "xpack.spaces.management.copyToSpace.copyModeControl.overwrite.enabledLabel": "Écraser automatiquement les conflits", @@ -47152,15 +47085,12 @@ "xpack.transform.newTransform.chooseSourceTitle": "Choisir une source", "xpack.transform.newTransform.newTransformTitle": "Nouvelle transformation", "xpack.transform.newTransform.searchSelection.createADataView": "Créer une vue de données", - "xpack.transform.newTransform.searchSelection.notFoundLabel": "Aucun recherche enregistrée ni aucun index correspondants n'ont été trouvés.", "xpack.transform.newTransform.searchSelection.savedObjectType.dataView": "Vue de données", - "xpack.transform.newTransform.searchSelection.savedObjectType.search": "Recherche enregistrée", "xpack.transform.pivotPreview.copyClipboardTooltip": "Copier la déclaration Dev Console de l'aperçu de la transformation dans le presse-papiers.", "xpack.transform.pivotPreview.PivotPreviewIncompleteConfigCalloutBody": "Veuillez choisir au moins un champ Regrouper par et une agrégation.", "xpack.transform.pivotPreview.PivotPreviewNoDataCalloutBody": "La requête d'aperçu n'a renvoyé aucune donnée. Veuillez vous assurer que la requête facultative renvoie des données et que les valeurs existent pour le champ utilisé par le champ Regrouper par et le champ d'agrégation.", "xpack.transform.pivotPreview.transformPreviewTitle": "Aperçu de la transformation", "xpack.transform.progress": "Progression", - "xpack.transform.searchItems.errorInitializationTitle": "Une erreur s'est produite lors de l'initialisation de la vue de données Kibana ou de la recherche enregistrée.", "xpack.transform.statsBar.batchTransformsLabel": "Lot", "xpack.transform.statsBar.continuousTransformsLabel": "Continu", "xpack.transform.statsBar.failedTransformsLabel": "Échoué", @@ -47242,7 +47172,6 @@ "xpack.transform.stepDefineForm.runtimeEditorSwitchModalTitle": "Les modifications seront perdues", "xpack.transform.stepDefineForm.runtimeFieldsLabel": "Champs de temps d'exécution", "xpack.transform.stepDefineForm.runtimeFieldsListLabel": "{runtimeFields}", - "xpack.transform.stepDefineForm.savedSearchLabel": "Recherche enregistrée", "xpack.transform.stepDefineForm.searchFilterLabel": "Filtre de recherche", "xpack.transform.stepDefineForm.sortFieldOptionsEmptyError": "Aucun champ de date n'est disponible pour effectuer le tri. Pour utiliser un autre type de champ, copiez la configuration dans le presse-papiers et continuez à créer la transformation dans la Console.", "xpack.transform.stepDefineForm.sortHelpText": "Sélectionnez le champ de date à utiliser pour identifier le document le plus récent.", @@ -47255,7 +47184,6 @@ "xpack.transform.stepDefineSummary.groupByLabel": "Regrouper par", "xpack.transform.stepDefineSummary.queryCodeBlockLabel": "Recherche", "xpack.transform.stepDefineSummary.queryLabel": "Requête", - "xpack.transform.stepDefineSummary.savedSearchLabel": "Recherche enregistrée", "xpack.transform.stepDefineSummary.timeRangeLabel": "Plage temporelle", "xpack.transform.stepDetailsForm.advancedSettingsAccordionButtonContent": "Paramètres avancés", "xpack.transform.stepDetailsForm.continuousModeAriaLabel": "Choisissez un retard.", diff --git a/x-pack/platform/plugins/private/translations/translations/ja-JP.json b/x-pack/platform/plugins/private/translations/translations/ja-JP.json index faeb7636282f..a9d26dc336ff 100644 --- a/x-pack/platform/plugins/private/translations/translations/ja-JP.json +++ b/x-pack/platform/plugins/private/translations/translations/ja-JP.json @@ -1454,7 +1454,6 @@ "dashboard.emptyScreen.noPermissionsTitle": "このダッシュボードは空です。", "dashboard.emptyScreen.viewModeSubtitle": "編集モードに切り替えて、ビジュアライゼーションの追加を開始します。", "dashboard.emptyScreen.viewModeTitle": "ダッシュボードにビジュアライゼーションを追加", - "dashboard.featureCatalogue.dashboardDescription": "ビジュアライゼーションと保存された検索のコレクションの表示と共有を行います。", "dashboard.featureCatalogue.dashboardSubtitle": "ダッシュボードでデータを分析します。", "dashboard.featureCatalogue.dashboardTitle": "ダッシュボード", "dashboard.labs.enableLabsDescription": "このフラグはビューアーで[ラボ]ボタンを使用できるかどうかを決定します。ダッシュボードで実験的機能を有効および無効にするための簡単な方法です。", @@ -1581,7 +1580,6 @@ "data.advancedSettings.courier.requestPreferenceTitle": "リクエスト設定", "data.advancedSettings.defaultIndexText": "データビューが設定されていないときに、検索とビジュアライゼーションによって使用されます。", "data.advancedSettings.defaultIndexTitle": "デフォルトのデータビュー", - "data.advancedSettings.docTableHighlightText": "Discover と保存された検索ダッシュボードの結果をハイライトします。ハイライトすることで、大きなドキュメントを扱う際にリクエストが遅くなります。", "data.advancedSettings.docTableHighlightTitle": "結果をハイライト", "data.advancedSettings.histogram.barTargetText": "日付ヒストグラムで「自動」間隔を使用する際、この数に近いバケットの作成を試みます", "data.advancedSettings.histogram.barTargetTitle": "目標バケット数", @@ -2510,7 +2508,6 @@ "discover.advancedSettings.discover.showFieldStatisticsDescription": "{fieldStatisticsDocs}を有効にすると、数値フィールドの最大/最小値やジオフィールドの地図といった詳細が表示されます。この機能はベータ段階で、変更される可能性があります。", "discover.advancedSettings.discover.showMultifields": "マルチフィールドを表示", "discover.advancedSettings.discover.showMultifieldsDescription": "拡張ドキュメントビューに{multiFields}が表示されるかどうかを制御します。ほとんどの場合、マルチフィールドは元のフィールドと同じです。「searchFieldsFromSource」がオフのときにのみこのオプションを使用できます。", - "discover.advancedSettings.docTableHideTimeColumnText": "Discover と、ダッシュボードのすべての保存された検索で、「時刻」列を非表示にします。", "discover.advancedSettings.docTableHideTimeColumnTitle": "「時刻」列を非表示", "discover.advancedSettings.fieldsPopularLimitText": "最も頻繁に使用されるフィールドのトップNを表示します", "discover.advancedSettings.fieldsPopularLimitTitle": "頻繁に使用されるフィールドの制限", @@ -2522,7 +2519,6 @@ "discover.advancedSettings.sampleRowsPerPageTitle": "ページごとの行数", "discover.advancedSettings.sampleSizeText": "ドキュメントテーブル全体の最大行数を設定します。", "discover.advancedSettings.sampleSizeTitle": "テーブルごとの最大行数", - "discover.advancedSettings.searchOnPageLoadText": "Discover の最初の読み込み時に検索を実行するかを制御します。この設定は、保存された検索の読み込み時には影響しません。", "discover.advancedSettings.searchOnPageLoadTitle": "ページの読み込み時の検索", "discover.advancedSettings.sortDefaultOrderText": "Discover アプリのデータビューに基づく時刻のデフォルトの並べ替え方向をコントロールします。", "discover.advancedSettings.sortDefaultOrderTitle": "デフォルトの並べ替え方向", @@ -2532,7 +2528,6 @@ "discover.alerts.manageRulesAndConnectors": "ルールとコネクターの管理", "discover.alerts.missedTimeFieldToolTip": "データビューには時間フィールドがありません。", "discover.badge.readOnly.text": "読み取り専用", - "discover.badge.readOnly.tooltip": "検索を保存できません", "discover.context.breadcrumb": "周りのドキュメント", "discover.context.contextOfTitle": "#{anchorId}の周りのドキュメント", "discover.context.failedToLoadAnchorDocumentDescription": "アンカードキュメントの読み込みに失敗しました", @@ -2580,7 +2575,6 @@ "discover.dropZoneTableLabel": "フィールドを列として表に追加するには、ゾーンをドロップします", "discover.embeddable.inspectorRequestDescription": "このリクエストはElasticsearchにクエリーをかけ、検索データを取得します。", "discover.embeddable.search.dataViewError": "データビュー{indexPatternId}が見つかりません", - "discover.embeddable.search.displayName": "検索", "discover.errorCalloutESQLReferenceButtonLabel": "ES|QL参照を開く", "discover.errorCalloutShowErrorMessage": "詳細を表示", "discover.esqlMode.selectedColumnsCallout": "{esqlQueryColumnsNumber}フィールド中{selectedColumnsNumber}フィールドを表示中です。利用可能なフィールドリストからさらに追加します。", @@ -2589,7 +2583,6 @@ "discover.esqlToDataViewTransitionModal.feedbackLink": "ES|QLフィードバックを送信", "discover.esqlToDataViewTransitionModal.saveButtonLabel": "保存して切り替え", "discover.esqlToDataViewTransitionModal.title": "保存されていない変更", - "discover.esqlToDataviewTransitionModalBody": "データビューを切り替えると、現在のES|QLクエリが削除されます。作業が失われないようにするには、この検索を保存してください。", "discover.fieldChooser.availableFieldsTooltip": "フィールドをテーブルに表示できます。", "discover.fieldChooser.discoverField.addFieldTooltip": "フィールドを列として追加", "discover.fieldChooser.discoverField.removeFieldTooltip": "フィールドを表から削除", @@ -2617,19 +2610,10 @@ "discover.loadingDocuments": "ドキュメントを読み込み中", "discover.localMenu.alertsDescription": "アラート", "discover.localMenu.esqlTooltipLabel": "ES|QLはElasticの強力な新しいパイプクエリ言語です。", - "discover.localMenu.fallbackReportTitle": "無題のDiscover検索", "discover.localMenu.inspectTitle": "検査", "discover.localMenu.localMenu.alertsTitle": "アラート", - "discover.localMenu.localMenu.newSearchTitle": "新規", - "discover.localMenu.mustCopyOnSave": "Elasticはこの保存された検索を管理します。変更は新しい保存された検索に保存されます。", - "discover.localMenu.newSearchDescription": "新規検索", "discover.localMenu.openInspectorForSearchDescription": "検索用にインスペクターを開きます", - "discover.localMenu.openSavedSearchDescription": "保存された検索を開きます", - "discover.localMenu.openTitle": "開く", - "discover.localMenu.saveSaveSearchObjectType": "検索", - "discover.localMenu.saveSearchDescription": "検索を保存します", "discover.localMenu.saveTitle": "保存", - "discover.localMenu.shareSearchDescription": "検索を共有します", "discover.localMenu.shareTitle": "共有", "discover.localMenu.switchToClassicTitle": "クラシックに切り替える", "discover.localMenu.switchToClassicTooltipLabel": "KQLまたはLucene構文に切り替えます。", @@ -2695,8 +2679,6 @@ "discover.noResults.suggestion.tryText": "次の方法を試してください:", "discover.notifications.invalidTimeRangeText": "指定された時間範囲が無効です。(開始:''{from}''、終了:''{to}'')", "discover.notifications.invalidTimeRangeTitle": "無効な時間範囲", - "discover.notifications.notSavedSearchTitle": "検索''{savedSearchTitle}''は保存されませんでした。", - "discover.notifications.savedSearchTitle": "検索''{savedSearchTitle}''が保存されました。", "discover.pageTitleWithoutSavedSearch": "Discover - 検索は保存されていません", "discover.pageTitleWithSavedSearch": "Discover - {savedSearchTitle}", "discover.panelsToggle.hideChartButton": "グラフを非表示", @@ -2705,24 +2687,15 @@ "discover.panelsToggle.showSidebarButton": "サイドバーを表示", "discover.rootBreadcrumb": "Discover", "discover.sampleData.viewLinkLabel": "Discover", - "discover.savedSearch.savedObjectName": "保存検索", - "discover.savedSearchAliasMatchRedirect.objectNoun": "{savedSearch}検索", "discover.savedSearchEmbeddable.action.viewSavedSearch.displayName": "Discoverで開く", - "discover.savedSearchURLConflictCallout.objectNoun": "{savedSearch}検索", "discover.searchingTitle": "検索中", "discover.serverLocatorExtension.titleFromLocatorUnknown": "不明な検索", - "discover.share.shareModal.title": "この検索を共有", "discover.showingDefaultDataViewWarningDescription": "デフォルトデータビューを表示しています:\"{loadedDataViewTitle}\" ({loadedDataViewId})", "discover.showingSavedDataViewWarningDescription": "保存されたデータビューを表示しています:\"{ownDataViewTitle}\" ({ownDataViewId})", "discover.singleDocRoute.errorMessage": "ID {dataViewId}の一致するデータビューが見つかりません", "discover.singleDocRoute.errorTitle": "エラーが発生しました", "discover.skipToBottomButtonLabel": "テーブルの最後に移動", - "discover.topNav.managedContentLabel": "この保存された検索は、Elasticによって管理されます。この変更は、新しく保存された検索に保存する必要があります。", - "discover.topNav.openSearchPanel.manageSearchesButtonLabel": "検索の管理", - "discover.topNav.openSearchPanel.noSearchesFoundDescription": "一致する検索が見つかりませんでした。", - "discover.topNav.openSearchPanel.openSearchTitle": "検索を開く", "discover.topNav.saveModal.storeTimeWithSearchToggleDescription": "この検索を使用するときには、時間フィルターを更新し、現在の選択に合わせて間隔を更新します。", - "discover.topNav.saveModal.storeTimeWithSearchToggleLabel": "保存された検索で時間を保存", "discover.uninitializedRefreshButtonText": "データを更新", "discover.uninitializedText": "クエリーを作成、フィルターを追加、または[更新]をクリックして、現在のクエリーの結果を取得します。", "discover.uninitializedTitle": "検索開始", @@ -2839,7 +2812,6 @@ "embeddableExamples.unifiedFieldList.displayName": "フィールドリスト", "embeddableExamples.unifiedFieldList.noDefaultDataViewErrorMessage": "フィールドリストは、1つ以上のデータビューで使用する必要があります。", "embeddableExamples.unifiedFieldList.selectDataViewMessage": "データビューを選択してください", - "esql.advancedSettings.enableESQLDescription": "この設定はKibanaのES|QLを有効にします。オフにすると、さまざまなアプリケーションからES|QLユーザーインターフェースが非表示になります。ただし、ユーザーは、既存のES|QLで保存された検索、ビジュアライゼーションなどにアクセスできます。", "esql.advancedSettings.enableESQLTitle": "ES|QLを有効化", "esql.triggers.updateEsqlQueryTrigger": "ES|QLクエリを更新", "esql.triggers.updateEsqlQueryTriggerDescription": "ES|QLクエリを新しいクエリで更新", @@ -5069,7 +5041,6 @@ "indexPatternManagement.editIndexPattern.source.table.matchesHeader": "一致", "indexPatternManagement.editIndexPattern.source.table.notMatchedLabel": "ソースフィルターが既知のフィールドと一致しません。", "indexPatternManagement.editIndexPattern.source.table.saveAria": "保存", - "indexPatternManagement.editIndexPattern.sourceLabel": "フィールドフィルターは、ドキュメントの取得時に 1 つまたは複数のフィールドを除外するのに使用される場合もあります。これは Discover アプリでのドキュメントの表示中、またはダッシュボードアプリの保存された検索の結果を表示する表で起こります。ドキュメントに大きなフィールドや重要ではないフィールドが含まれている場合、この程度の低いレベルでフィルターにより除外すると良いかもしれません。", "indexPatternManagement.editIndexPattern.sourcePlaceholder": "フィールドフィルター、ワイルドカード使用可(例:「user*」と入力して「user」で始まるフィールドをフィルタリング)", "indexPatternManagement.editIndexPattern.tabs.fieldsHeader": "フィールド", "indexPatternManagement.editIndexPattern.tabs.relationshipsHeader": "関係({count})", @@ -6547,9 +6518,7 @@ "savedObjectsManagement.view.inspectCodeEditorAriaLabel": "{ title }の検査", "savedObjectsManagement.view.inspectItemTitle": "{title}の検査", "savedObjectsManagement.view.savedObjectProblemErrorMessage": "この保存されたオブジェクトに問題があります", - "savedObjectsManagement.view.savedSearchDoesNotExistErrorMessage": "このオブジェクトに関連付けられた保存された検索は現在存在しません。", "savedObjectsManagement.view.viewItemButtonLabel": "{title}を表示", - "savedSearch.contentManagementType": "保存検索", "savedSearch.kibana_context.filters.help": "Kibana ジェネリックフィルターを指定します", "savedSearch.kibana_context.help": "Kibana グローバルコンテキストを更新します", "savedSearch.kibana_context.q.help": "自由形式の Kibana テキストクエリーを指定します", @@ -7949,8 +7918,6 @@ "unifiedDataTable.rowHeight.single": "単一", "unifiedDataTable.rowHeightLabel": "セル行高さ", "unifiedDataTable.sampleSizeSettings.sampleSizeLabel": "サンプルサイズ", - "unifiedDataTable.searchGenerationWithDescription": "検索{searchTitle}で生成されたテーブル", - "unifiedDataTable.searchGenerationWithDescriptionGrid": "検索{searchTitle}で生成されたテーブル({searchDescription})", "unifiedDataTable.selectAllDocs": "すべての{rowsCount}を選択", "unifiedDataTable.selectAllRowsOnPageColumnHeader": "すべての表示行を選択", "unifiedDataTable.selectColumnHeader": "列を選択", @@ -8521,11 +8488,6 @@ "visDefaultEditor.sidebar.errorButtonTooltip": "ハイライトされたフィールドのエラーを解決する必要があります。", "visDefaultEditor.sidebar.indexPatternAriaLabel": "インデックスパターン:{title}", "visDefaultEditor.sidebar.savedSearch.goToDiscoverButtonText": "Discover にこの検索を表示", - "visDefaultEditor.sidebar.savedSearch.linkButtonAriaLabel": "保存された検索へのリンク。クリックして詳細を確認するかリンクを解除します。", - "visDefaultEditor.sidebar.savedSearch.popoverHelpText": "保存したこの検索に今後加える修正は、ビジュアライゼーションに反映されます。自動更新を無効にするには、リンクを削除します。", - "visDefaultEditor.sidebar.savedSearch.popoverTitle": "保存された検索にリンクされています", - "visDefaultEditor.sidebar.savedSearch.titleAriaLabel": "保存された検索:{title}", - "visDefaultEditor.sidebar.savedSearch.unlinkSavedSearchButtonText": "保存された検索へのリンクを削除", "visDefaultEditor.sidebar.tabs.dataLabel": "データ", "visDefaultEditor.sidebar.tabs.optionsLabel": "オプション", "visDefaultEditor.sidebar.updateChartButtonLabel": "更新", @@ -9515,7 +9477,6 @@ "visualizations.helpMenu.appName": "Visualizeライブラリ", "visualizations.legacyCharts.conditionalMessage.noPermissions": "古いライブラリに切り替えるには、システム管理者に連絡してください。", "visualizations.legacyUrlConflict.objectNoun": "{visName}ビジュアライゼーション", - "visualizations.linkedToSearch.unlinkSuccessNotificationText": "保存された検索''{searchTitle}''からリンクが解除されました", "visualizations.listing.betaTitle": "ベータ", "visualizations.listing.betaTooltip": "このビジュアライゼーションはベータ段階で、変更される可能性があります。デザインとコードはオフィシャルGA機能よりも完成度が低く、現状のまま保証なしで提供されています。ベータ機能にはオフィシャルGA機能のSLAが適用されません", "visualizations.listing.breadcrumb": "Visualizeライブラリ", @@ -9548,9 +9509,7 @@ "visualizations.newVisWizard.learnMoreText": "詳細について", "visualizations.newVisWizard.newVisTypeTitle": "新規 {visTypeName}", "visualizations.newVisWizard.resultsFound": "{resultCount, plural, other {個のタイプ}} が見つかりました", - "visualizations.newVisWizard.searchSelection.notFoundLabel": "一致インデックスまたは保存した検索が見つかりません。", "visualizations.newVisWizard.searchSelection.savedObjectType.dataView": "データビュー", - "visualizations.newVisWizard.searchSelection.savedObjectType.search": "保存検索", "visualizations.newVisWizard.title": "新規ビジュアライゼーション", "visualizations.noDataView.label": "データビュー", "visualizations.noMatchRoute.bannerText": "Visualizeアプリケーションはこのルートを認識できません。{route}", @@ -9857,7 +9816,6 @@ "xpack.aiops.correlations.veryLowImpactText": "非常に低い", "xpack.aiops.dataGrid.field.documentCountChart.seriesLabel": "ドキュメントカウント", "xpack.aiops.dataGrid.field.documentCountChartSplit.seriesLabel": "他のドキュメントカウント", - "xpack.aiops.dataSourceContext.errorTitle": "データビューまたは保存された検索を取得できません", "xpack.aiops.dataViewNotBasedOnTimeSeriesWarning.title": "データビュー\"{dataViewTitle}\"は時系列に基づいていません。", "xpack.aiops.documentCountChart.baselineBadgeLabel": "ベースライン", "xpack.aiops.documentCountChart.deviationBadgeLabel": "偏差", @@ -12544,7 +12502,6 @@ "xpack.canvas.functions.savedMap.args.titleHelpText": "マップのタイトル", "xpack.canvas.functions.savedMap.args.zoomHelpText": "マップのズームレベル", "xpack.canvas.functions.savedMapHelpText": "保存されたマップオブジェクトの埋め込み可能なオブジェクトを返します。", - "xpack.canvas.functions.savedSearchHelpText": "保存検索オブジェクトの埋め込み可能なオブジェクトを返します", "xpack.canvas.functions.savedVisualization.args.colorsHelpText": "特定のシリーズに使用する色を指定します", "xpack.canvas.functions.savedVisualization.args.hideLegendHelpText": "凡例を非表示にするオプションを指定します", "xpack.canvas.functions.savedVisualization.args.idHelpText": "保存されたビジュアライゼーションオブジェクトのID", @@ -15438,7 +15395,6 @@ "xpack.dataVisualizer.index.lensChart.countLabel": "カウント", "xpack.dataVisualizer.index.lensChart.maximumOfLabel": "{fieldName}の最大", "xpack.dataVisualizer.index.lensChart.topValuesLabel": "トップの値", - "xpack.dataVisualizer.index.savedSearchErrorMessage": "保存された検索{savedSearchId}の取得エラー", "xpack.dataVisualizer.multiSelectPicker.NoFiltersFoundMessage": "フィルターが見つかりません", "xpack.dataVisualizer.nameCollisionMsg": "「{name}」はすでに存在します。一意の名前を入力してください。", "xpack.dataVisualizer.noData": "データなし", @@ -19632,7 +19588,6 @@ "xpack.features.ossFeatures.discoverSearchSessionsFeatureName": "検索セッションの保存", "xpack.features.ossFeatures.discoverShortUrlSubFeatureName": "短い URL", "xpack.features.ossFeatures.discoverStoreSearchSessionsPrivilegeName": "検索セッションの保存", - "xpack.features.ossFeatures.reporting.dashboardDownloadCSV": "保存された検索パネルからCSVレポートを生成", "xpack.features.ossFeatures.reporting.dashboardGenerateScreenshot": "PDFまたはPNGレポートを生成", "xpack.features.ossFeatures.reporting.discoverGenerateCSV": "CSVレポートを生成", "xpack.features.ossFeatures.reporting.reportingTitle": "レポート", @@ -20618,7 +20573,6 @@ "xpack.fleet.epm.assetTitles.mlModules": "異常検知構成", "xpack.fleet.epm.assetTitles.osqueryPackAssets": "Osqueryパック", "xpack.fleet.epm.assetTitles.osquerySavedQuery": "Osqueryの保存されたクエリー", - "xpack.fleet.epm.assetTitles.savedSearches": "保存された検索", "xpack.fleet.epm.assetTitles.securityRules": "セキュリティルール", "xpack.fleet.epm.assetTitles.tag": "タグ", "xpack.fleet.epm.assetTitles.transforms": "トランスフォーム", @@ -24194,8 +24148,6 @@ "xpack.infra.logsPage.toolbar.logFilterErrorToastTitle": "ログフィルターエラー", "xpack.infra.logsSettingsPage.loadingButtonLabel": "読み込み中", "xpack.infra.logsStreamEmbeddable.deprecationWarningDescription": "ログストリームパネルは管理されていません。{savedSearchDocsLink}を同様の視覚化に活用してください。", - "xpack.infra.logsStreamEmbeddable.deprecationWarningDescription.savedSearchesLinkLabel": "保存された検索", - "xpack.infra.logStreamEmbeddable.description": "ライブストリーミングログのテーブルを追加します。体験を効率化するために、ログストリームを使用するのではなく、検出ページを使用して、保存された検索を作成することをお勧めします。", "xpack.infra.logStreamEmbeddable.displayName": "ログストリーム(廃止予定)", "xpack.infra.logStreamEmbeddable.title": "ログストリーム", "xpack.infra.logStreamPageTemplate.backtoLogsStream": "ログストリームに戻る", @@ -28972,15 +28924,10 @@ "xpack.ml.dataframe.analytics.create.resultsFieldHelpText": "分析の結果を格納するフィールドの名前を定義します。デフォルトはmlです。", "xpack.ml.dataframe.analytics.create.resultsFieldInputAriaLabel": "分析の結果を格納するフィールドの名前。", "xpack.ml.dataframe.analytics.create.resultsFieldLabel": "結果フィールド", - "xpack.ml.dataframe.analytics.create.savedSearchLabel": "保存検索", "xpack.ml.dataframe.analytics.create.scatterplotMatrixLabel": "散布図マトリックス", "xpack.ml.dataframe.analytics.create.scatterplotMatrixLabelHelpText": "選択した分析対象フィールドのペアの間の関係を可視化します。", - "xpack.ml.dataFrame.analytics.create.searchSelection.CcsErrorCallOutBody": "保存された検索''{savedSearchTitle}''はデータビュー''{dataViewName}''を使用しています。", "xpack.ml.dataFrame.analytics.create.searchSelection.CcsErrorCallOutTitle": "クラスター横断検索を使用するデータビューはサポートされていません。", - "xpack.ml.dataFrame.analytics.create.searchSelection.errorGettingDataViewTitle": "保存された検索で使用されているデータビューの読み込みエラー", - "xpack.ml.dataFrame.analytics.create.searchSelection.notFoundLabel": "一致インデックスまたは保存した検索が見つかりません。", "xpack.ml.dataFrame.analytics.create.searchSelection.savedObjectType.dataView": "データビュー", - "xpack.ml.dataFrame.analytics.create.searchSelection.savedObjectType.search": "保存検索", "xpack.ml.dataframe.analytics.create.softTreeDepthLimitInputAriaLabel": "この深さを超える決定木は、損失計算でペナルティがあります。", "xpack.ml.dataframe.analytics.create.softTreeDepthLimitLabel": "ソフトツリー深さ上限値", "xpack.ml.dataframe.analytics.create.softTreeDepthLimitText": "この深さを超える決定木は、損失計算でペナルティがあります。0以上でなければなりません。", @@ -29272,7 +29219,6 @@ "xpack.ml.dataGridChart.notEnoughData": "0個のドキュメントにフィールドが含まれます。", "xpack.ml.dataGridChart.singleCategoryLegend": "{cardinality, plural, other {# カテゴリ}}", "xpack.ml.dataGridChart.topCategoriesLegend": "上位 {maxChartColumns}/{cardinality} カテゴリ", - "xpack.ml.dataSourceContext.errorTitle": "データビューまたは保存された検索を取得できません", "xpack.ml.dataViewNotBasedOnTimeSeriesNotificationDescription": "異常検知は時間ベースのインデックスでのみ実行されます", "xpack.ml.dataViewNotBasedOnTimeSeriesNotificationTitle": "データビュー{dataViewIndexPattern}は時系列に基づいていません。", "xpack.ml.dataViewUtils.createDataViewSwitchLabel": "データビューを作成", @@ -29516,7 +29462,6 @@ "xpack.ml.feature.reserved.description": "ユーザーアクセスを許可するには、machine_learning_user か machine_learning_admin ロールのどちらかを割り当てる必要があります。", "xpack.ml.featureFeedbackButton.tellUsWhatYouThinkLink": "ご意見をお聞かせください。", "xpack.ml.featureRegistry.mlFeatureName": "機械学習", - "xpack.ml.featureRegistry.privilegesTooltip": "機械学習にすべてまたは読み取り機能権限を付与すると、特定のタイプのKibanaで保存されたオブジェクト(インデックスパターン、ダッシュボード、保存された検索、ビジュアライゼーション、機械学習ジョブ、学習済みモデル、モジュールで保存されたオブジェクト)にも同等の機能権限が付与されます。", "xpack.ml.fieldTypeIcon.booleanTypeAriaLabel": "ブールタイプ", "xpack.ml.fieldTypeIcon.dateTypeAriaLabel": "日付タイプ", "xpack.ml.fieldTypeIcon.geoPointTypeAriaLabel": "{geoPointParam} タイプ", @@ -30319,7 +30264,6 @@ "xpack.ml.newJob.recognize.running.startedAriaLabel": "開始", "xpack.ml.newJob.recognize.running.startFailedAriaLabel": "開始に失敗", "xpack.ml.newJob.recognize.runningLabel": "実行中", - "xpack.ml.newJob.recognize.savedSearchPageTitle": "saved search {savedSearchTitle}", "xpack.ml.newJob.recognize.saveJobOverrideLabel": "保存", "xpack.ml.newJob.recognize.searchesLabel": "検索", "xpack.ml.newJob.recognize.searchWillBeOverwrittenLabel": "検索は上書きされます", @@ -30328,7 +30272,6 @@ "xpack.ml.newJob.recognize.startDatafeedAfterSaveLabel": "保存後データフィードを開始", "xpack.ml.newJob.recognize.useDedicatedIndexLabel": "専用インデックスを使用", "xpack.ml.newJob.recognize.useFullDataLabel": "完全な{dataViewIndexPattern}データを使用", - "xpack.ml.newJob.recognize.usingSavedSearchDescription": "保存検索を使用すると、データフィードで使用されるクエリーが、{moduleId} モジュールでデフォルトで提供されるものと異なるものになります。", "xpack.ml.newJob.recognize.viewResultsAriaLabel": "結果を表示", "xpack.ml.newJob.recognize.viewResultsLinkText": "結果を表示", "xpack.ml.newJob.recognize.visualizationsLabel": "ビジュアライゼーション", @@ -30348,7 +30291,6 @@ "xpack.ml.newJob.wizard.datafeedStep.dataView.description": "現在このジョブで使用されているデータビュー。", "xpack.ml.newJob.wizard.datafeedStep.dataView.step0.title": "データビューを変更", "xpack.ml.newJob.wizard.datafeedStep.dataView.step1.dataView": "データビュー", - "xpack.ml.newJob.wizard.datafeedStep.dataView.step1.noMatchingError": "一致インデックスまたは保存した検索が見つかりません。", "xpack.ml.newJob.wizard.datafeedStep.dataView.step1.title": "ジョブの新しいデータビューを選択", "xpack.ml.newJob.wizard.datafeedStep.dataView.step2.ApplyButton": "適用", "xpack.ml.newJob.wizard.datafeedStep.dataView.step2.backButton": "戻る", @@ -30458,8 +30400,6 @@ "xpack.ml.newJob.wizard.jobType.rareAriaLabel": "まれなジョブ", "xpack.ml.newJob.wizard.jobType.rareDescription": "時系列データでまれな値を検出します。", "xpack.ml.newJob.wizard.jobType.rareTitle": "ほとんどない", - "xpack.ml.newJob.wizard.jobType.savedSearchPageTitleLabel": "saved search {savedSearchTitle}", - "xpack.ml.newJob.wizard.jobType.selectDifferentIndexLinkText": "別のデータビューまたは保存された検索を選択", "xpack.ml.newJob.wizard.jobType.singleMetricAriaLabel": "シングルメトリックジョブ", "xpack.ml.newJob.wizard.jobType.singleMetricDescription": "単独の時系列の異常を検知します。", "xpack.ml.newJob.wizard.jobType.singleMetricTitle": "シングルメトリック", @@ -30469,7 +30409,6 @@ "xpack.ml.newJob.wizard.jsonFlyout.autoSetJobCreatorTimeRange.error": "インデックスの開始時刻と終了時刻の取得中にエラーが発生しました", "xpack.ml.newJob.wizard.jsonFlyout.closeButton": "閉じる", "xpack.ml.newJob.wizard.jsonFlyout.datafeed.title": "データフィード構成 JSON", - "xpack.ml.newJob.wizard.jsonFlyout.indicesChange.calloutText": "データフィードで使用されているインデックスはここで変更できません。別のデータビューまたは保存された検索を選択するには、ウィザードのステップ1に進み、[インデックスパターンを変更]オプションを選択します。", "xpack.ml.newJob.wizard.jsonFlyout.indicesChange.calloutTitle": "インデックスが変更されました", "xpack.ml.newJob.wizard.jsonFlyout.job.title": "ジョブ構成 JSON", "xpack.ml.newJob.wizard.jsonFlyout.saveButton": "保存", @@ -30601,10 +30540,7 @@ "xpack.ml.newJob.wizard.revertModelSnapshotFlyout.title": "モデルスナップショット{ssId}に戻す", "xpack.ml.newJob.wizard.revertModelSnapshotFlyout.warningCallout.contents": "{date}後のすべての異常検知結果は削除されます。", "xpack.ml.newJob.wizard.revertModelSnapshotFlyout.warningCallout.title": "異常値データが削除されます", - "xpack.ml.newJob.wizard.searchSelection.notFoundLabel": "一致データビューまたは保存された検索が見つかりません。", "xpack.ml.newJob.wizard.searchSelection.savedObjectType.dataView": "データビュー", - "xpack.ml.newJob.wizard.searchSelection.savedObjectType.search": "保存検索", - "xpack.ml.newJob.wizard.selectDataViewOrSavedSearch": "データビューまたは保存された検索を選択", "xpack.ml.newJob.wizard.shopValidationButton": "検証をスキップ", "xpack.ml.newJob.wizard.step.configureDatafeedTitle": "データフィードの構成", "xpack.ml.newJob.wizard.step.jobDetailsTitle": "ジョブの詳細", @@ -30616,7 +30552,6 @@ "xpack.ml.newJob.wizard.stepComponentWrapper.jobDetailsTitle": "ジョブの詳細", "xpack.ml.newJob.wizard.stepComponentWrapper.pickFieldsTitle": "フィールドを選択", "xpack.ml.newJob.wizard.stepComponentWrapper.summaryTitleDataView": "データビュー{dataViewName}の新しいジョブ", - "xpack.ml.newJob.wizard.stepComponentWrapper.summaryTitleSavedSearch": "保存された検索 {title} からの新規ジョブ", "xpack.ml.newJob.wizard.stepComponentWrapper.timeRangeTitle": "時間範囲", "xpack.ml.newJob.wizard.stepComponentWrapper.validationTitle": "検証", "xpack.ml.newJob.wizard.summaryStep.convertToAdvancedButton": "高度なジョブに変換", @@ -42236,7 +42171,6 @@ "xpack.securitySolution.timelines.components.templateFilter.elasticTitle": "Elasticテンプレート", "xpack.securitySolution.timelines.discoverInTimeline.save_saved_search_error": "Discover検索の保存エラー", "xpack.securitySolution.timelines.discoverInTimeline.save_saved_search_unknown_error": "Discover検索の保存中に不明なエラーが発生しました", - "xpack.securitySolution.timelines.discoverInTimeline.savedSearchTitle": "タイムラインの保存された検索 - {title}", "xpack.securitySolution.timelines.newTemplateTimelineButtonLabel": "新規タイムラインテンプレートを作成", "xpack.securitySolution.timelines.newTimelineButtonLabel": "新規タイムラインを作成", "xpack.securitySolution.timelines.pageTitle": "タイムライン", @@ -44230,7 +44164,6 @@ "xpack.spaces.management.copyToSpace.copyModeControl.createNewCopies.disabledTitle": "既存のオブジェクトを確認", "xpack.spaces.management.copyToSpace.copyModeControl.createNewCopies.enabledText": "このオプションを使用すると、同じ場所でオブジェクトの1つ以上のコピーを作成します。", "xpack.spaces.management.copyToSpace.copyModeControl.createNewCopies.enabledTitle": "ランダムIDで新しいオブジェクトを作成", - "xpack.spaces.management.copyToSpace.copyModeControl.includeRelated.text": "このオブジェクトと関連するオブジェクトをコピーします。ダッシュボードでは、関連するビジュアライゼーション、インデックスパターン、および保存された検索もコピーされます。", "xpack.spaces.management.copyToSpace.copyModeControl.includeRelated.title": "関連オブジェクトを含める", "xpack.spaces.management.copyToSpace.copyModeControl.overwrite.disabledLabel": "競合時にアクションを要求", "xpack.spaces.management.copyToSpace.copyModeControl.overwrite.enabledLabel": "自動的に競合を上書き", @@ -47002,15 +46935,12 @@ "xpack.transform.newTransform.chooseSourceTitle": "ソースの選択", "xpack.transform.newTransform.newTransformTitle": "新規トランスフォーム", "xpack.transform.newTransform.searchSelection.createADataView": "データビューを作成", - "xpack.transform.newTransform.searchSelection.notFoundLabel": "一致インデックスまたは保存した検索が見つかりません。", "xpack.transform.newTransform.searchSelection.savedObjectType.dataView": "データビュー", - "xpack.transform.newTransform.searchSelection.savedObjectType.search": "保存検索", "xpack.transform.pivotPreview.copyClipboardTooltip": "トランスフォームプレビューの開発コンソールステートメントをクリップボードにコピーします。", "xpack.transform.pivotPreview.PivotPreviewIncompleteConfigCalloutBody": "group-by フィールドと集約を 1 つ以上選んでください。", "xpack.transform.pivotPreview.PivotPreviewNoDataCalloutBody": "プレビューリクエストはデータを返しませんでした。オプションのクエリがデータを返し、グループ分け基準により使用されるフィールドと集約フィールドに値が存在することを確認してください。", "xpack.transform.pivotPreview.transformPreviewTitle": "トランスフォームプレビュー", "xpack.transform.progress": "進捗", - "xpack.transform.searchItems.errorInitializationTitle": "Kibanaデータビューまたは保存された検索を初期化するときにエラーが発生しました。", "xpack.transform.statsBar.batchTransformsLabel": "バッチ", "xpack.transform.statsBar.continuousTransformsLabel": "実行中", "xpack.transform.statsBar.failedTransformsLabel": "失敗", @@ -47091,7 +47021,6 @@ "xpack.transform.stepDefineForm.runtimeEditorSwitchModalTitle": "編集内容は失われます", "xpack.transform.stepDefineForm.runtimeFieldsLabel": "ランタイムフィールド", "xpack.transform.stepDefineForm.runtimeFieldsListLabel": "{runtimeFields}", - "xpack.transform.stepDefineForm.savedSearchLabel": "保存検索", "xpack.transform.stepDefineForm.searchFilterLabel": "検索フィルター", "xpack.transform.stepDefineForm.sortFieldOptionsEmptyError": "並べ替えの条件にする日付フィールドがありません。別のフィールド型を使用するには、構成をクリップボードにコピーして、コンソールでトランスフォームを作成し続けます。", "xpack.transform.stepDefineForm.sortHelpText": "最新のドキュメントを特定するために使用する日付フィールドを選択してます。", @@ -47104,7 +47033,6 @@ "xpack.transform.stepDefineSummary.groupByLabel": "グループ分けの条件", "xpack.transform.stepDefineSummary.queryCodeBlockLabel": "クエリー", "xpack.transform.stepDefineSummary.queryLabel": "クエリー", - "xpack.transform.stepDefineSummary.savedSearchLabel": "保存検索", "xpack.transform.stepDefineSummary.timeRangeLabel": "時間範囲", "xpack.transform.stepDetailsForm.advancedSettingsAccordionButtonContent": "高度な設定", "xpack.transform.stepDetailsForm.continuousModeAriaLabel": "遅延を選択してください。", diff --git a/x-pack/platform/plugins/private/translations/translations/zh-CN.json b/x-pack/platform/plugins/private/translations/translations/zh-CN.json index d466cda357f4..370c4d8fa63b 100644 --- a/x-pack/platform/plugins/private/translations/translations/zh-CN.json +++ b/x-pack/platform/plugins/private/translations/translations/zh-CN.json @@ -1467,7 +1467,6 @@ "dashboard.emptyScreen.noPermissionsTitle": "此仪表板是空的。", "dashboard.emptyScreen.viewModeSubtitle": "进入编辑模式,然后开始添加可视化。", "dashboard.emptyScreen.viewModeTitle": "将可视化添加到仪表板", - "dashboard.featureCatalogue.dashboardDescription": "显示和共享可视化和已保存搜索的集合。", "dashboard.featureCatalogue.dashboardSubtitle": "在仪表板中分析数据。", "dashboard.featureCatalogue.dashboardTitle": "仪表板", "dashboard.labs.enableLabsDescription": "此标志决定查看者是否有权访问用于在仪表板中快速启用和禁用技术预览功能的'实验'按钮。", @@ -1593,7 +1592,6 @@ "data.advancedSettings.courier.requestPreferenceTitle": "请求首选项", "data.advancedSettings.defaultIndexText": "未设置数据视图时,供 Discover 和可视化使用。", "data.advancedSettings.defaultIndexTitle": "默认数据视图", - "data.advancedSettings.docTableHighlightText": "在 Discover 和已保存搜索仪表板中突出显示结果。处理大文档时,突出显示会使请求变慢。", "data.advancedSettings.docTableHighlightTitle": "突出显示结果", "data.advancedSettings.histogram.barTargetText": "在日期和数值直方图中使用'auto'时间间隔时尝试生成大约此数目的存储桶", "data.advancedSettings.histogram.barTargetTitle": "目标存储桶", @@ -2501,7 +2499,6 @@ "discover.advancedSettings.discover.showFieldStatisticsDescription": "启用 {fieldStatisticsDocs} 以显示详细信息,如数字字段的最小和最大值,或地理字段的地图。此功能为公测版,可能会进行更改。", "discover.advancedSettings.discover.showMultifields": "显示多字段", "discover.advancedSettings.discover.showMultifieldsDescription": "控制 {multiFields} 是否显示在展开的文档视图中。多数情况下,多字段与原始字段相同。此选项仅在 `searchFieldsFromSource` 关闭时可用。", - "discover.advancedSettings.docTableHideTimeColumnText": "在 Discover 中和仪表板上的所有已保存搜索中隐藏'时间'列。", "discover.advancedSettings.docTableHideTimeColumnTitle": "隐藏'时间'列", "discover.advancedSettings.fieldsPopularLimitText": "要显示的排名前 N 最常见字段", "discover.advancedSettings.fieldsPopularLimitTitle": "常见字段限制", @@ -2513,7 +2510,6 @@ "discover.advancedSettings.sampleRowsPerPageTitle": "每页行数", "discover.advancedSettings.sampleSizeText": "设置整个文档表的最大行数。", "discover.advancedSettings.sampleSizeTitle": "每个表的最大行数", - "discover.advancedSettings.searchOnPageLoadText": "控制在 Discover 首次加载时是否执行搜索。加载已保存搜索时,此设置无效。", "discover.advancedSettings.searchOnPageLoadTitle": "在页面加载时搜索", "discover.advancedSettings.sortDefaultOrderText": "在 Discover 应用中控制基于时间的数据视图的默认排序方向。", "discover.advancedSettings.sortDefaultOrderTitle": "默认排序方向", @@ -2523,7 +2519,6 @@ "discover.alerts.manageRulesAndConnectors": "管理规则和连接器", "discover.alerts.missedTimeFieldToolTip": "数据视图没有时间字段。", "discover.badge.readOnly.text": "只读", - "discover.badge.readOnly.tooltip": "无法保存搜索", "discover.context.breadcrumb": "周围文档", "discover.context.contextOfTitle": "#{anchorId} 周围的文档", "discover.context.failedToLoadAnchorDocumentDescription": "无法加载定位点文档", @@ -2571,7 +2566,6 @@ "discover.dropZoneTableLabel": "放置区域以将字段作为列添加到表中", "discover.embeddable.inspectorRequestDescription": "此请求将查询 Elasticsearch 以获取搜索的数据。", "discover.embeddable.search.dataViewError": "缺少数据视图 {indexPatternId}", - "discover.embeddable.search.displayName": "搜索", "discover.errorCalloutESQLReferenceButtonLabel": "打开 ES|QL 参考", "discover.errorCalloutShowErrorMessage": "查看详情", "discover.esqlMode.selectedColumnsCallout": "正在显示 {selectedColumnsNumber} 个字段,共 {esqlQueryColumnsNumber} 个。从可用字段列表中添加更多字段。", @@ -2580,7 +2574,6 @@ "discover.esqlToDataViewTransitionModal.feedbackLink": "提交 ES|QL 反馈", "discover.esqlToDataViewTransitionModal.saveButtonLabel": "保存并切换", "discover.esqlToDataViewTransitionModal.title": "未保存的更改", - "discover.esqlToDataviewTransitionModalBody": "切换数据视图会移除当前的 ES|QL 查询。保存此搜索以避免丢失工作。", "discover.fieldChooser.availableFieldsTooltip": "适用于在表中显示的字段。", "discover.fieldChooser.discoverField.addFieldTooltip": "将字段添加为列", "discover.fieldChooser.discoverField.removeFieldTooltip": "从表中移除字段", @@ -2608,19 +2601,10 @@ "discover.loadingDocuments": "正在加载文档", "discover.localMenu.alertsDescription": "告警", "discover.localMenu.esqlTooltipLabel": "ES|QL 是 Elastic 支持的功能强大的全新管道查询语言。", - "discover.localMenu.fallbackReportTitle": "未命名 Discover 搜索", "discover.localMenu.inspectTitle": "检查", "discover.localMenu.localMenu.alertsTitle": "告警", - "discover.localMenu.localMenu.newSearchTitle": "新建", - "discover.localMenu.mustCopyOnSave": "Elastic 将管理此已保存搜索。将任何更改保存到新的已保存搜索。", - "discover.localMenu.newSearchDescription": "新搜索", "discover.localMenu.openInspectorForSearchDescription": "打开 Inspector 以进行搜索", - "discover.localMenu.openSavedSearchDescription": "打开已保存搜索", - "discover.localMenu.openTitle": "打开", - "discover.localMenu.saveSaveSearchObjectType": "搜索", - "discover.localMenu.saveSearchDescription": "保存搜索", "discover.localMenu.saveTitle": "保存", - "discover.localMenu.shareSearchDescription": "共享搜索", "discover.localMenu.shareTitle": "共享", "discover.localMenu.switchToClassicTitle": "切换到经典模式", "discover.localMenu.switchToClassicTooltipLabel": "切换到 KQL 或 Lucene 语法。", @@ -2693,22 +2677,13 @@ "discover.panelsToggle.showSidebarButton": "显示侧边栏", "discover.rootBreadcrumb": "Discover", "discover.sampleData.viewLinkLabel": "Discover", - "discover.savedSearch.savedObjectName": "已保存搜索", - "discover.savedSearchAliasMatchRedirect.objectNoun": "{savedSearch} 搜索", "discover.savedSearchEmbeddable.action.viewSavedSearch.displayName": "在 Discover 中打开", - "discover.savedSearchURLConflictCallout.objectNoun": "{savedSearch} 搜索", "discover.searchingTitle": "正在搜索", "discover.serverLocatorExtension.titleFromLocatorUnknown": "未知搜索", - "discover.share.shareModal.title": "共享此搜索", "discover.singleDocRoute.errorMessage": "没有与 ID {dataViewId} 相匹配的数据视图", "discover.singleDocRoute.errorTitle": "发生错误", "discover.skipToBottomButtonLabel": "转到表尾", - "discover.topNav.managedContentLabel": "此已保存搜索由 Elastic 托管。此处的更改必须保存到新的已保存搜索。", - "discover.topNav.openSearchPanel.manageSearchesButtonLabel": "管理搜索", - "discover.topNav.openSearchPanel.noSearchesFoundDescription": "未找到匹配的搜索。", - "discover.topNav.openSearchPanel.openSearchTitle": "打开搜索", "discover.topNav.saveModal.storeTimeWithSearchToggleDescription": "在使用此搜索时更新时间筛选并将时间间隔刷新到当前选择。", - "discover.topNav.saveModal.storeTimeWithSearchToggleLabel": "将时间与已保存搜索一起存储", "discover.uninitializedRefreshButtonText": "刷新数据", "discover.uninitializedText": "编写查询,添加一些筛选,或只需单击'刷新'来检索当前查询的结果。", "discover.uninitializedTitle": "开始搜索", @@ -2829,7 +2804,6 @@ "embeddableExamples.unifiedFieldList.displayName": "字段列表", "embeddableExamples.unifiedFieldList.noDefaultDataViewErrorMessage": "字段列表必须至少与一个存在的数据视图搭配使用", "embeddableExamples.unifiedFieldList.selectDataViewMessage": "请选择数据视图", - "esql.advancedSettings.enableESQLDescription": "此设置将在 Kibana 中启用 ES|QL。通过将其关闭,您将从各种应用程序中隐藏 ES|QL 用户界面。但是,用户将能够访问现有 ES|QL 已保存的搜索及可视化等。", "esql.advancedSettings.enableESQLTitle": "启用 ES|QL", "esql.triggers.updateEsqlQueryTrigger": "更新 ES|QL 查询", "esql.triggers.updateEsqlQueryTriggerDescription": "使用新查询更新 ES|QL 查询", @@ -5033,7 +5007,6 @@ "indexPatternManagement.editIndexPattern.source.table.matchesHeader": "匹配", "indexPatternManagement.editIndexPattern.source.table.notMatchedLabel": "源筛选不匹配任何已知字段。", "indexPatternManagement.editIndexPattern.source.table.saveAria": "保存", - "indexPatternManagement.editIndexPattern.sourceLabel": "字段筛选可用于在提取文档时排除一个或多个字段。在 Discover 应用中查看文档时会使用字段筛选,表在 Dashboard 应用中显示已保存搜索的结果时也会使用字段筛选。如果您的文档含有较大或不重要的字段,则通过在此较低层级筛除这些字段可能会更好。", "indexPatternManagement.editIndexPattern.sourcePlaceholder": "字段筛选,接受通配符(例如'user*'用于筛选以'user'开头的字段)", "indexPatternManagement.editIndexPattern.tabs.fieldsHeader": "字段", "indexPatternManagement.editIndexPattern.tabs.relationshipsHeader": "关系 ({count})", @@ -6493,8 +6466,6 @@ "savedObjectsManagement.view.inspectCodeEditorAriaLabel": "检查 { title }", "savedObjectsManagement.view.inspectItemTitle": "检查 {title}", "savedObjectsManagement.view.savedObjectProblemErrorMessage": "此已保存对象有问题", - "savedObjectsManagement.view.savedSearchDoesNotExistErrorMessage": "与此对象关联的已保存搜索已不存在。", - "savedSearch.contentManagementType": "已保存搜索", "savedSearch.kibana_context.filters.help": "指定 Kibana 常规筛选", "savedSearch.kibana_context.help": "更新 kibana 全局上下文", "savedSearch.kibana_context.q.help": "指定 Kibana 自由格式文本查询", @@ -7826,8 +7797,6 @@ "unifiedDataTable.rowHeight.single": "单个", "unifiedDataTable.rowHeightLabel": "单元格行高", "unifiedDataTable.sampleSizeSettings.sampleSizeLabel": "样例大小", - "unifiedDataTable.searchGenerationWithDescription": "搜索 {searchTitle} 生成的表", - "unifiedDataTable.searchGenerationWithDescriptionGrid": "搜索 {searchTitle} 生成的表({searchDescription})", "unifiedDataTable.selectAllDocs": "选择所有 {rowsCount} 行", "unifiedDataTable.selectAllRowsOnPageColumnHeader": "选择所有可见行", "unifiedDataTable.selectColumnHeader": "选择列", @@ -8381,11 +8350,6 @@ "visDefaultEditor.sidebar.errorButtonTooltip": "需要解决突出显示的字段中的错误。", "visDefaultEditor.sidebar.indexPatternAriaLabel": "索引模式:{title}", "visDefaultEditor.sidebar.savedSearch.goToDiscoverButtonText": "在 Discover 中查看此搜索", - "visDefaultEditor.sidebar.savedSearch.linkButtonAriaLabel": "链接到已保存搜索。单击以了解详情或断开链接。", - "visDefaultEditor.sidebar.savedSearch.popoverHelpText": "对此已保存搜索的后续修改将反映在可视化中。要禁用自动更新,请移除该链接。", - "visDefaultEditor.sidebar.savedSearch.popoverTitle": "已链接到已保存搜索", - "visDefaultEditor.sidebar.savedSearch.titleAriaLabel": "已保存搜索:{title}", - "visDefaultEditor.sidebar.savedSearch.unlinkSavedSearchButtonText": "移除已保存搜索的链接", "visDefaultEditor.sidebar.tabs.dataLabel": "数据", "visDefaultEditor.sidebar.tabs.optionsLabel": "选项", "visDefaultEditor.sidebar.updateChartButtonLabel": "更新", @@ -9399,9 +9363,7 @@ "visualizations.newVisWizard.learnMoreText": "希望了解详情?", "visualizations.newVisWizard.newVisTypeTitle": "新建{visTypeName}", "visualizations.newVisWizard.resultsFound": "{resultCount, plural, other {类型}}已找到", - "visualizations.newVisWizard.searchSelection.notFoundLabel": "未找到匹配的索引或已保存搜索。", "visualizations.newVisWizard.searchSelection.savedObjectType.dataView": "数据视图", - "visualizations.newVisWizard.searchSelection.savedObjectType.search": "已保存搜索", "visualizations.newVisWizard.title": "新建可视化", "visualizations.noDataView.label": "数据视图", "visualizations.noMatchRoute.bannerText": "Visualize 应用程序无法识别此路由:{route}。", @@ -9694,7 +9656,6 @@ "xpack.aiops.correlations.veryLowImpactText": "极低", "xpack.aiops.dataGrid.field.documentCountChart.seriesLabel": "文档计数", "xpack.aiops.dataGrid.field.documentCountChartSplit.seriesLabel": "其他文档计数", - "xpack.aiops.dataSourceContext.errorTitle": "无法提取数据视图或已保存搜索", "xpack.aiops.documentCountChart.baselineBadgeLabel": "基线", "xpack.aiops.documentCountChart.deviationBadgeLabel": "偏差", "xpack.aiops.embeddableChangePointChart.dataViewLabel": "数据视图", @@ -12328,7 +12289,6 @@ "xpack.canvas.functions.savedMap.args.titleHelpText": "地图的标题", "xpack.canvas.functions.savedMap.args.zoomHelpText": "地图的缩放级别", "xpack.canvas.functions.savedMapHelpText": "返回已保存地图对象的可嵌入对象。", - "xpack.canvas.functions.savedSearchHelpText": "为已保存搜索对象返回可嵌入对象", "xpack.canvas.functions.savedVisualization.args.colorsHelpText": "定义用于特定序列的颜色", "xpack.canvas.functions.savedVisualization.args.hideLegendHelpText": "指定用于隐藏图例的选项", "xpack.canvas.functions.savedVisualization.args.idHelpText": "已保存可视化对象的 ID", @@ -15164,7 +15124,6 @@ "xpack.dataVisualizer.index.lensChart.countLabel": "计数", "xpack.dataVisualizer.index.lensChart.maximumOfLabel": "{fieldName} 的最大值", "xpack.dataVisualizer.index.lensChart.topValuesLabel": "排名最前值", - "xpack.dataVisualizer.index.savedSearchErrorMessage": "检索已保存搜索 {savedSearchId} 时出错", "xpack.dataVisualizer.multiSelectPicker.NoFiltersFoundMessage": "未找到任何筛选", "xpack.dataVisualizer.noData": "无数据", "xpack.dataVisualizer.randomSamplerPreference.offLabel": "关闭", @@ -19325,7 +19284,6 @@ "xpack.features.ossFeatures.discoverSearchSessionsFeatureName": "存储搜索会话", "xpack.features.ossFeatures.discoverShortUrlSubFeatureName": "短 URL", "xpack.features.ossFeatures.discoverStoreSearchSessionsPrivilegeName": "存储搜索会话", - "xpack.features.ossFeatures.reporting.dashboardDownloadCSV": "从已保存搜索面板生成 CSV 报告", "xpack.features.ossFeatures.reporting.dashboardGenerateScreenshot": "生成 PDF 或 PNG 报告", "xpack.features.ossFeatures.reporting.discoverGenerateCSV": "生成 CSV 报告", "xpack.features.ossFeatures.reporting.reportingTitle": "Reporting", @@ -20295,7 +20253,6 @@ "xpack.fleet.epm.assetTitles.mlModules": "异常检测配置", "xpack.fleet.epm.assetTitles.osqueryPackAssets": "Osquery 包", "xpack.fleet.epm.assetTitles.osquerySavedQuery": "Osquery 已保存查询", - "xpack.fleet.epm.assetTitles.savedSearches": "已保存的搜索", "xpack.fleet.epm.assetTitles.securityRules": "安全规则", "xpack.fleet.epm.assetTitles.tag": "标签", "xpack.fleet.epm.assetTitles.transforms": "转换", @@ -23808,8 +23765,6 @@ "xpack.infra.logsPage.toolbar.logFilterErrorToastTitle": "日志筛选错误", "xpack.infra.logsSettingsPage.loadingButtonLabel": "正在加载", "xpack.infra.logsStreamEmbeddable.deprecationWarningDescription": "将不再维护日志流面板。尝试将 {savedSearchDocsLink} 用于类似可视化。", - "xpack.infra.logsStreamEmbeddable.deprecationWarningDescription.savedSearchesLinkLabel": "已保存的搜索", - "xpack.infra.logStreamEmbeddable.description": "添加实时流式传输日志的表。为了获得更高效的体验,建议使用 Discover 页面创建已保存搜索,而不是使用日志流。", "xpack.infra.logStreamEmbeddable.displayName": "日志流(已过时)", "xpack.infra.logStreamEmbeddable.title": "日志流", "xpack.infra.logStreamPageTemplate.backtoLogsStream": "返回到日志流", @@ -28501,14 +28456,10 @@ "xpack.ml.dataframe.analytics.create.resultsFieldHelpText": "定义用于存储分析结果的字段的名称。默认为 ml。", "xpack.ml.dataframe.analytics.create.resultsFieldInputAriaLabel": "用于存储分析结果的字段的名称。", "xpack.ml.dataframe.analytics.create.resultsFieldLabel": "结果字段", - "xpack.ml.dataframe.analytics.create.savedSearchLabel": "已保存搜索", "xpack.ml.dataframe.analytics.create.scatterplotMatrixLabel": "散点图矩阵", "xpack.ml.dataframe.analytics.create.scatterplotMatrixLabelHelpText": "可视化选定包括字段对之间的关系。", "xpack.ml.dataFrame.analytics.create.searchSelection.CcsErrorCallOutTitle": "不支持使用跨集群搜索的数据视图。", - "xpack.ml.dataFrame.analytics.create.searchSelection.errorGettingDataViewTitle": "加载已保存搜索所使用的数据视图时出错", - "xpack.ml.dataFrame.analytics.create.searchSelection.notFoundLabel": "未找到匹配的索引或已保存搜索。", "xpack.ml.dataFrame.analytics.create.searchSelection.savedObjectType.dataView": "数据视图", - "xpack.ml.dataFrame.analytics.create.searchSelection.savedObjectType.search": "已保存搜索", "xpack.ml.dataframe.analytics.create.softTreeDepthLimitInputAriaLabel": "超过此深度的决策树将在损失计算中被罚分。", "xpack.ml.dataframe.analytics.create.softTreeDepthLimitLabel": "软性树深度限制", "xpack.ml.dataframe.analytics.create.softTreeDepthLimitText": "超过此深度的决策树将在损失计算中被罚分。必须大于或等于 0。", @@ -28797,7 +28748,6 @@ "xpack.ml.dataGridChart.notEnoughData": "0 个文档包含字段。", "xpack.ml.dataGridChart.singleCategoryLegend": "{cardinality, plural, other {# 个类别}}", "xpack.ml.dataGridChart.topCategoriesLegend": "{cardinality} 个类别中的排名前 {maxChartColumns} 个", - "xpack.ml.dataSourceContext.errorTitle": "无法提取数据视图或已保存搜索", "xpack.ml.dataViewNotBasedOnTimeSeriesNotificationDescription": "仅针对基于时间的索引运行异常检测", "xpack.ml.dataViewNotBasedOnTimeSeriesNotificationTitle": "数据视图 {dataViewIndexPattern} 并非基于时间序列", "xpack.ml.dataViewUtils.createDataViewSwitchLabel": "创建数据视图", @@ -29040,7 +28990,6 @@ "xpack.ml.feature.reserved.description": "要向用户授予访问权限,还应分配 machine_learning_user 或 machine_learning_admin 角色。", "xpack.ml.featureFeedbackButton.tellUsWhatYouThinkLink": "告诉我们您的看法!", "xpack.ml.featureRegistry.mlFeatureName": "Machine Learning", - "xpack.ml.featureRegistry.privilegesTooltip": "为 Machine Learning 授予所有或读取功能权限还会向某些类型的 Kibana 已保存对象(即索引模式、仪表板、已保存搜索和可视化,以及 Machine Learning 作业、已训练模型和模块已保存对象)授予对等功能权限。", "xpack.ml.fieldTypeIcon.booleanTypeAriaLabel": "布尔类型", "xpack.ml.fieldTypeIcon.dateTypeAriaLabel": "日期类型", "xpack.ml.fieldTypeIcon.geoPointTypeAriaLabel": "{geoPointParam} 类型", @@ -29842,7 +29791,6 @@ "xpack.ml.newJob.recognize.running.startedAriaLabel": "已启动", "xpack.ml.newJob.recognize.running.startFailedAriaLabel": "启动失败", "xpack.ml.newJob.recognize.runningLabel": "正在运行", - "xpack.ml.newJob.recognize.savedSearchPageTitle": "已保存搜索 {savedSearchTitle}", "xpack.ml.newJob.recognize.saveJobOverrideLabel": "保存", "xpack.ml.newJob.recognize.searchesLabel": "搜索", "xpack.ml.newJob.recognize.searchWillBeOverwrittenLabel": "搜索将被覆盖", @@ -29851,7 +29799,6 @@ "xpack.ml.newJob.recognize.startDatafeedAfterSaveLabel": "保存后启动数据馈送", "xpack.ml.newJob.recognize.useDedicatedIndexLabel": "使用专用索引", "xpack.ml.newJob.recognize.useFullDataLabel": "使用完整的 {dataViewIndexPattern} 数据", - "xpack.ml.newJob.recognize.usingSavedSearchDescription": "使用已保存搜索意味着在数据馈送中使用的查询会与我们在 {moduleId} 模块中提供的默认查询不同。", "xpack.ml.newJob.recognize.viewResultsAriaLabel": "查看结果", "xpack.ml.newJob.recognize.viewResultsLinkText": "查看结果", "xpack.ml.newJob.recognize.visualizationsLabel": "可视化", @@ -29871,7 +29818,6 @@ "xpack.ml.newJob.wizard.datafeedStep.dataView.description": "当前用于此作业的数据视图。", "xpack.ml.newJob.wizard.datafeedStep.dataView.step0.title": "更改数据视图", "xpack.ml.newJob.wizard.datafeedStep.dataView.step1.dataView": "数据视图", - "xpack.ml.newJob.wizard.datafeedStep.dataView.step1.noMatchingError": "未找到匹配的索引或已保存搜索。", "xpack.ml.newJob.wizard.datafeedStep.dataView.step1.title": "为该作业选择新数据视图", "xpack.ml.newJob.wizard.datafeedStep.dataView.step2.ApplyButton": "应用", "xpack.ml.newJob.wizard.datafeedStep.dataView.step2.backButton": "返回", @@ -29981,8 +29927,6 @@ "xpack.ml.newJob.wizard.jobType.rareAriaLabel": "罕见作业", "xpack.ml.newJob.wizard.jobType.rareDescription": "检测时间序列数据中的罕见值。", "xpack.ml.newJob.wizard.jobType.rareTitle": "极少", - "xpack.ml.newJob.wizard.jobType.savedSearchPageTitleLabel": "已保存搜索 {savedSearchTitle}", - "xpack.ml.newJob.wizard.jobType.selectDifferentIndexLinkText": "选择不同数据视图或已保存搜索", "xpack.ml.newJob.wizard.jobType.singleMetricAriaLabel": "单一指标作业", "xpack.ml.newJob.wizard.jobType.singleMetricDescription": "检测单个时序中的异常。", "xpack.ml.newJob.wizard.jobType.singleMetricTitle": "单一指标", @@ -29992,7 +29936,6 @@ "xpack.ml.newJob.wizard.jsonFlyout.autoSetJobCreatorTimeRange.error": "检索索引的开始和结束时间时出错", "xpack.ml.newJob.wizard.jsonFlyout.closeButton": "关闭", "xpack.ml.newJob.wizard.jsonFlyout.datafeed.title": "数据馈送配置 JSON", - "xpack.ml.newJob.wizard.jsonFlyout.indicesChange.calloutText": "在此处无法更改数据馈送正在使用的索引。要选择不同数据视图或已保存搜索,请前往向导的第 1 步,然后选择更改数据视图选项。", "xpack.ml.newJob.wizard.jsonFlyout.indicesChange.calloutTitle": "索引已更改", "xpack.ml.newJob.wizard.jsonFlyout.job.title": "作业配置 JSON", "xpack.ml.newJob.wizard.jsonFlyout.saveButton": "保存", @@ -30123,10 +30066,7 @@ "xpack.ml.newJob.wizard.revertModelSnapshotFlyout.title": "恢复到模型快照 {ssId}", "xpack.ml.newJob.wizard.revertModelSnapshotFlyout.warningCallout.contents": "将删除 {date} 后的所有异常检测结果。", "xpack.ml.newJob.wizard.revertModelSnapshotFlyout.warningCallout.title": "将删除异常数据", - "xpack.ml.newJob.wizard.searchSelection.notFoundLabel": "未找到匹配的数据视图或已保存搜索。", "xpack.ml.newJob.wizard.searchSelection.savedObjectType.dataView": "数据视图", - "xpack.ml.newJob.wizard.searchSelection.savedObjectType.search": "已保存搜索", - "xpack.ml.newJob.wizard.selectDataViewOrSavedSearch": "选择数据视图或已保存搜索", "xpack.ml.newJob.wizard.shopValidationButton": "跳过验证", "xpack.ml.newJob.wizard.step.configureDatafeedTitle": "配置数据馈送", "xpack.ml.newJob.wizard.step.jobDetailsTitle": "作业详情", @@ -30138,7 +30078,6 @@ "xpack.ml.newJob.wizard.stepComponentWrapper.jobDetailsTitle": "作业详情", "xpack.ml.newJob.wizard.stepComponentWrapper.pickFieldsTitle": "选择字段", "xpack.ml.newJob.wizard.stepComponentWrapper.summaryTitleDataView": "从数据视图 {dataViewName} 新建作业", - "xpack.ml.newJob.wizard.stepComponentWrapper.summaryTitleSavedSearch": "从已保存搜索 {title} 新建作业", "xpack.ml.newJob.wizard.stepComponentWrapper.timeRangeTitle": "时间范围", "xpack.ml.newJob.wizard.stepComponentWrapper.validationTitle": "验证", "xpack.ml.newJob.wizard.summaryStep.convertToAdvancedButton": "转换成高级作业", @@ -41623,7 +41562,6 @@ "xpack.securitySolution.timelines.components.templateFilter.elasticTitle": "Elastic 模板", "xpack.securitySolution.timelines.discoverInTimeline.save_saved_search_error": "保存 Discover 搜索时出错", "xpack.securitySolution.timelines.discoverInTimeline.save_saved_search_unknown_error": "保存 Discover 搜索时出现未知错误", - "xpack.securitySolution.timelines.discoverInTimeline.savedSearchTitle": "时间线的已保存搜索 - {title}", "xpack.securitySolution.timelines.newTemplateTimelineButtonLabel": "创建新时间线模板", "xpack.securitySolution.timelines.newTimelineButtonLabel": "创建新时间线", "xpack.securitySolution.timelines.pageTitle": "时间线", @@ -43583,7 +43521,6 @@ "xpack.spaces.management.copyToSpace.copyModeControl.createNewCopies.disabledTitle": "检查现有对象", "xpack.spaces.management.copyToSpace.copyModeControl.createNewCopies.enabledText": "使用此选项可在相同的工作区中创建该对象的一个或多个副本。", "xpack.spaces.management.copyToSpace.copyModeControl.createNewCopies.enabledTitle": "使用随机 ID 创建新对象", - "xpack.spaces.management.copyToSpace.copyModeControl.includeRelated.text": "复制此对象及其相关对象。对于仪表板,还将复制相关可视化、索引模式和已保存的搜索。", "xpack.spaces.management.copyToSpace.copyModeControl.includeRelated.title": "包括相关对象", "xpack.spaces.management.copyToSpace.copyModeControl.overwrite.disabledLabel": "冲突时请求操作", "xpack.spaces.management.copyToSpace.copyModeControl.overwrite.enabledLabel": "自动覆盖冲突", @@ -46311,15 +46248,12 @@ "xpack.transform.newTransform.chooseSourceTitle": "选择源", "xpack.transform.newTransform.newTransformTitle": "新转换", "xpack.transform.newTransform.searchSelection.createADataView": "创建数据视图", - "xpack.transform.newTransform.searchSelection.notFoundLabel": "未找到匹配的索引或已保存搜索。", "xpack.transform.newTransform.searchSelection.savedObjectType.dataView": "数据视图", - "xpack.transform.newTransform.searchSelection.savedObjectType.search": "已保存搜索", "xpack.transform.pivotPreview.copyClipboardTooltip": "将转换预览的开发控制台语句复制到剪贴板。", "xpack.transform.pivotPreview.PivotPreviewIncompleteConfigCalloutBody": "请至少选择一个分组依据字段和聚合。", "xpack.transform.pivotPreview.PivotPreviewNoDataCalloutBody": "预览请求未返回任何数据。请确保可选查询返回数据且分组依据和聚合字段使用的字段的值存在。", "xpack.transform.pivotPreview.transformPreviewTitle": "转换预览", "xpack.transform.progress": "进度", - "xpack.transform.searchItems.errorInitializationTitle": "初始化 Kibana 数据视图或已保存搜索时发生错误。", "xpack.transform.statsBar.batchTransformsLabel": "批量", "xpack.transform.statsBar.continuousTransformsLabel": "连续", "xpack.transform.statsBar.failedTransformsLabel": "失败", @@ -46396,7 +46330,6 @@ "xpack.transform.stepDefineForm.runtimeEditorSwitchModalTitle": "编辑将会丢失", "xpack.transform.stepDefineForm.runtimeFieldsLabel": "运行时字段", "xpack.transform.stepDefineForm.runtimeFieldsListLabel": "{runtimeFields}", - "xpack.transform.stepDefineForm.savedSearchLabel": "已保存搜索", "xpack.transform.stepDefineForm.searchFilterLabel": "搜索筛选", "xpack.transform.stepDefineForm.sortFieldOptionsEmptyError": "没有日期字段可用于排序。要使用其他字段类型,请将配置复制到剪贴板,然后继续在控制台中创建转换。", "xpack.transform.stepDefineForm.sortHelpText": "选择要用于标识最新文档的日期字段。", @@ -46409,7 +46342,6 @@ "xpack.transform.stepDefineSummary.groupByLabel": "分组依据", "xpack.transform.stepDefineSummary.queryCodeBlockLabel": "查询", "xpack.transform.stepDefineSummary.queryLabel": "查询", - "xpack.transform.stepDefineSummary.savedSearchLabel": "已保存搜索", "xpack.transform.stepDefineSummary.timeRangeLabel": "时间范围", "xpack.transform.stepDetailsForm.advancedSettingsAccordionButtonContent": "高级设置", "xpack.transform.stepDetailsForm.continuousModeAriaLabel": "选择延迟。", diff --git a/x-pack/platform/plugins/shared/aiops/public/hooks/use_data_source.tsx b/x-pack/platform/plugins/shared/aiops/public/hooks/use_data_source.tsx index ef574a348b92..7acdc24e069f 100644 --- a/x-pack/platform/plugins/shared/aiops/public/hooks/use_data_source.tsx +++ b/x-pack/platform/plugins/shared/aiops/public/hooks/use_data_source.tsx @@ -100,7 +100,7 @@ export const DataSourceContextProvider: FC

    } diff --git a/x-pack/platform/plugins/shared/ml/public/application/contexts/ml/data_source_context.tsx b/x-pack/platform/plugins/shared/ml/public/application/contexts/ml/data_source_context.tsx index 1c94200794a8..5855325f5918 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/contexts/ml/data_source_context.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/contexts/ml/data_source_context.tsx @@ -120,7 +120,7 @@ export const DataSourceContextProvider: FC> = ({ chil

    } diff --git a/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx b/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx index 7fd678e98f6f..f8c368c226ab 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx @@ -603,8 +603,8 @@ export const ConfigurationStepForm: FC = ({ {savedSearchQuery !== null && ( - {i18n.translate('xpack.ml.dataframe.analytics.create.savedSearchLabel', { - defaultMessage: 'Saved search', + {i18n.translate('xpack.ml.dataframe.analytics.create.discoverSessionLabel', { + defaultMessage: 'Discover session', })} )} diff --git a/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_management/components/source_selection/source_selection.test.tsx b/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_management/components/source_selection/source_selection.test.tsx index c17490f4506d..6c3508db1db3 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_management/components/source_selection/source_selection.test.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_management/components/source_selection/source_selection.test.tsx @@ -203,7 +203,7 @@ describe('Data Frame Analytics: ', () => { ).toBeInTheDocument(); expect( screen.queryByText( - `The saved search 'the-remote-saved-search-title' uses the data view 'my_remote_cluster:index-pattern-title'.` + `The saved Discover session 'the-remote-saved-search-title' uses the data view 'my_remote_cluster:index-pattern-title'.` ) ).toBeInTheDocument(); expect(mockNavigateToPath).toHaveBeenCalledTimes(0); diff --git a/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_management/components/source_selection/source_selection.tsx b/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_management/components/source_selection/source_selection.tsx index ff173c47a532..86245a73f89f 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_management/components/source_selection/source_selection.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_management/components/source_selection/source_selection.tsx @@ -67,7 +67,7 @@ export const SourceSelection: FC = () => { i18n.translate( 'xpack.ml.dataFrame.analytics.create.searchSelection.errorGettingDataViewTitle', { - defaultMessage: 'Error loading data view used by the saved search', + defaultMessage: 'Error loading data view used by the saved Discover session', } ) ); @@ -82,7 +82,7 @@ export const SourceSelection: FC = () => { i18n.translate( 'xpack.ml.dataFrame.analytics.create.searchSelection.CcsErrorCallOutBody', { - defaultMessage: `The saved search ''{savedSearchTitle}'' uses the data view ''{dataViewName}''.`, + defaultMessage: `The saved Discover session ''{savedSearchTitle}'' uses the data view ''{dataViewName}''.`, values: { savedSearchTitle: getNestedProperty(savedObject, 'attributes.title'), dataViewName, @@ -132,17 +132,17 @@ export const SourceSelection: FC = () => { noItemsMessage={i18n.translate( 'xpack.ml.dataFrame.analytics.create.searchSelection.notFoundLabel', { - defaultMessage: 'No matching indices or saved searches found.', + defaultMessage: 'No matching indices or saved Discover sessions found.', } )} savedObjectMetaData={[ { type: 'search', - getIconForSavedObject: () => 'search', + getIconForSavedObject: () => 'discoverApp', name: i18n.translate( - 'xpack.ml.dataFrame.analytics.create.searchSelection.savedObjectType.search', + 'xpack.ml.dataFrame.analytics.create.searchSelection.savedObjectType.discoverSession', { - defaultMessage: 'Saved search', + defaultMessage: 'Discover session', } ), showSavedObject: (savedObject: SavedObject) => diff --git a/x-pack/platform/plugins/shared/ml/public/application/datavisualizer/data_drift/index_patterns_picker.tsx b/x-pack/platform/plugins/shared/ml/public/application/datavisualizer/data_drift/index_patterns_picker.tsx index 6a8c09d000cc..78628558cfaf 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/datavisualizer/data_drift/index_patterns_picker.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/datavisualizer/data_drift/index_patterns_picker.tsx @@ -48,7 +48,7 @@ export const DataDriftIndexOrSearchRedirect: FC = () => { @@ -58,16 +58,16 @@ export const DataDriftIndexOrSearchRedirect: FC = () => { onChoose={onObjectSelection} showFilter noItemsMessage={i18n.translate('xpack.ml.newJob.wizard.searchSelection.notFoundLabel', { - defaultMessage: 'No matching data views or saved searches found.', + defaultMessage: 'No matching data views or saved Discover sessions found.', })} savedObjectMetaData={[ { type: 'search', - getIconForSavedObject: () => 'search', + getIconForSavedObject: () => 'discoverApp', name: i18n.translate( - 'xpack.ml.newJob.wizard.searchSelection.savedObjectType.search', + 'xpack.ml.newJob.wizard.searchSelection.savedObjectType.discoverSession', { - defaultMessage: 'Saved search', + defaultMessage: 'Discover session', } ), showSavedObject: (savedObject: SavedObject) => diff --git a/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/components/common/json_editor_flyout/json_editor_flyout.tsx b/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/components/common/json_editor_flyout/json_editor_flyout.tsx index 6c128bcef12a..467a8e1e66b8 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/components/common/json_editor_flyout/json_editor_flyout.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/components/common/json_editor_flyout/json_editor_flyout.tsx @@ -230,7 +230,7 @@ export const JsonEditorFlyout: FC = ({ isDisabled, jobEditorMode, datafee > diff --git a/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/components/datafeed_step/components/data_view/change_data_view.tsx b/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/components/datafeed_step/components/data_view/change_data_view.tsx index eaad9b8ceeac..95755b86de93 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/components/datafeed_step/components/data_view/change_data_view.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/components/datafeed_step/components/data_view/change_data_view.tsx @@ -153,7 +153,7 @@ export const ChangeDataViewModal: FC = ({ onClose }) => { noItemsMessage={i18n.translate( 'xpack.ml.newJob.wizard.datafeedStep.dataView.step1.noMatchingError', { - defaultMessage: 'No matching indices or saved searches found.', + defaultMessage: 'No matching data views found.', } )} savedObjectMetaData={[ diff --git a/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/index_or_search/page.tsx b/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/index_or_search/page.tsx index e0c3e39182af..5423c443dabc 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/index_or_search/page.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/index_or_search/page.tsx @@ -51,7 +51,7 @@ export const Page: FC = ({ @@ -61,16 +61,16 @@ export const Page: FC = ({ onChoose={onObjectSelection} showFilter noItemsMessage={i18n.translate('xpack.ml.newJob.wizard.searchSelection.notFoundLabel', { - defaultMessage: 'No matching data views or saved searches found.', + defaultMessage: 'No matching data views or saved Discover sessions found.', })} savedObjectMetaData={[ { type: 'search', - getIconForSavedObject: () => 'search', + getIconForSavedObject: () => 'discoverApp', name: i18n.translate( - 'xpack.ml.newJob.wizard.searchSelection.savedObjectType.search', + 'xpack.ml.newJob.wizard.searchSelection.savedObjectType.discoverSession', { - defaultMessage: 'Saved search', + defaultMessage: 'Discover session', } ), showSavedObject: (savedObject: SavedObject) => diff --git a/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/job_type/page.tsx b/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/job_type/page.tsx index 2d49f1f17727..42b5623605ec 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/job_type/page.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/job_type/page.tsx @@ -95,7 +95,7 @@ export const Page: FC = () => { const pageTitleLabel = selectedSavedSearch ? i18n.translate('xpack.ml.newJob.wizard.jobType.savedSearchPageTitleLabel', { - defaultMessage: 'saved search {savedSearchTitle}', + defaultMessage: 'Discover session {savedSearchTitle}', values: { savedSearchTitle: selectedSavedSearch.title ?? '' }, }) : i18n.translate('xpack.ml.newJob.wizard.jobType.dataViewPageTitleLabel', { @@ -285,7 +285,7 @@ export const Page: FC = () => { diff --git a/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/new_job/wizard_steps.tsx b/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/new_job/wizard_steps.tsx index b44c523bc57c..f72087f50315 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/new_job/wizard_steps.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/new_job/wizard_steps.tsx @@ -74,7 +74,7 @@ export const WizardSteps: FC = ({ currentStep, setCurrentStep }) => { function getSummaryStepTitle() { if (dataSourceContext.selectedSavedSearch) { return i18n.translate('xpack.ml.newJob.wizard.stepComponentWrapper.summaryTitleSavedSearch', { - defaultMessage: 'New job from saved search {title}', + defaultMessage: 'New job from saved Discover session {title}', values: { title: dataSourceContext.selectedSavedSearch.title ?? '' }, }); } else if (dataSourceContext.selectedDataView.id !== undefined) { diff --git a/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/recognize/page.tsx b/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/recognize/page.tsx index c65f9b83f859..c2ea2999eee4 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/recognize/page.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/recognize/page.tsx @@ -94,7 +94,7 @@ export const Page: FC = ({ moduleId, existingGroupIds }) => { const { selectedSavedSearch, selectedDataView: dataView, combinedQuery } = useDataSource(); const pageTitle = selectedSavedSearch ? i18n.translate('xpack.ml.newJob.recognize.savedSearchPageTitle', { - defaultMessage: 'saved search {savedSearchTitle}', + defaultMessage: 'Discover session {savedSearchTitle}', values: { savedSearchTitle: selectedSavedSearch.title ?? '' }, }) : i18n.translate('xpack.ml.newJob.recognize.dataViewPageTitle', { @@ -310,7 +310,7 @@ export const Page: FC = ({ moduleId, existingGroupIds }) => { diff --git a/x-pack/platform/plugins/shared/ml/server/plugin.ts b/x-pack/platform/plugins/shared/ml/server/plugin.ts index e40bed733f0d..beeab9767d95 100644 --- a/x-pack/platform/plugins/shared/ml/server/plugin.ts +++ b/x-pack/platform/plugins/shared/ml/server/plugin.ts @@ -138,7 +138,7 @@ export class MlServerPlugin catalogue: [PLUGIN_ID, `${PLUGIN_ID}_file_data_visualizer`], privilegesTooltip: i18n.translate('xpack.ml.featureRegistry.privilegesTooltip', { defaultMessage: - 'Granting All or Read feature privilege for Machine Learning will also grant the equivalent feature privileges to certain types of Kibana saved objects, namely index patterns, dashboards, saved searches and visualizations as well as machine learning job, trained model and module saved objects.', + 'Granting All or Read feature privilege for Machine Learning will also grant the equivalent feature privileges to certain types of Kibana saved objects, namely index patterns, dashboards, saved Discover sessions and visualizations as well as machine learning job, trained model and module saved objects.', }), management: { insightsAndAlerting: ['jobsListLink', 'triggersActions'], diff --git a/x-pack/plugins/canvas/i18n/functions/dict/saved_search.ts b/x-pack/plugins/canvas/i18n/functions/dict/saved_search.ts index 7cdac8909c6e..d00ea3cf79b7 100644 --- a/x-pack/plugins/canvas/i18n/functions/dict/saved_search.ts +++ b/x-pack/plugins/canvas/i18n/functions/dict/saved_search.ts @@ -12,9 +12,9 @@ import { FunctionFactory } from '../../../types'; export const help: FunctionHelp> = { help: i18n.translate('xpack.canvas.functions.savedSearchHelpText', { - defaultMessage: `Returns an embeddable for a saved search object`, + defaultMessage: `Returns an embeddable for a saved Discover session object`, }), args: { - id: 'The id of the saved search object', + id: 'The id of the saved Discover session object', }, }; diff --git a/x-pack/plugins/features/server/__snapshots__/oss_features.test.ts.snap b/x-pack/plugins/features/server/__snapshots__/oss_features.test.ts.snap index 140d20f8ebdb..cc32fa26b475 100644 --- a/x-pack/plugins/features/server/__snapshots__/oss_features.test.ts.snap +++ b/x-pack/plugins/features/server/__snapshots__/oss_features.test.ts.snap @@ -434,7 +434,7 @@ Array [ "reporting", ], }, - "name": "Generate CSV reports from Saved Search panels", + "name": "Generate CSV reports from Discover session panels", "savedObject": Object { "all": Array [], "read": Array [], diff --git a/x-pack/plugins/features/server/oss_features.ts b/x-pack/plugins/features/server/oss_features.ts index 12978c35777e..d0596a59ca50 100644 --- a/x-pack/plugins/features/server/oss_features.ts +++ b/x-pack/plugins/features/server/oss_features.ts @@ -636,7 +636,7 @@ const reportingFeatures: { { id: 'download_csv_report', name: i18n.translate('xpack.features.ossFeatures.reporting.dashboardDownloadCSV', { - defaultMessage: 'Generate CSV reports from Saved Search panels', + defaultMessage: 'Generate CSV reports from Discover session panels', }), includeIn: 'all', savedObject: { all: [], read: [] }, diff --git a/x-pack/plugins/fleet/dev_docs/integrations_overview.md b/x-pack/plugins/fleet/dev_docs/integrations_overview.md index b6ce0f5ce991..19d0564cf6f2 100644 --- a/x-pack/plugins/fleet/dev_docs/integrations_overview.md +++ b/x-pack/plugins/fleet/dev_docs/integrations_overview.md @@ -143,7 +143,7 @@ Contains screenshots rendered on the integrations detail page for the integratio ## `kibana` directory -Contains top level Kibana assets (dashboards, visualizations, saved searches etc) for the integration. +Contains top level Kibana assets (dashboards, visualizations, Discover sessions etc) for the integration. ## Relationship diagram diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/constants.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/constants.tsx index 03f0b0b5cee8..c65e5c8d5644 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/constants.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/constants.tsx @@ -36,7 +36,7 @@ export const AssetTitleMap: Record< defaultMessage: 'Visualizations', }), search: i18n.translate('xpack.fleet.epm.assetTitles.savedSearches', { - defaultMessage: 'Saved searches', + defaultMessage: 'Discover sessions', }), 'index-pattern': i18n.translate('xpack.fleet.epm.assetTitles.indexPatterns', { defaultMessage: 'Data views', diff --git a/x-pack/plugins/observability_solution/infra/public/components/log_stream/log_stream_react_embeddable.tsx b/x-pack/plugins/observability_solution/infra/public/components/log_stream/log_stream_react_embeddable.tsx index 43382cf37203..f5fee9d94ea0 100644 --- a/x-pack/plugins/observability_solution/infra/public/components/log_stream/log_stream_react_embeddable.tsx +++ b/x-pack/plugins/observability_solution/infra/public/components/log_stream/log_stream_react_embeddable.tsx @@ -142,8 +142,8 @@ const DeprecationCallout = () => { target="_blank" > {i18n.translate( - 'xpack.infra.logsStreamEmbeddable.deprecationWarningDescription.savedSearchesLinkLabel', - { defaultMessage: 'saved searches' } + 'xpack.infra.logsStreamEmbeddable.deprecationWarningDescription.discoverSessionsLinkLabel', + { defaultMessage: 'Discover sessions' } )} ), diff --git a/x-pack/plugins/observability_solution/infra/public/plugin.ts b/x-pack/plugins/observability_solution/infra/public/plugin.ts index 524ca1841be9..f9825915a681 100644 --- a/x-pack/plugins/observability_solution/infra/public/plugin.ts +++ b/x-pack/plugins/observability_solution/infra/public/plugin.ts @@ -353,7 +353,7 @@ export class Plugin implements InfraClientPluginClass { getDisplayNameTooltip: () => i18n.translate('xpack.infra.logStreamEmbeddable.description', { defaultMessage: - 'Add a table of live streaming logs. For a more efficient experience, we recommend using the Discover Page to create a saved search instead of using Log stream.', + 'Add a table of live streaming logs. For a more efficient experience, we recommend using the Discover Page to create a saved Discover session instead of using Log stream.', }), getIconType: () => 'logsApp', isCompatible: async ({ embeddable }) => { diff --git a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_mode_control.tsx b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_mode_control.tsx index 223a21f248f7..fb8fde6b1e22 100644 --- a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_mode_control.tsx +++ b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_mode_control.tsx @@ -80,7 +80,7 @@ const includeRelated = { 'xpack.spaces.management.copyToSpace.copyModeControl.includeRelated.text', { defaultMessage: - 'Copy this object and its related objects. For dashboards, related visualizations, index patterns, and saved searches are also copied.', + 'Copy this object and its related objects. For dashboards, related visualizations, data views, and saved Discover sessions are also copied.', } ), }; diff --git a/x-pack/plugins/spaces/server/routes/api/external/copy_to_space.ts b/x-pack/plugins/spaces/server/routes/api/external/copy_to_space.ts index 509de14e2928..fcbc84b0655c 100644 --- a/x-pack/plugins/spaces/server/routes/api/external/copy_to_space.ts +++ b/x-pack/plugins/spaces/server/routes/api/external/copy_to_space.ts @@ -47,7 +47,7 @@ export function initCopyToSpacesApi(deps: ExternalRouteDeps) { tags: ['oas-tag:spaces'], summary: `Copy saved objects between spaces`, description: - 'It also allows you to automatically copy related objects, so when you copy a dashboard, this can automatically copy over the associated visualizations, data views, and saved searches, as required. You can request to overwrite any objects that already exist in the target space if they share an identifier or you can use the resolve copy saved objects conflicts API to do this on a per-object basis.', + 'It also allows you to automatically copy related objects, so when you copy a dashboard, this can automatically copy over the associated visualizations, data views, and saved Discover sessions, as required. You can request to overwrite any objects that already exist in the target space if they share an identifier or you can use the resolve copy saved objects conflicts API to do this on a per-object basis.', }, validate: { body: schema.object( diff --git a/x-pack/solutions/security/plugins/security_solution/public/timelines/components/timeline/tabs/esql/translations.ts b/x-pack/solutions/security/plugins/security_solution/public/timelines/components/timeline/tabs/esql/translations.ts index e97da8b29c65..bffd2db6cd73 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/timelines/components/timeline/tabs/esql/translations.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/timelines/components/timeline/tabs/esql/translations.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; export const GET_TIMELINE_DISCOVER_SAVED_SEARCH_TITLE = (title: string) => - i18n.translate('xpack.securitySolution.timelines.discoverInTimeline.savedSearchTitle', { - defaultMessage: 'Saved search for timeline - {title}', + i18n.translate('xpack.securitySolution.timelines.discoverInTimeline.discoverSessionTitle', { + defaultMessage: 'Saved Discover session for timeline - {title}', values: { title }, }); From c88b2736114f97a54abca0cf5e1138e67dfd69b0 Mon Sep 17 00:00:00 2001 From: Liam Thompson <32779855+leemthompo@users.noreply.github.com> Date: Wed, 18 Dec 2024 13:55:01 +0100 Subject: [PATCH 34/60] [DOCS] Link to Playground videos (#204716) --- docs/search/playground/index.asciidoc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/search/playground/index.asciidoc b/docs/search/playground/index.asciidoc index 72d8eccab47c..465637e79bc0 100644 --- a/docs/search/playground/index.asciidoc +++ b/docs/search/playground/index.asciidoc @@ -18,7 +18,16 @@ Refer to the following for more advanced topics: * <> * <> -* <> +* <> + +.🍿 Getting started videos +*********************** +Watch these video tutorials to help you get started: + +* https://www.youtube.com/watch?v=zTHgJ3rhe10[Getting Started] +* https://www.youtube.com/watch?v=ZtxoASFvkno[Using Playground with local LLMs] +*********************** + [float] [[playground-how-it-works]] @@ -259,4 +268,4 @@ Once you've got {x} up and running, and you've tested out the chat interface, yo include::playground-context.asciidoc[] include::playground-query.asciidoc[] -include::playground-troubleshooting.asciidoc[] \ No newline at end of file +include::playground-troubleshooting.asciidoc[] From 53748fdefa1d59d58a4708258a1476dc140b1588 Mon Sep 17 00:00:00 2001 From: Maryam Saeidi Date: Wed, 18 Dec 2024 13:59:23 +0100 Subject: [PATCH 35/60] Fix context.pageName by fixing missing executionContext and add enableExecutionContextTracking flag (#204547) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves https://github.com/elastic/kibana/issues/195778 ## 🐞 Summary This PR fixes missing executionContext in sharedux router by adding `SharedUXContext` to the `KibanaRootContextProvider` (inside of the `KibanaRenderContextProvider`). (More context provided in this https://github.com/elastic/kibana/issues/195778#issuecomment-2426936142) It also introduces `enableExecutionContextTracking` to enable tracking logic to avoid creating a race condition for the existing custom execution context tracking implementations. I enabled this flag for the observability plugin and here is the difference: |Item|Screenshot| |---|---| |Before|![image](https://github.com/user-attachments/assets/83283d23-3347-45be-95c1-120cdfabb9c5)| |After|![image](https://github.com/user-attachments/assets/9de51645-6bf1-4537-baeb-6878e7bb3590)| ### 🧪 How to test - Go to the observability alerts page and check the kibana-browser request as shown above ### ✨ Possible future improvements Allowing this logic to be provided by the consumer so that we can get rid of custom implementations (Example: [APM custom execution context](https://github.com/elastic/kibana/blob/e9671937bacfaa911d32de0e8885e7f26425888a/x-pack/plugins/observability_solution/apm/public/components/routing/app_root/update_execution_context_on_route_change.ts#L21,L25)) --------- Co-authored-by: Anton Dosov Co-authored-by: Davis McPhee Co-authored-by: Marco Antonio Ghiani Co-authored-by: Elena Stoeva --- .../kibana_context/render/render_provider.tsx | 4 +- .../react/kibana_context/root/BUILD.bazel | 1 + .../root/root_provider.test.tsx | 6 ++ .../kibana_context/root/root_provider.tsx | 14 ++++- .../react/kibana_context/root/tsconfig.json | 3 + packages/shared-ux/router/impl/BUILD.bazel | 34 ++++++++++ .../impl/__snapshots__/route.test.tsx.snap | 2 + packages/shared-ux/router/impl/index.ts | 2 + packages/shared-ux/router/impl/route.test.tsx | 19 ++++++ packages/shared-ux/router/impl/route.tsx | 16 +++-- packages/shared-ux/router/impl/routes.tsx | 62 ++++++++++--------- .../shared-ux/router/impl/routes_context.ts | 18 ++++++ packages/shared-ux/router/impl/services.ts | 8 ++- packages/shared-ux/router/impl/types.ts | 8 +++ .../router/impl/use_execution_context.ts | 2 +- .../public/application/index.tsx | 2 +- 16 files changed, 160 insertions(+), 41 deletions(-) create mode 100644 packages/shared-ux/router/impl/BUILD.bazel create mode 100644 packages/shared-ux/router/impl/routes_context.ts diff --git a/packages/react/kibana_context/render/render_provider.tsx b/packages/react/kibana_context/render/render_provider.tsx index 233abb42834b..345a0993bb9e 100644 --- a/packages/react/kibana_context/render/render_provider.tsx +++ b/packages/react/kibana_context/render/render_provider.tsx @@ -25,11 +25,11 @@ export type KibanaRenderContextProviderProps = Omit > = ({ children, ...props }) => { - const { analytics, i18n, theme, userProfile, colorMode, modify } = props; + const { analytics, executionContext, i18n, theme, userProfile, colorMode, modify } = props; return ( {children} diff --git a/packages/react/kibana_context/root/BUILD.bazel b/packages/react/kibana_context/root/BUILD.bazel index 1c47c25bc20a..fc073da074a6 100644 --- a/packages/react/kibana_context/root/BUILD.bazel +++ b/packages/react/kibana_context/root/BUILD.bazel @@ -26,6 +26,7 @@ DEPS = [ "@npm//tslib", "@npm//@elastic/eui", "//packages/core/base/core-base-common", + "//packages/shared-ux/router/impl:shared-ux-router", ] js_library( diff --git a/packages/react/kibana_context/root/root_provider.test.tsx b/packages/react/kibana_context/root/root_provider.test.tsx index 405823a9b823..52af9d565421 100644 --- a/packages/react/kibana_context/root/root_provider.test.tsx +++ b/packages/react/kibana_context/root/root_provider.test.tsx @@ -15,6 +15,8 @@ import { useEuiTheme } from '@elastic/eui'; import type { UseEuiTheme } from '@elastic/eui'; import { mountWithIntl } from '@kbn/test-jest-helpers'; import type { KibanaTheme } from '@kbn/react-kibana-context-common'; +import type { ExecutionContextStart } from '@kbn/core-execution-context-browser'; +import { executionContextServiceMock } from '@kbn/core-execution-context-browser-mocks'; import { i18nServiceMock } from '@kbn/core-i18n-browser-mocks'; import { I18nStart } from '@kbn/core-i18n-browser'; import type { UserProfileService } from '@kbn/core-user-profile-browser'; @@ -25,11 +27,13 @@ describe('KibanaRootContextProvider', () => { let euiTheme: UseEuiTheme | undefined; let i18nMock: I18nStart; let userProfile: UserProfileService; + let executionContext: ExecutionContextStart; beforeEach(() => { euiTheme = undefined; i18nMock = i18nServiceMock.createStartContract(); userProfile = userProfileServiceMock.createStart(); + executionContext = executionContextServiceMock.createStartContract(); }); const flushPromises = async () => { @@ -64,6 +68,7 @@ describe('KibanaRootContextProvider', () => { @@ -82,6 +87,7 @@ describe('KibanaRootContextProvider', () => { diff --git a/packages/react/kibana_context/root/root_provider.tsx b/packages/react/kibana_context/root/root_provider.tsx index 386a67fb005e..be8ddfa3f95a 100644 --- a/packages/react/kibana_context/root/root_provider.tsx +++ b/packages/react/kibana_context/root/root_provider.tsx @@ -11,6 +11,8 @@ import React, { FC, PropsWithChildren } from 'react'; import type { AnalyticsServiceStart } from '@kbn/core-analytics-browser'; import type { I18nStart } from '@kbn/core-i18n-browser'; +import type { ExecutionContextStart } from '@kbn/core-execution-context-browser'; +import { SharedUXRouterContext } from '@kbn/shared-ux-router'; // @ts-expect-error EUI exports this component internally, but Kibana isn't picking it up its types import { useIsNestedEuiProvider } from '@elastic/eui/lib/components/provider/nested'; @@ -25,6 +27,8 @@ export interface KibanaRootContextProviderProps extends KibanaEuiProviderProps { i18n: I18nStart; /** The `AnalyticsServiceStart` API from `CoreStart`. */ analytics?: Pick; + /** The `ExecutionContextStart` API from `CoreStart`. */ + executionContext?: ExecutionContextStart; } /** @@ -44,20 +48,26 @@ export interface KibanaRootContextProviderProps extends KibanaEuiProviderProps { export const KibanaRootContextProvider: FC> = ({ children, i18n, + executionContext, ...props }) => { const hasEuiProvider = useIsNestedEuiProvider(); + const rootContextProvider = ( + + {children} + + ); if (hasEuiProvider) { emitEuiProviderWarning( 'KibanaRootContextProvider has likely been nested in this React tree, either by direct reference or by KibanaRenderContextProvider. The result of this nesting is a nesting of EuiProvider, which has negative effects. Check your React tree for nested Kibana context providers.' ); - return {children}; + return rootContextProvider; } else { const { theme, userProfile, globalStyles, colorMode, modify } = props; return ( - {children} + {rootContextProvider} ); } diff --git a/packages/react/kibana_context/root/tsconfig.json b/packages/react/kibana_context/root/tsconfig.json index a7606025552b..8035f8379e39 100644 --- a/packages/react/kibana_context/root/tsconfig.json +++ b/packages/react/kibana_context/root/tsconfig.json @@ -24,5 +24,8 @@ "@kbn/core-analytics-browser", "@kbn/core-user-profile-browser", "@kbn/core-user-profile-browser-mocks", + "@kbn/core-execution-context-browser", + "@kbn/core-execution-context-browser-mocks", + "@kbn/shared-ux-router" ] } diff --git a/packages/shared-ux/router/impl/BUILD.bazel b/packages/shared-ux/router/impl/BUILD.bazel new file mode 100644 index 000000000000..224bebcf72e4 --- /dev/null +++ b/packages/shared-ux/router/impl/BUILD.bazel @@ -0,0 +1,34 @@ +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") + +SRCS = glob( + [ + "**/*.ts", + "**/*.tsx", + ], + exclude = [ + "**/test_helpers.ts", + "**/*.config.js", + "**/*.mock.*", + "**/*.test.*", + "**/*.stories.*", + "**/__snapshots__/**", + "**/integration_tests/**", + "**/mocks/**", + "**/scripts/**", + "**/storybook/**", + "**/test_fixtures/**", + "**/test_helpers/**", + ], +) + +DEPS = [ + +] + +js_library( + name = "shared-ux-router", + package_name = "@kbn/shared-ux-router", + srcs = ["package.json"] + SRCS, + deps = DEPS, + visibility = ["//visibility:public"], +) diff --git a/packages/shared-ux/router/impl/__snapshots__/route.test.tsx.snap b/packages/shared-ux/router/impl/__snapshots__/route.test.tsx.snap index 418aa60b7c1f..b7ef59528923 100644 --- a/packages/shared-ux/router/impl/__snapshots__/route.test.tsx.snap +++ b/packages/shared-ux/router/impl/__snapshots__/route.test.tsx.snap @@ -33,3 +33,5 @@ exports[`Route renders 1`] = ` `; + +exports[`Route renders with enableExecutionContextTracking as false 1`] = ``; diff --git a/packages/shared-ux/router/impl/index.ts b/packages/shared-ux/router/impl/index.ts index a8bef1b8499d..253d42beaa50 100644 --- a/packages/shared-ux/router/impl/index.ts +++ b/packages/shared-ux/router/impl/index.ts @@ -10,3 +10,5 @@ export { Route } from './route'; export { HashRouter, BrowserRouter, MemoryRouter, Router } from './router'; export { Routes } from './routes'; + +export { SharedUXRouterContext } from './services'; diff --git a/packages/shared-ux/router/impl/route.test.tsx b/packages/shared-ux/router/impl/route.test.tsx index 96bb6130387a..9d21690cdcf4 100644 --- a/packages/shared-ux/router/impl/route.test.tsx +++ b/packages/shared-ux/router/impl/route.test.tsx @@ -9,15 +9,34 @@ import React, { Component, FC } from 'react'; import { shallow } from 'enzyme'; +import { useSharedUXRoutesContext } from './routes_context'; import { Route } from './route'; import { createMemoryHistory } from 'history'; +jest.mock('./routes_context', () => ({ + useSharedUXRoutesContext: jest.fn().mockImplementation(() => ({ + enableExecutionContextTracking: true, + })), +})); + describe('Route', () => { + beforeEach(() => { + jest.restoreAllMocks(); + }); + test('renders', () => { const example = shallow(); expect(example).toMatchSnapshot(); }); + test('renders with enableExecutionContextTracking as false', () => { + (useSharedUXRoutesContext as jest.Mock).mockImplementationOnce(() => ({ + enableExecutionContextTracking: false, + })); + const example = shallow(); + expect(example).toMatchSnapshot(); + }); + test('location renders as expected', () => { // create a history const historyLocation = createMemoryHistory(); diff --git a/packages/shared-ux/router/impl/route.tsx b/packages/shared-ux/router/impl/route.tsx index 3535ff7aecec..5041f872b71b 100644 --- a/packages/shared-ux/router/impl/route.tsx +++ b/packages/shared-ux/router/impl/route.tsx @@ -15,6 +15,7 @@ import { RouteProps, useRouteMatch, } from 'react-router-dom'; +import { useSharedUXRoutesContext } from './routes_context'; import { useKibanaSharedUX } from './services'; import { useSharedUXExecutionContext } from './use_execution_context'; @@ -30,17 +31,18 @@ export const Route = ({ render, ...rest }: RouteProps) => { + const { enableExecutionContextTracking } = useSharedUXRoutesContext(); const component = useMemo(() => { if (!Component) { return undefined; } return (props: RouteComponentProps) => ( <> - + {enableExecutionContextTracking && } ); - }, [Component]); + }, [Component, enableExecutionContextTracking]); if (component) { return ; @@ -52,7 +54,7 @@ export const Route = ({ {...rest} render={(props) => ( <> - + {enableExecutionContextTracking && } {/* @ts-ignore else condition exists if renderFunction is undefined*/} {renderFunction(props)} @@ -62,7 +64,7 @@ export const Route = ({ } return ( - + {enableExecutionContextTracking && } {children} ); @@ -75,6 +77,12 @@ export const MatchPropagator = () => { const { executionContext } = useKibanaSharedUX().services; const match = useRouteMatch(); + if (!executionContext && process.env.NODE_ENV !== 'production') { + throw new Error( + 'Default execution context tracking is enabled but the executionContext service is not available' + ); + } + useSharedUXExecutionContext(executionContext, { type: 'application', page: match.path, diff --git a/packages/shared-ux/router/impl/routes.tsx b/packages/shared-ux/router/impl/routes.tsx index 9c1a97de6583..937756224627 100644 --- a/packages/shared-ux/router/impl/routes.tsx +++ b/packages/shared-ux/router/impl/routes.tsx @@ -13,6 +13,7 @@ import React, { Children } from 'react'; import { Switch, useRouteMatch } from 'react-router-dom'; import { Routes as ReactRouterRoutes, Route } from 'react-router-dom-v5-compat'; import { Route as LegacyRoute, MatchPropagator } from './route'; +import { SharedUXRoutesContext } from './routes_context'; type RouterElementChildren = Array< React.ReactElement< @@ -28,42 +29,47 @@ type RouterElementChildren = Array< export const Routes = ({ legacySwitch = true, + enableExecutionContextTracking = false, children, }: { legacySwitch?: boolean; + enableExecutionContextTracking?: boolean; children: React.ReactNode; }) => { const match = useRouteMatch(); return legacySwitch ? ( - {children} + + {children} + ) : ( - - {Children.map(children as RouterElementChildren, (child) => { - if (React.isValidElement(child) && child.type === LegacyRoute) { - const path = replace(child?.props.path, match.url + '/', ''); - const renderFunction = - typeof child?.props.children === 'function' - ? child?.props.children - : child?.props.render; - - return ( - - - {(child?.props?.component && ) || - (renderFunction && renderFunction()) || - children} - - } - /> - ); - } else { - return child; - } - })} - + + + {Children.map(children as RouterElementChildren, (child) => { + if (React.isValidElement(child) && child.type === LegacyRoute) { + const path = replace(child?.props.path, match.url + '/', ''); + const renderFunction = + typeof child?.props.children === 'function' + ? child?.props.children + : child?.props.render; + return ( + + {enableExecutionContextTracking && } + {(child?.props?.component && ) || + (renderFunction && renderFunction()) || + children} + + } + /> + ); + } else { + return child; + } + })} + + ); }; diff --git a/packages/shared-ux/router/impl/routes_context.ts b/packages/shared-ux/router/impl/routes_context.ts new file mode 100644 index 000000000000..115a5df7780d --- /dev/null +++ b/packages/shared-ux/router/impl/routes_context.ts @@ -0,0 +1,18 @@ +/* + * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +import { createContext, useContext } from 'react'; +import { SharedUXRoutesContextType } from './types'; + +const defaultContextValue = {}; + +export const SharedUXRoutesContext = createContext(defaultContextValue); + +export const useSharedUXRoutesContext = (): SharedUXRoutesContextType => + useContext(SharedUXRoutesContext as unknown as React.Context); diff --git a/packages/shared-ux/router/impl/services.ts b/packages/shared-ux/router/impl/services.ts index c3ad2ab06e06..7cea72f03bd8 100644 --- a/packages/shared-ux/router/impl/services.ts +++ b/packages/shared-ux/router/impl/services.ts @@ -50,7 +50,7 @@ export interface SharedUXExecutionContextSetup { */ export interface SharedUXExecutionContextSetup { /** {@link SharedUXExecutionContextSetup} */ - executionContext: SharedUXExecutionContextStart; + executionContext?: SharedUXExecutionContextStart; } export type KibanaServices = Partial; @@ -63,12 +63,14 @@ const defaultContextValue = { services: {}, }; -export const sharedUXContext = +export const SharedUXRouterContext = createContext>(defaultContextValue); export const useKibanaSharedUX = (): SharedUXRouterContextValue< KibanaServices & Extra > => useContext( - sharedUXContext as unknown as React.Context> + SharedUXRouterContext as unknown as React.Context< + SharedUXRouterContextValue + > ); diff --git a/packages/shared-ux/router/impl/types.ts b/packages/shared-ux/router/impl/types.ts index 833c5bdd0c81..067677d152ca 100644 --- a/packages/shared-ux/router/impl/types.ts +++ b/packages/shared-ux/router/impl/types.ts @@ -33,3 +33,11 @@ export declare interface SharedUXExecutionContext { /** an inner context spawned from the current context. */ child?: SharedUXExecutionContext; } + +export declare interface SharedUXRoutesContextType { + /** + * This flag is used to enable the default execution context tracking for a specific router. + * Enable this flag in case you don't have a custom implementation for execution context tracking. + * */ + readonly enableExecutionContextTracking?: boolean; +} diff --git a/packages/shared-ux/router/impl/use_execution_context.ts b/packages/shared-ux/router/impl/use_execution_context.ts index d460d4df3080..5e088fc3eac7 100644 --- a/packages/shared-ux/router/impl/use_execution_context.ts +++ b/packages/shared-ux/router/impl/use_execution_context.ts @@ -8,7 +8,7 @@ */ import useDeepCompareEffect from 'react-use/lib/useDeepCompareEffect'; -import { SharedUXExecutionContextSetup } from './services'; +import type { SharedUXExecutionContextSetup } from './services'; import { SharedUXExecutionContext } from './types'; /** diff --git a/x-pack/solutions/observability/plugins/observability/public/application/index.tsx b/x-pack/solutions/observability/plugins/observability/public/application/index.tsx index 3ae624d2f8ea..54b8b4044e64 100644 --- a/x-pack/solutions/observability/plugins/observability/public/application/index.tsx +++ b/x-pack/solutions/observability/plugins/observability/public/application/index.tsx @@ -28,7 +28,7 @@ import { HideableReactQueryDevTools } from './hideable_react_query_dev_tools'; function App() { return ( <> - + {Object.keys(routes).map((key) => { const path = key as keyof typeof routes; const { handler, exact } = routes[path]; From ff3a600d5eca300c769f67ce144364b5de3a2409 Mon Sep 17 00:00:00 2001 From: Jean-Louis Leysens Date: Wed, 18 Dec 2024 14:14:57 +0100 Subject: [PATCH 36/60] [UA] Remove noisey warn when deleting from `.tasks` (#204720) ## Summary Reduce the number of `warn` logs reindexing will create due to failed attempts to delete from `.tasks`. In this PR we only log for responses that do not have status code 403 or 401. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --- .../lib/reindexing/reindex_service.test.ts | 34 +++++++++++++++---- .../server/lib/reindexing/reindex_service.ts | 17 ++++------ 2 files changed, 34 insertions(+), 17 deletions(-) diff --git a/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts b/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts index e160ac37a9e3..44aed05b2c82 100644 --- a/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts +++ b/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts @@ -26,7 +26,6 @@ import { esIndicesStateCheck } from '../es_indices_state_check'; import { versionService } from '../version'; import { ReindexService, reindexServiceFactory } from './reindex_service'; -import { error } from './error'; const asApiResponse = (body: T): TransportResult => ({ @@ -638,12 +637,7 @@ describe('reindexService', () => { index: '.tasks', id: 'xyz', }); - expect(log.warn).toHaveBeenCalledTimes(1); - expect(log.warn).toHaveBeenCalledWith( - error.reindexTaskCannotBeDeleted( - `Could not delete reindexing task xyz, got response "!?"` - ) - ); + expect(log.warn).toHaveBeenCalledTimes(0); // Do not log anything in this case }); it('does not throw if task doc deletion throws', async () => { @@ -672,6 +666,32 @@ describe('reindexService', () => { expect(log.warn).toHaveBeenCalledTimes(1); expect(log.warn).toHaveBeenCalledWith(new Error('FAILED!')); }); + + it.each([401, 403])( + 'does not throw if task doc deletion throws AND does not log due to missing access permission: %d', + async (statusCode) => { + clusterClient.asCurrentUser.tasks.get.mockResponseOnce({ + completed: true, + // @ts-expect-error not full interface + task: { status: { created: 100, total: 100 } }, + }); + + clusterClient.asCurrentUser.count.mockResponseOnce( + // @ts-expect-error not full interface + { + count: 100, + } + ); + const e = new Error(); + Object.defineProperty(e, 'statusCode', { value: statusCode }); + clusterClient.asCurrentUser.delete.mockRejectedValue(e); + + const updatedOp = await service.processNextStep(reindexOp); + expect(updatedOp.attributes.lastCompletedStep).toEqual(ReindexStep.reindexCompleted); + expect(updatedOp.attributes.reindexTaskPercComplete).toEqual(1); + expect(log.warn).toHaveBeenCalledTimes(0); + } + ); }); describe('reindex task is cancelled', () => { diff --git a/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts b/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts index ce1f19f6babb..e55b4fce2e4d 100644 --- a/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts +++ b/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts @@ -309,20 +309,17 @@ export const reindexServiceFactory = ( } try { - // Delete the task from ES .tasks index - const deleteTaskResp = await esClient.delete({ + // Best effort, delete the task from ES .tasks index... + await esClient.delete({ index: '.tasks', id: taskId, }); - if (deleteTaskResp.result !== 'deleted') { - log.warn( - error.reindexTaskCannotBeDeleted( - `Could not delete reindexing task ${taskId}, got response "${deleteTaskResp.result}"` - ) - ); - } } catch (e) { - log.warn(e); + // We explicitly ignore authz related error codes bc we expect this to be + // very common when deleting from .tasks + if (e?.statusCode !== 401 && e?.statusCode !== 403) { + log.warn(e); + } } return reindexOp; From d5af2e031c95cdefcf3ded7be3456819584cb674 Mon Sep 17 00:00:00 2001 From: Umberto Pepato Date: Wed, 18 Dec 2024 14:23:29 +0100 Subject: [PATCH 37/60] [ResponseOps][Alerts] Fix muted alerts query using wrong filter (#204182) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Reverts the `getMutedAlerts` filter to use rule ids instead of rule type ids that caused the muted alerts state to be always empty. ## To verify 1. Create a rule that fire alerts 2. Navigate to `Stack management > Alerts` 3. Click on any alert actions menu (•••) 4. Toggle on and off the alert muted state and check that the action updates accordingly and the slashed bell icon appears in the status cell when muted ## Release note Fix alert mute/unmute action --- .../hooks/apis/get_rules_muted_alerts.test.ts | 23 +++- .../hooks/apis/get_rules_muted_alerts.ts | 6 +- .../tests/alerting/group4/index.ts | 1 + .../tests/alerting/group4/muted_alerts.ts | 122 ++++++++++++++++++ 4 files changed, 150 insertions(+), 2 deletions(-) create mode 100644 x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/muted_alerts.ts diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/apis/get_rules_muted_alerts.test.ts b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/apis/get_rules_muted_alerts.test.ts index d0f1a39f7ced..f6b3d23c2e28 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/apis/get_rules_muted_alerts.test.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/apis/get_rules_muted_alerts.test.ts @@ -37,7 +37,28 @@ describe('getMutedAlerts', () => { Array [ "/internal/alerting/rules/_find", Object { - "body": "{\\"rule_type_ids\\":[\\"foo\\"],\\"fields\\":[\\"id\\",\\"mutedInstanceIds\\"],\\"page\\":1,\\"per_page\\":1}", + "body": "{\\"filter\\":\\"{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.id\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert:foo\\\\\\",\\\\\\"isQuoted\\\\\\":false}]}\\",\\"fields\\":[\\"id\\",\\"mutedInstanceIds\\"],\\"page\\":1,\\"per_page\\":1}", + "signal": undefined, + }, + ] + `); + }); + + test('should call find API with multiple ruleIds', async () => { + const result = await getMutedAlerts(http, { ruleIds: ['foo', 'bar'] }); + + expect(result).toEqual({ + page: 1, + per_page: 10, + total: 0, + data: [], + }); + + expect(http.post.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + "/internal/alerting/rules/_find", + Object { + "body": "{\\"filter\\":\\"{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"or\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.id\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert:foo\\\\\\",\\\\\\"isQuoted\\\\\\":false}]},{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.id\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert:bar\\\\\\",\\\\\\"isQuoted\\\\\\":false}]}]}\\",\\"fields\\":[\\"id\\",\\"mutedInstanceIds\\"],\\"page\\":1,\\"per_page\\":2}", "signal": undefined, }, ] diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/apis/get_rules_muted_alerts.ts b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/apis/get_rules_muted_alerts.ts index d9baef548daf..4c13c0c7b5ef 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/apis/get_rules_muted_alerts.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/apis/get_rules_muted_alerts.ts @@ -6,6 +6,7 @@ */ import { HttpStart } from '@kbn/core-http-browser'; +import { nodeBuilder } from '@kbn/es-query'; const INTERNAL_FIND_RULES_URL = '/internal/alerting/rules/_find'; @@ -23,9 +24,12 @@ export const getMutedAlerts = async ( params: { ruleIds: string[] }, signal?: AbortSignal ) => { + const filterNode = nodeBuilder.or( + params.ruleIds.map((id) => nodeBuilder.is('alert.id', `alert:${id}`)) + ); return http.post(INTERNAL_FIND_RULES_URL, { body: JSON.stringify({ - rule_type_ids: params.ruleIds, + filter: JSON.stringify(filterNode), fields: ['id', 'mutedInstanceIds'], page: 1, per_page: params.ruleIds.length, diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/index.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/index.ts index 1da03fbbcc54..b2753cb17245 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/index.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/index.ts @@ -18,6 +18,7 @@ export default function alertingTests({ loadTestFile, getService }: FtrProviderC loadTestFile(require.resolve('./builtin_alert_types')); loadTestFile(require.resolve('./mustache_templates.ts')); loadTestFile(require.resolve('./notify_when')); + loadTestFile(require.resolve('./muted_alerts')); loadTestFile(require.resolve('./event_log_alerts')); loadTestFile(require.resolve('./snooze')); loadTestFile(require.resolve('./unsnooze')); diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/muted_alerts.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/muted_alerts.ts new file mode 100644 index 000000000000..475a36872e8c --- /dev/null +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/muted_alerts.ts @@ -0,0 +1,122 @@ +/* + * 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 expect from '@kbn/expect'; +import { ES_TEST_INDEX_NAME } from '@kbn/alerting-api-integration-helpers'; +import { ALERT_INSTANCE_ID, ALERT_RULE_UUID, ALERT_STATUS } from '@kbn/rule-data-utils'; +import { nodeBuilder } from '@kbn/es-query'; +import { Spaces } from '../../../scenarios'; +import { FtrProviderContext } from '../../../../common/ftr_provider_context'; +import { getUrlPrefix, getTestRuleData, ObjectRemover } from '../../../../common/lib'; + +const alertAsDataIndex = '.internal.alerts-observability.test.alerts.alerts-default-000001'; + +// eslint-disable-next-line import/no-default-export +export default function createDisableRuleTests({ getService }: FtrProviderContext) { + const es = getService('es'); + const retry = getService('retry'); + const supertest = getService('supertest'); + + describe('mutedAlerts', () => { + const objectRemover = new ObjectRemover(supertest); + + const createRule = async () => { + const { body: createdRule } = await supertest + .post(`${getUrlPrefix(Spaces.space1.id)}/api/alerting/rule`) + .set('kbn-xsrf', 'foo') + .send( + getTestRuleData({ + rule_type_id: 'test.always-firing-alert-as-data', + schedule: { interval: '24h' }, + throttle: undefined, + notify_when: undefined, + params: { + index: ES_TEST_INDEX_NAME, + reference: 'test', + }, + }) + ) + .expect(200); + + objectRemover.add(Spaces.space1.id, createdRule.id, 'rule', 'alerting'); + return createdRule.id; + }; + + const getAlerts = async () => { + const { + hits: { hits: alerts }, + } = await es.search({ + index: alertAsDataIndex, + body: { query: { match_all: {} } }, + }); + + return alerts; + }; + + afterEach(async () => { + await es.deleteByQuery({ + index: alertAsDataIndex, + query: { + match_all: {}, + }, + conflicts: 'proceed', + ignore_unavailable: true, + }); + await objectRemover.removeAll(); + }); + + it('should reflect muted alert instance ids in rule', async () => { + const createdRule1 = await createRule(); + const createdRule2 = await createRule(); + + let alerts: any[] = []; + + await retry.try(async () => { + alerts = await getAlerts(); + + expect(alerts.length).greaterThan(2); + alerts.forEach((activeAlert: any) => { + expect(activeAlert._source[ALERT_STATUS]).eql('active'); + }); + }); + + const alertFromRule1 = alerts.find( + (alert: any) => + alert._source[ALERT_STATUS] === 'active' && + alert._source[ALERT_RULE_UUID] === createdRule1 + ); + + await supertest + .post( + `${getUrlPrefix(Spaces.space1.id)}/api/alerting/rule/${encodeURIComponent( + createdRule1 + )}/alert/${encodeURIComponent(alertFromRule1._source['kibana.alert.instance.id'])}/_mute` + ) + .set('kbn-xsrf', 'foo') + .expect(204); + + const ruleUuids = [createdRule1, createdRule2]; + + const filterNode = nodeBuilder.or( + ruleUuids.map((id) => nodeBuilder.is('alert.id', `alert:${id}`)) + ); + const { body: rules } = await supertest + .post(`${getUrlPrefix(Spaces.space1.id)}/internal/alerting/rules/_find`) + .set('kbn-xsrf', 'foo') + .send({ + filter: JSON.stringify(filterNode), + fields: ['id', 'mutedInstanceIds'], + page: 1, + per_page: ruleUuids.length, + }); + + expect(rules.data.length).to.be(2); + const mutedRule = rules.data.find((rule: { id: string }) => rule.id === createdRule1); + expect(mutedRule.muted_alert_ids).to.contain(alertFromRule1._source[ALERT_INSTANCE_ID]); + }); + }); +} From 38aa404e4f00ce98b7d004255583c5ba35d36e54 Mon Sep 17 00:00:00 2001 From: Marco Liberati Date: Wed, 18 Dec 2024 14:32:15 +0100 Subject: [PATCH 38/60] [Core] Exclude js or map assets from event loop utilisation log (#203155) ## Summary Exclude `js` and `.js.map` assets from the logger. --- .../core/http/core-http-server-internal/src/http_server.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/core/http/core-http-server-internal/src/http_server.ts b/packages/core/http/core-http-server-internal/src/http_server.ts index 14cc4397ebce..1d80c9c4ab0d 100644 --- a/packages/core/http/core-http-server-internal/src/http_server.ts +++ b/packages/core/http/core-http-server-internal/src/http_server.ts @@ -93,7 +93,11 @@ function startEluMeasurement( if ( eluMonitorOptions.logging.enabled && active >= eluMonitorOptions.logging.threshold.ela && - utilization >= eluMonitorOptions.logging.threshold.elu + utilization >= eluMonitorOptions.logging.threshold.elu && + // static js and js.map assets are generating lots of noise for this + // event loop check, hiding endpoint slowness which are higher priority + // remove this check once endpoints slowness is addressed + !['js', 'js.map'].some((ext) => path.endsWith(ext)) ) { log.warn( `Event loop utilization for ${path} exceeded threshold of ${elaThreshold}ms (${Math.round( From ce8fa36111f9a74588b824f8a405bf827c8f68dc Mon Sep 17 00:00:00 2001 From: Julia Date: Wed, 18 Dec 2024 14:40:38 +0100 Subject: [PATCH 39/60] [ResponseOps][Cases] Fill working alert status with updated at time (#204282) Fixes: https://github.com/elastic/kibana/issues/192252 ### How to test: I've created a rule in Security Solution which triggers alerts. After attached couple alerts to the case. Then I've closed case, so status alerts will be closed as well so I can filter out them from other alerts. After I checked if they have filled `kibana.alert.workflow_status_updated_at` column. ![Screenshot 2024-12-16 at 09 57 16](https://github.com/user-attachments/assets/b090e5f6-4aca-4c7f-8367-9cc2ba4412e8) ### Checklist Check the PR satisfies following conditions. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --- .../server/services/alerts/index.test.ts | 31 ++++++++++++++----- .../cases/server/services/alerts/index.ts | 8 +++-- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/x-pack/plugins/cases/server/services/alerts/index.test.ts b/x-pack/plugins/cases/server/services/alerts/index.test.ts index a18681c6478a..450efd67c9e1 100644 --- a/x-pack/plugins/cases/server/services/alerts/index.test.ts +++ b/x-pack/plugins/cases/server/services/alerts/index.test.ts @@ -16,11 +16,19 @@ describe('updateAlertsStatus', () => { const alertsClient = alertsClientMock.create(); let alertService: AlertService; - beforeEach(async () => { + beforeEach(() => { + jest.useFakeTimers(); + jest.setSystemTime(new Date('2022-02-21T17:35:00Z')); + alertService = new AlertService(esClient, logger, alertsClient); jest.clearAllMocks(); }); + afterEach(() => { + jest.runOnlyPendingTimers(); + jest.useRealTimers(); + }); + describe('happy path', () => { it('updates the status of the alert correctly', async () => { const args = [{ id: 'alert-id-1', index: '.siem-signals', status: CaseStatuses.closed }]; @@ -41,7 +49,8 @@ describe('updateAlertsStatus', () => { "script": Object { "lang": "painless", "source": "if (ctx._source['kibana.alert.workflow_status'] != null) { - ctx._source['kibana.alert.workflow_status'] = 'closed' + ctx._source['kibana.alert.workflow_status'] = 'closed'; + ctx._source['kibana.alert.workflow_status_updated_at'] = '2022-02-21T17:35:00.000Z'; } if (ctx._source.signal != null && ctx._source.signal.status != null) { ctx._source.signal.status = 'closed' @@ -80,7 +89,8 @@ describe('updateAlertsStatus', () => { "script": Object { "lang": "painless", "source": "if (ctx._source['kibana.alert.workflow_status'] != null) { - ctx._source['kibana.alert.workflow_status'] = 'closed' + ctx._source['kibana.alert.workflow_status'] = 'closed'; + ctx._source['kibana.alert.workflow_status_updated_at'] = '2022-02-21T17:35:00.000Z'; } if (ctx._source.signal != null && ctx._source.signal.status != null) { ctx._source.signal.status = 'closed' @@ -115,7 +125,8 @@ describe('updateAlertsStatus', () => { "script": Object { "lang": "painless", "source": "if (ctx._source['kibana.alert.workflow_status'] != null) { - ctx._source['kibana.alert.workflow_status'] = 'acknowledged' + ctx._source['kibana.alert.workflow_status'] = 'acknowledged'; + ctx._source['kibana.alert.workflow_status_updated_at'] = '2022-02-21T17:35:00.000Z'; } if (ctx._source.signal != null && ctx._source.signal.status != null) { ctx._source.signal.status = 'acknowledged' @@ -154,7 +165,8 @@ describe('updateAlertsStatus', () => { "script": Object { "lang": "painless", "source": "if (ctx._source['kibana.alert.workflow_status'] != null) { - ctx._source['kibana.alert.workflow_status'] = 'closed' + ctx._source['kibana.alert.workflow_status'] = 'closed'; + ctx._source['kibana.alert.workflow_status_updated_at'] = '2022-02-21T17:35:00.000Z'; } if (ctx._source.signal != null && ctx._source.signal.status != null) { ctx._source.signal.status = 'closed' @@ -183,7 +195,8 @@ describe('updateAlertsStatus', () => { "script": Object { "lang": "painless", "source": "if (ctx._source['kibana.alert.workflow_status'] != null) { - ctx._source['kibana.alert.workflow_status'] = 'open' + ctx._source['kibana.alert.workflow_status'] = 'open'; + ctx._source['kibana.alert.workflow_status_updated_at'] = '2022-02-21T17:35:00.000Z'; } if (ctx._source.signal != null && ctx._source.signal.status != null) { ctx._source.signal.status = 'open' @@ -222,7 +235,8 @@ describe('updateAlertsStatus', () => { "script": Object { "lang": "painless", "source": "if (ctx._source['kibana.alert.workflow_status'] != null) { - ctx._source['kibana.alert.workflow_status'] = 'closed' + ctx._source['kibana.alert.workflow_status'] = 'closed'; + ctx._source['kibana.alert.workflow_status_updated_at'] = '2022-02-21T17:35:00.000Z'; } if (ctx._source.signal != null && ctx._source.signal.status != null) { ctx._source.signal.status = 'closed' @@ -251,7 +265,8 @@ describe('updateAlertsStatus', () => { "script": Object { "lang": "painless", "source": "if (ctx._source['kibana.alert.workflow_status'] != null) { - ctx._source['kibana.alert.workflow_status'] = 'open' + ctx._source['kibana.alert.workflow_status'] = 'open'; + ctx._source['kibana.alert.workflow_status_updated_at'] = '2022-02-21T17:35:00.000Z'; } if (ctx._source.signal != null && ctx._source.signal.status != null) { ctx._source.signal.status = 'open' diff --git a/x-pack/plugins/cases/server/services/alerts/index.ts b/x-pack/plugins/cases/server/services/alerts/index.ts index 50a8e286cea4..94694b7f243b 100644 --- a/x-pack/plugins/cases/server/services/alerts/index.ts +++ b/x-pack/plugins/cases/server/services/alerts/index.ts @@ -10,7 +10,10 @@ import { isEmpty } from 'lodash'; import type { ElasticsearchClient, Logger } from '@kbn/core/server'; import type { STATUS_VALUES } from '@kbn/rule-registry-plugin/common/technical_rule_data_field_names'; -import { ALERT_WORKFLOW_STATUS } from '@kbn/rule-registry-plugin/common/technical_rule_data_field_names'; +import { + ALERT_WORKFLOW_STATUS, + ALERT_WORKFLOW_STATUS_UPDATED_AT, +} from '@kbn/rule-registry-plugin/common/technical_rule_data_field_names'; import type { MgetResponse } from '@elastic/elasticsearch/lib/api/types'; import type { AlertsClient } from '@kbn/rule-registry-plugin/server'; import type { PublicMethodsOf } from '@kbn/utility-types'; @@ -169,7 +172,8 @@ export class AlertService { body: { script: { source: `if (ctx._source['${ALERT_WORKFLOW_STATUS}'] != null) { - ctx._source['${ALERT_WORKFLOW_STATUS}'] = '${status}' + ctx._source['${ALERT_WORKFLOW_STATUS}'] = '${status}'; + ctx._source['${ALERT_WORKFLOW_STATUS_UPDATED_AT}'] = '${new Date().toISOString()}'; } if (ctx._source.signal != null && ctx._source.signal.status != null) { ctx._source.signal.status = '${status}' From e991e6e8bcd58548341031ac6cf6d26494f92b59 Mon Sep 17 00:00:00 2001 From: Bryce Buchanan <75274611+bryce-b@users.noreply.github.com> Date: Wed, 18 Dec 2024 05:43:16 -0800 Subject: [PATCH 40/60] [EUI][INFRA] Updated hardcoded colors (#204133) ## Summary This PR replaces a couple of places where hardcoded colors are used in the Infra portion of Kibana with EUITheme colors. ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) ### Details Below are before and after screenshots: #### Inventory History ##### Before inventory history before ##### After Screenshot 2024-12-12 at 13 05 45 #### Alert Threshold & Alert Range annotation ##### Before Screenshot 2024-12-11 at 14 10 54 ##### After Screenshot 2024-12-12 at 12 58 32 --- .../threhsold_chart/create_lens_definition.ts | 2 +- .../alert_details_app_section.test.tsx.snap | 2 +- .../components/alert_details_app_section.tsx | 3 +-- .../inventory_view/components/timeline/timeline.tsx | 12 ++++++++---- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/x-pack/plugins/observability_solution/infra/public/alerting/log_threshold/components/alert_details_app_section/components/threhsold_chart/create_lens_definition.ts b/x-pack/plugins/observability_solution/infra/public/alerting/log_threshold/components/alert_details_app_section/components/threhsold_chart/create_lens_definition.ts index ab3bc5f72bbf..a6feb02a2bc6 100644 --- a/x-pack/plugins/observability_solution/infra/public/alerting/log_threshold/components/alert_details_app_section/components/threhsold_chart/create_lens_definition.ts +++ b/x-pack/plugins/observability_solution/infra/public/alerting/log_threshold/components/alert_details_app_section/components/threhsold_chart/create_lens_definition.ts @@ -78,7 +78,7 @@ function createBaseLensDefinition( yConfig: [ { forAccessor: '607b2253-ed20-4f0a-bf62-07a1f846cca4', - color: '#6092c0', + color: euiTheme.colors.vis.euiColorVis2, }, ], }, diff --git a/x-pack/plugins/observability_solution/infra/public/alerting/metric_threshold/components/__snapshots__/alert_details_app_section.test.tsx.snap b/x-pack/plugins/observability_solution/infra/public/alerting/metric_threshold/components/__snapshots__/alert_details_app_section.test.tsx.snap index af8a5b3d8e0a..0df66d4c3dca 100644 --- a/x-pack/plugins/observability_solution/infra/public/alerting/metric_threshold/components/__snapshots__/alert_details_app_section.test.tsx.snap +++ b/x-pack/plugins/observability_solution/infra/public/alerting/metric_threshold/components/__snapshots__/alert_details_app_section.test.tsx.snap @@ -17,7 +17,7 @@ Array [ "type": "manual", }, Object { - "color": "#F04E9833", + "color": "rgba(189,39,30,0.2)", "id": "metric_threshold_active_alert_range_annotation", "key": Object { "endTimestamp": "2024-06-13T07:00:33.381Z", diff --git a/x-pack/plugins/observability_solution/infra/public/alerting/metric_threshold/components/alert_details_app_section.tsx b/x-pack/plugins/observability_solution/infra/public/alerting/metric_threshold/components/alert_details_app_section.tsx index 8f3e22c5b8a8..b23bfe38d1d3 100644 --- a/x-pack/plugins/observability_solution/infra/public/alerting/metric_threshold/components/alert_details_app_section.tsx +++ b/x-pack/plugins/observability_solution/infra/public/alerting/metric_threshold/components/alert_details_app_section.tsx @@ -18,7 +18,6 @@ import { transparentize, useEuiTheme, } from '@elastic/eui'; -import chroma from 'chroma-js'; import { RuleConditionChart, TopAlert } from '@kbn/observability-plugin/public'; import { ALERT_END, ALERT_START, ALERT_EVALUATION_VALUES, ALERT_GROUP } from '@kbn/rule-data-utils'; @@ -90,7 +89,7 @@ export function AlertDetailsAppSection({ alert, rule }: AppSectionProps) { timestamp: alertStart!, endTimestamp: alertEnd ?? moment().toISOString(), }, - color: chroma(transparentize('#F04E981A', 0.2)).hex().toUpperCase(), + color: transparentize(euiTheme.colors.danger, 0.2), id: `metric_threshold_${alertEnd ? 'recovered' : 'active'}_alert_range_annotation`, }; diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/timeline/timeline.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/timeline/timeline.tsx index 0697b05205fe..a40bab58d70f 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/timeline/timeline.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/timeline/timeline.tsx @@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import moment from 'moment'; import { first, last } from 'lodash'; -import { EuiLoadingChart, EuiText, EuiEmptyPrompt, EuiButton } from '@elastic/eui'; +import { EuiLoadingChart, EuiText, EuiEmptyPrompt, EuiButton, useEuiTheme } from '@elastic/eui'; import { Axis, Chart, @@ -56,7 +56,7 @@ export const Timeline: React.FC = ({ interval, yAxisFormatter, isVisible const { metric, nodeType, accountId, region } = useWaffleOptionsContext(); const { currentTime, jumpToTime, stopAutoReload } = useWaffleTimeContext(); const { filterQueryAsJson } = useWaffleFiltersContext(); - + const { euiTheme } = useEuiTheme(); const chartTheme = useTimelineChartTheme(); const { loading, error, startTime, endTime, timeseries, reload } = useTimeline( @@ -238,7 +238,11 @@ export const Timeline: React.FC = ({ interval, yAxisFormatter, isVisible @@ -261,7 +265,7 @@ export const Timeline: React.FC = ({ interval, yAxisFormatter, isVisible dataValues={generateAnnotationData( anomalies.map((a) => [a.startTime, a.influencers]) )} - style={{ fill: '#D36086' }} + style={{ fill: euiTheme.colors.backgroundFilledAccent }} /> )} Date: Wed, 18 Dec 2024 14:49:57 +0100 Subject: [PATCH 41/60] [ML] EUI Visual Refresh (tokens) (#203518) ## Summary Part of #199715 (EUI Visual Refresh). Recommend to review with white-space diff disabled: https://github.com/elastic/kibana/pull/203518/files?w=1 - All references to renamed tokens have been updated to use the new token name. - All usage of color palette tokens and functions now pull from the theme, and correctly update to use new colors when the theme changes from Borealis to Amsterdam and vice versa. - Migrated some data visualizer related SCSS to emotion, part of #140695. - It makes use of EUI's own `useEuiTheme()` instead of our own hook variants. So this gets rid of `useCurrentEuiThemeVars()`, `useFieldStatsFlyoutThemeVars()`, `useCurrentEuiTheme()`, `useCurrentThemeVars()`. - Renamed components used to edit Anomaly Detection jobs from `JobDetails`, `Detectors`, `Datafeed` to `EditJobDetailsTab`, `EditDetectorsTab`, `EditDatafeedTab` to make them less ambiguous. - Added unit tests for `ner_output.tsx`. - Adds checks to pick `euiColorVis*` colors suitable for the theme. ---- Some of our code used colors like `euiColorVis5_behindText`. In Borealis `*_behindText` is no longer available since the original colors like `euiColorVis5` have been updated to be suitable to be used behind text. For that reason and for simplicity's sake I removed the border from the custom badges we use to render NER items: NER labels Amsterdam: ![CleanShot 2024-12-18 at 11 37 45@2x](https://github.com/user-attachments/assets/d82bca3a-2ad1-411a-94cd-748de6b4b0e9) NER labels Borealis: ![CleanShot 2024-12-18 at 11 38 45@2x](https://github.com/user-attachments/assets/36987779-fab2-4ad7-8e31-6853d48079a1) ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --- .../document_count_chart.tsx | 8 +- .../data_grid/hooks/use_column_chart.test.tsx | 92 ++- .../ml/data_grid/hooks/use_column_chart.tsx | 29 +- .../private/ml/data_grid/tsconfig.json | 1 - .../field_stats_flyout_provider.tsx | 4 - .../field_stats_info_button.tsx | 20 +- .../option_list_popover_footer.tsx | 11 +- .../ml/field_stats_flyout/tsconfig.json | 3 - .../use_field_stats_flyout_context.ts | 17 - .../packages/private/ml/kibana_theme/index.ts | 2 +- .../private/ml/kibana_theme/src/hooks.ts | 11 - .../private/ml/kibana_theme/tsconfig.json | 1 - .../ml/aiops_log_rate_analysis/constants.ts | 14 +- .../ml/aiops_log_rate_analysis/index.ts | 2 +- .../public/application/_index.scss | 1 - .../application/common/components/_index.scss | 2 - .../document_count_chart.tsx | 10 +- .../common/components/link_card/link_card.tsx | 6 +- .../multi_select_picker.tsx | 8 +- .../common/components/stats_table/_index.scss | 2 - .../field_data_expanded_row/_index.scss | 1 - .../_number_content.scss | 4 - .../boolean_content.tsx | 12 +- .../field_data_expanded_row/ip_content.tsx | 10 +- .../keyword_content.tsx | 16 +- .../number_content.tsx | 33 +- .../field_data_expanded_row/use_bar_color.ts} | 14 +- .../components/field_data_row/_index.scss | 3 - .../data_visualizer_stats_table.tsx | 1 - .../stats_table/hooks/use_color_range.ts | 21 +- .../hooks/use_data_viz_chart_theme.ts | 18 +- .../components/top_values/_top_values.scss | 7 - .../components/top_values/top_values.tsx | 21 +- .../common/hooks/use_current_eui_theme.ts | 17 - .../data_drift/data_drift_overview_table.tsx | 11 +- .../data_drift/data_drift_page.tsx | 9 +- .../document_count_chart_singular.tsx | 8 +- .../data_drift/use_data_drift_colors.ts | 31 + .../components/about_panel/about_panel.tsx | 29 +- .../about_panel/welcome_content.tsx | 45 +- .../doc_count_chart/event_rate_chart.tsx | 45 +- .../components/file_contents/field_badge.tsx | 7 +- .../file_contents/use_text_parser.tsx | 9 +- .../components/import_summary/failures.tsx | 92 ++- .../file_data_visualizer.tsx | 1 - .../index_data_visualizer_esql.tsx | 10 +- .../index_data_visualizer_view.tsx | 6 +- .../search_panel/field_type_filter.tsx | 7 +- .../field_stats/field_stats_initializer.tsx | 19 +- .../index_data_visualizer.tsx | 1 - .../private/data_visualizer/tsconfig.json | 2 - .../components/wizard/wizard.tsx | 3 +- .../change_point_detection/fields_config.tsx | 3 +- .../field_stats_popover.tsx | 7 +- .../category_table/category_table.tsx | 13 +- .../category_table/table_header.tsx | 14 +- .../format_category.test.tsx | 2 +- .../log_categorization/format_category.tsx | 2 +- .../log_rate_analysis_content.tsx | 4 +- .../log_rate_analysis_info_popover.tsx | 8 +- .../log_rate_analysis_results_table.tsx | 9 +- .../use_columns.tsx | 8 +- .../mini_histogram/mini_histogram.tsx | 14 +- .../change_point_chart_initializer.tsx | 3 +- ...g_rate_analysis_embeddable_initializer.tsx | 5 +- .../pattern_analysis_initializer.tsx | 5 +- ...{use_eui_theme.ts => use_is_dark_theme.ts} | 7 +- .../plugins/shared/aiops/tsconfig.json | 1 - .../ml/common/util/group_color_utils.ts | 35 +- .../components/anomalies_table/links_menu.tsx | 5 +- .../chart_tooltip/chart_tooltip_styles.ts | 36 +- .../collapsible_panel/collapsible_panel.tsx | 10 +- .../collapsible_panel/panel_header_items.tsx | 15 +- .../color_range_legend/color_range_legend.tsx | 54 +- .../components/color_range_legend/index.ts | 1 - .../color_range_legend/use_color_range.ts | 24 +- .../influencers_list_styles.ts | 36 +- .../job_selector_badge/job_selector_badge.tsx | 5 +- .../ml_inference/components/test_pipeline.tsx | 5 +- .../create_calendar.tsx | 8 +- .../scatterplot_matrix.test.tsx | 7 - .../scatterplot_matrix/scatterplot_matrix.tsx | 34 +- .../scatterplot_matrix_vega_lite_spec.test.ts | 30 +- .../scatterplot_matrix_vega_lite_spec.ts | 29 +- .../application/contexts/kibana/index.ts | 1 - .../configuration_step_form.tsx | 1 - .../evaluate_panel.tsx | 5 +- .../get_roc_curve_chart_vega_lite_spec.tsx | 17 +- .../decision_path_chart.tsx | 80 +-- .../feature_importance_summary.tsx | 90 +-- .../pages/job_map/components/cytoscape.tsx | 14 +- .../job_map/components/cytoscape_options.tsx | 149 +++-- .../pages/job_map/components/legend.tsx | 73 ++- .../pages/job_map/job_map.tsx | 33 +- .../explorer/annotation_timeline.tsx | 26 +- .../swimlane_annotation_container.tsx | 23 +- .../explorer/swimlane_container.tsx | 24 +- .../datafeed_chart_flyout.tsx | 21 +- .../edit_job_flyout/edit_job_flyout.js | 10 +- .../{datafeed.js => edit_datafeed_tab.js} | 4 +- .../{detectors.js => edit_detectors_tab.js} | 4 +- ...job_details.js => edit_job_details_tab.js} | 12 +- .../components/edit_job_flyout/tabs/index.js | 6 +- .../components/job_group/job_group.tsx | 18 +- .../jobs_list_view/jobs_list_view.js | 6 + .../application/jobs/jobs_list/jobs.tsx | 3 + .../common/components/job_groups_input.tsx | 10 +- .../components/charts/common/settings.ts | 12 +- .../charts/event_rate_chart/overlay_range.tsx | 7 +- .../components/groups/groups_input.tsx | 10 +- .../new_job/pages/new_job/wizard_steps.tsx | 1 - .../new_job/recognize/components/job_item.tsx | 5 +- .../models/ner/ner_output.test.tsx | 76 +++ .../test_models/models/ner/ner_output.tsx | 107 +++- .../question_answering_output.tsx | 22 +- .../text_expansion/text_expansion_output.tsx | 16 +- .../forecasting_modal/forecasts_list.js | 7 +- .../application/timeseriesexplorer/styles.ts | 599 +++++++++--------- .../timeseriesexplorer_page.tsx | 8 +- .../plugins/shared/ml/public/maps/util.ts | 9 +- .../single_metric_viewer.tsx | 9 +- .../platform/plugins/shared/ml/tsconfig.json | 1 - .../classification_creation.ts | 35 +- .../outlier_detection_creation.ts | 14 +- .../ml/data_frame_analytics_creation.ts | 11 +- .../ml/data_frame_analytics_results.ts | 21 +- 126 files changed, 1574 insertions(+), 1222 deletions(-) delete mode 100644 x-pack/platform/plugins/private/data_visualizer/public/application/_index.scss delete mode 100644 x-pack/platform/plugins/private/data_visualizer/public/application/common/components/_index.scss delete mode 100644 x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/_index.scss delete mode 100644 x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/_index.scss delete mode 100644 x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/_number_content.scss rename x-pack/platform/plugins/{shared/ml/public/application/contexts/kibana/use_current_theme.ts => private/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/use_bar_color.ts} (50%) delete mode 100644 x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/components/field_data_row/_index.scss delete mode 100644 x-pack/platform/plugins/private/data_visualizer/public/application/common/components/top_values/_top_values.scss delete mode 100644 x-pack/platform/plugins/private/data_visualizer/public/application/common/hooks/use_current_eui_theme.ts create mode 100644 x-pack/platform/plugins/private/data_visualizer/public/application/data_drift/use_data_drift_colors.ts rename x-pack/platform/plugins/shared/aiops/public/hooks/{use_eui_theme.ts => use_is_dark_theme.ts} (65%) rename x-pack/platform/plugins/shared/ml/public/application/jobs/jobs_list/components/edit_job_flyout/tabs/{datafeed.js => edit_datafeed_tab.js} (98%) rename x-pack/platform/plugins/shared/ml/public/application/jobs/jobs_list/components/edit_job_flyout/tabs/{detectors.js => edit_detectors_tab.js} (96%) rename x-pack/platform/plugins/shared/ml/public/application/jobs/jobs_list/components/edit_job_flyout/tabs/{job_details.js => edit_job_details_tab.js} (96%) create mode 100644 x-pack/platform/plugins/shared/ml/public/application/model_management/test_models/models/ner/ner_output.test.tsx diff --git a/x-pack/platform/packages/private/ml/aiops_components/src/document_count_chart/document_count_chart.tsx b/x-pack/platform/packages/private/ml/aiops_components/src/document_count_chart/document_count_chart.tsx index 6e44f01cbbd6..5a6f45f6a6ba 100644 --- a/x-pack/platform/packages/private/ml/aiops_components/src/document_count_chart/document_count_chart.tsx +++ b/x-pack/platform/packages/private/ml/aiops_components/src/document_count_chart/document_count_chart.tsx @@ -28,6 +28,7 @@ import { getSnappedTimestamps, getSnappedWindowParameters, getWindowParametersForTrigger, + useLogRateAnalysisBarColors, type DocumentCountStatsChangePoint, type LogRateHistogramItem, type WindowParameters, @@ -198,6 +199,7 @@ export const DocumentCountChart: FC = (props) => { const { data, uiSettings, fieldFormats, charts } = dependencies; const chartBaseTheme = charts.theme.useChartsBaseTheme(); + const barColors = useLogRateAnalysisBarColors(); const xAxisFormatter = fieldFormats.deserialize({ id: 'date' }); const useLegacyTimeAxis = uiSettings.get('visualization:useLegacyTimeAxis', false); @@ -422,8 +424,10 @@ export const DocumentCountChart: FC = (props) => { const baselineBadgeMarginLeft = (mlBrushMarginLeft ?? 0) + (windowParametersAsPixels?.baselineMin ?? 0); - const barColor = barColorOverride ? [barColorOverride] : undefined; - const barHighlightColor = barHighlightColorOverride ? [barHighlightColorOverride] : ['orange']; + const barColor = barColorOverride ? [barColorOverride] : barColors.barColor; + const barHighlightColor = barHighlightColorOverride + ? [barHighlightColorOverride] + : [barColors.barHighlightColor]; return ( <> diff --git a/x-pack/platform/packages/private/ml/data_grid/hooks/use_column_chart.test.tsx b/x-pack/platform/packages/private/ml/data_grid/hooks/use_column_chart.test.tsx index 4b8191de1d87..09c118e4d262 100644 --- a/x-pack/platform/packages/private/ml/data_grid/hooks/use_column_chart.test.tsx +++ b/x-pack/platform/packages/private/ml/data_grid/hooks/use_column_chart.test.tsx @@ -10,6 +10,8 @@ import { render, renderHook } from '@testing-library/react'; import { KBN_FIELD_TYPES } from '@kbn/field-types'; +import type { EuiThemeComputed } from '@elastic/eui'; + import type { NumericChartData, OrdinalChartData, @@ -23,6 +25,10 @@ import { import { getFieldType, getLegendText, getXScaleType, useColumnChart } from './use_column_chart'; +const euiThemeMock = { + size: { base: '16px' }, +} as EuiThemeComputed; + describe('getFieldType()', () => { it('should return the Kibana field type for a given EUI data grid schema', () => { expect(getFieldType('text')).toBe('string'); @@ -103,63 +109,81 @@ describe('isUnsupportedChartData()', () => { describe('getLegendText()', () => { it('should return the chart legend text for unsupported chart types', () => { - expect(getLegendText(validUnsupportedChartData)).toBe('Chart not supported.'); + expect(getLegendText(validUnsupportedChartData, euiThemeMock)).toBe('Chart not supported.'); }); it('should return the chart legend text for empty datasets', () => { - expect(getLegendText(validNumericChartData)).toBe('0 documents contain field.'); + expect(getLegendText(validNumericChartData, euiThemeMock)).toBe('0 documents contain field.'); }); it('should return the chart legend text for boolean chart types', () => { const { getByText } = render( <> - {getLegendText({ - cardinality: 2, - data: [ - { key: 'true', key_as_string: 'true', doc_count: 10 }, - { key: 'false', key_as_string: 'false', doc_count: 20 }, - ], - id: 'the-id', - type: 'boolean', - })} + {getLegendText( + { + cardinality: 2, + data: [ + { key: 'true', key_as_string: 'true', doc_count: 10 }, + { key: 'false', key_as_string: 'false', doc_count: 20 }, + ], + id: 'the-id', + type: 'boolean', + }, + euiThemeMock + )} ); expect(getByText('true')).toBeInTheDocument(); expect(getByText('false')).toBeInTheDocument(); }); it('should return the chart legend text for ordinal chart data with less than max categories', () => { - expect(getLegendText({ ...validOrdinalChartData, data: [{ key: 'cat', doc_count: 10 }] })).toBe( - '10 categories' - ); + expect( + getLegendText( + { ...validOrdinalChartData, data: [{ key: 'cat', doc_count: 10 }] }, + euiThemeMock + ) + ).toBe('10 categories'); }); it('should return the chart legend text for ordinal chart data with more than max categories', () => { expect( - getLegendText({ - ...validOrdinalChartData, - cardinality: 30, - data: [{ key: 'cat', doc_count: 10 }], - }) + getLegendText( + { + ...validOrdinalChartData, + cardinality: 30, + data: [{ key: 'cat', doc_count: 10 }], + }, + euiThemeMock + ) ).toBe('top 20 of 30 categories'); }); it('should return the chart legend text for numeric datasets', () => { expect( - getLegendText({ - ...validNumericChartData, - data: [{ key: 1, doc_count: 10 }], - stats: [1, 100], - }) + getLegendText( + { + ...validNumericChartData, + data: [{ key: 1, doc_count: 10 }], + stats: [1, 100], + }, + euiThemeMock + ) ).toBe('1 - 100'); expect( - getLegendText({ - ...validNumericChartData, - data: [{ key: 1, doc_count: 10 }], - stats: [100, 100], - }) + getLegendText( + { + ...validNumericChartData, + data: [{ key: 1, doc_count: 10 }], + stats: [100, 100], + }, + euiThemeMock + ) ).toBe('100'); expect( - getLegendText({ - ...validNumericChartData, - data: [{ key: 1, doc_count: 10 }], - stats: [1.2345, 6.3456], - }) + getLegendText( + { + ...validNumericChartData, + data: [{ key: 1, doc_count: 10 }], + stats: [1.2345, 6.3456], + }, + euiThemeMock + ) ).toBe('1.23 - 6.35'); }); }); diff --git a/x-pack/platform/packages/private/ml/data_grid/hooks/use_column_chart.tsx b/x-pack/platform/packages/private/ml/data_grid/hooks/use_column_chart.tsx index f0ad27d46447..9292f17069e7 100644 --- a/x-pack/platform/packages/private/ml/data_grid/hooks/use_column_chart.tsx +++ b/x-pack/platform/packages/private/ml/data_grid/hooks/use_column_chart.tsx @@ -12,9 +12,13 @@ import { css } from '@emotion/react'; import useObservable from 'react-use/lib/useObservable'; -import { euiPaletteColorBlind, type EuiDataGridColumn } from '@elastic/eui'; +import { + useEuiTheme, + euiPaletteColorBlind, + type EuiDataGridColumn, + type EuiThemeComputed, +} from '@elastic/eui'; -import { euiThemeVars } from '@kbn/ui-theme'; import { i18n } from '@kbn/i18n'; import { KBN_FIELD_TYPES } from '@kbn/field-types'; @@ -29,14 +33,6 @@ import { isNumericChartData, isOrdinalChartData } from '../lib/field_histograms' import { NON_AGGREGATABLE } from '../lib/common'; import type { DataGridItem } from '../lib/types'; -const cssHistogramLegendBoolean = css({ - width: '100%', - // This was originally $euiButtonMinWidth, but that - // is no longer exported from the EUI package, - // so we're replicating it here inline. - minWidth: `calc(${euiThemeVars.euiSize} * 7)`, -}); - const cssTextAlignCenter = css({ textAlign: 'center', }); @@ -97,6 +93,7 @@ export const getFieldType = (schema: EuiDataGridColumn['schema']): KBN_FIELD_TYP type LegendText = string | JSX.Element; export const getLegendText = ( chartData: ChartData, + euiTheme: EuiThemeComputed, maxChartColumns = MAX_CHART_COLUMNS ): LegendText => { if (chartData.type === 'unsupported') { @@ -112,6 +109,14 @@ export const getLegendText = ( } if (chartData.type === 'boolean') { + const cssHistogramLegendBoolean = css({ + width: '100%', + // This was originally $euiButtonMinWidth, but that + // is no longer exported from the EUI package, + // so we're replicating it here inline. + minWidth: `calc(${euiTheme.size.base} * 7)`, + }); + return ( @@ -171,6 +176,8 @@ export const useColumnChart = ( columnType: EuiDataGridColumn, maxChartColumns?: number ): ColumnChart => { + const { euiTheme } = useEuiTheme(); + const fieldType = getFieldType(columnType.schema); const hoveredRow = useObservable(hoveredRow$); @@ -231,7 +238,7 @@ export const useColumnChart = ( return { data, - legendText: getLegendText(chartData, maxChartColumns), + legendText: getLegendText(chartData, euiTheme, maxChartColumns), xScaleType, }; }; diff --git a/x-pack/platform/packages/private/ml/data_grid/tsconfig.json b/x-pack/platform/packages/private/ml/data_grid/tsconfig.json index db1fefe7ccca..e2c0a8146855 100644 --- a/x-pack/platform/packages/private/ml/data_grid/tsconfig.json +++ b/x-pack/platform/packages/private/ml/data_grid/tsconfig.json @@ -28,7 +28,6 @@ "@kbn/ml-agg-utils", "@kbn/ml-error-utils", "@kbn/ml-data-frame-analytics-utils", - "@kbn/ui-theme", "@kbn/i18n-react", "@kbn/ml-is-populated-object", "@kbn/ml-date-picker", diff --git a/x-pack/platform/packages/private/ml/field_stats_flyout/field_stats_flyout_provider.tsx b/x-pack/platform/packages/private/ml/field_stats_flyout/field_stats_flyout_provider.tsx index 4e7a501140b0..16eb8a48798b 100644 --- a/x-pack/platform/packages/private/ml/field_stats_flyout/field_stats_flyout_provider.tsx +++ b/x-pack/platform/packages/private/ml/field_stats_flyout/field_stats_flyout_provider.tsx @@ -7,7 +7,6 @@ import type { PropsWithChildren, FC } from 'react'; import React, { useCallback, useState } from 'react'; -import type { ThemeServiceStart } from '@kbn/core-theme-browser'; import type { DataView } from '@kbn/data-plugin/common'; import type { FieldStatsServices } from '@kbn/unified-field-list/src/components/field_stats'; import type { TimeRange as TimeRangeMs } from '@kbn/ml-date-picker'; @@ -36,7 +35,6 @@ import { PopulatedFieldsCacheManager } from './populated_fields/populated_fields export type FieldStatsFlyoutProviderProps = PropsWithChildren<{ dataView: DataView; fieldStatsServices: FieldStatsServices; - theme: ThemeServiceStart; timeRangeMs?: TimeRangeMs; dslQuery?: FieldStatsProps['dslQuery']; disablePopulatedFields?: boolean; @@ -65,7 +63,6 @@ export const FieldStatsFlyoutProvider: FC = (prop const { dataView, fieldStatsServices, - theme, timeRangeMs, dslQuery, disablePopulatedFields = false, @@ -174,7 +171,6 @@ export const FieldStatsFlyoutProvider: FC = (prop fieldValue, timeRangeMs, populatedFields, - theme, }} > = (props) => { const { field, label, onButtonClick, disabled, isEmpty, hideTrigger } = props; - const theme = useFieldStatsFlyoutThemeVars(); - const themeVars = useCurrentEuiThemeVars(theme); + const { euiTheme } = useEuiTheme(); const emptyFieldMessage = isEmpty ? ' ' + @@ -100,7 +104,7 @@ export const FieldStatsInfoButton: FC = (props) => { disabled={disabled === true} size="xs" iconType="fieldStatistics" - css={{ color: isEmpty ? themeVars.euiTheme.euiColorDisabled : undefined }} + css={{ color: isEmpty ? euiTheme.colors.textDisabled : undefined }} onClick={(ev: React.MouseEvent) => { if (ev.type === 'click') { ev.currentTarget.focus(); @@ -127,12 +131,12 @@ export const FieldStatsInfoButton: FC = (props) => { {!hideTrigger ? ( diff --git a/x-pack/platform/packages/private/ml/field_stats_flyout/options_list_with_stats/option_list_popover_footer.tsx b/x-pack/platform/packages/private/ml/field_stats_flyout/options_list_with_stats/option_list_popover_footer.tsx index 0bed94223b0c..b1bdb9c3e07d 100644 --- a/x-pack/platform/packages/private/ml/field_stats_flyout/options_list_with_stats/option_list_popover_footer.tsx +++ b/x-pack/platform/packages/private/ml/field_stats_flyout/options_list_with_stats/option_list_popover_footer.tsx @@ -6,25 +6,26 @@ */ import React from 'react'; import type { FC } from 'react'; -import { EuiPopoverFooter, EuiSwitch, EuiProgress, useEuiBackgroundColor } from '@elastic/eui'; +import { EuiPopoverFooter, EuiSwitch, EuiProgress, useEuiTheme } from '@elastic/eui'; import { css } from '@emotion/react'; import { i18n } from '@kbn/i18n'; -import { euiThemeVars } from '@kbn/ui-theme'; export const OptionsListPopoverFooter: FC<{ showEmptyFields: boolean; setShowEmptyFields: (showEmptyFields: boolean) => void; isLoading?: boolean; }> = ({ showEmptyFields, setShowEmptyFields, isLoading }) => { + const { euiTheme } = useEuiTheme(); + return ( {isLoading ? ( diff --git a/x-pack/platform/packages/private/ml/field_stats_flyout/tsconfig.json b/x-pack/platform/packages/private/ml/field_stats_flyout/tsconfig.json index 33e65f0cebca..1de626e740fc 100644 --- a/x-pack/platform/packages/private/ml/field_stats_flyout/tsconfig.json +++ b/x-pack/platform/packages/private/ml/field_stats_flyout/tsconfig.json @@ -23,14 +23,11 @@ "@kbn/i18n", "@kbn/react-field", "@kbn/ml-anomaly-utils", - "@kbn/ml-kibana-theme", "@kbn/ml-data-grid", "@kbn/ml-string-hash", "@kbn/ml-is-populated-object", "@kbn/ml-query-utils", "@kbn/ml-is-defined", "@kbn/field-types", - "@kbn/ui-theme", - "@kbn/core-theme-browser", ] } diff --git a/x-pack/platform/packages/private/ml/field_stats_flyout/use_field_stats_flyout_context.ts b/x-pack/platform/packages/private/ml/field_stats_flyout/use_field_stats_flyout_context.ts index 121426352e6e..2e58dbb1361a 100644 --- a/x-pack/platform/packages/private/ml/field_stats_flyout/use_field_stats_flyout_context.ts +++ b/x-pack/platform/packages/private/ml/field_stats_flyout/use_field_stats_flyout_context.ts @@ -7,7 +7,6 @@ import { createContext, useContext } from 'react'; import type { TimeRange as TimeRangeMs } from '@kbn/ml-date-picker'; -import type { ThemeServiceStart } from '@kbn/core-theme-browser'; /** * Represents the properties for the MLJobWizardFieldStatsFlyout component. @@ -22,7 +21,6 @@ interface MLJobWizardFieldStatsFlyoutProps { fieldValue?: string | number; timeRangeMs?: TimeRangeMs; populatedFields?: Set; - theme?: ThemeServiceStart; } /** @@ -36,7 +34,6 @@ export const MLFieldStatsFlyoutContext = createContext {}, timeRangeMs: undefined, populatedFields: undefined, - theme: undefined, }); /** @@ -52,17 +49,3 @@ export function useFieldStatsFlyoutContext() { return fieldStatsFlyoutContext; } - -/** - * Retrieves the theme vars from the field stats flyout context. - * @returns The theme vars. - */ -export function useFieldStatsFlyoutThemeVars() { - const { theme } = useFieldStatsFlyoutContext(); - - if (!theme) { - throw new Error('theme must be provided in the MLFieldStatsFlyoutContext'); - } - - return theme; -} diff --git a/x-pack/platform/packages/private/ml/kibana_theme/index.ts b/x-pack/platform/packages/private/ml/kibana_theme/index.ts index 0bd52263c70f..daa5b6ad8964 100644 --- a/x-pack/platform/packages/private/ml/kibana_theme/index.ts +++ b/x-pack/platform/packages/private/ml/kibana_theme/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export { useIsDarkTheme, useCurrentEuiThemeVars, type EuiThemeType } from './src/hooks'; +export { useIsDarkTheme } from './src/hooks'; diff --git a/x-pack/platform/packages/private/ml/kibana_theme/src/hooks.ts b/x-pack/platform/packages/private/ml/kibana_theme/src/hooks.ts index ed156f56f025..68aa5bb4129a 100644 --- a/x-pack/platform/packages/private/ml/kibana_theme/src/hooks.ts +++ b/x-pack/platform/packages/private/ml/kibana_theme/src/hooks.ts @@ -8,11 +8,8 @@ import { useMemo } from 'react'; import { of } from 'rxjs'; import useObservable from 'react-use/lib/useObservable'; -import { euiDarkVars as euiThemeDark, euiLightVars as euiThemeLight } from '@kbn/ui-theme'; import type { ThemeServiceStart } from '@kbn/core-theme-browser'; -export type EuiThemeType = typeof euiThemeLight | typeof euiThemeDark; - const themeDefault = { darkMode: false }; /** @@ -28,11 +25,3 @@ export function useIsDarkTheme(theme: ThemeServiceStart): boolean { return darkMode; } - -/** - * Returns an EUI theme definition based on the currently applied theme. - */ -export function useCurrentEuiThemeVars(theme: ThemeServiceStart): { euiTheme: EuiThemeType } { - const isDarkMode = useIsDarkTheme(theme); - return useMemo(() => ({ euiTheme: isDarkMode ? euiThemeDark : euiThemeLight }), [isDarkMode]); -} diff --git a/x-pack/platform/packages/private/ml/kibana_theme/tsconfig.json b/x-pack/platform/packages/private/ml/kibana_theme/tsconfig.json index 263f34ba2758..1342e03481c5 100644 --- a/x-pack/platform/packages/private/ml/kibana_theme/tsconfig.json +++ b/x-pack/platform/packages/private/ml/kibana_theme/tsconfig.json @@ -14,7 +14,6 @@ "target/**/*" ], "kbn_references": [ - "@kbn/ui-theme", "@kbn/core-theme-browser", ] } diff --git a/x-pack/platform/packages/shared/ml/aiops_log_rate_analysis/constants.ts b/x-pack/platform/packages/shared/ml/aiops_log_rate_analysis/constants.ts index 2d915870ca12..6ae763ef4096 100644 --- a/x-pack/platform/packages/shared/ml/aiops_log_rate_analysis/constants.ts +++ b/x-pack/platform/packages/shared/ml/aiops_log_rate_analysis/constants.ts @@ -5,6 +5,8 @@ * 2.0. */ +import { useEuiTheme } from '@elastic/eui'; + /** Log rate analysis settings */ export const LOG_RATE_ANALYSIS_SETTINGS = { /** @@ -32,7 +34,17 @@ export const LOG_RATE_ANALYSIS_SETTINGS = { export const RANDOM_SAMPLER_SEED = 3867412; /** Highlighting color for charts */ -export const LOG_RATE_ANALYSIS_HIGHLIGHT_COLOR = 'orange'; +export const useLogRateAnalysisBarColors = () => { + const { euiTheme } = useEuiTheme(); + return { + barColor: euiTheme.flags.hasVisColorAdjustment + ? euiTheme.colors.vis.euiColorVis0 + : euiTheme.colors.vis.euiColorVis0, + barHighlightColor: euiTheme.flags.hasVisColorAdjustment + ? 'orange' + : euiTheme.colors.vis.euiColorVis8, + }; +}; /** */ export const EMBEDDABLE_LOG_RATE_ANALYSIS_TYPE = 'aiopsLogRateAnalysisEmbeddable' as const; diff --git a/x-pack/platform/packages/shared/ml/aiops_log_rate_analysis/index.ts b/x-pack/platform/packages/shared/ml/aiops_log_rate_analysis/index.ts index 15762c09684c..36041bbcca7c 100644 --- a/x-pack/platform/packages/shared/ml/aiops_log_rate_analysis/index.ts +++ b/x-pack/platform/packages/shared/ml/aiops_log_rate_analysis/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -export { LOG_RATE_ANALYSIS_HIGHLIGHT_COLOR } from './constants'; +export { useLogRateAnalysisBarColors } from './constants'; export { getLogRateAnalysisTypeForHistogram } from './get_log_rate_analysis_type_for_histogram'; export { LOG_RATE_ANALYSIS_TYPE, type LogRateAnalysisType } from './log_rate_analysis_type'; export type { LogRateHistogramItem } from './log_rate_histogram_item'; diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/_index.scss b/x-pack/platform/plugins/private/data_visualizer/public/application/_index.scss deleted file mode 100644 index ecc7a2fce1fa..000000000000 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/_index.scss +++ /dev/null @@ -1 +0,0 @@ -@import 'common/components/index'; diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/_index.scss b/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/_index.scss deleted file mode 100644 index 232cb369a1d0..000000000000 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/_index.scss +++ /dev/null @@ -1,2 +0,0 @@ -@import 'stats_table/index'; -@import 'top_values/top_values'; diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/document_count_content/document_count_chart/document_count_chart.tsx b/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/document_count_content/document_count_chart/document_count_chart.tsx index d6adf432fd57..75d000e8e8a4 100644 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/document_count_content/document_count_chart/document_count_chart.tsx +++ b/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/document_count_content/document_count_chart/document_count_chart.tsx @@ -7,7 +7,8 @@ import type { FC } from 'react'; import React, { useCallback, useMemo } from 'react'; -import { i18n } from '@kbn/i18n'; +import moment from 'moment'; + import type { BrushEndListener, ElementClickListener, @@ -15,12 +16,13 @@ import type { XYBrushEvent, } from '@elastic/charts'; import { Axis, HistogramBarSeries, Chart, Position, ScaleType, Settings } from '@elastic/charts'; -import moment from 'moment'; +import { useEuiTheme, EuiFlexGroup, EuiLoadingSpinner, EuiFlexItem } from '@elastic/eui'; + +import { i18n } from '@kbn/i18n'; import { getTimeZone } from '@kbn/visualization-utils'; import { MULTILAYER_TIME_AXIS_STYLE } from '@kbn/charts-plugin/common'; import type { LogRateHistogramItem } from '@kbn/aiops-log-rate-analysis'; -import { EuiFlexGroup, EuiLoadingSpinner, EuiFlexItem } from '@elastic/eui'; import { useDataVisualizerKibana } from '../../../../kibana_context'; interface Props { @@ -50,6 +52,7 @@ export const DocumentCountChart: FC = ({ interval, loading, }) => { + const { euiTheme } = useEuiTheme(); const { services: { data, uiSettings, fieldFormats, charts }, } = useDataVisualizerKibana(); @@ -154,6 +157,7 @@ export const DocumentCountChart: FC = ({ yAccessors={['value']} data={adjustedChartPoints} timeZone={timeZone} + color={euiTheme.colors.vis.euiColorVis0} yNice /> diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/link_card/link_card.tsx b/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/link_card/link_card.tsx index b65092514d59..501b7385fbf6 100644 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/link_card/link_card.tsx +++ b/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/link_card/link_card.tsx @@ -9,6 +9,7 @@ import type { FC } from 'react'; import React from 'react'; import { + useEuiTheme, EuiIcon, EuiText, EuiTitle, @@ -18,7 +19,6 @@ import { EuiLink, } from '@elastic/eui'; import type { EuiIconType } from '@elastic/eui/src/components/icon/icon'; -import { useCurrentEuiTheme } from '../../hooks/use_current_eui_theme'; export interface LinkCardProps { icon: EuiIconType | string; @@ -43,7 +43,7 @@ export const LinkCard: FC = ({ isDisabled, 'data-test-subj': dataTestSubj, }) => { - const euiTheme = useCurrentEuiTheme(); + const { euiTheme } = useEuiTheme(); const linkHrefAndOnClickProps = { ...(href ? { href } : {}), @@ -67,7 +67,7 @@ export const LinkCard: FC = ({ {...linkHrefAndOnClickProps} > - + diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/multi_select_picker/multi_select_picker.tsx b/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/multi_select_picker/multi_select_picker.tsx index feabb32ecadb..8c3c06ba08ce 100644 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/multi_select_picker/multi_select_picker.tsx +++ b/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/multi_select_picker/multi_select_picker.tsx @@ -6,6 +6,7 @@ */ import { + useEuiTheme, EuiFieldSearch, EuiFilterButton, EuiFilterGroup, @@ -21,7 +22,6 @@ import React, { useEffect, useState } from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; import type { SerializedStyles } from '@emotion/react'; import { css } from '@emotion/react'; -import { useCurrentEuiTheme } from '../../hooks/use_current_eui_theme'; export interface Option { name?: string | ReactNode; @@ -60,7 +60,7 @@ export const MultiSelectPicker: FC<{ postfix?: React.ReactElement; cssStyles?: MultiSelectPickerStyles; }> = ({ options, onChange, title, checkedOptions, dataTestSubj, postfix, cssStyles }) => { - const euiTheme = useCurrentEuiTheme(); + const { euiTheme } = useEuiTheme(); const [items, setItems] = useState(options); const [searchTerm, setSearchTerm] = useState(''); @@ -153,8 +153,8 @@ export const MultiSelectPicker: FC<{ flexDirection: 'row', color: item.disabled === true - ? euiTheme.euiColorDisabledText - : euiTheme.euiTextColor, + ? euiTheme.colors.textDisabled + : euiTheme.colors.textParagraph, }} data-test-subj={`${dataTestSubj}-option-${item.value}${ checked ? '-checked' : '' diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/_index.scss b/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/_index.scss deleted file mode 100644 index ccd38b8506a9..000000000000 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/_index.scss +++ /dev/null @@ -1,2 +0,0 @@ -@import 'components/field_data_expanded_row/index'; -@import 'components/field_data_row/index'; diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/_index.scss b/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/_index.scss deleted file mode 100644 index fdc591a140fe..000000000000 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/_index.scss +++ /dev/null @@ -1 +0,0 @@ -@import 'number_content'; diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/_number_content.scss b/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/_number_content.scss deleted file mode 100644 index 1f52b0763cdd..000000000000 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/_number_content.scss +++ /dev/null @@ -1,4 +0,0 @@ -.metricDistributionChartContainer { - padding-top: $euiSizeXS; - width: 100%; -} diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/boolean_content.tsx b/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/boolean_content.tsx index 669c48b1db8b..6be2d5e9fa28 100644 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/boolean_content.tsx +++ b/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/boolean_content.tsx @@ -7,20 +7,26 @@ import type { FC } from 'react'; import React, { useMemo } from 'react'; + import { EuiSpacer } from '@elastic/eui'; import { Axis, BarSeries, Chart, Settings, ScaleType, LEGACY_LIGHT_THEME } from '@elastic/charts'; import { FormattedMessage } from '@kbn/i18n-react'; import { roundToDecimalPlace } from '@kbn/ml-number-utils'; import { i18n } from '@kbn/i18n'; + import { TopValues } from '../../../top_values'; + import type { FieldDataRowProps } from '../../types/field_data_row'; -import { ExpandedRowFieldHeader } from '../expanded_row_field_header'; import { getTFPercentage } from '../../utils'; import { useDataVizChartTheme } from '../../hooks'; + +import { ExpandedRowFieldHeader } from '../expanded_row_field_header'; + import { DocumentStatsTable } from './document_stats'; import { ExpandedRowContent } from './expanded_row_content'; import { ExpandedRowPanel } from './expanded_row_panel'; +import { useBarColor } from './use_bar_color'; function getPercentLabel(value: number): string { if (value === 0) { @@ -41,6 +47,8 @@ function getFormattedValue(value: number, totalCount: number): string { const BOOLEAN_DISTRIBUTION_CHART_HEIGHT = 70; export const BooleanContent: FC = ({ config, onAddFilter }) => { + const barColor = useBarColor(); + const fieldFormat = 'fieldFormat' in config ? config.fieldFormat : undefined; const formattedPercentages = useMemo(() => getTFPercentage(config), [config]); const theme = useDataVizChartTheme(); @@ -54,7 +62,7 @@ export const BooleanContent: FC = ({ config, onAddFilter }) = diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/ip_content.tsx b/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/ip_content.tsx index 6baaf8e065d1..3cd12cb78a45 100644 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/ip_content.tsx +++ b/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/ip_content.tsx @@ -7,12 +7,18 @@ import type { FC } from 'react'; import React from 'react'; -import type { FieldDataRowProps } from '../../types/field_data_row'; + import { TopValues } from '../../../top_values'; + +import type { FieldDataRowProps } from '../../types/field_data_row'; + import { DocumentStatsTable } from './document_stats'; import { ExpandedRowContent } from './expanded_row_content'; +import { useBarColor } from './use_bar_color'; export const IpContent: FC = ({ config, onAddFilter }) => { + const barColor = useBarColor(); + const { stats } = config; if (stats === undefined) return null; const { count, sampleCount, cardinality } = stats; @@ -26,7 +32,7 @@ export const IpContent: FC = ({ config, onAddFilter }) => { )} diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/keyword_content.tsx b/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/keyword_content.tsx index ddca9193db2b..e2be5c86018c 100644 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/keyword_content.tsx +++ b/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/keyword_content.tsx @@ -7,16 +7,24 @@ import type { FC } from 'react'; import React, { useEffect, useState } from 'react'; + import type { EMSTermJoinConfig } from '@kbn/maps-plugin/public'; -import type { FieldDataRowProps } from '../../types/field_data_row'; -import { TopValues } from '../../../top_values'; + import { useDataVisualizerKibana } from '../../../../../kibana_context'; + +import { TopValues } from '../../../top_values'; + +import type { FieldDataRowProps } from '../../types/field_data_row'; + import { DocumentStatsTable } from './document_stats'; import { ExpandedRowContent } from './expanded_row_content'; import { ChoroplethMap } from './choropleth_map'; import { ErrorMessageContent } from './error_message'; +import { useBarColor } from './use_bar_color'; export const KeywordContent: FC = ({ config, onAddFilter }) => { + const barColor = useBarColor(); + const [suggestion, setSuggestion] = useState(null); const { stats, fieldName } = config; const fieldFormat = 'fieldFormat' in config ? config.fieldFormat : undefined; @@ -62,14 +70,14 @@ export const KeywordContent: FC = ({ config, onAddFilter }) = {config.stats?.sampledValues && fieldName !== undefined ? ( diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/number_content.tsx b/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/number_content.tsx index 8b121660e342..db0c2270fedb 100644 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/number_content.tsx +++ b/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/components/field_data_expanded_row/number_content.tsx @@ -7,20 +7,34 @@ import type { FC, ReactNode } from 'react'; import React, { useMemo } from 'react'; +import { css } from '@emotion/react'; + import type { HorizontalAlignment } from '@elastic/eui'; -import { EuiBasicTable, EuiFlexItem, EuiText, LEFT_ALIGNMENT, RIGHT_ALIGNMENT } from '@elastic/eui'; +import { + useEuiTheme, + EuiBasicTable, + EuiFlexItem, + EuiText, + LEFT_ALIGNMENT, + RIGHT_ALIGNMENT, +} from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { isDefined } from '@kbn/ml-is-defined'; -import type { FieldDataRowProps } from '../../types/field_data_row'; + +import { TopValues } from '../../../top_values'; import { kibanaFieldFormat, numberAsOrdinal } from '../../../utils'; + +import type { FieldDataRowProps } from '../../types/field_data_row'; + import { MetricDistributionChart, buildChartDataFromStats } from '../metric_distribution_chart'; -import { TopValues } from '../../../top_values'; import { ExpandedRowFieldHeader } from '../expanded_row_field_header'; + import { DocumentStatsTable } from './document_stats'; import { ExpandedRowContent } from './expanded_row_content'; import { ExpandedRowPanel } from './expanded_row_panel'; +import { useBarColor } from './use_bar_color'; const METRIC_DISTRIBUTION_CHART_WIDTH = 260; const METRIC_DISTRIBUTION_CHART_HEIGHT = 200; @@ -32,6 +46,13 @@ interface SummaryTableItem { } export const NumberContent: FC = ({ config, onAddFilter }) => { + const { euiTheme } = useEuiTheme(); + + const metricDistributionChartContainer = css({ + paddingTop: euiTheme.size.xs, + width: '100%', + }); + const { stats } = config; const distributionChartData = useMemo( @@ -39,6 +60,8 @@ export const NumberContent: FC = ({ config, onAddFilter }) => [stats?.distribution] ); + const barColor = useBarColor(); + if (stats === undefined) return null; const { min, median, max, distribution } = stats; const fieldFormat = 'fieldFormat' in config ? config.fieldFormat : undefined; @@ -119,7 +142,7 @@ export const NumberContent: FC = ({ config, onAddFilter }) => @@ -141,7 +164,7 @@ export const NumberContent: FC = ({ config, onAddFilter }) => - + { + const { euiTheme } = useEuiTheme(); + + return euiTheme.flags.hasVisColorAdjustment ? 'success' : 'vis0'; +}; diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/components/field_data_row/_index.scss b/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/components/field_data_row/_index.scss deleted file mode 100644 index 3afa182560e1..000000000000 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/components/field_data_row/_index.scss +++ /dev/null @@ -1,3 +0,0 @@ -.dataVisualizerColumnHeaderIcon { - max-width: $euiSizeM; -} diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/data_visualizer_stats_table.tsx b/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/data_visualizer_stats_table.tsx index e0e43efb694f..b4db9b26681e 100644 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/data_visualizer_stats_table.tsx +++ b/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/data_visualizer_stats_table.tsx @@ -41,7 +41,6 @@ import { BooleanContentPreview } from './components/field_data_row'; import { calculateTableColumnsDimensions } from './utils'; import { DistinctValues } from './components/field_data_row/distinct_values'; import { FieldTypeIcon } from '../field_type_icon'; -import './_index.scss'; import type { FieldStatisticTableEmbeddableProps } from '../../../index_data_visualizer/embeddables/grid_embeddable/types'; import type { DataVisualizerTableItem } from './types'; diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/hooks/use_color_range.ts b/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/hooks/use_color_range.ts index d230da125c13..b929ec9a557d 100644 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/hooks/use_color_range.ts +++ b/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/hooks/use_color_range.ts @@ -7,8 +7,7 @@ import d3 from 'd3'; import { i18n } from '@kbn/i18n'; -import { useCurrentEuiTheme } from '../../../hooks/use_current_eui_theme'; - +import { useEuiTheme } from '@elastic/eui'; /** * Custom color scale factory that takes the amount of feature influencers * into account to adjust the contrast of the color range. This is used for @@ -155,16 +154,24 @@ export const useColorRange = ( colorRangeScale = COLOR_RANGE_SCALE.LINEAR, featureCount = 1 ) => { - const euiTheme = useCurrentEuiTheme(); + const { euiTheme } = useEuiTheme(); const colorRanges: Record = { [COLOR_RANGE.BLUE]: [ - d3.rgb(euiTheme.euiColorEmptyShade).toString(), - d3.rgb(euiTheme.euiColorVis1).toString(), + d3.rgb(euiTheme.colors.emptyShade).toString(), + d3 + .rgb( + // Amsterdam: euiTheme.colors.vis.euiColorVis1 + // Borealis: euiTheme.colors.vis.euiColorVis2 + euiTheme.flags.hasVisColorAdjustment + ? euiTheme.colors.vis.euiColorVis1 + : euiTheme.colors.vis.euiColorVis2 + ) + .toString(), ], [COLOR_RANGE.RED]: [ - d3.rgb(euiTheme.euiColorEmptyShade).toString(), - d3.rgb(euiTheme.euiColorDanger).toString(), + d3.rgb(euiTheme.colors.emptyShade).toString(), + d3.rgb(euiTheme.colors.danger).toString(), ], [COLOR_RANGE.RED_GREEN]: ['red', 'green'], [COLOR_RANGE.GREEN_RED]: ['green', 'red'], diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/hooks/use_data_viz_chart_theme.ts b/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/hooks/use_data_viz_chart_theme.ts index 269c9b55fc3d..cf21569de6eb 100644 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/hooks/use_data_viz_chart_theme.ts +++ b/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/stats_table/hooks/use_data_viz_chart_theme.ts @@ -5,18 +5,22 @@ * 2.0. */ -import type { PartialTheme } from '@elastic/charts'; import { useMemo } from 'react'; -import { useCurrentEuiTheme } from '../../../hooks/use_current_eui_theme'; + +import type { PartialTheme } from '@elastic/charts'; +import { useEuiFontSize, useEuiTheme } from '@elastic/eui'; + export const useDataVizChartTheme = (): PartialTheme => { - const euiTheme = useCurrentEuiTheme(); + const { euiTheme } = useEuiTheme(); + const euiFontSizeXS = useEuiFontSize('xs', { unit: 'px' }).fontSize as string; const chartTheme = useMemo(() => { - const AREA_SERIES_COLOR = euiTheme.euiColorVis0; + // Amsterdam + Borealis + const AREA_SERIES_COLOR = euiTheme.colors.vis.euiColorVis0; return { axes: { tickLabel: { - fontSize: parseInt(euiTheme.euiFontSizeXS, 10), - fontFamily: euiTheme.euiFontFamily, + fontSize: parseInt(euiFontSizeXS, 10), + fontFamily: euiTheme.font.family, fontStyle: 'italic', }, }, @@ -50,6 +54,6 @@ export const useDataVizChartTheme = (): PartialTheme => { area: { visible: true, opacity: 1 }, }, }; - }, [euiTheme]); + }, [euiFontSizeXS, euiTheme]); return chartTheme; }; diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/top_values/_top_values.scss b/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/top_values/_top_values.scss deleted file mode 100644 index bb227dd24d48..000000000000 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/top_values/_top_values.scss +++ /dev/null @@ -1,7 +0,0 @@ -.fieldDataTopValuesContainer { - padding-top: $euiSizeXS; -} - -.topValuesValueLabelContainer { - margin-right: $euiSizeM; -} diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/top_values/top_values.tsx b/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/top_values/top_values.tsx index 35c648e7135b..d3337a7f676d 100644 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/top_values/top_values.tsx +++ b/x-pack/platform/plugins/private/data_visualizer/public/application/common/components/top_values/top_values.tsx @@ -34,7 +34,7 @@ import type { FieldVisStats } from '../../../../../common/types'; import { ExpandedRowPanel } from '../stats_table/components/field_data_expanded_row/expanded_row_panel'; import { EMPTY_EXAMPLE } from '../examples_list/examples_list'; -interface Props { +interface TopValuesProps { stats: FieldVisStats | undefined; fieldFormat?: any; barColor?: EuiProgressProps['color']; @@ -53,7 +53,7 @@ function getPercentLabel(percent: number): string { } } -export const TopValues: FC = ({ +export const TopValues: FC = ({ stats, fieldFormat, barColor, @@ -72,7 +72,11 @@ export const TopValues: FC = ({ data: { fieldFormats }, }, } = useDataVisualizerKibana(); - const euiTheme = useEuiTheme(); + const euiThemeContext = useEuiTheme(); + const { euiTheme } = euiThemeContext; + + const fieldDataTopValuesContainer = css({ paddingTop: euiTheme.size.xs }); + const topValuesValueLabelContainer = css({ marginRight: euiTheme.size.m }); if (stats === undefined || !stats.topValues) return null; const { fieldName, sampleCount, approximate } = stats; @@ -175,7 +179,7 @@ export const TopValues: FC = ({ className={classNames('dvPanel__wrapper', compressed ? 'dvPanel--compressed' : undefined)} css={css` overflow-x: auto; - ${euiScrollBarStyles(euiTheme)} + ${euiScrollBarStyles(euiThemeContext)} `} > @@ -194,7 +198,8 @@ export const TopValues: FC = ({
    {Array.isArray(topValues) ? topValues.map((value) => { @@ -210,7 +215,8 @@ export const TopValues: FC = ({ color={barColor} size="xs" label={value.key ? kibanaFieldFormat(value.key, fieldFormat) : displayValue} - className={classNames('eui-textTruncate', 'topValuesValueLabelContainer')} + className="eui-textTruncate" + css={topValuesValueLabelContainer} valueText={`${value.doc_count}${ totalDocuments !== undefined ? ` (${getPercentLabel(value.percent * 100)})` @@ -289,7 +295,8 @@ export const TopValues: FC = ({ defaultMessage="Other" /> } - className={classNames('eui-textTruncate', 'topValuesValueLabelContainer')} + className="eui-textTruncate" + css={topValuesValueLabelContainer} valueText={`${topValuesOtherCount}${ totalDocuments !== undefined ? ` (${getPercentLabel(topValuesOtherCountPercent * 100)})` diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/common/hooks/use_current_eui_theme.ts b/x-pack/platform/plugins/private/data_visualizer/public/application/common/hooks/use_current_eui_theme.ts deleted file mode 100644 index bd2500b1b77e..000000000000 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/common/hooks/use_current_eui_theme.ts +++ /dev/null @@ -1,17 +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 { useCurrentEuiThemeVars } from '@kbn/ml-kibana-theme'; -import { useDataVisualizerKibana } from '../../kibana_context'; - -export function useCurrentEuiTheme() { - const { - services: { theme }, - } = useDataVisualizerKibana(); - - return useCurrentEuiThemeVars(theme).euiTheme; -} diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/data_drift/data_drift_overview_table.tsx b/x-pack/platform/plugins/private/data_visualizer/public/application/data_drift/data_drift_overview_table.tsx index 7de413c74b4d..ddbc3d4e9efe 100644 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/data_drift/data_drift_overview_table.tsx +++ b/x-pack/platform/plugins/private/data_visualizer/public/application/data_drift/data_drift_overview_table.tsx @@ -20,12 +20,12 @@ import { import { FieldTypeIcon } from '../common/components/field_type_icon'; import { COLLAPSE_ROW, EXPAND_ROW } from '../../../common/i18n_constants'; import { COMPARISON_LABEL, REFERENCE_LABEL } from './constants'; -import { useCurrentEuiTheme } from '../common/hooks/use_current_eui_theme'; import { type DataDriftField, type Feature, FETCH_STATUS } from './types'; import { formatSignificanceLevel } from './data_drift_utils'; import { SingleDistributionChart } from './charts/single_distribution_chart'; import { OverlapDistributionComparison } from './charts/overlap_distribution_chart'; import { DataDriftDistributionChart } from './charts/data_drift_distribution_chart'; +import { useDataDriftColors } from './use_data_drift_colors'; const dataComparisonYesLabel = i18n.translate('xpack.dataVisualizer.dataDrift.fieldTypeYesLabel', { defaultMessage: 'Yes', @@ -47,15 +47,8 @@ export const DataDriftOverviewTable = ({ data: Feature[]; status: FETCH_STATUS; } & UseTableState) => { - const euiTheme = useCurrentEuiTheme(); + const colors = useDataDriftColors(); - const colors = useMemo( - () => ({ - referenceColor: euiTheme.euiColorVis2, - comparisonColor: euiTheme.euiColorVis1, - }), - [euiTheme] - ); const [itemIdToExpandedRowMap, setItemIdToExpandedRowMap] = useState>( {} ); diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/data_drift/data_drift_page.tsx b/x-pack/platform/plugins/private/data_visualizer/public/application/data_drift/data_drift_page.tsx index 4623e886852d..229290a1ace2 100644 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/data_drift/data_drift_page.tsx +++ b/x-pack/platform/plugins/private/data_visualizer/public/application/data_drift/data_drift_page.tsx @@ -45,7 +45,6 @@ import { useDataDriftStateManagerContext } from './use_state_manager'; import { useData } from '../common/hooks/use_data'; import type { DVKey, DVStorageMapped } from '../index_data_visualizer/types/storage'; import { DV_FROZEN_TIER_PREFERENCE } from '../index_data_visualizer/types/storage'; -import { useCurrentEuiTheme } from '../common/hooks/use_current_eui_theme'; import type { DataComparisonFullAppState } from './types'; import { getDefaultDataComparisonState } from './types'; import { useDataSource } from '../common/hooks/data_source_context'; @@ -55,6 +54,7 @@ import { COMPARISON_LABEL, REFERENCE_LABEL } from './constants'; import { SearchPanelContent } from '../index_data_visualizer/components/search_panel/search_bar'; import { useSearch } from '../common/hooks/use_search'; import { DocumentCountWithBrush } from './document_count_with_brush'; +import { useDataDriftColors } from './use_data_drift_colors'; const dataViewTitleHeader = css({ minWidth: '300px', @@ -264,12 +264,7 @@ export const DataDriftPage: FC = ({ initialSettings }) => { }); }, [dataService, searchQueryLanguage, searchString]); - const euiTheme = useCurrentEuiTheme(); - const colors = { - referenceColor: euiTheme.euiColorVis2, - comparisonColor: euiTheme.euiColorVis1, - overlapColor: '#490771', - }; + const colors = useDataDriftColors(); const [brushRanges, setBrushRanges] = useState(); diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/data_drift/document_count_chart_single_brush/document_count_chart_singular.tsx b/x-pack/platform/plugins/private/data_visualizer/public/application/data_drift/document_count_chart_single_brush/document_count_chart_singular.tsx index 94de2d2f4390..71b2cbdd3c2f 100644 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/data_drift/document_count_chart_single_brush/document_count_chart_singular.tsx +++ b/x-pack/platform/plugins/private/data_visualizer/public/application/data_drift/document_count_chart_single_brush/document_count_chart_singular.tsx @@ -19,6 +19,8 @@ import type { BarStyleAccessor, RectAnnotationSpec, } from '@elastic/charts/dist/chart_types/xy_chart/utils/specs'; +import { useEuiTheme } from '@elastic/eui'; + import { getTimeZone } from '@kbn/visualization-utils'; import { i18n } from '@kbn/i18n'; import type { IUiSettingsClient } from '@kbn/core/public'; @@ -27,10 +29,10 @@ import { MULTILAYER_TIME_AXIS_STYLE } from '@kbn/charts-plugin/common'; import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; import type { ChartsPluginStart } from '@kbn/charts-plugin/public'; import type { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; - import { DualBrushAnnotation } from '@kbn/aiops-components'; import { FormattedMessage } from '@kbn/i18n-react'; import { EuiText } from '@elastic/eui'; + import { SingleBrush, getSingleBrushWindowParameters, @@ -174,6 +176,8 @@ export const DocumentCountChartWithBrush: FC = (props) const { data, uiSettings, fieldFormats, charts } = dependencies; + const { euiTheme } = useEuiTheme(); + const chartBaseTheme = charts.theme.useChartsBaseTheme(); const xAxisFormatter = fieldFormats.deserialize({ id: 'date' }); @@ -374,7 +378,7 @@ export const DocumentCountChartWithBrush: FC = (props) mlBrushWidth && mlBrushWidth > 0; - const barColor = barColorOverride ? [barColorOverride] : undefined; + const barColor = barColorOverride ? [barColorOverride] : euiTheme.colors.vis.euiColorVis0; const barHighlightColor = barHighlightColorOverride ? [barHighlightColorOverride] : ['orange']; return ( diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/data_drift/use_data_drift_colors.ts b/x-pack/platform/plugins/private/data_visualizer/public/application/data_drift/use_data_drift_colors.ts new file mode 100644 index 000000000000..7d63ee4c7c25 --- /dev/null +++ b/x-pack/platform/plugins/private/data_visualizer/public/application/data_drift/use_data_drift_colors.ts @@ -0,0 +1,31 @@ +/* + * 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 { useMemo } from 'react'; + +import { useEuiTheme } from '@elastic/eui'; + +export const useDataDriftColors = () => { + const { euiTheme } = useEuiTheme(); + + return useMemo( + () => ({ + // Amsterdam: euiTheme.colors.vis.euiColorVis2 + // Borealis: euiTheme.colors.vis.euiColorVis4 + referenceColor: euiTheme.flags.hasVisColorAdjustment + ? euiTheme.colors.vis.euiColorVis2 + : euiTheme.colors.vis.euiColorVis4, + // Amsterdam: euiTheme.colors.vis.euiColorVis1 + // Borealis: euiTheme.colors.vis.euiColorVis2 + comparisonColor: euiTheme.flags.hasVisColorAdjustment + ? euiTheme.colors.vis.euiColorVis1 + : euiTheme.colors.vis.euiColorVis2, + overlapColor: '#490771', + }), + [euiTheme] + ); +}; diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/components/about_panel/about_panel.tsx b/x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/components/about_panel/about_panel.tsx index 64f08822617f..e76fbf6e6549 100644 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/components/about_panel/about_panel.tsx +++ b/x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/components/about_panel/about_panel.tsx @@ -5,12 +5,13 @@ * 2.0. */ +import React, { type FC, useMemo } from 'react'; +import { css } from '@emotion/react'; + +import { useEuiTheme } from '@elastic/eui'; + import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; -import { css } from '@emotion/react'; -import { euiThemeVars } from '@kbn/ui-theme'; -import type { FC } from 'react'; -import React from 'react'; import { EuiFlexGroup, @@ -30,14 +31,20 @@ interface Props { hasPermissionToImport: boolean; } -const aboutPanelContentStyle = css({ - '.euiFilePicker__icon': { - width: euiThemeVars.euiSizeXXL, - height: euiThemeVars.euiSizeXXL, - }, -}); - export const AboutPanel: FC = ({ onFilePickerChange, hasPermissionToImport }) => { + const { euiTheme } = useEuiTheme(); + + const aboutPanelContentStyle = useMemo( + () => + css({ + '.euiFilePicker__icon': { + width: euiTheme.size.xxl, + height: euiTheme.size.xxl, + }, + }), + [euiTheme] + ); + return ( diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/components/about_panel/welcome_content.tsx b/x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/components/about_panel/welcome_content.tsx index a5437ad49dc2..af821dce63dd 100644 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/components/about_panel/welcome_content.tsx +++ b/x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/components/about_panel/welcome_content.tsx @@ -5,33 +5,29 @@ * 2.0. */ -import { FormattedMessage } from '@kbn/i18n-react'; -import type { FC } from 'react'; -import React from 'react'; -import { euiThemeVars } from '@kbn/ui-theme'; +import React, { type FC, useMemo } from 'react'; import { css } from '@emotion/react'; -import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiSpacer, EuiText, EuiTitle } from '@elastic/eui'; - -import { useDataVisualizerKibana } from '../../../kibana_context'; +import { + useEuiTheme, + EuiFlexGroup, + EuiFlexItem, + EuiIcon, + EuiSpacer, + EuiText, + EuiTitle, +} from '@elastic/eui'; -const docIconStyle = css({ - marginLeft: euiThemeVars.euiSizeL, - marginTop: euiThemeVars.euiSizeXS, -}); +import { FormattedMessage } from '@kbn/i18n-react'; -const mainIconStyle = css({ - width: '96px', - height: '96px', - marginLeft: euiThemeVars.euiSizeXL, - marginRight: euiThemeVars.euiSizeL, -}); +import { useDataVisualizerKibana } from '../../../kibana_context'; interface Props { hasPermissionToImport: boolean; } export const WelcomeContent: FC = ({ hasPermissionToImport }) => { + const { euiTheme } = useEuiTheme(); const { services: { fileUpload: { getMaxBytesFormatted, getMaxTikaBytesFormatted }, @@ -40,6 +36,21 @@ export const WelcomeContent: FC = ({ hasPermissionToImport }) => { const maxFileSize = getMaxBytesFormatted(); const maxTikaFileSize = getMaxTikaBytesFormatted(); + const { docIconStyle, mainIconStyle } = useMemo(() => { + return { + docIconStyle: css({ + marginLeft: euiTheme.size.l, + marginTop: euiTheme.size.xs, + }), + mainIconStyle: css({ + width: '96px', + height: '96px', + marginLeft: euiTheme.size.xl, + marginRight: euiTheme.size.l, + }), + }; + }, [euiTheme]); + return ( diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/components/doc_count_chart/event_rate_chart.tsx b/x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/components/doc_count_chart/event_rate_chart.tsx index e8bde09ef24c..d60ab995d415 100644 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/components/doc_count_chart/event_rate_chart.tsx +++ b/x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/components/doc_count_chart/event_rate_chart.tsx @@ -5,8 +5,8 @@ * 2.0. */ -import type { FC } from 'react'; -import React from 'react'; +import React, { useMemo, type FC } from 'react'; + import type { PartialTheme } from '@elastic/charts'; import { HistogramBarSeries, @@ -16,10 +16,11 @@ import { Tooltip, TooltipType, } from '@elastic/charts'; +import { useEuiTheme } from '@elastic/eui'; + import { i18n } from '@kbn/i18n'; -import { euiLightVars } from '@kbn/ui-theme'; + import { Axes } from './axes'; -import { useCurrentEuiTheme } from '../../../common/hooks/use_current_eui_theme'; export interface LineChartPoint { time: number | string; @@ -33,23 +34,26 @@ interface Props { } export const EventRateChart: FC = ({ eventRateChartData, height, width }) => { - const { euiColorLightShade } = useCurrentEuiTheme(); - const theme: PartialTheme = { - scales: { histogramPadding: 0.2 }, - background: { - color: 'transparent', - }, - axes: { - gridLine: { - horizontal: { - stroke: euiColorLightShade, - }, - vertical: { - stroke: euiColorLightShade, + const { euiTheme } = useEuiTheme(); + const theme: PartialTheme = useMemo( + () => ({ + scales: { histogramPadding: 0.2 }, + background: { + color: 'transparent', + }, + axes: { + gridLine: { + horizontal: { + stroke: euiTheme.colors.lightShade, + }, + vertical: { + stroke: euiTheme.colors.lightShade, + }, }, }, - }, - }; + }), + [euiTheme] + ); return (
    = ({ eventRateChartData, height, width }) xAccessor={'time'} yAccessors={['value']} data={eventRateChartData} - color={euiLightVars.euiColorVis0} + // Amsterdam + Borealis + color={euiTheme.colors.vis.euiColorVis0} />
    diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/components/file_contents/field_badge.tsx b/x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/components/file_contents/field_badge.tsx index 55dea99a4042..4a9caf694872 100644 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/components/file_contents/field_badge.tsx +++ b/x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/components/file_contents/field_badge.tsx @@ -7,11 +7,10 @@ import type { FC } from 'react'; import React from 'react'; -import { EuiBadge, EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui'; +import { useEuiTheme, EuiBadge, EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui'; import { FieldIcon } from '@kbn/react-field'; import { i18n } from '@kbn/i18n'; import { getSupportedFieldType } from '../../../common/components/fields_stats_grid/get_field_names'; -import { useCurrentEuiTheme } from '../../../common/hooks/use_current_eui_theme'; interface Props { type: string | undefined; @@ -20,7 +19,9 @@ interface Props { } export const FieldBadge: FC = ({ type, value, name }) => { - const { euiColorLightestShade, euiColorLightShade } = useCurrentEuiTheme(); + const { euiTheme } = useEuiTheme(); + const euiColorLightestShade = euiTheme.colors.lightestShade; + const euiColorLightShade = euiTheme.colors.lightShade; const supportedType = getSupportedFieldType(type ?? 'unknown'); const tooltip = type ? i18n.translate('xpack.dataVisualizer.file.fileContents.fieldBadge.tooltip', { diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/components/file_contents/use_text_parser.tsx b/x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/components/file_contents/use_text_parser.tsx index 64684c758949..ba381d10af9b 100644 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/components/file_contents/use_text_parser.tsx +++ b/x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/components/file_contents/use_text_parser.tsx @@ -6,18 +6,17 @@ */ import React, { useMemo } from 'react'; -import { EuiText } from '@elastic/eui'; +import { useEuiTheme, EuiText } from '@elastic/eui'; import type { FindFileStructureResponse } from '@kbn/file-upload-plugin/common'; import { FieldBadge } from './field_badge'; import { useDataVisualizerKibana } from '../../../kibana_context'; -import { useCurrentEuiTheme } from '../../../common/hooks/use_current_eui_theme'; import { GrokHighlighter } from './grok_highlighter'; export function useGrokHighlighter() { const { services: { http }, } = useDataVisualizerKibana(); - const { euiSizeL } = useCurrentEuiTheme(); + const { euiTheme } = useEuiTheme(); const createLines = useMemo( () => @@ -56,7 +55,7 @@ export function useGrokHighlighter() { return ( {formattedWords} @@ -64,7 +63,7 @@ export function useGrokHighlighter() { ); }); }, - [euiSizeL, http] + [euiTheme, http] ); return createLines; diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/components/import_summary/failures.tsx b/x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/components/import_summary/failures.tsx index 2e29b081765c..15389fc404c7 100644 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/components/import_summary/failures.tsx +++ b/x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/components/import_summary/failures.tsx @@ -6,10 +6,9 @@ */ import { FormattedMessage } from '@kbn/i18n-react'; -import React, { Component } from 'react'; -import { euiThemeVars } from '@kbn/ui-theme'; +import React, { useState, type FC } from 'react'; -import { EuiAccordion, EuiPagination } from '@elastic/eui'; +import { useEuiTheme, EuiAccordion, EuiPagination } from '@elastic/eui'; import { css } from '@emotion/react'; const PAGE_SIZE = 100; @@ -22,63 +21,56 @@ export interface DocFailure { }; } -interface Props { +interface FailuresProps { failedDocs: DocFailure[]; } -interface State { - page: number; -} - const containerStyle = css({ maxHeight: '200px', overflowY: 'auto', }); -const errorStyle = css({ - color: euiThemeVars.euiColorDanger, -}); +export const Failures: FC = ({ failedDocs }) => { + const { euiTheme } = useEuiTheme(); -export class Failures extends Component { - state: State = { page: 0 }; + const [page, setPage] = useState(0); - _renderPaginationControl() { - return this.props.failedDocs.length > PAGE_SIZE ? ( - this.setState({ page })} - compressed - /> - ) : null; - } + const startIndex = page * PAGE_SIZE; + const endIndex = startIndex + PAGE_SIZE; - render() { - const startIndex = this.state.page * PAGE_SIZE; - const endIndex = startIndex + PAGE_SIZE; - return ( - + } + paddingSize="m" + > +
    + {failedDocs.length > PAGE_SIZE && ( + setPage(newPage)} + compressed /> - } - paddingSize="m" - > -
    - {this._renderPaginationControl()} - {this.props.failedDocs.slice(startIndex, endIndex).map(({ item, reason, doc }) => ( -
    -
    - {item}: {reason} -
    -
    {JSON.stringify(doc)}
    + )} + {failedDocs.slice(startIndex, endIndex).map(({ item, reason, doc }) => ( +
    +
    + {item}: {reason}
    - ))} -
    - - ); - } -} +
    {JSON.stringify(doc)}
    +
    + ))} +
    + + ); +}; diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/file_data_visualizer.tsx b/x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/file_data_visualizer.tsx index 6289a73e2a66..c8dbb53d68f4 100644 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/file_data_visualizer.tsx +++ b/x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/file_data_visualizer.tsx @@ -4,7 +4,6 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import '../_index.scss'; import type { FC, PropsWithChildren } from 'react'; import React from 'react'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_esql.tsx b/x-pack/platform/plugins/private/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_esql.tsx index 5953144e715f..2f601498c848 100644 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_esql.tsx +++ b/x-pack/platform/plugins/private/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_esql.tsx @@ -16,6 +16,7 @@ import { ESQLLangEditor } from '@kbn/esql/public'; import type { AggregateQuery } from '@kbn/es-query'; import { + useEuiTheme, useEuiBreakpoint, useIsWithinMaxBreakpoint, EuiFlexGroup, @@ -29,7 +30,6 @@ import { import type { DataView } from '@kbn/data-views-plugin/common'; import { getIndexPatternFromESQLQuery } from '@kbn/esql-utils'; import { getOrCreateDataViewByIndexPattern } from '../../search_strategy/requests/get_data_view_by_index_pattern'; -import { useCurrentEuiTheme } from '../../../common/hooks/use_current_eui_theme'; import { DATA_VISUALIZER_INDEX_VIEWER } from '../../constants/index_data_visualizer_viewer'; import { useDataVisualizerKibana } from '../../../kibana_context'; import type { GetAdditionalLinks } from '../../../common/components/results_links'; @@ -58,7 +58,7 @@ const DEFAULT_ESQL_QUERY = { esql: '' }; export const IndexDataVisualizerESQL: FC = (dataVisualizerProps) => { const { services } = useDataVisualizerKibana(); const { data } = services; - const euiTheme = useCurrentEuiTheme(); + const { euiTheme } = useEuiTheme(); // Query that has been typed, but has not submitted with cmd + enter const [localQuery, setLocalQuery] = useState(DEFAULT_ESQL_QUERY); @@ -281,9 +281,9 @@ export const IndexDataVisualizerESQL: FC = (dataVi grow={false} data-test-subj="DataVisualizerESQLEditor" css={css({ - borderTop: euiTheme.euiBorderThin, - borderLeft: euiTheme.euiBorderThin, - borderRight: euiTheme.euiBorderThin, + borderTop: euiTheme.border.thin, + borderLeft: euiTheme.border.thin, + borderRight: euiTheme.border.thin, })} > = (dataVisualizerProps) => { - const euiTheme = useCurrentEuiTheme(); + const { euiTheme } = useEuiTheme(); const [savedRandomSamplerPreference, saveRandomSamplerPreference] = useStorage< DVKey, @@ -520,7 +520,7 @@ export const IndexDataVisualizerView: FC = (dataVi data-test-subj="dataViewTitleHeader" direction="row" alignItems="center" - css={{ padding: `${euiTheme.euiSizeS} 0`, marginRight: `${euiTheme.euiSize}` }} + css={{ padding: `${euiTheme.size.s} 0`, marginRight: `${euiTheme.size.base}` }} >

    {currentDataView.getName()}

    diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/index_data_visualizer/components/search_panel/field_type_filter.tsx b/x-pack/platform/plugins/private/data_visualizer/public/application/index_data_visualizer/components/search_panel/field_type_filter.tsx index 2c9faf9d9a85..b7e3790620e3 100644 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/index_data_visualizer/components/search_panel/field_type_filter.tsx +++ b/x-pack/platform/plugins/private/data_visualizer/public/application/index_data_visualizer/components/search_panel/field_type_filter.tsx @@ -7,11 +7,10 @@ import type { FC } from 'react'; import React, { useMemo } from 'react'; -import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import { useEuiTheme, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { css } from '@emotion/react'; import { getFieldTypeName } from '@kbn/field-utils'; -import { useCurrentEuiTheme } from '../../../common/hooks/use_current_eui_theme'; import { FieldTypesHelpPopover } from '../../../common/components/field_types_filter/field_types_help_popover'; import { FieldTypeIcon } from '../../../common/components/field_type_icon'; import type { Option } from '../../../common/components/multi_select_picker'; @@ -22,7 +21,7 @@ export const DataVisualizerFieldTypeFilter: FC<{ setVisibleFieldTypes(q: string[]): void; visibleFieldTypes: string[]; }> = ({ indexedFieldTypes, setVisibleFieldTypes, visibleFieldTypes }) => { - const euiTheme = useCurrentEuiTheme(); + const { euiTheme } = useEuiTheme(); const options: Option[] = useMemo(() => { return indexedFieldTypes.map((indexedFieldName) => { const label = getFieldTypeName(indexedFieldName) ?? indexedFieldName; @@ -61,7 +60,7 @@ export const DataVisualizerFieldTypeFilter: FC<{ postfix={} cssStyles={{ filterGroup: css` - margin-left: ${euiTheme.euiSizeS}; + margin-left: ${euiTheme.size.s}; `, }} /> diff --git a/x-pack/platform/plugins/private/data_visualizer/public/application/index_data_visualizer/embeddables/field_stats/field_stats_initializer.tsx b/x-pack/platform/plugins/private/data_visualizer/public/application/index_data_visualizer/embeddables/field_stats/field_stats_initializer.tsx index eb829e9a20cd..4f53fc389140 100644 --- a/x-pack/platform/plugins/private/data_visualizer/public/application/index_data_visualizer/embeddables/field_stats/field_stats_initializer.tsx +++ b/x-pack/platform/plugins/private/data_visualizer/public/application/index_data_visualizer/embeddables/field_stats/field_stats_initializer.tsx @@ -6,6 +6,8 @@ */ import { + mathWithUnits, + useEuiTheme, EuiButton, EuiButtonEmpty, EuiCodeBlock, @@ -28,7 +30,6 @@ import React, { useMemo, useState, useCallback } from 'react'; import { ENABLE_ESQL, getESQLAdHocDataview } from '@kbn/esql-utils'; import type { AggregateQuery } from '@kbn/es-query'; import { css } from '@emotion/react'; -import { euiThemeVars } from '@kbn/ui-theme'; import { useDataVisualizerKibana } from '../../../kibana_context'; import { FieldStatsESQLEditor } from './field_stats_esql_editor'; import type { @@ -61,6 +62,12 @@ export const FieldStatisticsInitializer: FC = ({ onPreview, isNewPanel, }) => { + const euiContext = useEuiTheme(); + const { euiTheme } = euiContext; + + // FIXME: add a token for this on euiTheme.components. https://github.com/elastic/eui/issues/8217 + const formMaxWidth = mathWithUnits(euiTheme.size.base, (x) => x * 25); + const { data: { dataViews }, unifiedSearch: { @@ -130,7 +137,7 @@ export const FieldStatisticsInitializer: FC = ({ hasBorder={true} css={css` pointer-events: auto; - background-color: ${euiThemeVars.euiColorEmptyShade}; + background-color: ${euiTheme.colors.emptyShade}; `} data-test-subj="editFlyoutHeader" > @@ -171,8 +178,8 @@ export const FieldStatisticsInitializer: FC = ({ css={css` // styles needed to display extra drop targets that are outside of the config panel main area overflow-y: auto; - padding-left: ${euiThemeVars.euiFormMaxWidth}; - margin-left: -${euiThemeVars.euiFormMaxWidth}; + padding-left: ${formMaxWidth}; + margin-left: -${formMaxWidth}; pointer-events: none; .euiFlyoutBody__overflow { -webkit-mask-image: none; @@ -190,7 +197,7 @@ export const FieldStatisticsInitializer: FC = ({ padding: 0; block-size: 100%; } - border-bottom: 2px solid ${euiThemeVars.euiBorderColor}; + border-bottom: 2px solid ${euiTheme.border.color}; `} > = ({ defaultMessage: 'Data view', } )} - css={css({ padding: euiThemeVars.euiSizeM })} + css={css({ padding: euiTheme.size.m })} > = React.memo(({ cloneConfig, searchItems }) => { const { showNodeInfo } = useEnabledFeatures(); const appDependencies = useAppDependencies(); - const { uiSettings, data, fieldFormats, charts, theme } = appDependencies; + const { uiSettings, data, fieldFormats, charts } = appDependencies; const { dataView } = searchItems; // The current WIZARD_STEP @@ -247,7 +247,6 @@ export const Wizard: FC = React.memo(({ cloneConfig, searchItems }) fieldStatsServices={fieldStatsServices} timeRangeMs={stepDefineState.timeRangeMs} dslQuery={transformConfig.source.query} - theme={theme} > > = ({ }) => { const { splitFieldsOptions, combinedQuery } = useChangePointDetectionContext(); const { dataView } = useDataSource(); - const { data, uiSettings, fieldFormats, charts, fieldStats, theme } = useAiopsAppContext(); + const { data, uiSettings, fieldFormats, charts, fieldStats } = useAiopsAppContext(); const timefilter = useTimefilter(); // required in order to trigger state updates useTimeRangeUpdates(); @@ -677,7 +677,6 @@ export const FieldsControls: FC> = ({ } : undefined } - theme={theme} > diff --git a/x-pack/platform/plugins/shared/aiops/public/components/field_stats_popover/field_stats_popover.tsx b/x-pack/platform/plugins/shared/aiops/public/components/field_stats_popover/field_stats_popover.tsx index 342485f68441..fe18686e93d1 100644 --- a/x-pack/platform/plugins/shared/aiops/public/components/field_stats_popover/field_stats_popover.tsx +++ b/x-pack/platform/plugins/shared/aiops/public/components/field_stats_popover/field_stats_popover.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiButtonIcon, EuiToolTip } from '@elastic/eui'; +import { useEuiTheme, EuiButtonIcon, EuiToolTip } from '@elastic/eui'; import React, { useCallback, useMemo, useState } from 'react'; import { i18n } from '@kbn/i18n'; import { isDefined } from '@kbn/ml-is-defined'; @@ -19,7 +19,6 @@ import { } from '@kbn/unified-field-list/src/components/field_popover'; import type { DataView } from '@kbn/data-views-plugin/common'; import type { TimeRange as TimeRangeMs } from '@kbn/ml-date-picker'; -import { useEuiTheme } from '../../hooks/use_eui_theme'; import { FieldStatsContent } from './field_stats_content'; export function FieldStatsPopover({ @@ -38,7 +37,7 @@ export function FieldStatsPopover({ timeRangeMs?: TimeRangeMs; }) { const [infoIsOpen, setInfoOpen] = useState(false); - const euiTheme = useEuiTheme(); + const { euiTheme } = useEuiTheme(); const closePopover = useCallback(() => setInfoOpen(false), []); @@ -62,7 +61,7 @@ export function FieldStatsPopover({ defaultMessage: 'Show top field values', })} data-test-subj={'aiopsContextPopoverButton'} - css={{ marginLeft: euiTheme.euiSizeXS }} + css={{ marginLeft: euiTheme.size.xs }} /> ); diff --git a/x-pack/platform/plugins/shared/aiops/public/components/log_categorization/category_table/category_table.tsx b/x-pack/platform/plugins/shared/aiops/public/components/log_categorization/category_table/category_table.tsx index 2a9591bb415a..06ba0d128a9b 100644 --- a/x-pack/platform/plugins/shared/aiops/public/components/log_categorization/category_table/category_table.tsx +++ b/x-pack/platform/plugins/shared/aiops/public/components/log_categorization/category_table/category_table.tsx @@ -10,6 +10,7 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' import type { EuiBasicTableColumn, EuiTableSelectionType } from '@elastic/eui'; import { + useEuiTheme, useEuiBackgroundColor, EuiInMemoryTable, EuiButtonIcon, @@ -24,8 +25,6 @@ import type { UseTableState } from '@kbn/ml-in-memory-table'; import { css } from '@emotion/react'; import type { Category } from '@kbn/aiops-log-pattern-analysis/types'; -import { useEuiTheme } from '../../../hooks/use_eui_theme'; - import { MiniHistogram } from '../../mini_histogram'; import type { EventRate } from '../use_categorize_request'; @@ -63,7 +62,7 @@ export const CategoryTable: FC = ({ selectable = true, onRenderComplete, }) => { - const euiTheme = useEuiTheme(); + const { euiTheme } = useEuiTheme(); const primaryBackgroundColor = useEuiBackgroundColor('primary'); const { onTableChange, pagination, sorting } = tableState; @@ -221,12 +220,12 @@ export const CategoryTable: FC = ({ if (mouseOver.highlightedCategory && mouseOver.highlightedCategory.key === category.key) { return { - backgroundColor: euiTheme.euiColorLightestShade, + backgroundColor: euiTheme.colors.lightestShade, }; } return { - backgroundColor: euiTheme.euiColorEmptyShade, + backgroundColor: euiTheme.colors.emptyShade, }; }; @@ -235,8 +234,8 @@ export const CategoryTable: FC = ({ position: 'sticky', insetBlockStart: 0, zIndex: 1, - backgroundColor: euiTheme.euiColorEmptyShade, - boxShadow: `inset 0 0px 0, inset 0 -1px 0 ${euiTheme.euiBorderColor}`, + backgroundColor: euiTheme.colors.emptyShade, + boxShadow: `inset 0 0px 0, inset 0 -1px 0 ${euiTheme.border.color}`, }, }); diff --git a/x-pack/platform/plugins/shared/aiops/public/components/log_categorization/category_table/table_header.tsx b/x-pack/platform/plugins/shared/aiops/public/components/log_categorization/category_table/table_header.tsx index 9157b4994adb..82a8d99f7337 100644 --- a/x-pack/platform/plugins/shared/aiops/public/components/log_categorization/category_table/table_header.tsx +++ b/x-pack/platform/plugins/shared/aiops/public/components/log_categorization/category_table/table_header.tsx @@ -7,10 +7,16 @@ import type { FC, PropsWithChildren } from 'react'; import React from 'react'; -import { EuiFlexGroup, EuiFlexItem, EuiText, EuiButtonEmpty, EuiToolTip } from '@elastic/eui'; +import { + useEuiTheme, + EuiFlexGroup, + EuiFlexItem, + EuiText, + EuiButtonEmpty, + EuiToolTip, +} from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { QUERY_MODE } from '@kbn/aiops-log-pattern-analysis/get_category_query'; -import { useEuiTheme } from '../../../hooks/use_eui_theme'; import type { OpenInDiscover } from './use_open_in_discover'; interface Props { @@ -24,9 +30,9 @@ export const TableHeader: FC = ({ selectedCategoriesCount, openInDiscover, }) => { - const euiTheme = useEuiTheme(); + const { euiTheme } = useEuiTheme(); return ( - + ({ +jest.mock('../../hooks/use_is_dark_theme', () => ({ useIsDarkTheme: () => false, })); diff --git a/x-pack/platform/plugins/shared/aiops/public/components/log_categorization/format_category.tsx b/x-pack/platform/plugins/shared/aiops/public/components/log_categorization/format_category.tsx index 5af947834964..bd8c16f8f8f7 100644 --- a/x-pack/platform/plugins/shared/aiops/public/components/log_categorization/format_category.tsx +++ b/x-pack/platform/plugins/shared/aiops/public/components/log_categorization/format_category.tsx @@ -11,7 +11,7 @@ import { EuiText, EuiHorizontalRule } from '@elastic/eui'; import type { SerializedStyles } from '@emotion/react'; import { css } from '@emotion/react'; import type { Category } from '@kbn/aiops-log-pattern-analysis/types'; -import { useIsDarkTheme } from '../../hooks/use_eui_theme'; +import { useIsDarkTheme } from '../../hooks/use_is_dark_theme'; interface Props { category: Category; diff --git a/x-pack/platform/plugins/shared/aiops/public/components/log_rate_analysis/log_rate_analysis_content/log_rate_analysis_content.tsx b/x-pack/platform/plugins/shared/aiops/public/components/log_rate_analysis/log_rate_analysis_content/log_rate_analysis_content.tsx index fb3c17634fd3..37b3d796f489 100644 --- a/x-pack/platform/plugins/shared/aiops/public/components/log_rate_analysis/log_rate_analysis_content/log_rate_analysis_content.tsx +++ b/x-pack/platform/plugins/shared/aiops/public/components/log_rate_analysis/log_rate_analysis_content/log_rate_analysis_content.tsx @@ -17,7 +17,7 @@ import { getWindowParametersForTrigger, getSnappedTimestamps, getSnappedWindowParameters, - LOG_RATE_ANALYSIS_HIGHLIGHT_COLOR, + useLogRateAnalysisBarColors, LOG_RATE_ANALYSIS_TYPE, type WindowParameters, } from '@kbn/aiops-log-rate-analysis'; @@ -130,7 +130,7 @@ export const LogRateAnalysisContent: FC = ({ const barStyle = { rect: { opacity: 1, - fill: LOG_RATE_ANALYSIS_HIGHLIGHT_COLOR, + fill: useLogRateAnalysisBarColors().barHighlightColor, }, }; diff --git a/x-pack/platform/plugins/shared/aiops/public/components/log_rate_analysis/log_rate_analysis_info_popover.tsx b/x-pack/platform/plugins/shared/aiops/public/components/log_rate_analysis/log_rate_analysis_info_popover.tsx index afa1fd27ac99..ec11caa24a72 100644 --- a/x-pack/platform/plugins/shared/aiops/public/components/log_rate_analysis/log_rate_analysis_info_popover.tsx +++ b/x-pack/platform/plugins/shared/aiops/public/components/log_rate_analysis/log_rate_analysis_info_popover.tsx @@ -7,14 +7,12 @@ import React, { useState, type FC } from 'react'; -import { EuiBadge, EuiPopover, EuiPopoverTitle, EuiText } from '@elastic/eui'; +import { useEuiTheme, EuiBadge, EuiPopover, EuiPopoverTitle, EuiText } from '@elastic/eui'; import { LOG_RATE_ANALYSIS_TYPE } from '@kbn/aiops-log-rate-analysis'; import { useAppSelector } from '@kbn/aiops-log-rate-analysis/state'; import { i18n } from '@kbn/i18n'; -import { useEuiTheme } from '../../hooks/use_eui_theme'; - export const LogRateAnalysisInfoPopoverButton: FC<{ onClick: React.MouseEventHandler; label: string; @@ -37,7 +35,7 @@ export const LogRateAnalysisInfoPopoverButton: FC<{ }; export const LogRateAnalysisInfoPopover: FC = () => { - const euiTheme = useEuiTheme(); + const { euiTheme } = useEuiTheme(); const showInfoPopover = useAppSelector( (s) => s.logRateAnalysisResults.significantItems.length > 0 @@ -117,7 +115,7 @@ export const LogRateAnalysisInfoPopover: FC = () => { )} - +

    {infoContent} {fieldSelectionMessage && ` ${fieldSelectionMessage}`} diff --git a/x-pack/platform/plugins/shared/aiops/public/components/log_rate_analysis_results_table/log_rate_analysis_results_table.tsx b/x-pack/platform/plugins/shared/aiops/public/components/log_rate_analysis_results_table/log_rate_analysis_results_table.tsx index ded175a89dfb..816d7654444e 100644 --- a/x-pack/platform/plugins/shared/aiops/public/components/log_rate_analysis_results_table/log_rate_analysis_results_table.tsx +++ b/x-pack/platform/plugins/shared/aiops/public/components/log_rate_analysis_results_table/log_rate_analysis_results_table.tsx @@ -11,7 +11,7 @@ import { orderBy, isEqual } from 'lodash'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { Criteria, EuiTableSortingType } from '@elastic/eui'; -import { useEuiBackgroundColor, EuiBasicTable } from '@elastic/eui'; +import { useEuiTheme, useEuiBackgroundColor, EuiBasicTable } from '@elastic/eui'; import type { SignificantItem } from '@kbn/ml-agg-utils'; import { @@ -22,7 +22,6 @@ import { } from '@kbn/aiops-log-rate-analysis/state'; import type { GroupTableItemGroup } from '@kbn/aiops-log-rate-analysis/state'; -import { useEuiTheme } from '../../hooks/use_eui_theme'; import { useColumns, LOG_RATE_ANALYSIS_RESULTS_TABLE_TYPE } from './use_columns'; const PAGINATION_SIZE_OPTIONS = [5, 10, 20, 50]; @@ -48,7 +47,7 @@ export const LogRateAnalysisResultsTable: FC = barHighlightColorOverride, skippedColumns, }) => { - const euiTheme = useEuiTheme(); + const { euiTheme } = useEuiTheme(); const primaryBackgroundColor = useEuiBackgroundColor('primary'); const allItems = useAppSelector((s) => s.logRateAnalysisResults.significantItems); @@ -227,12 +226,12 @@ export const LogRateAnalysisResultsTable: FC = selectedSignificantItem.fieldValue === significantItem.fieldValue ) { return { - backgroundColor: euiTheme.euiColorLightestShade, + backgroundColor: euiTheme.colors.lightestShade, }; } return { - backgroundColor: euiTheme.euiColorEmptyShade, + backgroundColor: euiTheme.colors.emptyShade, }; }; diff --git a/x-pack/platform/plugins/shared/aiops/public/components/log_rate_analysis_results_table/use_columns.tsx b/x-pack/platform/plugins/shared/aiops/public/components/log_rate_analysis_results_table/use_columns.tsx index c5b7a83e3364..a9657c907f93 100644 --- a/x-pack/platform/plugins/shared/aiops/public/components/log_rate_analysis_results_table/use_columns.tsx +++ b/x-pack/platform/plugins/shared/aiops/public/components/log_rate_analysis_results_table/use_columns.tsx @@ -7,6 +7,7 @@ import React, { useMemo, useCallback } from 'react'; import { + useEuiTheme, type EuiBasicTableColumn, EuiBadge, EuiCode, @@ -35,7 +36,6 @@ import { getFailedTransactionsCorrelationImpactLabel } from './get_failed_transa import { FieldStatsPopover } from '../field_stats_popover'; import { useAiopsAppContext } from '../../hooks/use_aiops_app_context'; import { useDataSource } from '../../hooks/use_data_source'; -import { useEuiTheme } from '../../hooks/use_eui_theme'; import { useViewInDiscoverAction } from './use_view_in_discover_action'; import { useViewInLogPatternAnalysisAction } from './use_view_in_log_pattern_analysis_action'; import { useCopyToClipboardAction } from './use_copy_to_clipboard_action'; @@ -159,7 +159,7 @@ export const useColumns = ( ): Array> => { const { data, uiSettings, fieldFormats, charts } = useAiopsAppContext(); const { dataView } = useDataSource(); - const euiTheme = useEuiTheme(); + const { euiTheme } = useEuiTheme(); const viewInDiscoverAction = useViewInDiscoverAction(dataView.id); const viewInLogPatternAnalysisAction = useViewInLogPatternAnalysisAction(dataView.id); const copyToClipBoardAction = useCopyToClipboardAction(); @@ -265,8 +265,8 @@ export const useColumns = ( = ({ }) => { const { charts } = useAiopsAppContext(); - const euiTheme = useEuiTheme(); + const { euiTheme } = useEuiTheme(); const chartBaseTheme = charts.theme.useChartsBaseTheme(); + const barColors = useLogRateAnalysisBarColors(); const miniHistogramChartTheme: PartialTheme = { chartMargins: { @@ -66,7 +66,7 @@ export const MiniHistogram: FC = ({ const cssChartSize = css({ width: '80px', - height: euiTheme.euiSizeL, + height: euiTheme.size.l, margin: '0px', }); @@ -94,10 +94,10 @@ export const MiniHistogram: FC = ({ ); } - const barColor = barColorOverride ? [barColorOverride] : undefined; + const barColor = barColorOverride ? [barColorOverride] : barColors.barColor; const barHighlightColor = barHighlightColorOverride ? [barHighlightColorOverride] - : [LOG_RATE_ANALYSIS_HIGHLIGHT_COLOR]; + : [barColors.barHighlightColor]; return (

    diff --git a/x-pack/platform/plugins/shared/aiops/public/embeddables/change_point_chart/change_point_chart_initializer.tsx b/x-pack/platform/plugins/shared/aiops/public/embeddables/change_point_chart/change_point_chart_initializer.tsx index e69511fe45f9..f98714d6338a 100644 --- a/x-pack/platform/plugins/shared/aiops/public/embeddables/change_point_chart/change_point_chart_initializer.tsx +++ b/x-pack/platform/plugins/shared/aiops/public/embeddables/change_point_chart/change_point_chart_initializer.tsx @@ -211,7 +211,7 @@ export const FormControls: FC<{ onChange: (update: FormControlsProps) => void; onValidationChange: (isValid: boolean) => void; }> = ({ formInput, onChange, onValidationChange }) => { - const { charts, data, fieldFormats, theme, uiSettings } = useAiopsAppContext(); + const { charts, data, fieldFormats, uiSettings } = useAiopsAppContext(); const { dataView } = useDataSource(); const { combinedQuery } = useChangePointDetectionContext(); const { metricFieldOptions, splitFieldsOptions } = useChangePointDetectionControlsContext(); @@ -290,7 +290,6 @@ export const FormControls: FC<{ } : undefined } - theme={theme} > { + const { euiTheme } = useEuiTheme(); const isMounted = useMountedState(); const [formInput, setFormInput] = useState( @@ -136,7 +137,7 @@ export const LogRateAnalysisEmbeddableInitializer: FC< hasBorder={true} css={{ pointerEvents: 'auto', - backgroundColor: euiThemeVars.euiColorEmptyShade, + backgroundColor: euiTheme.colors.emptyShade, }} > diff --git a/x-pack/platform/plugins/shared/aiops/public/embeddables/pattern_analysis/pattern_analysis_initializer.tsx b/x-pack/platform/plugins/shared/aiops/public/embeddables/pattern_analysis/pattern_analysis_initializer.tsx index ef185518638b..684ab9b988ed 100644 --- a/x-pack/platform/plugins/shared/aiops/public/embeddables/pattern_analysis/pattern_analysis_initializer.tsx +++ b/x-pack/platform/plugins/shared/aiops/public/embeddables/pattern_analysis/pattern_analysis_initializer.tsx @@ -6,6 +6,7 @@ */ import { + useEuiTheme, EuiFlyoutHeader, EuiTitle, EuiFlyoutBody, @@ -19,7 +20,6 @@ import { EuiFlyoutFooter, EuiCallOut, } from '@elastic/eui'; -import { euiThemeVars } from '@kbn/ui-theme'; import { i18n } from '@kbn/i18n'; import type { FC } from 'react'; import React, { useEffect, useMemo, useState, useCallback } from 'react'; @@ -62,6 +62,7 @@ export const PatternAnalysisEmbeddableInitializer: FC { + const { euiTheme } = useEuiTheme(); const { data: { dataViews }, unifiedSearch: { @@ -128,7 +129,7 @@ export const PatternAnalysisEmbeddableInitializer: FC diff --git a/x-pack/platform/plugins/shared/aiops/public/hooks/use_eui_theme.ts b/x-pack/platform/plugins/shared/aiops/public/hooks/use_is_dark_theme.ts similarity index 65% rename from x-pack/platform/plugins/shared/aiops/public/hooks/use_eui_theme.ts rename to x-pack/platform/plugins/shared/aiops/public/hooks/use_is_dark_theme.ts index 7da2bd6be954..6dc15ffa9e25 100644 --- a/x-pack/platform/plugins/shared/aiops/public/hooks/use_eui_theme.ts +++ b/x-pack/platform/plugins/shared/aiops/public/hooks/use_is_dark_theme.ts @@ -5,14 +5,9 @@ * 2.0. */ -import { useCurrentEuiThemeVars, useIsDarkTheme as useIsDarkThemeMl } from '@kbn/ml-kibana-theme'; +import { useIsDarkTheme as useIsDarkThemeMl } from '@kbn/ml-kibana-theme'; import { useAiopsAppContext } from './use_aiops_app_context'; -export function useEuiTheme() { - const { theme } = useAiopsAppContext(); - return useCurrentEuiThemeVars(theme).euiTheme; -} - export function useIsDarkTheme() { const { theme } = useAiopsAppContext(); return useIsDarkThemeMl(theme); diff --git a/x-pack/platform/plugins/shared/aiops/tsconfig.json b/x-pack/platform/plugins/shared/aiops/tsconfig.json index afee86051b7a..1069dfde9622 100644 --- a/x-pack/platform/plugins/shared/aiops/tsconfig.json +++ b/x-pack/platform/plugins/shared/aiops/tsconfig.json @@ -75,7 +75,6 @@ "@kbn/usage-collection-plugin", "@kbn/utility-types", "@kbn/observability-ai-assistant-plugin", - "@kbn/ui-theme", "@kbn/apm-utils", "@kbn/ml-field-stats-flyout", ], diff --git a/x-pack/platform/plugins/shared/ml/common/util/group_color_utils.ts b/x-pack/platform/plugins/shared/ml/common/util/group_color_utils.ts index 77d16b8aaad5..1e58ce6e67ea 100644 --- a/x-pack/platform/plugins/shared/ml/common/util/group_color_utils.ts +++ b/x-pack/platform/plugins/shared/ml/common/util/group_color_utils.ts @@ -5,28 +5,29 @@ * 2.0. */ -import { euiDarkVars as euiVars } from '@kbn/ui-theme'; +import type { EuiThemeComputed } from '@elastic/eui'; import { stringHash } from '@kbn/ml-string-hash'; -const COLORS = [ - euiVars.euiColorVis0, - euiVars.euiColorVis1, - euiVars.euiColorVis2, - euiVars.euiColorVis3, - euiVars.euiColorVis4, - euiVars.euiColorVis5, - euiVars.euiColorVis6, - euiVars.euiColorVis7, - euiVars.euiColorVis8, - euiVars.euiColorVis9, - euiVars.euiColorDarkShade, - euiVars.euiColorPrimary, -]; - const colorMap: Record = Object.create(null); -export function tabColor(name: string): string { +export function tabColor(name: string, euiTheme: EuiThemeComputed): string { + const COLORS = [ + // Amsterdam + Borealis + euiTheme.colors.vis.euiColorVis0, + euiTheme.colors.vis.euiColorVis1, + euiTheme.colors.vis.euiColorVis2, + euiTheme.colors.vis.euiColorVis3, + euiTheme.colors.vis.euiColorVis4, + euiTheme.colors.vis.euiColorVis5, + euiTheme.colors.vis.euiColorVis6, + euiTheme.colors.vis.euiColorVis7, + euiTheme.colors.vis.euiColorVis8, + euiTheme.colors.vis.euiColorVis9, + euiTheme.colors.darkShade, + euiTheme.colors.primary, + ]; + if (colorMap[name] === undefined) { const n = stringHash(name); const color = COLORS[n % COLORS.length]; diff --git a/x-pack/platform/plugins/shared/ml/public/application/components/anomalies_table/links_menu.tsx b/x-pack/platform/plugins/shared/ml/public/application/components/anomalies_table/links_menu.tsx index 1f81a9422761..dd963136f29c 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/components/anomalies_table/links_menu.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/components/anomalies_table/links_menu.tsx @@ -13,6 +13,7 @@ import React, { useEffect, useMemo, useState } from 'react'; import useMountedState from 'react-use/lib/useMountedState'; import { + useEuiTheme, EuiButtonIcon, EuiContextMenuItem, EuiContextMenuPanel, @@ -80,6 +81,7 @@ interface LinksMenuProps { } export const LinksMenuUI = (props: LinksMenuProps) => { + const { euiTheme } = useEuiTheme(); const isMounted = useMountedState(); const [dataViewId, setDataViewId] = useState(null); @@ -195,7 +197,8 @@ export const LinksMenuUI = (props: LinksMenuProps) => { ) => { // Create a layer for each of the geoFields const initialLayers = getInitialSourceIndexFieldLayers( - sourceIndicesWithGeoFields[anomaly.jobId] + sourceIndicesWithGeoFields[anomaly.jobId], + euiTheme ); // Widen the timerange by one bucket span on start/end to increase chances of always having data on the map const anomalyBucketStartMoment = moment(anomaly.source.timestamp).tz( diff --git a/x-pack/platform/plugins/shared/ml/public/application/components/chart_tooltip/chart_tooltip_styles.ts b/x-pack/platform/plugins/shared/ml/public/application/components/chart_tooltip/chart_tooltip_styles.ts index c53bdb5242f3..be4735abb214 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/components/chart_tooltip/chart_tooltip_styles.ts +++ b/x-pack/platform/plugins/shared/ml/public/application/components/chart_tooltip/chart_tooltip_styles.ts @@ -7,29 +7,23 @@ import { css } from '@emotion/react'; -import { mathWithUnits, transparentize, useEuiTheme } from '@elastic/eui'; +import { mathWithUnits, transparentize, useEuiFontSize, useEuiTheme } from '@elastic/eui'; // @ts-expect-error style types not defined import { euiToolTipStyles } from '@elastic/eui/lib/components/tool_tip/tool_tip.styles'; -import { useCurrentEuiThemeVars } from '@kbn/ml-kibana-theme'; - -import { useMlKibana } from '../../contexts/kibana'; - export const useChartTooltipStyles = () => { - const euiThemeContext = useEuiTheme(); - const { - services: { theme }, - } = useMlKibana(); - const { euiTheme } = useCurrentEuiThemeVars(theme); - const euiStyles = euiToolTipStyles(euiThemeContext); + const theme = useEuiTheme(); + const { euiTheme } = theme; + const euiStyles = euiToolTipStyles(theme); + const euiFontSizeXS = useEuiFontSize('xs').fontSize; return { mlChartTooltip: css([ euiStyles.euiToolTip, { - fontSize: euiTheme.euiFontSizeXS, + fontSize: euiFontSizeXS, padding: 0, - transition: `opacity ${euiTheme.euiAnimSpeedNormal}`, + transition: `opacity ${euiTheme.animation.normal}`, pointerEvents: 'none', userSelect: 'none', maxWidth: '512px', @@ -37,26 +31,26 @@ export const useChartTooltipStyles = () => { }, ]), mlChartTooltipList: css({ - margin: euiTheme.euiSizeXS, - paddingBottom: euiTheme.euiSizeXS, + margin: euiTheme.size.xs, + paddingBottom: euiTheme.size.xs, }), mlChartTooltipHeader: css({ - fontWeight: euiTheme.euiFontWeightBold, - padding: `${euiTheme.euiSizeXS} ${mathWithUnits(euiTheme.euiSizeS, (x) => x * 2)}`, - marginBottom: euiTheme.euiSizeXS, - borderBottom: `1px solid ${transparentize(euiTheme.euiBorderColor, 0.8)}`, + fontWeight: euiTheme.font.weight.bold, + padding: `${euiTheme.size.xs} ${mathWithUnits(euiTheme.size.xs, (x) => x * 2)}`, + marginBottom: euiTheme.size.xs, + borderBottom: `1px solid ${transparentize(euiTheme.border.color, 0.8)}`, }), mlChartTooltipItem: css({ display: 'flex', padding: '3px', boxSizing: 'border-box', - borderLeft: `${euiTheme.euiSizeXS} solid transparent`, + borderLeft: `${euiTheme.size.xs} solid transparent`, }), mlChartTooltipLabel: css({ minWidth: '1px', }), mlChartTooltipValue: css({ - fontWeight: euiTheme.euiFontWeightBold, + fontWeight: euiTheme.font.weight.bold, textAlign: 'right', fontFeatureSettings: 'tnum', marginLeft: '8px', diff --git a/x-pack/platform/plugins/shared/ml/public/application/components/collapsible_panel/collapsible_panel.tsx b/x-pack/platform/plugins/shared/ml/public/application/components/collapsible_panel/collapsible_panel.tsx index b33d056467d1..8d91d6eae009 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/components/collapsible_panel/collapsible_panel.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/components/collapsible_panel/collapsible_panel.tsx @@ -6,6 +6,7 @@ */ import { + useEuiTheme, EuiBadge, EuiButtonIcon, EuiFlexGroup, @@ -18,7 +19,6 @@ import type { PropsWithChildren } from 'react'; import React, { type FC } from 'react'; import { i18n } from '@kbn/i18n'; import { PanelHeaderItems } from './panel_header_items'; -import { useCurrentThemeVars } from '../../contexts/kibana'; export interface CollapsiblePanelProps { isOpen: boolean; @@ -36,15 +36,15 @@ export const CollapsiblePanel: FC> = ({ headerItems, ariaLabel, }) => { - const { euiTheme } = useCurrentThemeVars(); + const { euiTheme } = useEuiTheme(); return ( @@ -88,7 +88,7 @@ export const CollapsiblePanel: FC> = ({ {isOpen ? ( {children} diff --git a/x-pack/platform/plugins/shared/ml/public/application/components/collapsible_panel/panel_header_items.tsx b/x-pack/platform/plugins/shared/ml/public/application/components/collapsible_panel/panel_header_items.tsx index 75d43e6ebe6f..bd657a6a5828 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/components/collapsible_panel/panel_header_items.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/components/collapsible_panel/panel_header_items.tsx @@ -6,9 +6,8 @@ */ import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import { css } from '@emotion/react'; import React, { type FC } from 'react'; -import { useCurrentThemeVars } from '../../contexts/kibana'; +import { useEuiTheme } from '@elastic/eui'; export interface PanelHeaderItems { headerItems: React.ReactElement[]; @@ -16,7 +15,7 @@ export interface PanelHeaderItems { } export const PanelHeaderItems: FC = ({ headerItems, compressed = false }) => { - const { euiTheme } = useCurrentThemeVars(); + const { euiTheme } = useEuiTheme(); return ( @@ -26,12 +25,10 @@ export const PanelHeaderItems: FC = ({ headerItems, compressed
    diff --git a/x-pack/platform/plugins/shared/ml/public/application/components/color_range_legend/color_range_legend.tsx b/x-pack/platform/plugins/shared/ml/public/application/components/color_range_legend/color_range_legend.tsx index 9c121853cf6b..4051b0632c2c 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/components/color_range_legend/color_range_legend.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/components/color_range_legend/color_range_legend.tsx @@ -6,36 +6,43 @@ */ import type { FC } from 'react'; -import React, { useEffect, useRef } from 'react'; +import React, { useEffect, useMemo, useRef } from 'react'; import { css } from '@emotion/react'; import d3 from 'd3'; -import { EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui'; - -import { euiThemeVars } from '@kbn/ui-theme'; +import { useEuiFontSize, useEuiTheme, EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui'; const COLOR_RANGE_RESOLUTION = 10; // Overrides for d3/svg default styles -const cssOverride = css({ - // Override default font size and color for axis - text: { - fontSize: `calc(${euiThemeVars.euiFontSizeXS} - 2px)`, - fill: euiThemeVars.euiColorDarkShade, - }, - // Override default styles for axis lines - '.axis': { - path: { - fill: 'none', - stroke: 'none', - }, - line: { - fill: 'none', - stroke: euiThemeVars.euiColorMediumShade, - shapeRendering: 'crispEdges', - }, - }, -}); +const useCssOverride = () => { + const { euiTheme } = useEuiTheme(); + const euiFontSizeXS = useEuiFontSize('xs', { unit: 'px' }).fontSize as string; + + return useMemo( + () => + css({ + // Override default font size and color for axis + text: { + fontSize: `calc(${euiFontSizeXS} - 2px)`, + fill: euiTheme.colors.darkShade, + }, + // Override default styles for axis lines + '.axis': { + path: { + fill: 'none', + stroke: 'none', + }, + line: { + fill: 'none', + stroke: euiTheme.colors.mediumShade, + shapeRendering: 'crispEdges', + }, + }, + }), + [euiFontSizeXS, euiTheme] + ); +}; interface ColorRangeLegendProps { colorRange: (d: number) => string; @@ -60,6 +67,7 @@ export const ColorRangeLegend: FC = ({ title, width = 250, }) => { + const cssOverride = useCssOverride(); const d3Container = useRef(null); const scale = d3.range(COLOR_RANGE_RESOLUTION + 1).map((d) => ({ diff --git a/x-pack/platform/plugins/shared/ml/public/application/components/color_range_legend/index.ts b/x-pack/platform/plugins/shared/ml/public/application/components/color_range_legend/index.ts index 8e0549fb522f..f614b5ae4ac4 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/components/color_range_legend/index.ts +++ b/x-pack/platform/plugins/shared/ml/public/application/components/color_range_legend/index.ts @@ -6,7 +6,6 @@ */ export { ColorRangeLegend } from './color_range_legend'; -export type { EuiThemeType } from './use_color_range'; export { colorRangeOptions, colorRangeScaleOptions, diff --git a/x-pack/platform/plugins/shared/ml/public/application/components/color_range_legend/use_color_range.ts b/x-pack/platform/plugins/shared/ml/public/application/components/color_range_legend/use_color_range.ts index 4e4e92b5352f..49662ab00e51 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/components/color_range_legend/use_color_range.ts +++ b/x-pack/platform/plugins/shared/ml/public/application/components/color_range_legend/use_color_range.ts @@ -6,10 +6,10 @@ */ import d3 from 'd3'; -import type { euiDarkVars as euiThemeDark, euiLightVars as euiThemeLight } from '@kbn/ui-theme'; + +import { useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { useCurrentThemeVars } from '../../contexts/kibana'; /** * Custom color scale factory that takes the amount of feature influencers @@ -148,16 +148,24 @@ export const useColorRange = ( colorRangeScale = COLOR_RANGE_SCALE.LINEAR, featureCount = 1 ) => { - const { euiTheme } = useCurrentThemeVars(); + const { euiTheme } = useEuiTheme(); const colorRanges: Record = { [COLOR_RANGE.BLUE]: [ - d3.rgb(euiTheme.euiColorEmptyShade).toString(), - d3.rgb(euiTheme.euiColorVis1).toString(), + d3.rgb(euiTheme.colors.emptyShade).toString(), + d3 + .rgb( + // Amsterdam: euiTheme.colors.vis.euiColorVis1 + // Borealis: euiTheme.colors.vis.euiColorVis2 + euiTheme.flags.hasVisColorAdjustment + ? euiTheme.colors.vis.euiColorVis1 + : euiTheme.colors.vis.euiColorVis2 + ) + .toString(), ], [COLOR_RANGE.RED]: [ - d3.rgb(euiTheme.euiColorEmptyShade).toString(), - d3.rgb(euiTheme.euiColorDanger).toString(), + d3.rgb(euiTheme.colors.emptyShade).toString(), + d3.rgb(euiTheme.colors.danger).toString(), ], [COLOR_RANGE.RED_GREEN]: ['red', 'green'], [COLOR_RANGE.GREEN_RED]: ['green', 'red'], @@ -184,5 +192,3 @@ export const useColorRange = ( return scaleTypes[colorRangeScale]; }; - -export type EuiThemeType = typeof euiThemeLight | typeof euiThemeDark; diff --git a/x-pack/platform/plugins/shared/ml/public/application/components/influencers_list/influencers_list_styles.ts b/x-pack/platform/plugins/shared/ml/public/application/components/influencers_list/influencers_list_styles.ts index 5a0732ceb8d7..d54eb495a0a3 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/components/influencers_list/influencers_list_styles.ts +++ b/x-pack/platform/plugins/shared/ml/public/application/components/influencers_list/influencers_list_styles.ts @@ -6,24 +6,24 @@ */ import { css } from '@emotion/react'; -import { useCurrentEuiThemeVars } from '@kbn/ml-kibana-theme'; + +import { useEuiFontSize, useEuiTheme } from '@elastic/eui'; + import { mlColors } from '../../styles'; -import { useMlKibana } from '../../contexts/kibana'; export const useInfluencersListStyles = () => { - const { - services: { theme }, - } = useMlKibana(); - const { euiTheme } = useCurrentEuiThemeVars(theme); + const { euiTheme } = useEuiTheme(); + const euiFontSizeXS = useEuiFontSize('xs').fontSize; + const euiFontSizeS = useEuiFontSize('s').fontSize; return { influencersList: css({ lineHeight: 1.45, }), fieldLabel: css({ - fontSize: euiTheme.euiFontSizeXS, + fontSize: euiFontSizeXS, textAlign: 'left', - maxHeight: euiTheme.euiFontSizeS, + maxHeight: euiFontSizeS, maxWidth: 'calc(100% - 102px)', }), progress: css({ @@ -32,7 +32,7 @@ export const useInfluencersListStyles = () => { height: '22px', minWidth: '70px', marginBottom: 0, - color: euiTheme.euiColorDarkShade, + color: euiTheme.colors.darkShade, backgroundColor: 'transparent', }), progressBarHolder: css({ @@ -40,9 +40,9 @@ export const useInfluencersListStyles = () => { }), progressBar: (severity: string, barScore: number) => css({ - height: `calc(${euiTheme.euiSizeXS} / 2)`, + height: `calc(${euiTheme.size.xs} / 2)`, float: 'left', - marginTop: euiTheme.euiSizeM, + marginTop: euiTheme.size.m, textAlign: 'right', lineHeight: '18px', display: 'inline-block', @@ -62,8 +62,8 @@ export const useInfluencersListStyles = () => { textAlign: 'center', lineHeight: '14px', whiteSpace: 'nowrap', - fontSize: euiTheme.euiFontSizeXS, - marginLeft: euiTheme.euiSizeXS, + fontSize: euiFontSizeXS, + marginLeft: euiTheme.size.xs, display: 'inline', borderColor: severity === 'critical' @@ -75,16 +75,16 @@ export const useInfluencersListStyles = () => { : mlColors.warning, }), totalScoreLabel: css({ - width: euiTheme.euiSizeXL, + width: euiTheme.size.xl, verticalAlign: 'top', textAlign: 'center', - color: euiTheme.euiColorDarkShade, + color: euiTheme.colors.darkShade, fontSize: '11px', lineHeight: '14px', - borderRadius: euiTheme.euiBorderRadius, - padding: `calc(${euiTheme.euiSizeXS} / 2)`, + borderRadius: euiTheme.border.radius.small, + padding: `calc(${euiTheme.size.xs} / 2)`, display: 'inline-block', - border: euiTheme.euiBorderThin, + border: euiTheme.border.thin, }), }; }; diff --git a/x-pack/platform/plugins/shared/ml/public/application/components/job_selector/job_selector_badge/job_selector_badge.tsx b/x-pack/platform/plugins/shared/ml/public/application/components/job_selector/job_selector_badge/job_selector_badge.tsx index 8b277b84fac2..f3561944e684 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/components/job_selector/job_selector_badge/job_selector_badge.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/components/job_selector/job_selector_badge/job_selector_badge.tsx @@ -8,7 +8,7 @@ import type { FC } from 'react'; import React from 'react'; import type { EuiBadgeProps } from '@elastic/eui'; -import { EuiBadge } from '@elastic/eui'; +import { useEuiTheme, EuiBadge } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { tabColor } from '../../../../../common/util/group_color_utils'; @@ -27,7 +27,8 @@ export const JobSelectorBadge: FC = ({ numJobs, removeId, }) => { - const color = isGroup ? tabColor(id) : 'hollow'; + const { euiTheme } = useEuiTheme(); + const color = isGroup ? tabColor(id, euiTheme) : 'hollow'; let props = { color } as EuiBadgeProps; let jobCount; diff --git a/x-pack/platform/plugins/shared/ml/public/application/components/ml_inference/components/test_pipeline.tsx b/x-pack/platform/plugins/shared/ml/public/application/components/ml_inference/components/test_pipeline.tsx index 10b02310b39d..b2b46d5d59ac 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/components/ml_inference/components/test_pipeline.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/components/ml_inference/components/test_pipeline.tsx @@ -8,10 +8,10 @@ import type { FC } from 'react'; import React, { memo, useEffect, useCallback, useMemo, useState } from 'react'; import { css } from '@emotion/react'; -import { euiThemeVars } from '@kbn/ui-theme'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { + useEuiTheme, EuiAccordion, EuiButton, EuiButtonEmpty, @@ -58,6 +58,7 @@ interface Props { } export const TestPipeline: FC = memo(({ state, sourceIndex, mode }) => { + const { euiTheme } = useEuiTheme(); const [simulatePipelineResult, setSimulatePipelineResult] = useState< undefined | estypes.IngestSimulateResponse >(); @@ -391,7 +392,7 @@ export const TestPipeline: FC = memo(({ state, sourceIndex, mode }) => { {(EuiResizablePanel, EuiResizableButton) => ( diff --git a/x-pack/platform/plugins/shared/ml/public/application/components/model_snapshots/revert_model_snapshot_flyout/create_calendar.tsx b/x-pack/platform/plugins/shared/ml/public/application/components/model_snapshots/revert_model_snapshot_flyout/create_calendar.tsx index e4f87e7fa4ac..3c3abdc4d995 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/components/model_snapshots/revert_model_snapshot_flyout/create_calendar.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/components/model_snapshots/revert_model_snapshot_flyout/create_calendar.tsx @@ -12,6 +12,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; import moment from 'moment'; import type { BrushEndListener, XYBrushEvent } from '@elastic/charts'; import { + useEuiTheme, EuiButtonIcon, EuiDatePicker, EuiFieldText, @@ -21,7 +22,6 @@ import { EuiPanel, EuiSpacer, } from '@elastic/eui'; -import { useCurrentThemeVars } from '../../../contexts/kibana'; import { EventRateChart } from '../../../jobs/new_job/pages/components/charts/event_rate_chart/event_rate_chart'; import type { Anomaly } from '../../../jobs/new_job/common/results_loader/results_loader'; import type { LineChartPoint } from '../../../jobs/new_job/common/chart_loader/chart_loader'; @@ -54,7 +54,7 @@ export const CreateCalendar: FC = ({ const maxSelectableTimeMoment = moment(maxSelectableTimeStamp); const minSelectableTimeMoment = moment(minSelectableTimeStamp); - const { euiTheme } = useCurrentThemeVars(); + const { euiTheme } = useEuiTheme(); const onBrushEnd = useCallback( ({ x }: XYBrushEvent) => { @@ -155,7 +155,7 @@ export const CreateCalendar: FC = ({ end: c.end!.valueOf(), }))} onBrushEnd={onBrushEnd} - overlayColor={euiTheme.euiColorPrimary} + overlayColor={euiTheme.colors.primary} /> @@ -226,7 +226,7 @@ export const CreateCalendar: FC = ({ diff --git a/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.test.tsx b/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.test.tsx index 3fd25534134a..2388920a178f 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.test.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.test.tsx @@ -10,8 +10,6 @@ import { render, waitFor, screen } from '@testing-library/react'; import { __IntlProvider as IntlProvider } from '@kbn/i18n-react'; -import { euiLightVars as euiThemeLight } from '@kbn/ui-theme'; - import { createFilterManagerMock } from '@kbn/data-plugin/public/query/filter_manager/filter_manager.mock'; import { ScatterplotMatrix } from './scatterplot_matrix'; @@ -22,8 +20,6 @@ const mockEsSearch = jest.fn((body) => ({ hits: { hits: [{ fields: { x: [1], y: [2] } }, { fields: { x: [2], y: [3] } }] }, })); -const mockEuiTheme = euiThemeLight; - jest.mock('../../contexts/kibana', () => ({ useMlApi: () => ({ esSearch: mockEsSearch, @@ -48,9 +44,6 @@ jest.mock('../../contexts/kibana', () => ({ }, }, }), - useCurrentThemeVars: () => ({ - euiTheme: mockEuiTheme, - }), })); // Mocking VegaChart to avoid a jest/canvas related error diff --git a/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx b/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx index 763addd4aaa8..bd79731f22e0 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix.tsx @@ -12,6 +12,8 @@ import { css } from '@emotion/react'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { EuiComboBoxOptionOption } from '@elastic/eui'; import { + useEuiFontSize, + useEuiTheme, EuiCallOut, EuiComboBox, EuiFlexGroup, @@ -36,9 +38,8 @@ import { type RuntimeMappings, } from '@kbn/ml-runtime-field-utils'; import { getProcessedFields } from '@kbn/ml-data-grid'; -import { euiThemeVars } from '@kbn/ui-theme'; -import { useCurrentThemeVars, useMlApi, useMlKibana } from '../../contexts/kibana'; +import { useMlApi, useMlKibana } from '../../contexts/kibana'; // Separate imports for lazy loadable VegaChart and related code import { VegaChart } from '../vega_chart'; @@ -50,17 +51,22 @@ import { OUTLIER_SCORE_FIELD, } from './scatterplot_matrix_vega_lite_spec'; -const cssOverrides = css({ - // Prevent the chart from overflowing the container - overflowX: 'auto', - // Overrides for the outlier threshold slider - '.vega-bind': { - span: { - fontSize: euiThemeVars.euiFontSizeXS, - padding: `0 ${euiThemeVars.euiSizeXS}`, +const useCssOverrides = () => { + const { euiTheme } = useEuiTheme(); + const euiFontSizeXS = useEuiFontSize('xs').fontSize; + + return css({ + // Prevent the chart from overflowing the container + overflowX: 'auto', + // Overrides for the outlier threshold slider + '.vega-bind': { + span: { + fontSize: euiFontSizeXS, + padding: `0 ${euiTheme.size.xs}`, + }, }, - }, -}); + }); +}; const SCATTERPLOT_MATRIX_DEFAULT_FIELDS = 4; const SCATTERPLOT_MATRIX_DEFAULT_FETCH_SIZE = 1000; @@ -161,7 +167,7 @@ export const ScatterplotMatrix: FC = ({ { items: any[]; backgroundItems: any[]; columns: string[]; messages: string[] } | undefined >(); - const { euiTheme } = useCurrentThemeVars(); + const { euiTheme } = useEuiTheme(); // formats the array of field names for EuiComboBox const fieldOptions = useMemo( @@ -418,6 +424,8 @@ export const ScatterplotMatrix: FC = ({ // eslint-disable-next-line react-hooks/exhaustive-deps }, [resultsField, splom, color, legendType, dynamicSize]); + const cssOverrides = useCssOverrides(); + return ( <> {splom === undefined || vegaSpec === undefined ? ( diff --git a/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix_vega_lite_spec.test.ts b/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix_vega_lite_spec.test.ts index e2322ff7dd2b..0ed09b2c9489 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix_vega_lite_spec.test.ts +++ b/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix_vega_lite_spec.test.ts @@ -10,7 +10,7 @@ import 'jest-canvas-mock'; // @ts-ignore import { compile } from 'vega-lite/build/vega-lite'; -import { euiLightVars as euiThemeLight } from '@kbn/ui-theme'; +import type { EuiThemeComputed } from '@elastic/eui'; import { LEGEND_TYPES } from '../vega_chart/common'; @@ -25,9 +25,17 @@ import { SINGLE_POINT_CLICK, } from './scatterplot_matrix_vega_lite_spec'; +const euiThemeMock = { + colors: { + lighestShade: '#f0f0f0', + lightShade: '#d3dae6', + textSubdued: '#6a7170', + }, +} as unknown as EuiThemeComputed; + describe('getColorSpec()', () => { it('should return only user selection conditions and the default color for non-outlier specs', () => { - const colorSpec = getColorSpec(false, euiThemeLight); + const colorSpec = getColorSpec(false); expect(colorSpec).toEqual({ condition: [{ selection: USER_SELECTION }, { selection: SINGLE_POINT_CLICK }], @@ -36,7 +44,7 @@ describe('getColorSpec()', () => { }); it('should return user selection condition and conditional spec for outliers', () => { - const colorSpec = getColorSpec(false, euiThemeLight, 'outlier_score'); + const colorSpec = getColorSpec(false, 'outlier_score'); expect(colorSpec).toEqual({ condition: { @@ -54,13 +62,7 @@ describe('getColorSpec()', () => { it('should return user selection condition and a field based spec for non-outlier specs with legendType supplied', () => { const colorName = 'the-color-field'; - const colorSpec = getColorSpec( - false, - euiThemeLight, - undefined, - colorName, - LEGEND_TYPES.NOMINAL - ); + const colorSpec = getColorSpec(false, undefined, colorName, LEGEND_TYPES.NOMINAL); expect(colorSpec).toEqual({ condition: { @@ -137,7 +139,7 @@ describe('getScatterplotMatrixVegaLiteSpec()', () => { data, [], ['x', 'y'], - euiThemeLight + euiThemeMock ); const specForegroundLayer = vegaLiteSpec.spec.layer[0]; @@ -172,7 +174,7 @@ describe('getScatterplotMatrixVegaLiteSpec()', () => { data, [], ['x', 'y'], - euiThemeLight, + euiThemeMock, 'ml' ); const specForegroundLayer = vegaLiteSpec.spec.layer[0]; @@ -221,7 +223,7 @@ describe('getScatterplotMatrixVegaLiteSpec()', () => { data, [], ['x', 'y'], - euiThemeLight, + euiThemeMock, undefined, 'the-color-field', LEGEND_TYPES.NOMINAL @@ -267,7 +269,7 @@ describe('getScatterplotMatrixVegaLiteSpec()', () => { data, [], ['x.a', 'y[a]'], - euiThemeLight, + euiThemeMock, undefined, 'the-color-field', LEGEND_TYPES.NOMINAL diff --git a/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix_vega_lite_spec.ts b/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix_vega_lite_spec.ts index e7d706633984..95ede4edcc9e 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix_vega_lite_spec.ts +++ b/x-pack/platform/plugins/shared/ml/public/application/components/scatterplot_matrix/scatterplot_matrix_vega_lite_spec.ts @@ -9,9 +9,12 @@ // @ts-ignore import type { TopLevelSpec } from 'vega-lite/build/vega-lite'; -import type { euiLightVars as euiThemeLight } from '@kbn/ui-theme'; - -import { euiPaletteColorBlind, euiPaletteRed, euiPaletteGreen } from '@elastic/eui'; +import { + euiPaletteColorBlind, + euiPaletteRed, + euiPaletteGreen, + type EuiThemeComputed, +} from '@elastic/eui'; import { i18n } from '@kbn/i18n'; @@ -34,7 +37,6 @@ const CUSTOM_VIS_FIELDS_PATH = 'fields'; export const getColorSpec = ( forCustomVisLink: boolean, - euiTheme: typeof euiThemeLight, escapedOutlierScoreField?: string, color?: string, legendType?: LegendType @@ -280,7 +282,7 @@ export const getScatterplotMatrixVegaLiteSpec = ( values: VegaValue[], backgroundValues: VegaValue[], columns: string[], - euiTheme: typeof euiThemeLight, + euiTheme: EuiThemeComputed, resultsField?: string, color?: string, legendType?: LegendType, @@ -296,7 +298,6 @@ export const getScatterplotMatrixVegaLiteSpec = ( const colorSpec = getColorSpec( forCustomVisLink, - euiTheme, resultsField && escapedOutlierScoreField, color, legendType @@ -309,20 +310,20 @@ export const getScatterplotMatrixVegaLiteSpec = ( // for repeated charts, it seems to be fixed for facets but not repeat. // This causes #ddd lines to stand out in dark mode. // See: https://github.com/vega/vega-lite/issues/5908 - view: { fill: 'transparent', stroke: euiTheme.euiColorLightestShade }, + view: { fill: 'transparent', stroke: euiTheme.colors.lightestShade }, padding: 10, config: { axis: { - domainColor: euiTheme.euiColorLightShade, - gridColor: euiTheme.euiColorLightestShade, - tickColor: euiTheme.euiColorLightestShade, - labelColor: euiTheme.euiTextSubduedColor, - titleColor: euiTheme.euiTextSubduedColor, + domainColor: euiTheme.colors.lightShade, + gridColor: euiTheme.colors.lightestShade, + tickColor: euiTheme.colors.lightestShade, + labelColor: euiTheme.colors.textSubdued, + titleColor: euiTheme.colors.textSubdued, }, legend: { orient: 'right', - labelColor: euiTheme.euiTextSubduedColor, - titleColor: euiTheme.euiTextSubduedColor, + labelColor: euiTheme.colors.textSubdued, + titleColor: euiTheme.colors.textSubdued, }, }, repeat: { diff --git a/x-pack/platform/plugins/shared/ml/public/application/contexts/kibana/index.ts b/x-pack/platform/plugins/shared/ml/public/application/contexts/kibana/index.ts index 47836e6495c0..e8c6c081d6e1 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/contexts/kibana/index.ts +++ b/x-pack/platform/plugins/shared/ml/public/application/contexts/kibana/index.ts @@ -14,5 +14,4 @@ export { useNotifications } from './use_notifications_context'; export { useMlLocator, useMlLink } from './use_create_url'; export { useMlApi } from './use_ml_api_context'; export { useFieldFormatter } from './use_field_formatter'; -export { useCurrentThemeVars } from './use_current_theme'; export { useMlLicenseInfo } from './use_ml_license'; diff --git a/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx b/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx index f8c368c226ab..3e8933a5330a 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/configuration_step_form.tsx @@ -576,7 +576,6 @@ export const ConfigurationStepForm: FC = ({ fieldStatsServices={fieldStatsServices} timeRangeMs={indexData.timeRangeMs} dslQuery={jobConfigQuery} - theme={services.theme} > diff --git a/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/classification_exploration/evaluate_panel.tsx b/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/classification_exploration/evaluate_panel.tsx index 0d30b0371a02..2b0002896e1c 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/classification_exploration/evaluate_panel.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/classification_exploration/evaluate_panel.tsx @@ -10,6 +10,7 @@ import React, { useEffect, useState } from 'react'; import type { EuiDataGridCellValueElementProps } from '@elastic/eui'; import { + useEuiTheme, EuiButtonEmpty, EuiDataGrid, EuiFlexGroup, @@ -27,7 +28,7 @@ import { type DataFrameTaskStateType, } from '@kbn/ml-data-frame-analytics-utils'; -import { useCurrentThemeVars, useMlKibana } from '../../../../../contexts/kibana'; +import { useMlKibana } from '../../../../../contexts/kibana'; // Separate imports for lazy loadable VegaChart and related code import { VegaChart } from '../../../../../components/vega_chart'; @@ -111,7 +112,7 @@ export const EvaluatePanel: FC = ({ jobConfig, jobStatus, se const { services: { docLinks }, } = useMlKibana(); - const { euiTheme } = useCurrentThemeVars(); + const { euiTheme } = useEuiTheme(); const [columns, setColumns] = useState([]); const [columnsData, setColumnsData] = useState([]); diff --git a/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/classification_exploration/get_roc_curve_chart_vega_lite_spec.tsx b/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/classification_exploration/get_roc_curve_chart_vega_lite_spec.tsx index 3bfdfa03a302..1d148daac9e5 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/classification_exploration/get_roc_curve_chart_vega_lite_spec.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/classification_exploration/get_roc_curve_chart_vega_lite_spec.tsx @@ -9,9 +9,8 @@ // @ts-ignore import type { TopLevelSpec } from 'vega-lite/build/vega-lite'; -import { euiPaletteColorBlind, euiPaletteGray } from '@elastic/eui'; +import { euiPaletteColorBlind, euiPaletteGray, type EuiThemeComputed } from '@elastic/eui'; -import type { euiLightVars as euiThemeLight } from '@kbn/ui-theme'; import { i18n } from '@kbn/i18n'; import type { RocCurveItem } from '@kbn/ml-data-frame-analytics-utils'; @@ -44,7 +43,7 @@ export const getRocCurveChartVegaLiteSpec = ( classificationClasses: string[], data: RocCurveDataRow[], legendTitle: string, - euiTheme: typeof euiThemeLight + euiTheme: EuiThemeComputed ): TopLevelSpec => { // we append two rows which make up the data for the diagonal baseline data.push({ tpr: 0, fpr: 0, threshold: 1, class_name: BASELINE }); @@ -60,8 +59,8 @@ export const getRocCurveChartVegaLiteSpec = ( config: { legend: { orient: 'right', - labelColor: euiTheme.euiTextSubduedColor, - titleColor: euiTheme.euiTextSubduedColor, + labelColor: euiTheme.colors.textSubdued, + titleColor: euiTheme.colors.textSubdued, }, view: { continuousHeight: SIZE, @@ -104,9 +103,9 @@ export const getRocCurveChartVegaLiteSpec = ( type: 'quantitative', axis: { tickColor: GRAY, - labelColor: euiTheme.euiTextSubduedColor, + labelColor: euiTheme.colors.textSubdued, domainColor: GRAY, - titleColor: euiTheme.euiTextSubduedColor, + titleColor: euiTheme.colors.textSubdued, }, }, y: { @@ -117,9 +116,9 @@ export const getRocCurveChartVegaLiteSpec = ( type: 'quantitative', axis: { tickColor: GRAY, - labelColor: euiTheme.euiTextSubduedColor, + labelColor: euiTheme.colors.textSubdued, domainColor: GRAY, - titleColor: euiTheme.euiTextSubduedColor, + titleColor: euiTheme.colors.textSubdued, }, }, tooltip: [ diff --git a/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/feature_importance/decision_path_chart.tsx b/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/feature_importance/decision_path_chart.tsx index b2532b225db2..d6e64b6e8acd 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/feature_importance/decision_path_chart.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/feature_importance/decision_path_chart.tsx @@ -23,51 +23,16 @@ import { Settings, LEGACY_LIGHT_THEME, } from '@elastic/charts'; -import { EuiIcon } from '@elastic/eui'; +import { useEuiTheme, EuiIcon } from '@elastic/eui'; import React, { useCallback, useMemo } from 'react'; import { i18n } from '@kbn/i18n'; -import { euiLightVars as euiVars } from '@kbn/ui-theme'; import { type FeatureImportanceBaseline, isRegressionFeatureImportanceBaseline, } from '@kbn/ml-data-frame-analytics-utils'; import type { DecisionPathPlotData } from './use_classification_path_data'; import { formatSingleValue } from '../../../../../formatters/format_value'; -const { euiColorFullShade, euiColorMediumShade } = euiVars; -const axisColor = euiColorMediumShade; - -const baselineStyle: LineAnnotationStyle = { - line: { - strokeWidth: 1, - stroke: euiColorFullShade, - opacity: 0.75, - }, -}; - -const axes: RecursivePartial = { - axisLine: { - stroke: axisColor, - }, - tickLabel: { - fontSize: 10, - fill: axisColor, - }, - tickLine: { - stroke: axisColor, - }, - gridLine: { - horizontal: { - dash: [1, 2], - }, - vertical: { - strokeWidth: 0, - }, - }, -}; -const theme: PartialTheme = { - axes, -}; interface DecisionPathChartProps { decisionPathData: DecisionPathPlotData; @@ -88,6 +53,49 @@ export const DecisionPathChart = ({ maxDomain, baseline, }: DecisionPathChartProps) => { + const { euiTheme } = useEuiTheme(); + + const { baselineStyle, theme } = useMemo<{ + baselineStyle: LineAnnotationStyle; + theme: PartialTheme; + }>(() => { + const euiColorFullShade = euiTheme.colors.fullShade; + const euiColorMediumShade = euiTheme.colors.mediumShade; + const axisColor = euiColorMediumShade; + + const axes: RecursivePartial = { + axisLine: { + stroke: axisColor, + }, + tickLabel: { + fontSize: 10, + fill: axisColor, + }, + tickLine: { + stroke: axisColor, + }, + gridLine: { + horizontal: { + dash: [1, 2], + }, + vertical: { + strokeWidth: 0, + }, + }, + }; + + return { + baselineStyle: { + line: { + strokeWidth: 1, + stroke: euiColorFullShade, + opacity: 0.75, + }, + }, + theme: { axes }, + }; + }, [euiTheme]); + const regressionBaselineData: LineAnnotationDatum[] | undefined = useMemo( () => baseline && isRegressionFeatureImportanceBaseline(baseline) diff --git a/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/total_feature_importance_summary/feature_importance_summary.tsx b/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/total_feature_importance_summary/feature_importance_summary.tsx index 9e7371580b12..8a3ac185ef0e 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/total_feature_importance_summary/feature_importance_summary.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/total_feature_importance_summary/feature_importance_summary.tsx @@ -8,7 +8,7 @@ import type { FC } from 'react'; import React, { useCallback, useMemo } from 'react'; -import { EuiButtonEmpty, EuiSpacer, EuiText, EuiCallOut } from '@elastic/eui'; +import { useEuiTheme, EuiButtonEmpty, EuiSpacer, EuiText, EuiCallOut } from '@elastic/eui'; import type { RecursivePartial, AxisStyle, PartialTheme, BarSeriesProps } from '@elastic/charts'; import { Chart, @@ -22,7 +22,6 @@ import { import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; -import { euiLightVars as euiVars } from '@kbn/ui-theme'; import { getAnalysisType, isClassificationAnalysis, @@ -40,40 +39,6 @@ import { useMlKibana } from '../../../../../contexts/kibana'; import { ExpandableSection } from '../expandable_section'; -const { euiColorMediumShade } = euiVars; -const axisColor = euiColorMediumShade; - -const axes: RecursivePartial = { - axisLine: { - stroke: axisColor, - }, - tickLabel: { - fontSize: 12, - fill: axisColor, - }, - tickLine: { - stroke: axisColor, - }, - gridLine: { - horizontal: { - dash: [1, 2], - }, - vertical: { - strokeWidth: 0, - }, - }, -}; -const theme: PartialTheme = { - axes, - legend: { - /** - * Added buffer between label and value. - * Smaller values render a more compact legend - */ - spacingBuffer: 100, - }, -}; - export interface FeatureImportanceSummaryPanelProps { totalFeatureImportance: TotalFeatureImportance[]; jobConfig: DataFrameAnalyticsConfig; @@ -94,21 +59,60 @@ const calculateTotalMeanImportance = (featureClass: ClassificationTotalFeatureIm ); }; +interface Datum { + featureName: string; + meanImportance: number; + className?: FeatureImportanceClassName; +} +type PlotData = Datum[]; +type SeriesProps = Omit; + export const FeatureImportanceSummaryPanel: FC = ({ totalFeatureImportance, jobConfig, }) => { + const { euiTheme } = useEuiTheme(); const { services: { docLinks }, } = useMlKibana(); - interface Datum { - featureName: string; - meanImportance: number; - className?: FeatureImportanceClassName; - } - type PlotData = Datum[]; - type SeriesProps = Omit; + const theme: PartialTheme = useMemo(() => { + const euiColorMediumShade = euiTheme.colors.mediumShade; + const axisColor = euiColorMediumShade; + + const axes: RecursivePartial = { + axisLine: { + stroke: axisColor, + }, + tickLabel: { + fontSize: 12, + fill: axisColor, + }, + tickLine: { + stroke: axisColor, + }, + gridLine: { + horizontal: { + dash: [1, 2], + }, + vertical: { + strokeWidth: 0, + }, + }, + }; + + return { + axes, + legend: { + /** + * Added buffer between label and value. + * Smaller values render a more compact legend + */ + spacingBuffer: 100, + }, + }; + }, [euiTheme]); + const [plotData, barSeriesSpec, showLegend, chartHeight] = useMemo< [plotData: PlotData, barSeriesSpec: SeriesProps, showLegend?: boolean, chartHeight?: number] >(() => { diff --git a/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/job_map/components/cytoscape.tsx b/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/job_map/components/cytoscape.tsx index 16811a8429d1..de890ad9f9f9 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/job_map/components/cytoscape.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/job_map/components/cytoscape.tsx @@ -11,8 +11,7 @@ import { css } from '@emotion/react'; import cytoscape, { type Stylesheet } from 'cytoscape'; // @ts-ignore no declaration file import dagre from 'cytoscape-dagre'; -import { getCytoscapeOptions } from './cytoscape_options'; -import type { EuiThemeType } from '../../../../components/color_range_legend'; +import { useCytoscapeOptions } from './cytoscape_options'; cytoscape.use(dagre); @@ -20,7 +19,6 @@ export const CytoscapeContext = createContext(undefi interface CytoscapeProps { elements: cytoscape.ElementDefinition[]; - theme: EuiThemeType; height: number; itemsDeleted: boolean; resetCy: boolean; @@ -70,21 +68,21 @@ function getLayoutOptions(width: number, height: number) { export function Cytoscape({ children, elements, - theme, height, itemsDeleted, resetCy, style, width, }: PropsWithChildren) { - const cytoscapeOptions = useMemo(() => { + const cytoscapeOptions = useCytoscapeOptions(); + const cytoscapeOptionsWithElements = useMemo(() => { return { - ...getCytoscapeOptions(theme), + ...cytoscapeOptions, elements, }; - }, [theme, elements]); + }, [cytoscapeOptions, elements]); - const [ref, cy] = useCytoscape(cytoscapeOptions); + const [ref, cy] = useCytoscape(cytoscapeOptionsWithElements); // Add the height to the div style. The height is a separate prop because it // is required and can trigger rendering when changed. diff --git a/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/job_map/components/cytoscape_options.tsx b/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/job_map/components/cytoscape_options.tsx index 687776790759..9eca6585ac2b 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/job_map/components/cytoscape_options.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/job_map/components/cytoscape_options.tsx @@ -5,9 +5,13 @@ * 2.0. */ +import { useMemo } from 'react'; import type cytoscape from 'cytoscape'; + +import { useEuiFontSize, useEuiTheme, type EuiThemeComputed } from '@elastic/eui'; + import { ANALYSIS_CONFIG_TYPE, JOB_MAP_NODE_TYPES } from '@kbn/ml-data-frame-analytics-utils'; -import type { EuiThemeType } from '../../../../components/color_range_legend'; + import classificationJobIcon from './icons/ml_classification_job.svg'; import outlierDetectionJobIcon from './icons/ml_outlier_detection_job.svg'; import regressionJobIcon from './icons/ml_regression_job.svg'; @@ -57,85 +61,106 @@ function iconForNode(el: cytoscape.NodeSingular) { } } -function borderColorForNode(el: cytoscape.NodeSingular, theme: EuiThemeType) { +function borderColorForNode(el: cytoscape.NodeSingular, euiTheme: EuiThemeComputed) { if (el.selected()) { - return theme.euiColorPrimary; + return euiTheme.colors.primary; } const type = el.data('type'); switch (type) { case JOB_MAP_NODE_TYPES.ANALYTICS_JOB_MISSING: - return theme.euiColorFullShade; + return euiTheme.colors.fullShade; case JOB_MAP_NODE_TYPES.ANALYTICS: - return theme.euiColorVis0; + // Amsterdam + Borealis + return euiTheme.colors.vis.euiColorVis0; case JOB_MAP_NODE_TYPES.TRANSFORM: - return theme.euiColorVis1; + // Amsterdam: euiTheme.colors.vis.euiColorVis1 + // Borealis: euiTheme.colors.vis.euiColorVis2 + return euiTheme.flags.hasVisColorAdjustment + ? euiTheme.colors.vis.euiColorVis1 + : euiTheme.colors.vis.euiColorVis2; case JOB_MAP_NODE_TYPES.INDEX: - return theme.euiColorVis2; + // Amsterdam: euiTheme.colors.vis.euiColorVis2 + // Borealis: euiTheme.colors.vis.euiColorVis4 + return euiTheme.flags.hasVisColorAdjustment + ? euiTheme.colors.vis.euiColorVis2 + : euiTheme.colors.vis.euiColorVis4; case JOB_MAP_NODE_TYPES.TRAINED_MODEL: - return theme.euiColorVis3; + // Amsterdam: euiTheme.colors.vis.euiColorVis3 + // Borealis: euiTheme.colors.vis.euiColorVis5 + return euiTheme.flags.hasVisColorAdjustment + ? euiTheme.colors.vis.euiColorVis3 + : euiTheme.colors.vis.euiColorVis5; case JOB_MAP_NODE_TYPES.INGEST_PIPELINE: - return theme.euiColorVis7; + // Amsterdam: euiTheme.colors.vis.euiColorVis7 + // Borealis: euiTheme.colors.vis.euiColorVis8 + return euiTheme.flags.hasVisColorAdjustment + ? euiTheme.colors.vis.euiColorVis7 + : euiTheme.colors.vis.euiColorVis8; default: - return theme.euiColorMediumShade; + return euiTheme.colors.mediumShade; } } -export const getCytoscapeOptions = (theme: EuiThemeType): cytoscape.CytoscapeOptions => { - const lineColor = theme.euiColorLightShade; +export const useCytoscapeOptions = (): cytoscape.CytoscapeOptions => { + const { euiTheme } = useEuiTheme(); + const euiFontSizeXS = useEuiFontSize('xs', { unit: 'px' }).fontSize as string; - return { - autoungrabify: true, - boxSelectionEnabled: false, - maxZoom: 3, - minZoom: 0.2, - style: [ - { - selector: 'node', - style: { - 'background-color': (el: cytoscape.NodeSingular) => - el.data('isRoot') ? theme.euiColorWarning : theme.euiColorGhost, - 'background-height': '60%', - 'background-width': '60%', - 'border-color': (el: cytoscape.NodeSingular) => borderColorForNode(el, theme), - 'border-style': 'solid', - // @ts-ignore - 'background-image': (el: cytoscape.NodeSingular) => iconForNode(el), - 'border-width': (el: cytoscape.NodeSingular) => (el.selected() ? 4 : 3), - color: theme.euiTextColor, - 'font-family': 'Inter UI, Segoe UI, Helvetica, Arial, sans-serif', - 'font-size': theme.euiFontSizeXS, - 'min-zoomed-font-size': parseInt(theme.euiSizeL, 10), - label: 'data(label)', - shape: (el: cytoscape.NodeSingular) => shapeForNode(el), - 'text-background-color': theme.euiColorLightestShade, - 'text-background-opacity': 0, - 'text-background-padding': theme.euiSizeXS, - 'text-background-shape': 'roundrectangle', - 'text-margin-y': parseInt(theme.euiSizeS, 10), - 'text-max-width': '200px', - 'text-valign': 'bottom', - 'text-wrap': 'wrap', + return useMemo( + () => ({ + autoungrabify: true, + boxSelectionEnabled: false, + maxZoom: 3, + minZoom: 0.2, + style: [ + { + selector: 'node', + style: { + 'background-color': (el: cytoscape.NodeSingular) => + el.data('isRoot') ? euiTheme.colors.warning : euiTheme.colors.ghost, + 'background-height': '60%', + 'background-width': '60%', + 'border-color': (el: cytoscape.NodeSingular) => borderColorForNode(el, euiTheme), + 'border-style': 'solid', + // @ts-ignore + 'background-image': (el: cytoscape.NodeSingular) => iconForNode(el), + 'border-width': (el: cytoscape.NodeSingular) => (el.selected() ? 4 : 3), + color: euiTheme.colors.textParagraph, + 'font-family': 'Inter UI, Segoe UI, Helvetica, Arial, sans-serif', + 'font-size': euiFontSizeXS, + 'min-zoomed-font-size': parseInt(euiTheme.size.l, 10), + label: 'data(label)', + shape: (el: cytoscape.NodeSingular) => shapeForNode(el), + 'text-background-color': euiTheme.colors.lightestShade, + 'text-background-opacity': 0, + 'text-background-padding': euiTheme.size.xs, + 'text-background-shape': 'roundrectangle', + 'text-margin-y': parseInt(euiTheme.size.s, 10), + 'text-max-width': '200px', + 'text-valign': 'bottom', + 'text-wrap': 'wrap', + }, }, - }, - { - selector: 'edge', - style: { - 'curve-style': 'taxi', - // @ts-ignore - 'taxi-direction': 'rightward', - 'line-color': lineColor, - 'overlay-opacity': 0, - 'target-arrow-color': lineColor, - 'target-arrow-shape': 'triangle', - // @ts-ignore - 'target-distance-from-node': theme.euiSizeXS, - width: 1, - 'source-arrow-shape': 'none', + { + selector: 'edge', + style: { + 'curve-style': 'taxi', + // @ts-ignore + 'taxi-direction': 'rightward', + 'line-color': euiTheme.colors.lightShade, + 'overlay-opacity': 0, + 'target-arrow-color': euiTheme.colors.lightShade, + 'target-arrow-shape': 'triangle', + // @ts-ignore + 'target-distance-from-node': euiTheme.size.xs, + width: 1, + 'source-arrow-shape': 'none', + }, }, - }, - ], - }; + ], + }), + [euiFontSizeXS, euiTheme] + ); }; diff --git a/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/job_map/components/legend.tsx b/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/job_map/components/legend.tsx index cf22e9a3f275..0a706aa7a82b 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/job_map/components/legend.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/job_map/components/legend.tsx @@ -9,6 +9,7 @@ import type { FC } from 'react'; import React, { useState, useMemo } from 'react'; import { i18n } from '@kbn/i18n'; import { + useEuiTheme, EuiButtonIcon, EuiFlexGroup, EuiFlexItem, @@ -19,7 +20,6 @@ import { } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { JOB_MAP_NODE_TYPES } from '@kbn/ml-data-frame-analytics-utils'; -import type { EuiThemeType } from '../../../../components/color_range_legend'; const getJobTypeList = () => ( <> @@ -33,21 +33,48 @@ const getJobTypeList = () => ( ); -export const JobMapLegend: FC<{ hasMissingJobNode: boolean; theme: EuiThemeType }> = ({ - hasMissingJobNode, - theme, -}) => { +export const JobMapLegend: FC<{ hasMissingJobNode: boolean }> = ({ hasMissingJobNode }) => { + const { euiTheme } = useEuiTheme(); + const [showJobTypes, setShowJobTypes] = useState(false); - const { - euiSizeM, - euiSizeS, - euiColorGhost, - euiColorWarning, - euiBorderThin, - euiBorderRadius, - euiBorderRadiusSmall, - euiBorderWidthThick, - } = theme; + + const euiSizeM = euiTheme.size.m; + const euiSizeS = euiTheme.size.s; + const euiColorFullShade = euiTheme.colors.fullShade; + const euiColorGhost = euiTheme.colors.ghost; + const euiColorWarning = euiTheme.colors.warning; + const euiBorderThin = euiTheme.border.thin; + const euiBorderRadius = euiTheme.border.radius.medium; + const euiBorderRadiusSmall = euiTheme.border.radius.small; + const euiBorderWidthThick = euiTheme.border.width.thick; + const euiPageBackgroundColor = euiTheme.colors.backgroundBasePlain; + + // Amsterdam: euiTheme.colors.vis.euiColorVis2 + // Borealis: euiTheme.colors.vis.euiColorVis4 + const borderColorIndexPattern = euiTheme.flags.hasVisColorAdjustment + ? euiTheme.colors.vis.euiColorVis2 + : euiTheme.colors.vis.euiColorVis4; + + // Amsterdam: euiTheme.colors.vis.euiColorVis7 + // Borealis: euiTheme.colors.vis.euiColorVis8 + const borderColorIngestPipeline = euiTheme.flags.hasVisColorAdjustment + ? euiTheme.colors.vis.euiColorVis7 + : euiTheme.colors.vis.euiColorVis8; + + // Amsterdam: euiTheme.colors.vis.euiColorVis1 + // Borealis: euiTheme.colors.vis.euiColorVis2 + const borderColorTransform = euiTheme.flags.hasVisColorAdjustment + ? euiTheme.colors.vis.euiColorVis1 + : euiTheme.colors.vis.euiColorVis2; + + // Amsterdam: euiTheme.colors.vis.euiColorVis3 + // Borealis: euiTheme.colors.vis.euiColorVis5 + const borderBottomColorTrainedModel = euiTheme.flags.hasVisColorAdjustment + ? euiTheme.colors.vis.euiColorVis3 + : euiTheme.colors.vis.euiColorVis5; + + // Amsterdam + Borealis + const borderColorAnalytics = euiTheme.colors.vis.euiColorVis0; const cssOverrideBase = useMemo( () => ({ @@ -91,7 +118,7 @@ export const JobMapLegend: FC<{ hasMissingJobNode: boolean; theme: EuiThemeType data-test-subj="mlJobMapLegend__indexPattern" css={{ ...cssOverrideBase, - border: `${euiBorderWidthThick} solid ${theme.euiColorVis2}`, + border: `${euiBorderWidthThick} solid ${borderColorIndexPattern}`, transform: 'rotate(45deg)', }} /> @@ -113,7 +140,7 @@ export const JobMapLegend: FC<{ hasMissingJobNode: boolean; theme: EuiThemeType data-test-subj="mlJobMapLegend__ingestPipeline" css={{ ...cssOverrideBase, - border: `${euiBorderWidthThick} solid ${theme.euiColorVis7}`, + border: `${euiBorderWidthThick} solid ${borderColorIngestPipeline}`, borderRadius: euiBorderRadiusSmall, }} /> @@ -135,7 +162,7 @@ export const JobMapLegend: FC<{ hasMissingJobNode: boolean; theme: EuiThemeType data-test-subj="mlJobMapLegend__transform" css={{ ...cssOverrideBase, - border: `${euiBorderWidthThick} solid ${theme.euiColorVis1}`, + border: `${euiBorderWidthThick} solid ${borderColorTransform}`, }} /> @@ -154,9 +181,9 @@ export const JobMapLegend: FC<{ hasMissingJobNode: boolean; theme: EuiThemeType display: 'inline-block', width: '0px', height: '0px', - borderLeft: `${euiSizeS} solid ${theme.euiPageBackgroundColor}`, - borderRight: `${euiSizeS} solid ${theme.euiPageBackgroundColor}`, - borderBottom: `${euiSizeM} solid ${theme.euiColorVis3}`, + borderLeft: `${euiSizeS} solid ${euiPageBackgroundColor}`, + borderRight: `${euiSizeS} solid ${euiPageBackgroundColor}`, + borderBottom: `${euiSizeM} solid ${borderBottomColorTrainedModel}`, }} /> @@ -178,7 +205,7 @@ export const JobMapLegend: FC<{ hasMissingJobNode: boolean; theme: EuiThemeType data-test-subj="mlJobMapLegend__analyticsMissing" css={{ ...cssOverrideBase, - border: `${euiBorderWidthThick} solid ${theme.euiColorFullShade}`, + border: `${euiBorderWidthThick} solid ${euiColorFullShade}`, borderRadius: '50%', }} /> @@ -201,7 +228,7 @@ export const JobMapLegend: FC<{ hasMissingJobNode: boolean; theme: EuiThemeType data-test-subj="mlJobMapLegend__analytics" css={{ ...cssOverrideBase, - border: `${euiBorderWidthThick} solid ${theme.euiColorVis0}`, + border: `${euiBorderWidthThick} solid ${borderColorAnalytics}`, borderRadius: '50%', }} /> diff --git a/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/job_map/job_map.tsx b/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/job_map/job_map.tsx index d03b62bf934a..49a64f7dd5fa 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/job_map/job_map.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/data_frame_analytics/pages/job_map/job_map.tsx @@ -9,32 +9,38 @@ import type { FC } from 'react'; import React, { useEffect, useMemo, useState } from 'react'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; -import { EuiButtonEmpty, EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; +import { + useEuiTheme, + EuiButtonEmpty, + EuiFlexGroup, + EuiFlexItem, + EuiSpacer, + type EuiThemeComputed, +} from '@elastic/eui'; import { JOB_MAP_NODE_TYPES } from '@kbn/ml-data-frame-analytics-utils'; -import { useCurrentThemeVars, useMlKibana, useMlLocator } from '../../../contexts/kibana'; +import { useMlKibana, useMlLocator } from '../../../contexts/kibana'; import { Controls, Cytoscape, JobMapLegend } from './components'; import { ML_PAGES } from '../../../../../common/constants/locator'; -import type { EuiThemeType } from '../../../components/color_range_legend'; import { useRefresh } from '../../../routing/use_refresh'; import { useRefDimensions } from './components/use_ref_dimensions'; import { useFetchAnalyticsMapData } from './use_fetch_analytics_map_data'; -const getCytoscapeDivStyle = (theme: EuiThemeType) => ({ +const getCytoscapeDivStyle = (theme: EuiThemeComputed) => ({ background: `linear-gradient( 90deg, - ${theme.euiPageBackgroundColor} - calc(${theme.euiSizeL} - calc(${theme.euiSizeXS} / 2)), + ${theme.colors.backgroundBasePlain} + calc(${theme.size.l} - calc(${theme.size.xs} / 2)), transparent 1% ) center, linear-gradient( - ${theme.euiPageBackgroundColor} - calc(${theme.euiSizeL} - calc(${theme.euiSizeXS} / 2)), + ${theme.colors.backgroundBasePlain} + calc(${theme.size.l} - calc(${theme.size.xs} / 2)), transparent 1% ) center, -${theme.euiColorLightShade}`, - backgroundSize: `${theme.euiSizeL} ${theme.euiSizeL}`, +${theme.colors.lightShade}`, + backgroundSize: `${theme.size.l} ${theme.size.l}`, marginTop: 0, }); @@ -67,7 +73,7 @@ export const JobMap: FC = ({ defaultHeight, analyticsId, modelId, forceRe }, } = useMlKibana(); const locator = useMlLocator()!; - const { euiTheme } = useCurrentThemeVars(); + const { euiTheme } = useEuiTheme(); const refresh = useRefresh(); const redirectToAnalyticsManagementPage = async () => { @@ -162,7 +168,7 @@ export const JobMap: FC = ({ defaultHeight, analyticsId, modelId, forceRe - + = ({ defaultHeight, analyticsId, modelId, forceRe -
    +
    { @@ -39,7 +42,8 @@ export const AnnotationTimeline = >): ReturnType => { const canvasRef = React.useRef(null); - const { euiTheme } = useCurrentThemeVars(); + const { euiTheme } = useEuiTheme(); + const euiFontSizeXS = useEuiFontSize('xs', { unit: 'px' }).fontSize as string; useEffect( function renderChart() { @@ -69,8 +73,8 @@ export const AnnotationTimeline = tooltipService.hide()); }); }, - [ - chartWidth, - domain, - data, - tooltipService, - label, - euiTheme.euiTextSubduedColor, - euiTheme.euiFontSizeXS, - euiTheme.euiBorderColor, - getTooltipContent, - ] + [chartWidth, domain, data, tooltipService, label, euiTheme, euiFontSizeXS, getTooltipContent] ); return
    ; diff --git a/x-pack/platform/plugins/shared/ml/public/application/explorer/swimlane_annotation_container.tsx b/x-pack/platform/plugins/shared/ml/public/application/explorer/swimlane_annotation_container.tsx index ce506e03dae3..ec480da71767 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/explorer/swimlane_annotation_container.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/explorer/swimlane_annotation_container.tsx @@ -9,13 +9,18 @@ import type { FC } from 'react'; import React, { useEffect } from 'react'; import d3 from 'd3'; import { scaleTime } from 'd3-scale'; -import { i18n } from '@kbn/i18n'; import moment from 'moment'; -import { useCurrentThemeVars } from '../contexts/kibana'; + +import { useEuiFontSize, useEuiTheme } from '@elastic/eui'; + +import { i18n } from '@kbn/i18n'; + import type { Annotation, AnnotationsTable } from '../../../common/types/annotations'; + import type { ChartTooltipService } from '../components/chart_tooltip'; +import { useAnnotationStyles } from '../timeseriesexplorer/styles'; + import { Y_AXIS_LABEL_PADDING, Y_AXIS_LABEL_WIDTH } from './constants'; -import { getAnnotationStyles } from '../timeseriesexplorer/styles'; const ANNOTATION_CONTAINER_HEIGHT = 12; const ANNOTATION_MIN_WIDTH = 8; @@ -30,16 +35,16 @@ interface SwimlaneAnnotationContainerProps { tooltipService: ChartTooltipService; } -const annotationStyles = getAnnotationStyles(); - export const SwimlaneAnnotationContainer: FC = ({ chartWidth, domain, annotationsData, tooltipService, }) => { + const annotationStyles = useAnnotationStyles(); const canvasRef = React.useRef(null); - const { euiTheme } = useCurrentThemeVars(); + const { euiTheme } = useEuiTheme(); + const euiFontSizeXS = useEuiFontSize('xs', { unit: 'px' }).fontSize as string; useEffect(() => { if (canvasRef.current !== null && Array.isArray(annotationsData)) { @@ -71,8 +76,8 @@ export const SwimlaneAnnotationContainer: FC = .attr('x', Y_AXIS_LABEL_WIDTH - Y_AXIS_LABEL_PADDING) .attr('y', ANNOTATION_CONTAINER_HEIGHT / 2) .attr('dominant-baseline', 'middle') - .style('fill', euiTheme.euiTextSubduedColor) - .style('font-size', euiTheme.euiFontSizeXS); + .style('fill', euiTheme.colors.textSubdued) + .style('font-size', euiFontSizeXS); // Add border svg @@ -81,7 +86,7 @@ export const SwimlaneAnnotationContainer: FC = .attr('y', 0) .attr('height', ANNOTATION_CONTAINER_HEIGHT) .attr('width', endingXPos - startingXPos) - .style('stroke', euiTheme.euiBorderColor) + .style('stroke', euiTheme.border.color) .style('fill', 'none') .style('stroke-width', 1); diff --git a/x-pack/platform/plugins/shared/ml/public/application/explorer/swimlane_container.tsx b/x-pack/platform/plugins/shared/ml/public/application/explorer/swimlane_container.tsx index 5dd1440d7d81..7c1118b33cb6 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/explorer/swimlane_container.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/explorer/swimlane_container.tsx @@ -7,13 +7,17 @@ import type { FC } from 'react'; import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; + import { + useEuiFontSize, + useEuiTheme, EuiFlexGroup, EuiFlexItem, EuiLoadingChart, EuiResizeObserver, EuiText, } from '@elastic/eui'; + import { throttle } from 'lodash'; import type { BrushEndListener, @@ -62,7 +66,7 @@ import { FormattedTooltip } from '../components/chart_tooltip/chart_tooltip'; import './_explorer.scss'; import { EMPTY_FIELD_VALUE_LABEL } from '../timeseriesexplorer/components/entity_control/entity_control'; import { SWIM_LANE_LABEL_WIDTH, Y_AXIS_LABEL_PADDING } from './constants'; -import { useCurrentThemeVars, useMlKibana } from '../contexts/kibana'; +import { useMlKibana } from '../contexts/kibana'; declare global { interface Window { @@ -205,7 +209,7 @@ export const SwimlaneContainer: FC = ({ } = useMlKibana(); const isDarkTheme = useIsDarkTheme(themeService); - const { euiTheme } = useCurrentThemeVars(); + const { euiTheme } = useEuiTheme(); // Holds the container height for previously fetched data const containerHeightRef = useRef(); @@ -297,18 +301,20 @@ export const SwimlaneContainer: FC = ({ const showBrush = !!onCellsSelection; + const euiFontSizeXS = useEuiFontSize('xs', { unit: 'px' }).fontSize as string; + const themeOverrides = useMemo(() => { if (!showSwimlane) return {}; const theme: PartialTheme = { background: { - color: euiTheme.euiPanelBackgroundColorModifiers.plain, + color: euiTheme.colors.backgroundBasePlain, }, heatmap: { grid: { stroke: { width: BORDER_WIDTH, - color: euiTheme.euiBorderColor, + color: euiTheme.border.color, }, }, cell: { @@ -318,21 +324,21 @@ export const SwimlaneContainer: FC = ({ visible: false, }, border: { - stroke: euiTheme.euiBorderColor, + stroke: euiTheme.colors.borderBasePlain, strokeWidth: 0, }, }, yAxisLabel: { visible: showYAxis, width: yAxisWidth, - textColor: euiTheme.euiTextSubduedColor, + textColor: euiTheme.colors.textSubdued, padding: Y_AXIS_LABEL_PADDING, - fontSize: parseInt(euiTheme.euiFontSizeXS, 10), + fontSize: parseInt(euiFontSizeXS, 10), }, xAxisLabel: { visible: showTimeline, - textColor: euiTheme.euiTextSubduedColor, - fontSize: parseInt(euiTheme.euiFontSizeXS, 10), + textColor: euiTheme.colors.textSubdued, + fontSize: parseInt(euiFontSizeXS, 10), }, brushMask: { visible: showBrush, diff --git a/x-pack/platform/plugins/shared/ml/public/application/jobs/jobs_list/components/datafeed_chart_flyout/datafeed_chart_flyout.tsx b/x-pack/platform/plugins/shared/ml/public/application/jobs/jobs_list/components/datafeed_chart_flyout/datafeed_chart_flyout.tsx index a2f271f243b1..bc7b4b4d3a2f 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/jobs/jobs_list/components/datafeed_chart_flyout/datafeed_chart_flyout.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/jobs/jobs_list/components/datafeed_chart_flyout/datafeed_chart_flyout.tsx @@ -11,6 +11,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import moment from 'moment'; import { + useEuiTheme, EuiButtonEmpty, EuiCheckbox, EuiDatePicker, @@ -60,7 +61,7 @@ import type { import type { JobMessage } from '../../../../../../common/types/audit_message'; import type { LineAnnotationDatumWithModelSnapshot } from '../../../../../../common/types/results'; import { useToastNotificationService } from '../../../../services/toast_notification_service'; -import { useCurrentThemeVars, useMlApi } from '../../../../contexts/kibana'; +import { useMlApi } from '../../../../contexts/kibana'; import { RevertModelSnapshotFlyout } from '../../../../components/model_snapshots/revert_model_snapshot_flyout'; import { JobMessagesPane } from '../job_details/job_messages_pane'; import { EditQueryDelay } from './edit_query_delay'; @@ -146,7 +147,7 @@ export const DatafeedChartFlyout: FC = ({ results: { getDatafeedResultChartData }, } = useMlApi(); const { displayErrorToast } = useToastNotificationService(); - const { euiTheme } = useCurrentThemeVars(); + const { euiTheme } = useEuiTheme(); const handleChange = (date: moment.Moment) => setEndDate(date); const handleEndDateChange = (direction: ChartDirectionType) => { if (data.bucketSpan === undefined) return; @@ -479,7 +480,7 @@ export const DatafeedChartFlyout: FC = ({ style={{ line: { strokeWidth: 3, - stroke: euiTheme.euiColorDangerText, + stroke: euiTheme.colors.textDanger, opacity: 0.5, }, }} @@ -494,7 +495,7 @@ export const DatafeedChartFlyout: FC = ({ defaultMessage: 'Annotations rectangle result', } )} - style={{ fill: euiTheme.euiColorDangerText }} + style={{ fill: euiTheme.colors.textDanger }} /> ) : null} @@ -514,7 +515,11 @@ export const DatafeedChartFlyout: FC = ({ style={{ line: { strokeWidth: 3, - stroke: euiTheme.euiColorVis1, + // Amsterdam: euiTheme.colors.vis.euiColorVis1 + // Borealis: euiTheme.colors.vis.euiColorVis2 + stroke: euiTheme.flags.hasVisColorAdjustment + ? euiTheme.colors.vis.euiColorVis1 + : euiTheme.colors.vis.euiColorVis2, opacity: 0.5, }, }} @@ -537,7 +542,7 @@ export const DatafeedChartFlyout: FC = ({ style={{ line: { strokeWidth: 3, - stroke: euiTheme.euiColorAccent, + stroke: euiTheme.colors.accent, opacity: 0.5, }, }} @@ -546,7 +551,7 @@ export const DatafeedChartFlyout: FC = ({ ) : null} = ({ /> { - const groups = resp.map((g) => ({ label: g.id, color: tabColor(g.id) })); + const groups = resp.map((g) => ({ label: g.id, color: tabColor(g.id, euiTheme) })); this.setState({ groups }); }) .catch((error) => { @@ -58,7 +59,7 @@ export class JobDetailsUI extends Component { static getDerivedStateFromProps(props) { const selectedGroups = props.jobGroups !== undefined - ? props.jobGroups.map((g) => ({ label: g, color: tabColor(g) })) + ? props.jobGroups.map((g) => ({ label: g, color: tabColor(g, props.euiTheme) })) : []; const { datafeedRunning, jobClosed } = props; @@ -261,12 +262,13 @@ export class JobDetailsUI extends Component { ); } } -JobDetailsUI.propTypes = { +EditJobDetailsTabUI.propTypes = { datafeedRunning: PropTypes.bool.isRequired, + euiTheme: PropTypes.object.isRequired, jobDescription: PropTypes.string.isRequired, jobGroups: PropTypes.array.isRequired, jobModelMemoryLimit: PropTypes.string.isRequired, setJobDetails: PropTypes.func.isRequired, }; -export const JobDetails = withKibana(JobDetailsUI); +export const EditJobDetailsTab = withKibana(EditJobDetailsTabUI); diff --git a/x-pack/platform/plugins/shared/ml/public/application/jobs/jobs_list/components/edit_job_flyout/tabs/index.js b/x-pack/platform/plugins/shared/ml/public/application/jobs/jobs_list/components/edit_job_flyout/tabs/index.js index 9ea9b3448541..3b99a6ca59f5 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/jobs/jobs_list/components/edit_job_flyout/tabs/index.js +++ b/x-pack/platform/plugins/shared/ml/public/application/jobs/jobs_list/components/edit_job_flyout/tabs/index.js @@ -5,6 +5,6 @@ * 2.0. */ -export { JobDetails } from './job_details'; -export { Detectors } from './detectors'; -export { Datafeed } from './datafeed'; +export { EditJobDetailsTab } from './edit_job_details_tab'; +export { EditDetectorsTab } from './edit_detectors_tab'; +export { EditDatafeedTab } from './edit_datafeed_tab'; diff --git a/x-pack/platform/plugins/shared/ml/public/application/jobs/jobs_list/components/job_group/job_group.tsx b/x-pack/platform/plugins/shared/ml/public/application/jobs/jobs_list/components/job_group/job_group.tsx index 562d0c9bc440..5989c35230e8 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/jobs/jobs_list/components/job_group/job_group.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/jobs/jobs_list/components/job_group/job_group.tsx @@ -7,11 +7,17 @@ import type { FC } from 'react'; import React from 'react'; -import { EuiBadge } from '@elastic/eui'; + +import { useEuiTheme, EuiBadge } from '@elastic/eui'; + import { tabColor } from '../../../../../../common/util/group_color_utils'; -export const JobGroup: FC<{ name: string }> = ({ name }) => ( - - {name} - -); +export const JobGroup: FC<{ name: string }> = ({ name }) => { + const { euiTheme } = useEuiTheme(); + + return ( + + {name} + + ); +}; diff --git a/x-pack/platform/plugins/shared/ml/public/application/jobs/jobs_list/components/jobs_list_view/jobs_list_view.js b/x-pack/platform/plugins/shared/ml/public/application/jobs/jobs_list/components/jobs_list_view/jobs_list_view.js index b80ad9bcc0e5..9748d8889959 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/jobs/jobs_list/components/jobs_list_view/jobs_list_view.js +++ b/x-pack/platform/plugins/shared/ml/public/application/jobs/jobs_list/components/jobs_list_view/jobs_list_view.js @@ -5,6 +5,7 @@ * 2.0. */ +import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; @@ -505,6 +506,7 @@ export class JobsListViewUI extends Component { ) : null} this.refreshJobSummaryList()} @@ -557,4 +559,8 @@ export class JobsListViewUI extends Component { } } +JobsListViewUI.propTypes = { + euiTheme: PropTypes.object.isRequired, +}; + export const JobsListView = withKibana(JobsListViewUI); diff --git a/x-pack/platform/plugins/shared/ml/public/application/jobs/jobs_list/jobs.tsx b/x-pack/platform/plugins/shared/ml/public/application/jobs/jobs_list/jobs.tsx index 0516fa1b7986..650748055770 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/jobs/jobs_list/jobs.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/jobs/jobs_list/jobs.tsx @@ -7,6 +7,7 @@ import type { FC } from 'react'; import React from 'react'; +import { useEuiTheme } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { usePageUrlState } from '@kbn/ml-url-state'; import type { ListingPageUrlState } from '@kbn/ml-url-state'; @@ -44,6 +45,7 @@ export const JobsPage: FC = ({ isMlEnabledInSpace, lastRefresh }) const { services: { docLinks }, } = useMlKibana(); + const { euiTheme } = useEuiTheme(); const { showNodeInfo } = useEnabledFeatures(); const helpLink = docLinks.links.ml.anomalyDetection; @@ -56,6 +58,7 @@ export const JobsPage: FC = ({ isMlEnabledInSpace, lastRefresh }) = memo( ({ existingGroups, selectedGroups, onChange, validation }) => { + const { euiTheme } = useEuiTheme(); + const options = existingGroups.map((g) => ({ label: g, - color: tabColor(g), + color: tabColor(g, euiTheme), })); const selectedOptions = selectedGroups.map((g) => ({ label: g, - color: tabColor(g), + color: tabColor(g, euiTheme), })); function onChangeCallback(optionsIn: EuiComboBoxOptionOption[]) { @@ -46,7 +48,7 @@ export const JobGroupsInput: FC = memo( const newGroup: EuiComboBoxOptionOption = { label: input, - color: tabColor(input), + color: tabColor(input, euiTheme), }; if ( diff --git a/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/components/charts/common/settings.ts b/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/components/charts/common/settings.ts index 6f46aabef8aa..38b25b33e002 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/components/charts/common/settings.ts +++ b/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/components/charts/common/settings.ts @@ -8,18 +8,18 @@ import type { IUiSettingsClient } from '@kbn/core/public'; import type { TimeBuckets } from '@kbn/ml-time-buckets'; import type { AreaSeriesStyle, LineSeriesStyle, RecursivePartial } from '@elastic/charts'; -import { useCurrentThemeVars } from '../../../../../../contexts/kibana'; +import { useEuiTheme } from '@elastic/eui'; import type { JobCreatorType } from '../../../../common/job_creator'; import { isMultiMetricJobCreator, isPopulationJobCreator } from '../../../../common/job_creator'; import { getTimeBucketsFromCache } from '../../../../../../util/get_time_buckets_from_cache'; export function useChartColors() { - const { euiTheme } = useCurrentThemeVars(); + const { euiTheme } = useEuiTheme(); return { - LINE_COLOR: euiTheme.euiColorPrimary, - MODEL_COLOR: euiTheme.euiColorPrimary, - EVENT_RATE_COLOR: euiTheme.euiColorPrimary, - EVENT_RATE_COLOR_WITH_ANOMALIES: euiTheme.euiColorLightShade, + LINE_COLOR: euiTheme.colors.primary, + MODEL_COLOR: euiTheme.colors.primary, + EVENT_RATE_COLOR: euiTheme.colors.primary, + EVENT_RATE_COLOR_WITH_ANOMALIES: euiTheme.colors.lightShade, }; } diff --git a/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/components/charts/event_rate_chart/overlay_range.tsx b/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/components/charts/event_rate_chart/overlay_range.tsx index f9351ac78352..40d495b76290 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/components/charts/event_rate_chart/overlay_range.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/components/charts/event_rate_chart/overlay_range.tsx @@ -7,10 +7,9 @@ import type { FC } from 'react'; import React from 'react'; -import { EuiIcon } from '@elastic/eui'; +import { useEuiTheme, EuiIcon } from '@elastic/eui'; import { timeFormatter } from '@kbn/ml-date-utils'; import { AnnotationDomainType, LineAnnotation, Position, RectAnnotation } from '@elastic/charts'; -import { useCurrentThemeVars } from '../../../../../../contexts/kibana'; interface Props { overlayKey: number; @@ -21,7 +20,7 @@ interface Props { } export const OverlayRange: FC = ({ overlayKey, start, end, color, showMarker = true }) => { - const { euiTheme } = useCurrentThemeVars(); + const { euiTheme } = useEuiTheme(); return ( <> @@ -57,7 +56,7 @@ export const OverlayRange: FC = ({ overlayKey, start, end, color, showMar marker={showMarker ? : undefined} markerBody={ showMarker ? ( -
    +
    {timeFormatter(start)}
    ) : undefined diff --git a/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/components/job_details_step/components/groups/groups_input.tsx b/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/components/job_details_step/components/groups/groups_input.tsx index 601ce327a031..f3946b825cec 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/components/job_details_step/components/groups/groups_input.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/components/job_details_step/components/groups/groups_input.tsx @@ -7,7 +7,7 @@ import type { FC } from 'react'; import React, { useState, useContext, useEffect, useMemo } from 'react'; -import type { EuiComboBoxOptionOption } from '@elastic/eui'; +import { useEuiTheme, type EuiComboBoxOptionOption } from '@elastic/eui'; import { EuiComboBox } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { JobCreatorContext } from '../../../job_creator_context'; @@ -15,6 +15,8 @@ import { tabColor } from '../../../../../../../../../common/util/group_color_uti import { Description } from './description'; export const GroupsInput: FC = () => { + const { euiTheme } = useEuiTheme(); + const { jobCreator, jobCreatorUpdate, jobValidator, jobValidatorUpdated } = useContext(JobCreatorContext); const { existingJobsAndGroups } = useContext(JobCreatorContext); @@ -42,12 +44,12 @@ export const GroupsInput: FC = () => { const options: EuiComboBoxOptionOption[] = existingJobsAndGroups.groupIds.map((g: string) => ({ label: g, - color: tabColor(g), + color: tabColor(g, euiTheme), })); const selectedOptions: EuiComboBoxOptionOption[] = selectedGroups.map((g: string) => ({ label: g, - color: tabColor(g), + color: tabColor(g, euiTheme), })); function onChange(optionsIn: EuiComboBoxOptionOption[]) { @@ -63,7 +65,7 @@ export const GroupsInput: FC = () => { const newGroup: EuiComboBoxOptionOption = { label: input, - color: tabColor(input), + color: tabColor(input, euiTheme), }; if ( diff --git a/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/new_job/wizard_steps.tsx b/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/new_job/wizard_steps.tsx index f72087f50315..5a00613afa82 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/new_job/wizard_steps.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/pages/new_job/wizard_steps.tsx @@ -123,7 +123,6 @@ export const WizardSteps: FC = ({ currentStep, setCurrentStep }) => { fieldStatsServices={fieldStatsServices} timeRangeMs={timeRangeMs} dslQuery={jobCreator.query} - theme={services.theme} > <> diff --git a/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/recognize/components/job_item.tsx b/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/recognize/components/job_item.tsx index a60fa07fdee8..3e706f0e231d 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/recognize/components/job_item.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/recognize/components/job_item.tsx @@ -8,6 +8,7 @@ import type { FC } from 'react'; import React, { memo } from 'react'; import { + useEuiTheme, EuiBadge, EuiButtonIcon, EuiFlexGroup, @@ -35,6 +36,8 @@ interface JobItemProps { export const JobItem: FC = memo( ({ job, jobOverride, isSaving, jobPrefix, onEditRequest }) => { + const { euiTheme } = useEuiTheme(); + const { id, config: { description, groups }, @@ -90,7 +93,7 @@ export const JobItem: FC = memo( {(jobGroups ?? []).map((group) => ( - {group} + {group} ))} diff --git a/x-pack/platform/plugins/shared/ml/public/application/model_management/test_models/models/ner/ner_output.test.tsx b/x-pack/platform/plugins/shared/ml/public/application/model_management/test_models/models/ner/ner_output.test.tsx new file mode 100644 index 000000000000..772fe5996513 --- /dev/null +++ b/x-pack/platform/plugins/shared/ml/public/application/model_management/test_models/models/ner/ner_output.test.tsx @@ -0,0 +1,76 @@ +/* + * 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 { getClassColor, getClassLabel, getClassIcon } from './ner_output'; + +describe('NER output', () => { + describe('getClassIcon', () => { + test('returns the correct icon for class PER', () => { + expect(getClassIcon('PER')).toBe('user'); + }); + + test('returns the correct icon for class LOC', () => { + expect(getClassIcon('LOC')).toBe('visMapCoordinate'); + }); + + test('returns the correct icon for class ORG', () => { + expect(getClassIcon('ORG')).toBe('home'); + }); + + test('returns the correct icon for class MISC', () => { + expect(getClassIcon('MISC')).toBe('questionInCircle'); + }); + + test('returns the default icon for an unknown class', () => { + expect(getClassIcon('UNKNOWN')).toBe('questionInCircle'); + }); + }); + + describe('getClassLabel', () => { + test('returns the correct label for class PER', () => { + expect(getClassLabel('PER')).toBe('Person'); + }); + + test('returns the correct label for class LOC', () => { + expect(getClassLabel('LOC')).toBe('Location'); + }); + + test('returns the correct label for class ORG', () => { + expect(getClassLabel('ORG')).toBe('Organization'); + }); + + test('returns the correct label for class MISC', () => { + expect(getClassLabel('MISC')).toBe('Miscellaneous'); + }); + + test('returns the class name for an unknown class', () => { + expect(getClassLabel('UNKNOWN')).toBe('UNKNOWN'); + }); + }); + + describe('getClassColor', () => { + test('returns the correct color for class PER', () => { + expect(getClassColor('PER', true)).toBe('#f1d86f'); + }); + + test('returns the correct color for class LOC', () => { + expect(getClassColor('LOC', true)).toBe('#79aad9'); + }); + + test('returns the correct color for class ORG', () => { + expect(getClassColor('ORG', true)).toBe('#6dccb1'); + }); + + test('returns the correct color for class MISC', () => { + expect(getClassColor('MISC', true)).toBe('#f5a35c'); + }); + + test('returns the default color for an unknown class', () => { + expect(getClassColor('UNKNOWN', true)).toBe('#f1d86f'); + }); + }); +}); diff --git a/x-pack/platform/plugins/shared/ml/public/application/model_management/test_models/models/ner/ner_output.tsx b/x-pack/platform/plugins/shared/ml/public/application/model_management/test_models/models/ner/ner_output.tsx index 5582a383fe71..aa79f40dac7c 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/model_management/test_models/models/ner/ner_output.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/model_management/test_models/models/ner/ner_output.tsx @@ -11,6 +11,10 @@ import React from 'react'; import useObservable from 'react-use/lib/useObservable'; import { FormattedMessage } from '@kbn/i18n-react'; import { + euiPaletteColorBlind, + euiPaletteColorBlindBehindText, + useEuiFontSize, + useEuiTheme, EuiBadge, EuiFlexGroup, EuiFlexItem, @@ -18,48 +22,71 @@ import { EuiIcon, EuiToolTip, } from '@elastic/eui'; -import { useCurrentThemeVars } from '../../../../contexts/kibana'; -import type { EuiThemeType } from '../../../../components/color_range_legend/use_color_range'; import type { NerInference, NerResponse } from './ner_inference'; import { INPUT_TYPE } from '../inference_base'; +const badgeColorPaletteBorder = euiPaletteColorBlind(); +const badgeColorPaletteBehindText = euiPaletteColorBlindBehindText(); + const ICON_PADDING = '2px'; const PROBABILITY_SIG_FIGS = 3; -const ENTITY_TYPES = { +interface EntityType { + label: string; + icon: string; + colorIndex: number; +} + +const ENTITY_TYPE_NAMES = ['PER', 'LOC', 'ORG', 'MISC'] as const; +const isEntityTypeName = (name: string): name is EntityTypeName => + ENTITY_TYPE_NAMES.includes(name as EntityTypeName); +type EntityTypeName = (typeof ENTITY_TYPE_NAMES)[number]; + +const ENTITY_TYPES: Record = { PER: { label: 'Person', icon: 'user', - color: 'euiColorVis5_behindText', - borderColor: 'euiColorVis5', + // Amsterdam color + colorIndex: 5, }, LOC: { label: 'Location', icon: 'visMapCoordinate', - color: 'euiColorVis1_behindText', - borderColor: 'euiColorVis1', + // Amsterdam color + colorIndex: 1, }, ORG: { label: 'Organization', icon: 'home', - color: 'euiColorVis0_behindText', - borderColor: 'euiColorVis0', + // Amsterdam color + colorIndex: 0, }, MISC: { label: 'Miscellaneous', icon: 'questionInCircle', - color: 'euiColorVis7_behindText', - borderColor: 'euiColorVis7', + // Amsterdam color + colorIndex: 7, }, }; -const UNKNOWN_ENTITY_TYPE = { +const UNKNOWN_ENTITY_TYPE: EntityType = { label: '', icon: 'questionInCircle', - color: 'euiColorVis5_behindText', - borderColor: 'euiColorVis5', + // Amsterdam color + colorIndex: 5, }; +// Amsterdam +// ['#6dccb1', '#79aad9', '#ee789d', '#a987d1', '#e4a6c7', '#f1d86f', '#d2c0a0', '#f5a35c', '#c47c6c', '#ff7e62'] +// Borealis +// ['#00BEB8', '#98E6E2', '#599DFF', '#B4D5FF', '#ED6BA2', '#FFBED5', '#F66D64', '#FFC0B8', '#E6AB01', '#FCD279'] +const amsterdam2BorealisColorMap = new Map([ + [0, 0], + [1, 2], + [5, 9], + [7, 8], +]); + export const getNerOutputComponent = (inferrer: NerInference) => ; const NerOutput: FC<{ inferrer: NerInference }> = ({ inferrer }) => { @@ -86,7 +113,7 @@ const NerOutput: FC<{ inferrer: NerInference }> = ({ inferrer }) => { }; const Lines: FC<{ result: NerResponse }> = ({ result }) => { - const { euiTheme } = useCurrentThemeVars(); + const euiFontSizeXS = useEuiFontSize('xs', { unit: 'px' }).fontSize as string; const lineSplit: JSX.Element[] = []; result.response.forEach(({ value, entity }) => { if (entity === null) { @@ -110,7 +137,7 @@ const Lines: FC<{ result: NerResponse }> = ({ result }) => { {value}
    -
    +
    ) => { - const { euiTheme } = useCurrentThemeVars(); + const { euiTheme } = useEuiTheme(); + const euiFontSizeXS = useEuiFontSize('xs').fontSize; + return ( > = ({ children }) => { - const { euiTheme } = useCurrentThemeVars(); + const { euiTheme } = useEuiTheme(); + const euiFontSizeXS = useEuiFontSize('xs').fontSize; + + // For Amsterdam, use a `_behindText` variant. Borealis doesn't need it because of updated contrasts. + const badgeColor = euiTheme.flags.hasVisColorAdjustment + ? // @ts-expect-error _behindText is not defined in EuiThemeComputed after Borealis update + euiTheme.colors.vis.euiColorVis5_behindText + : euiTheme.colors.vis.euiColorVis9; + return ( { - const { - euiTheme: { euiColorMediumShade, euiTextSubduedColor, euiTextColor }, - } = useCurrentThemeVars(); + const { euiTheme } = useEuiTheme(); if (response.score >= 5) { return { color: 'success', - textColor: euiTextColor, + textColor: euiTheme.colors.textParagraph, icon: 'check', text: i18n.translate( 'xpack.ml.trainedModels.testModelsFlyout.textExpansion.output.goodMatch', @@ -216,16 +214,16 @@ const useResultStatFormatting = ( if (response.score > 0) { return { - color: euiTextSubduedColor, - textColor: euiTextColor, + color: euiTheme.colors.textSubdued, + textColor: euiTheme.colors.textParagraph, text: null, icon: null, }; } return { - color: euiColorMediumShade, - textColor: euiColorMediumShade, + color: euiTheme.colors.mediumShade, + textColor: euiTheme.colors.mediumShade, text: null, icon: null, }; diff --git a/x-pack/platform/plugins/shared/ml/public/application/timeseriesexplorer/components/forecasting_modal/forecasts_list.js b/x-pack/platform/plugins/shared/ml/public/application/timeseriesexplorer/components/forecasting_modal/forecasts_list.js index 52ce2b201dd8..349b7406d9d7 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/timeseriesexplorer/components/forecasting_modal/forecasts_list.js +++ b/x-pack/platform/plugins/shared/ml/public/application/timeseriesexplorer/components/forecasting_modal/forecasts_list.js @@ -12,12 +12,11 @@ import PropTypes from 'prop-types'; import React from 'react'; -import { EuiButtonIcon, EuiIconTip, EuiInMemoryTable, EuiText } from '@elastic/eui'; +import { useEuiTheme, EuiButtonIcon, EuiIconTip, EuiInMemoryTable, EuiText } from '@elastic/eui'; import { formatHumanReadableDateTimeSeconds } from '@kbn/ml-date-utils'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; -import { useCurrentThemeVars } from '../../../contexts/kibana'; function getColumns(viewForecast) { return [ @@ -77,7 +76,7 @@ function getColumns(viewForecast) { } export function ForecastsList({ forecasts, viewForecast, selectedForecastId }) { - const { euiTheme } = useCurrentThemeVars(); + const { euiTheme } = useEuiTheme(); const getRowProps = (item) => { return { @@ -85,7 +84,7 @@ export function ForecastsList({ forecasts, viewForecast, selectedForecastId }) { ...(item.forecast_id === selectedForecastId ? { style: { - backgroundColor: `${euiTheme.euiPanelBackgroundColorModifiers.primary}`, + backgroundColor: `${euiTheme.colors.backgroundBasePrimary}`, }, } : {}), diff --git a/x-pack/platform/plugins/shared/ml/public/application/timeseriesexplorer/styles.ts b/x-pack/platform/plugins/shared/ml/public/application/timeseriesexplorer/styles.ts index 74ddf0850380..7c4315e01688 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/timeseriesexplorer/styles.ts +++ b/x-pack/platform/plugins/shared/ml/public/application/timeseriesexplorer/styles.ts @@ -5,9 +5,11 @@ * 2.0. */ +import { useMemo } from 'react'; import { css } from '@emotion/react'; -import { euiThemeVars } from '@kbn/ui-theme'; -import { transparentize } from '@elastic/eui'; + +import { useEuiFontSize, useEuiTheme, transparentize } from '@elastic/eui'; + import { mlColors } from '../styles'; // Annotations constants @@ -15,318 +17,341 @@ const mlAnnotationBorderWidth = '2px'; const mlAnnotationRectDefaultStrokeOpacity = 0.2; const mlAnnotationRectDefaultFillOpacity = 0.05; -export const getTimeseriesExplorerStyles = () => - css({ - color: euiThemeVars.euiColorDarkShade, - - '.ml-timeseries-chart': { - svg: { - fontSize: euiThemeVars.euiFontSizeXS, - fontFamily: euiThemeVars.euiFontFamily, - }, - - '.axis': { - 'path, line': { - fill: 'none', - stroke: euiThemeVars.euiBorderColor, - shapeRendering: 'crispEdges', - pointerEvents: 'none', - }, +export const useTimeseriesExplorerStyles = () => { + const { euiTheme } = useEuiTheme(); + const { fontSize: euiFontSizeXS } = useEuiFontSize('xs', { unit: 'px' }); + const { fontSize: euiFontSizeS } = useEuiFontSize('s', { unit: 'px' }); + + // Amsterdam: euiTheme.colors.vis.euiColorVis5 + // Borealis: euiTheme.colors.vis.euiColorVis9 + const forecastColor = euiTheme.flags.hasVisColorAdjustment + ? euiTheme.colors.vis.euiColorVis5 + : euiTheme.colors.vis.euiColorVis9; + + return useMemo( + () => + css({ + color: euiTheme.colors.darkShade, + + '.ml-timeseries-chart': { + svg: { + fontSize: euiFontSizeXS, + fontFamily: euiTheme.font.family, + }, - text: { - fill: euiThemeVars.euiTextColor, - }, + '.axis': { + 'path, line': { + fill: 'none', + stroke: euiTheme.colors.borderBasePlain, + shapeRendering: 'crispEdges', + pointerEvents: 'none', + }, - '.tick line': { - stroke: euiThemeVars.euiColorLightShade, - }, - }, + text: { + fill: euiTheme.colors.textParagraph, + }, - '.chart-border': { - stroke: euiThemeVars.euiBorderColor, - fill: 'none', - strokeWidth: 1, - shapeRendering: 'crispEdges', - }, + '.tick line': { + stroke: euiTheme.colors.lightShade, + }, + }, - '.chart-border-highlight': { - stroke: euiThemeVars.euiColorDarkShade, - strokeWidth: 2, + '.chart-border': { + stroke: euiTheme.colors.borderBasePlain, + fill: 'none', + strokeWidth: 1, + shapeRendering: 'crispEdges', + }, - '&:hover': { - opacity: 1, - }, - }, + '.chart-border-highlight': { + stroke: euiTheme.colors.darkShade, + strokeWidth: 2, - '.area': { - strokeWidth: 1, + '&:hover': { + opacity: 1, + }, + }, - '&.bounds': { - fill: transparentize(euiThemeVars.euiColorPrimary, 0.2), - pointerEvents: 'none', - }, + '.area': { + strokeWidth: 1, - '&.forecast': { - fill: transparentize(euiThemeVars.euiColorVis5, 0.3), - pointerEvents: 'none', - }, - }, + '&.bounds': { + fill: transparentize(euiTheme.colors.primary, 0.2), + pointerEvents: 'none', + }, - '.values-line': { - fill: 'none', - stroke: euiThemeVars.euiColorPrimary, - strokeWidth: 2, - pointerEvents: 'none', + '&.forecast': { + fill: transparentize(forecastColor, 0.3), + pointerEvents: 'none', + }, + }, - '&.forecast': { - stroke: euiThemeVars.euiColorVis5, - pointerEvents: 'none', - }, - }, - - '.hidden': { - visibility: 'hidden', - }, - - '.values-dots circle': { - fill: euiThemeVars.euiColorPrimary, - strokeWidth: 0, - }, - - '.metric-value': { - opacity: 1, - fill: 'transparent', - stroke: euiThemeVars.euiColorPrimary, - strokeWidth: 0, - }, - - '.anomaly-marker': { - strokeWidth: 1, - stroke: euiThemeVars.euiColorMediumShade, - - '&.critical': { - fill: mlColors.critical, - }, + '.values-line': { + fill: 'none', + stroke: euiTheme.colors.primary, + strokeWidth: 2, + pointerEvents: 'none', - '&.major': { - fill: mlColors.major, - }, + '&.forecast': { + stroke: forecastColor, + pointerEvents: 'none', + }, + }, - '&.minor': { - fill: mlColors.minor, - }, + '.hidden': { + visibility: 'hidden', + }, - '&.warning': { - fill: mlColors.warning, - }, + '.values-dots circle': { + fill: euiTheme.colors.primary, + strokeWidth: 0, + }, - '&.low': { - fill: mlColors.lowWarning, - }, - }, - - '.metric-value:hover, .anomaly-marker:hover, .anomaly-marker.highlighted': { - strokeWidth: 6, - strokeOpacity: 0.65, - stroke: euiThemeVars.euiColorPrimary, - }, - - 'rect.scheduled-event-marker': { - strokeWidth: 1, - stroke: euiThemeVars.euiColorDarkShade, - fill: euiThemeVars.euiColorLightShade, - }, - - '.forecast': { - '.metric-value, .metric-value:hover': { - stroke: euiThemeVars.euiColorVis5, - }, - }, + '.metric-value': { + opacity: 1, + fill: 'transparent', + stroke: euiTheme.colors.primary, + strokeWidth: 0, + }, - '.focus-chart': { - '.x-axis-background': { - line: { - fill: 'none', - shapeRendering: 'crispEdges', - stroke: euiThemeVars.euiColorLightestShade, + '.anomaly-marker': { + strokeWidth: 1, + stroke: euiTheme.colors.mediumShade, + + '&.critical': { + fill: mlColors.critical, + }, + + '&.major': { + fill: mlColors.major, + }, + + '&.minor': { + fill: mlColors.minor, + }, + + '&.warning': { + fill: mlColors.warning, + }, + + '&.low': { + fill: mlColors.lowWarning, + }, }, - rect: { - fill: euiThemeVars.euiColorLightestShade, + + '.metric-value:hover, .anomaly-marker:hover, .anomaly-marker.highlighted': { + strokeWidth: 6, + strokeOpacity: 0.65, + stroke: euiTheme.colors.primary, }, - }, - '.focus-zoom': { - fill: euiThemeVars.euiColorDarkShade, - a: { - text: { - fill: euiThemeVars.euiColorPrimary, - cursor: 'pointer', + + 'rect.scheduled-event-marker': { + strokeWidth: 1, + stroke: euiTheme.colors.darkShade, + fill: euiTheme.colors.lightShade, + }, + + '.forecast': { + '.metric-value, .metric-value:hover': { + stroke: forecastColor, }, - '&:hover, &:active, &:focus': { - textDecoration: 'underline', - fill: euiThemeVars.euiColorPrimary, + }, + + '.focus-chart': { + '.x-axis-background': { + line: { + fill: 'none', + shapeRendering: 'crispEdges', + stroke: euiTheme.colors.lightestShade, + }, + rect: { + fill: euiTheme.colors.lightestShade, + }, + }, + '.focus-zoom': { + fill: euiTheme.colors.darkShade, + a: { + text: { + fill: euiTheme.colors.primary, + cursor: 'pointer', + }, + '&:hover, &:active, &:focus': { + textDecoration: 'underline', + fill: euiTheme.colors.primary, + }, + }, }, }, - }, - }, - '.context-chart': { - '.x.axis path': { - display: 'none', - }, - '.axis text': { - fontSize: '10px', - fill: euiThemeVars.euiTextColor, - }, - '.values-line': { - strokeWidth: 1, - }, - '.mask': { - polygon: { - fillOpacity: 0.1, + '.context-chart': { + '.x.axis path': { + display: 'none', + }, + '.axis text': { + fontSize: '10px', + fill: euiTheme.colors.textParagraph, + }, + '.values-line': { + strokeWidth: 1, + }, + '.mask': { + polygon: { + fillOpacity: 0.1, + }, + '.area.bounds': { + fill: euiTheme.colors.lightShade, + }, + '.values-line': { + strokeWidth: 1, + stroke: euiTheme.colors.mediumShade, + }, + }, + }, + + '.swimlane .axis text': { + display: 'none', }, - '.area.bounds': { - fill: euiThemeVars.euiColorLightShade, + + '.swimlane rect.swimlane-cell-hidden': { + display: 'none', }, - '.values-line': { + + '.brush .extent': { + fillOpacity: 0, + shapeRendering: 'crispEdges', + stroke: euiTheme.colors.darkShade, + strokeWidth: 2, + cursor: 'move', + '&:hover': { + opacity: 1, + }, + }, + + '.top-border': { + fill: euiTheme.colors.emptyShade, + }, + + 'foreignObject.brush-handle': { + pointerEvents: 'none', + paddingTop: '1px', + }, + + 'div.brush-handle-inner': { + border: `1px solid ${euiTheme.colors.darkShade}`, + backgroundColor: euiTheme.colors.lightShade, + height: '70px', + width: '10px', + textAlign: 'center', + cursor: 'ew-resize', + marginTop: '9px', + fontSize: euiFontSizeS, + fill: euiTheme.colors.darkShade, + }, + + 'div.brush-handle-inner-left': { + borderRadius: `${euiTheme.border.radius.small} 0 0 ${euiTheme.border.radius.small}`, + }, + + 'div.brush-handle-inner-right': { + borderRadius: `0 ${euiTheme.border.radius.small} ${euiTheme.border.radius.small} 0`, + }, + + 'rect.brush-handle': { strokeWidth: 1, - stroke: euiThemeVars.euiColorMediumShade, + stroke: euiTheme.colors.darkShade, + fill: euiTheme.colors.lightShade, + pointerEvents: 'none', + '&:hover': { + opacity: 1, + }, }, }, - }, - - '.swimlane .axis text': { - display: 'none', - }, - - '.swimlane rect.swimlane-cell-hidden': { - display: 'none', - }, - - '.brush .extent': { - fillOpacity: 0, - shapeRendering: 'crispEdges', - stroke: euiThemeVars.euiColorDarkShade, - strokeWidth: 2, - cursor: 'move', - '&:hover': { - opacity: 1, - }, - }, - - '.top-border': { - fill: euiThemeVars.euiColorEmptyShade, - }, - - 'foreignObject.brush-handle': { - pointerEvents: 'none', - paddingTop: '1px', - }, - - 'div.brush-handle-inner': { - border: `1px solid ${euiThemeVars.euiColorDarkShade}`, - backgroundColor: euiThemeVars.euiColorLightShade, - height: '70px', - width: '10px', - textAlign: 'center', - cursor: 'ew-resize', - marginTop: '9px', - fontSize: euiThemeVars.euiFontSizeS, - fill: euiThemeVars.euiColorDarkShade, - }, - - 'div.brush-handle-inner-left': { - borderRadius: `${euiThemeVars.euiBorderRadius} 0 0 ${euiThemeVars.euiBorderRadius}`, - }, - - 'div.brush-handle-inner-right': { - borderRadius: `0 ${euiThemeVars.euiBorderRadius} ${euiThemeVars.euiBorderRadius} 0`, - }, - - 'rect.brush-handle': { - strokeWidth: 1, - stroke: euiThemeVars.euiColorDarkShade, - fill: euiThemeVars.euiColorLightShade, - pointerEvents: 'none', - '&:hover': { - opacity: 1, - }, - }, - }, - }); - -export const getAnnotationStyles = () => - css({ - '.ml-annotation': { - '&__brush': { - '.extent': { - stroke: euiThemeVars.euiColorLightShade, - strokeWidth: mlAnnotationBorderWidth, - strokeDasharray: '2 2', - fill: euiThemeVars.euiColorLightestShade, - shapeRendering: 'geometricPrecision', - }, - }, - - '&__rect': { - stroke: euiThemeVars.euiColorFullShade, - strokeWidth: mlAnnotationBorderWidth, - strokeOpacity: mlAnnotationRectDefaultStrokeOpacity, - fill: euiThemeVars.euiColorFullShade, - fillOpacity: mlAnnotationRectDefaultFillOpacity, - shapeRendering: 'geometricPrecision', - transition: `stroke-opacity ${euiThemeVars.euiAnimSpeedFast}, fill-opacity ${euiThemeVars.euiAnimSpeedFast}`, - - '&--highlight': { - strokeOpacity: mlAnnotationRectDefaultStrokeOpacity * 2, - fillOpacity: mlAnnotationRectDefaultFillOpacity * 2, - }, + }), + [euiTheme, euiFontSizeS, euiFontSizeXS, forecastColor] + ); +}; + +export const useAnnotationStyles = () => { + const { euiTheme } = useEuiTheme(); + const euiFontSizeXS = useEuiFontSize('xs', { unit: 'px' }).fontSize as string; + + return useMemo( + () => + css({ + '.ml-annotation': { + '&__brush': { + '.extent': { + stroke: euiTheme.colors.lightShade, + strokeWidth: mlAnnotationBorderWidth, + strokeDasharray: '2 2', + fill: euiTheme.colors.lightestShade, + shapeRendering: 'geometricPrecision', + }, + }, - '&--blur': { - strokeOpacity: mlAnnotationRectDefaultStrokeOpacity / 2, - fillOpacity: mlAnnotationRectDefaultFillOpacity / 2, - }, - }, - - '&__text': { - textAnchor: 'middle', - fontSize: euiThemeVars.euiFontSizeXS, - fontFamily: euiThemeVars.euiFontFamily, - fontWeight: euiThemeVars.euiFontWeightMedium, - fill: euiThemeVars.euiColorFullShade, - transition: `fill ${euiThemeVars.euiAnimSpeedFast}`, - userSelect: 'none', - - '&--blur': { - fill: euiThemeVars.euiColorMediumShade, - }, - }, + '&__rect': { + stroke: euiTheme.colors.fullShade, + strokeWidth: mlAnnotationBorderWidth, + strokeOpacity: mlAnnotationRectDefaultStrokeOpacity, + fill: euiTheme.colors.fullShade, + fillOpacity: mlAnnotationRectDefaultFillOpacity, + shapeRendering: 'geometricPrecision', + transition: `stroke-opacity ${euiTheme.animation.fast}, fill-opacity ${euiTheme.animation.fast}`, + + '&--highlight': { + strokeOpacity: mlAnnotationRectDefaultStrokeOpacity * 2, + fillOpacity: mlAnnotationRectDefaultFillOpacity * 2, + }, - '&__text-rect': { - fill: euiThemeVars.euiColorLightShade, - transition: `fill ${euiThemeVars.euiAnimSpeedFast}`, + '&--blur': { + strokeOpacity: mlAnnotationRectDefaultStrokeOpacity / 2, + fillOpacity: mlAnnotationRectDefaultFillOpacity / 2, + }, + }, - '&--blur': { - fill: euiThemeVars.euiColorLightestShade, - }, - }, - - '&--hidden': { - display: 'none', - }, - - '&__context-rect': { - stroke: euiThemeVars.euiColorFullShade, - strokeWidth: mlAnnotationBorderWidth, - strokeOpacity: mlAnnotationRectDefaultStrokeOpacity, - fill: euiThemeVars.euiColorFullShade, - fillOpacity: mlAnnotationRectDefaultFillOpacity, - transition: `stroke-opacity ${euiThemeVars.euiAnimSpeedFast}, fill-opacity ${euiThemeVars.euiAnimSpeedFast}`, - shapeRendering: 'geometricPrecision', - - '&--blur': { - strokeOpacity: mlAnnotationRectDefaultStrokeOpacity / 2, - fillOpacity: mlAnnotationRectDefaultFillOpacity / 2, + '&__text': { + textAnchor: 'middle', + fontSize: euiFontSizeXS, + fontFamily: euiTheme.font.family, + fontWeight: euiTheme.font.weight.medium, + fill: euiTheme.colors.fullShade, + transition: `fill ${euiTheme.animation.fast}`, + userSelect: 'none', + + '&--blur': { + fill: euiTheme.colors.mediumShade, + }, + }, + + '&__text-rect': { + fill: euiTheme.colors.lightShade, + transition: `fill ${euiTheme.animation.fast}`, + + '&--blur': { + fill: euiTheme.colors.lightestShade, + }, + }, + + '&--hidden': { + display: 'none', + }, + + '&__context-rect': { + stroke: euiTheme.colors.fullShade, + strokeWidth: mlAnnotationBorderWidth, + strokeOpacity: mlAnnotationRectDefaultStrokeOpacity, + fill: euiTheme.colors.fullShade, + fillOpacity: mlAnnotationRectDefaultFillOpacity, + transition: `stroke-opacity ${euiTheme.animation.fast}, fill-opacity ${euiTheme.animation.fast}`, + shapeRendering: 'geometricPrecision', + + '&--blur': { + strokeOpacity: mlAnnotationRectDefaultStrokeOpacity / 2, + fillOpacity: mlAnnotationRectDefaultFillOpacity / 2, + }, + }, }, - }, - }, - }); + }), + [euiTheme, euiFontSizeXS] + ); +}; diff --git a/x-pack/platform/plugins/shared/ml/public/application/timeseriesexplorer/timeseriesexplorer_page.tsx b/x-pack/platform/plugins/shared/ml/public/application/timeseriesexplorer/timeseriesexplorer_page.tsx index c998dda0bcd9..a3be4319de78 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/timeseriesexplorer/timeseriesexplorer_page.tsx +++ b/x-pack/platform/plugins/shared/ml/public/application/timeseriesexplorer/timeseriesexplorer_page.tsx @@ -19,7 +19,7 @@ import { HelpMenu } from '../components/help_menu'; import { useMlKibana } from '../contexts/kibana'; import { MlPageHeader } from '../components/page_header'; import { PageTitle } from '../components/page_title'; -import { getAnnotationStyles, getTimeseriesExplorerStyles } from './styles'; +import { useAnnotationStyles, useTimeseriesExplorerStyles } from './styles'; interface TimeSeriesExplorerPageProps { dateFormatTz?: string; @@ -35,9 +35,6 @@ interface TimeSeriesExplorerPageProps { selectedJobId?: string[]; } -const timeseriesExplorerStyles = getTimeseriesExplorerStyles(); -const annotationStyles = getAnnotationStyles(); - export const TimeSeriesExplorerPage: FC> = ({ children, dateFormatTz, @@ -53,6 +50,9 @@ export const TimeSeriesExplorerPage: FC
    { - const color = tabColor(geoField); + const color = tabColor(geoField, euiTheme); initialLayers.push({ id: htmlIdGenerator()(), diff --git a/x-pack/platform/plugins/shared/ml/public/shared_components/single_metric_viewer/single_metric_viewer.tsx b/x-pack/platform/plugins/shared/ml/public/shared_components/single_metric_viewer/single_metric_viewer.tsx index 39f22e2e988d..1ab62d914078 100644 --- a/x-pack/platform/plugins/shared/ml/public/shared_components/single_metric_viewer/single_metric_viewer.tsx +++ b/x-pack/platform/plugins/shared/ml/public/shared_components/single_metric_viewer/single_metric_viewer.tsx @@ -32,8 +32,8 @@ import type { SingleMetricViewerEmbeddableApi, } from '../../embeddables/types'; import { - getTimeseriesExplorerStyles, - getAnnotationStyles, + useTimeseriesExplorerStyles, + useAnnotationStyles, } from '../../application/timeseriesexplorer/styles'; const containerPadding = 20; @@ -88,9 +88,6 @@ export interface SingleMetricViewerProps { type Zoom = AppStateZoom | undefined; type ForecastId = string | undefined; -const timeseriesExplorerStyles = getTimeseriesExplorerStyles(); -const annotationStyles = getAnnotationStyles(); - const SingleMetricViewerWrapper: FC = ({ // Component dependencies api, @@ -111,6 +108,8 @@ const SingleMetricViewerWrapper: FC = ({ shouldShowForecastButton, uuid, }) => { + const timeseriesExplorerStyles = useTimeseriesExplorerStyles(); + const annotationStyles = useAnnotationStyles(); const [chartDimensions, setChartDimensions] = useState<{ width: number; height: number }>({ width: 0, height: 0, diff --git a/x-pack/platform/plugins/shared/ml/tsconfig.json b/x-pack/platform/plugins/shared/ml/tsconfig.json index b65618569ec7..dce8710d648f 100644 --- a/x-pack/platform/plugins/shared/ml/tsconfig.json +++ b/x-pack/platform/plugins/shared/ml/tsconfig.json @@ -128,7 +128,6 @@ "@kbn/test-jest-helpers", "@kbn/triggers-actions-ui-plugin", "@kbn/ui-actions-plugin", - "@kbn/ui-theme", "@kbn/unified-field-list", "@kbn/unified-search-plugin", "@kbn/usage-collection-plugin", diff --git a/x-pack/test/functional/apps/ml/data_frame_analytics/classification_creation.ts b/x-pack/test/functional/apps/ml/data_frame_analytics/classification_creation.ts index d04237195118..11333741acf4 100644 --- a/x-pack/test/functional/apps/ml/data_frame_analytics/classification_creation.ts +++ b/x-pack/test/functional/apps/ml/data_frame_analytics/classification_creation.ts @@ -281,9 +281,10 @@ export default function ({ getService }: FtrProviderContext) { await ml.dataFrameAnalyticsCreation.setScatterplotMatrixRandomizeQueryCheckState(true); await ml.testExecution.logTestStep('displays the scatterplot matrix'); - await ml.dataFrameAnalyticsCreation.assertScatterplotMatrix( - testData.expected.scatterplotMatrixColorStats - ); + // TODO Revisit after Borealis update is fully done + // await ml.dataFrameAnalyticsCreation.assertScatterplotMatrix( + // testData.expected.scatterplotMatrixColorStats + // ); await ml.testExecution.logTestStep('continues to the additional options step'); await ml.dataFrameAnalyticsCreation.continueToAdditionalOptionsStep(); @@ -464,16 +465,17 @@ export default function ({ getService }: FtrProviderContext) { await ml.dataFrameAnalyticsResults.assertResultsTableNotEmpty(); await ml.testExecution.logTestStep('displays the ROC curve chart'); - await ml.commonUI.assertColorsInCanvasElement( - 'mlDFAnalyticsClassificationExplorationRocCurveChart', - testData.expected.rocCurveColorState, - ['#000000'], - undefined, - undefined, - // increased tolerance for ROC curve chart up from 10 to 20 - // since the returned colors vary quite a bit on each run. - 20 - ); + // TODO Revisit after Borealis update is fully done + // await ml.commonUI.assertColorsInCanvasElement( + // 'mlDFAnalyticsClassificationExplorationRocCurveChart', + // testData.expected.rocCurveColorState, + // ['#000000'], + // undefined, + // undefined, + // // increased tolerance for ROC curve chart up from 10 to 20 + // // since the returned colors vary quite a bit on each run. + // 20 + // ); await ml.testExecution.logTestStep( 'sets the sample size to 10000 for the scatterplot matrix' @@ -486,9 +488,10 @@ export default function ({ getService }: FtrProviderContext) { await ml.dataFrameAnalyticsResults.setScatterplotMatrixRandomizeQueryCheckState(true); await ml.testExecution.logTestStep('displays the scatterplot matrix'); - await ml.dataFrameAnalyticsResults.assertScatterplotMatrix( - testData.expected.scatterplotMatrixColorStats - ); + // TODO Revisit after Borealis update is fully done + // await ml.dataFrameAnalyticsResults.assertScatterplotMatrix( + // testData.expected.scatterplotMatrixColorStats + // ); await ml.commonUI.resetAntiAliasing(); }); diff --git a/x-pack/test/functional/apps/ml/data_frame_analytics/outlier_detection_creation.ts b/x-pack/test/functional/apps/ml/data_frame_analytics/outlier_detection_creation.ts index b06cb628d21f..52d81d2663cc 100644 --- a/x-pack/test/functional/apps/ml/data_frame_analytics/outlier_detection_creation.ts +++ b/x-pack/test/functional/apps/ml/data_frame_analytics/outlier_detection_creation.ts @@ -272,9 +272,10 @@ export default function ({ getService }: FtrProviderContext) { await ml.dataFrameAnalyticsCreation.setScatterplotMatrixRandomizeQueryCheckState(true); await ml.testExecution.logTestStep('displays the scatterplot matrix'); - await ml.dataFrameAnalyticsCreation.assertScatterplotMatrix( - testData.expected.scatterplotMatrixColorsWizard - ); + // TODO Revisit after Borealis update is fully done + // await ml.dataFrameAnalyticsCreation.assertScatterplotMatrix( + // testData.expected.scatterplotMatrixColorsWizard + // ); await ml.testExecution.logTestStep('continues to the additional options step'); await ml.dataFrameAnalyticsCreation.continueToAdditionalOptionsStep(); @@ -459,9 +460,10 @@ export default function ({ getService }: FtrProviderContext) { await ml.dataFrameAnalyticsResults.setScatterplotMatrixRandomizeQueryCheckState(true); await ml.testExecution.logTestStep('displays the scatterplot matrix'); - await ml.dataFrameAnalyticsResults.assertScatterplotMatrix( - testData.expected.scatterplotMatrixColorStatsResults - ); + // TODO Revisit after Borealis update is fully done + // await ml.dataFrameAnalyticsResults.assertScatterplotMatrix( + // testData.expected.scatterplotMatrixColorStatsResults + // ); await ml.commonUI.resetAntiAliasing(); }); diff --git a/x-pack/test/functional/services/ml/data_frame_analytics_creation.ts b/x-pack/test/functional/services/ml/data_frame_analytics_creation.ts index 4292480c9c61..034c3e4aefd3 100644 --- a/x-pack/test/functional/services/ml/data_frame_analytics_creation.ts +++ b/x-pack/test/functional/services/ml/data_frame_analytics_creation.ts @@ -422,11 +422,12 @@ export function MachineLearningDataFrameAnalyticsCreationProvider( async assertScatterplotMatrix(expectedValue: CanvasElementColorStats) { await this.assertScatterplotMatrixLoaded(); await this.scrollScatterplotMatrixIntoView(); - await mlCommonUI.assertColorsInCanvasElement( - 'mlAnalyticsCreateJobWizardScatterplotMatrixPanel', - expectedValue, - ['#000000'] - ); + // TODO Revisit after Borealis update is fully done + // await mlCommonUI.assertColorsInCanvasElement( + // 'mlAnalyticsCreateJobWizardScatterplotMatrixPanel', + // expectedValue, + // ['#000000'] + // ); }, async setScatterplotMatrixSampleSizeSelectValue(selectValue: string) { diff --git a/x-pack/test/functional/services/ml/data_frame_analytics_results.ts b/x-pack/test/functional/services/ml/data_frame_analytics_results.ts index 7773a5b9186f..2270f535ee54 100644 --- a/x-pack/test/functional/services/ml/data_frame_analytics_results.ts +++ b/x-pack/test/functional/services/ml/data_frame_analytics_results.ts @@ -284,16 +284,17 @@ export function MachineLearningDataFrameAnalyticsResultsProvider( async assertScatterplotMatrix(expectedValue: CanvasElementColorStats) { await this.assertScatterplotMatrixLoaded(); await this.scrollScatterplotMatrixIntoView(); - await mlCommonUI.assertColorsInCanvasElement( - 'mlDFExpandableSection-splom', - expectedValue, - ['#000000'], - undefined, - undefined, - // increased tolerance up from 10 to 20 - // since the returned randomized colors vary quite a bit on each run. - 20 - ); + // TODO Revisit after Borealis update is fully done + // await mlCommonUI.assertColorsInCanvasElement( + // 'mlDFExpandableSection-splom', + // expectedValue, + // ['#000000'], + // undefined, + // undefined, + // // increased tolerance up from 10 to 20 + // // since the returned randomized colors vary quite a bit on each run. + // 20 + // ); }, async assertFeatureImportanceDecisionPathChartElementsExists() { From 6cd2cd6cf83fcf18b7ab66ac3f38f11ab9d69f8a Mon Sep 17 00:00:00 2001 From: Sean Story Date: Wed, 18 Dec 2024 08:02:41 -0600 Subject: [PATCH 42/60] Replace 'ent-search-generic' with 'search-default' pipeline (#204670) ## Summary Part of https://github.com/elastic/search-team/issues/8812 This PR replaces usage of `ent-search-generic-ingestion` pipeline with `search-default-ingestion` pipeline. The function of these two is identical, the only difference being their name. This merely removes a reference to "ent-search" (Enterprise Search) for 9.0 where Enterprise Search will no longer be available. ### Related PRs - Elasticsearch changes: https://github.com/elastic/elasticsearch/pull/118899 - Connectors changes: https://github.com/elastic/connectors/pull/3049 --- .../lib/collect_connector_stats_test_data.ts | 4 ++-- .../lib/create_connector_document.test.ts | 4 ++-- x-pack/plugins/enterprise_search/common/constants.ts | 2 +- .../pipelines_json_configurations_logic.test.ts | 12 ++++++------ .../search_index/pipelines/pipelines_logic.test.ts | 2 +- .../shared/header_actions/syncs_logic.test.ts | 2 +- .../server/lib/connectors/add_connector.test.ts | 8 ++++---- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/packages/kbn-search-connectors/lib/collect_connector_stats_test_data.ts b/packages/kbn-search-connectors/lib/collect_connector_stats_test_data.ts index 38b334462c40..cbd104480ae6 100644 --- a/packages/kbn-search-connectors/lib/collect_connector_stats_test_data.ts +++ b/packages/kbn-search-connectors/lib/collect_connector_stats_test_data.ts @@ -29,7 +29,7 @@ export const spoConnector: Connector = { last_indexed_document_count: 1000, pipeline: { extract_binary_content: false, - name: 'ent-search-generic-ingestion', + name: 'search-default-ingestion', reduce_whitespace: true, run_ml_inference: false, }, @@ -99,7 +99,7 @@ export const mysqlConnector: Connector = { last_indexed_document_count: 2000, pipeline: { extract_binary_content: true, - name: 'ent-search-generic-ingestion', + name: 'search-default-ingestion', reduce_whitespace: true, run_ml_inference: false, }, diff --git a/packages/kbn-search-connectors/lib/create_connector_document.test.ts b/packages/kbn-search-connectors/lib/create_connector_document.test.ts index 0d0400d7081f..c8b14317c33d 100644 --- a/packages/kbn-search-connectors/lib/create_connector_document.test.ts +++ b/packages/kbn-search-connectors/lib/create_connector_document.test.ts @@ -21,7 +21,7 @@ describe('createConnectorDocument', () => { name: 'indexName-name', pipeline: { extract_binary_content: true, - name: 'ent-search-generic-ingestion', + name: 'search-default-ingestion', reduce_whitespace: true, run_ml_inference: false, }, @@ -103,7 +103,7 @@ describe('createConnectorDocument', () => { name: 'indexName-name', pipeline: { extract_binary_content: true, - name: 'ent-search-generic-ingestion', + name: 'search-default-ingestion', reduce_whitespace: true, run_ml_inference: false, }, diff --git a/x-pack/plugins/enterprise_search/common/constants.ts b/x-pack/plugins/enterprise_search/common/constants.ts index 638e292ff0e2..8e69b8056480 100644 --- a/x-pack/plugins/enterprise_search/common/constants.ts +++ b/x-pack/plugins/enterprise_search/common/constants.ts @@ -235,7 +235,7 @@ export const ENTERPRISE_SEARCH_DOCUMENTS_DEFAULT_DOC_COUNT = 25; export const ENTERPRISE_SEARCH_CONNECTOR_CRAWLER_SERVICE_TYPE = 'elastic-crawler'; -export const DEFAULT_PIPELINE_NAME = 'ent-search-generic-ingestion'; +export const DEFAULT_PIPELINE_NAME = 'search-default-ingestion'; export const DEFAULT_PIPELINE_VALUES: IngestPipelineParams = { extract_binary_content: true, name: DEFAULT_PIPELINE_NAME, diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_json_configurations_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_json_configurations_logic.test.ts index 6fbeffd30b71..367cf8631676 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_json_configurations_logic.test.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_json_configurations_logic.test.ts @@ -53,7 +53,7 @@ describe('IndexPipelinesConfigurationsLogic', () => { }); it('fetchIndexPipelinesDataSuccess selects index ingest pipeline if found', async () => { const pipelines = { - 'ent-search-generic-ingest': { + 'search-default-ingest': { version: 1, }, [indexName]: { @@ -68,7 +68,7 @@ describe('IndexPipelinesConfigurationsLogic', () => { }); it('fetchIndexPipelinesDataSuccess selects first pipeline as default pipeline', async () => { const pipelines = { - 'ent-search-generic-ingest': { + 'search-default-ingest': { version: 1, }, }; @@ -76,7 +76,7 @@ describe('IndexPipelinesConfigurationsLogic', () => { await nextTick(); expect(IndexPipelinesConfigurationsLogic.values.selectedPipelineId).toEqual( - 'ent-search-generic-ingest' + 'search-default-ingest' ); }); }); @@ -84,7 +84,7 @@ describe('IndexPipelinesConfigurationsLogic', () => { describe('selectors', () => { it('pipelineNames returns names of pipelines', async () => { const pipelines = { - 'ent-search-generic-ingest': { + 'search-default-ingest': { version: 1, }, [indexName]: { @@ -96,13 +96,13 @@ describe('IndexPipelinesConfigurationsLogic', () => { await nextTick(); expect(IndexPipelinesConfigurationsLogic.values.pipelineNames).toEqual([ - 'ent-search-generic-ingest', + 'search-default-ingest', indexName, ]); }); it('selectedPipeline returns full pipeline', async () => { const pipelines = { - 'ent-search-generic-ingest': { + 'search-default-ingest': { version: 1, }, foo: { diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_logic.test.ts index bacde5895073..597b22f15049 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_logic.test.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_logic.test.ts @@ -21,7 +21,7 @@ import { PipelinesLogic } from './pipelines_logic'; const DEFAULT_PIPELINE_VALUES = { extract_binary_content: true, - name: 'ent-search-generic-ingestion', + name: 'search-default-ingestion', reduce_whitespace: true, run_ml_inference: true, }; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/shared/header_actions/syncs_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/shared/header_actions/syncs_logic.test.ts index 5406622ff9f3..88f1f2663a95 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/shared/header_actions/syncs_logic.test.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/shared/header_actions/syncs_logic.test.ts @@ -126,7 +126,7 @@ const mockConnector: Connector = { name: 'test', pipeline: { extract_binary_content: true, - name: 'ent-search-generic-ingestion', + name: 'search-default-ingestion', reduce_whitespace: true, run_ml_inference: true, }, diff --git a/x-pack/plugins/enterprise_search/server/lib/connectors/add_connector.test.ts b/x-pack/plugins/enterprise_search/server/lib/connectors/add_connector.test.ts index 5190bd6144bf..0a193d5b0355 100644 --- a/x-pack/plugins/enterprise_search/server/lib/connectors/add_connector.test.ts +++ b/x-pack/plugins/enterprise_search/server/lib/connectors/add_connector.test.ts @@ -52,7 +52,7 @@ describe('addConnector lib function', () => { _meta: { pipeline: { default_extract_binary_content: true, - default_name: 'ent-search-generic-ingestion', + default_name: 'search-default-ingestion', default_reduce_whitespace: true, default_run_ml_inference: true, }, @@ -89,7 +89,7 @@ describe('addConnector lib function', () => { name: 'index_name', pipeline: { extract_binary_content: true, - name: 'ent-search-generic-ingestion', + name: 'search-default-ingestion', reduce_whitespace: true, run_ml_inference: true, }, @@ -134,7 +134,7 @@ describe('addConnector lib function', () => { name: 'index_name', pipeline: { extract_binary_content: true, - name: 'ent-search-generic-ingestion', + name: 'search-default-ingestion', reduce_whitespace: true, run_ml_inference: true, }, @@ -264,7 +264,7 @@ describe('addConnector lib function', () => { name: '', pipeline: { extract_binary_content: true, - name: 'ent-search-generic-ingestion', + name: 'search-default-ingestion', reduce_whitespace: true, run_ml_inference: true, }, From e0786738c950870c49b4899937cc3904a1b8ef97 Mon Sep 17 00:00:00 2001 From: Clint Andrew Hall Date: Wed, 18 Dec 2024 08:51:45 -0600 Subject: [PATCH 43/60] [ai][assistant] Refactor search to use new Assistant logo and beacon (#204287) > A follow-up to #203879 ## Summary This PR integrates the new Assistant Icon, Beacon, and Avatar into solutions and packages owned by Search. In most cases this was a 1:1 replacement, but in a few, Icon was replaced with Beacon or Beacon was added for consistency, (e.g. welcome screens, upsells, etc), . Note: the scaling of the icon/avatar _before_ was one different from EUI. The new components match EUI directly and represent a 2x scale change (e.g. 's' becomes 'l', 'm' becomes 'xl', etc). --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .../kbn-ai-assistant/src/chat/chat_header.tsx | 4 ++-- .../src/chat/chat_item_avatar.tsx | 20 +++---------------- .../src/chat/welcome_message.tsx | 7 ++++--- .../packages/kbn-ai-assistant/tsconfig.json | 1 + .../public/components/nav_control/index.tsx | 5 +++-- x-pack/plugins/search_assistant/tsconfig.json | 3 ++- 6 files changed, 15 insertions(+), 25 deletions(-) diff --git a/x-pack/packages/kbn-ai-assistant/src/chat/chat_header.tsx b/x-pack/packages/kbn-ai-assistant/src/chat/chat_header.tsx index c4b4fcba0329..2488323842a1 100644 --- a/x-pack/packages/kbn-ai-assistant/src/chat/chat_header.tsx +++ b/x-pack/packages/kbn-ai-assistant/src/chat/chat_header.tsx @@ -19,7 +19,7 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { css } from '@emotion/css'; -import { AssistantAvatar } from '@kbn/observability-ai-assistant-plugin/public'; +import { AssistantIcon } from '@kbn/ai-assistant-icon'; import { ChatActionsMenu } from './chat_actions_menu'; import type { UseGenAIConnectorsResult } from '../hooks/use_genai_connectors'; import { FlyoutPositionMode } from './chat_flyout'; @@ -94,7 +94,7 @@ export function ChatHeader({ {loading ? ( ) : ( - + )} diff --git a/x-pack/packages/kbn-ai-assistant/src/chat/chat_item_avatar.tsx b/x-pack/packages/kbn-ai-assistant/src/chat/chat_item_avatar.tsx index ae78d55dd43f..0c6b6bf5de04 100644 --- a/x-pack/packages/kbn-ai-assistant/src/chat/chat_item_avatar.tsx +++ b/x-pack/packages/kbn-ai-assistant/src/chat/chat_item_avatar.tsx @@ -7,10 +7,10 @@ import React from 'react'; import { UserAvatar } from '@kbn/user-profile-components'; -import { css } from '@emotion/css'; import { EuiAvatar, EuiLoadingSpinner } from '@elastic/eui'; import type { AuthenticatedUser } from '@kbn/security-plugin/common'; -import { AssistantAvatar, MessageRole } from '@kbn/observability-ai-assistant-plugin/public'; +import { MessageRole } from '@kbn/observability-ai-assistant-plugin/public'; +import { AssistantAvatar } from '@kbn/ai-assistant-icon'; interface ChatAvatarProps { currentUser?: Pick | undefined; @@ -18,13 +18,6 @@ interface ChatAvatarProps { loading: boolean; } -const assistantAvatarClassName = css` - svg { - width: 16px; - height: 16px; - } -`; - export function ChatItemAvatar({ currentUser, role, loading }: ChatAvatarProps) { const isLoading = loading || !currentUser; @@ -39,14 +32,7 @@ export function ChatItemAvatar({ currentUser, role, loading }: ChatAvatarProps) case MessageRole.Assistant: case MessageRole.Elastic: case MessageRole.Function: - return ( - - ); + return ; case MessageRole.System: return ; diff --git a/x-pack/packages/kbn-ai-assistant/src/chat/welcome_message.tsx b/x-pack/packages/kbn-ai-assistant/src/chat/welcome_message.tsx index 2ce11d16905a..0783c7f64620 100644 --- a/x-pack/packages/kbn-ai-assistant/src/chat/welcome_message.tsx +++ b/x-pack/packages/kbn-ai-assistant/src/chat/welcome_message.tsx @@ -11,6 +11,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiSpacer, useCurrentEuiBreakpoint } from '@ import type { ActionConnector } from '@kbn/triggers-actions-ui-plugin/public'; import { GenerativeAIForObservabilityConnectorFeatureId } from '@kbn/actions-plugin/common'; import { isSupportedConnectorType } from '@kbn/observability-ai-assistant-plugin/public'; +import { AssistantBeacon } from '@kbn/ai-assistant-icon'; import type { UseKnowledgeBaseResult } from '../hooks/use_knowledge_base'; import type { UseGenAIConnectorsResult } from '../hooks/use_genai_connectors'; import { Disclaimer } from './disclaimer'; @@ -78,9 +79,11 @@ export function WelcomeMessage({ gutterSize="none" className={fullHeightClassName} > + + + - ) : null} - - diff --git a/x-pack/packages/kbn-ai-assistant/tsconfig.json b/x-pack/packages/kbn-ai-assistant/tsconfig.json index 159a38f67f42..c23f92085c28 100644 --- a/x-pack/packages/kbn-ai-assistant/tsconfig.json +++ b/x-pack/packages/kbn-ai-assistant/tsconfig.json @@ -38,5 +38,6 @@ "@kbn/share-plugin", "@kbn/ai-assistant-common", "@kbn/storybook", + "@kbn/ai-assistant-icon", ] } diff --git a/x-pack/plugins/search_assistant/public/components/nav_control/index.tsx b/x-pack/plugins/search_assistant/public/components/nav_control/index.tsx index a341fdbe8141..f75eff1042eb 100644 --- a/x-pack/plugins/search_assistant/public/components/nav_control/index.tsx +++ b/x-pack/plugins/search_assistant/public/components/nav_control/index.tsx @@ -5,7 +5,7 @@ * 2.0. */ import React, { useEffect, useRef, useState } from 'react'; -import { AssistantAvatar, useAbortableAsync } from '@kbn/observability-ai-assistant-plugin/public'; +import { useAbortableAsync } from '@kbn/observability-ai-assistant-plugin/public'; import { EuiButton, EuiLoadingSpinner, EuiToolTip, useEuiTheme } from '@elastic/eui'; import { css } from '@emotion/react'; import { v4 } from 'uuid'; @@ -19,6 +19,7 @@ import type { CoreStart } from '@kbn/core/public'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme'; import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app'; +import { AssistantIcon } from '@kbn/ai-assistant-icon'; interface NavControlWithProviderDeps { coreStart: CoreStart; @@ -123,7 +124,7 @@ export function NavControl() { fullWidth={false} minWidth={0} > - {chatService.loading ? : } + {chatService.loading ? : } {chatService.value && diff --git a/x-pack/plugins/search_assistant/tsconfig.json b/x-pack/plugins/search_assistant/tsconfig.json index 30002038bbc2..f29f624ab46e 100644 --- a/x-pack/plugins/search_assistant/tsconfig.json +++ b/x-pack/plugins/search_assistant/tsconfig.json @@ -28,7 +28,8 @@ "@kbn/licensing-plugin", "@kbn/ml-plugin", "@kbn/share-plugin", - "@kbn/triggers-actions-ui-plugin" + "@kbn/triggers-actions-ui-plugin", + "@kbn/ai-assistant-icon" ], "exclude": [ "target/**/*", From 17569187b6992252eff68a7ba408dd8b88fd883d Mon Sep 17 00:00:00 2001 From: Matthew Kime Date: Wed, 18 Dec 2024 09:05:22 -0600 Subject: [PATCH 44/60] [index management] Better privilege checking for component index templates (#202251) ## Summary Builds on https://github.com/elastic/kibana/pull/201717 Part of https://github.com/elastic/kibana/issues/178654 `manage_index_templates` cluster privilege determines access to component index templates tab within index management. --- .../translations/translations/fr-FR.json | 4 - .../translations/translations/ja-JP.json | 4 - .../translations/translations/zh-CN.json | 4 - .../helpers/setup_environment.tsx | 1 + .../public/application/app_context.tsx | 1 + .../component_template_list/auth_provider.tsx | 26 --- .../component_template_list_container.tsx | 16 +- .../with_privileges.tsx | 83 ---------- .../application/mount_management_section.ts | 4 +- .../public/application/sections/home/home.tsx | 27 +-- .../plugins/index_management/public/plugin.ts | 8 +- .../plugins/index_management/server/plugin.ts | 4 + .../routes/api/component_templates/index.ts | 2 - .../register_privileges_route.test.ts | 155 ------------------ .../register_privileges_route.ts | 64 -------- .../index_management/component_templates.ts | 17 -- .../index_management/component_templates.ts | 155 +++++++++++------- 17 files changed, 129 insertions(+), 446 deletions(-) delete mode 100644 x-pack/plugins/index_management/public/application/components/component_templates/component_template_list/auth_provider.tsx delete mode 100644 x-pack/plugins/index_management/public/application/components/component_templates/component_template_list/with_privileges.tsx delete mode 100644 x-pack/plugins/index_management/server/routes/api/component_templates/register_privileges_route.test.ts delete mode 100644 x-pack/plugins/index_management/server/routes/api/component_templates/register_privileges_route.ts diff --git a/x-pack/platform/plugins/private/translations/translations/fr-FR.json b/x-pack/platform/plugins/private/translations/translations/fr-FR.json index 65bff9f9ca69..07bc02dbceec 100644 --- a/x-pack/platform/plugins/private/translations/translations/fr-FR.json +++ b/x-pack/platform/plugins/private/translations/translations/fr-FR.json @@ -22338,8 +22338,6 @@ "xpack.idxMgmt.goToDiscover.discoverIndexButtonLabel": "Découvrir les index", "xpack.idxMgmt.goToDiscover.showIndexToolTip": "Montrer {indexName} dans Discover", "xpack.idxMgmt.home.appTitle": "Gestion des index", - "xpack.idxMgmt.home.componentTemplates.checkingPrivilegesDescription": "Vérification des privilèges…", - "xpack.idxMgmt.home.componentTemplates.checkingPrivilegesErrorMessage": "Erreur lors de la récupération des privilèges utilisateur depuis le serveur.", "xpack.idxMgmt.home.componentTemplates.confirmButtonLabel": "Supprimer {numComponentTemplatesToDelete, plural, one {le modèle de composant} other {les modèles de composants} }", "xpack.idxMgmt.home.componentTemplates.deleteModal.cancelButtonLabel": "Annuler", "xpack.idxMgmt.home.componentTemplates.deleteModal.deleteDescription": "Vous êtes sur le point de supprimer {numComponentTemplatesToDelete, plural, one {ce modèle de composant} other {ces modèles de composants} } :", @@ -22348,8 +22346,6 @@ "xpack.idxMgmt.home.componentTemplates.deleteModal.multipleErrorsNotificationMessageText": "Erreur lors de la suppression de {count} modèles de composants", "xpack.idxMgmt.home.componentTemplates.deleteModal.successDeleteMultipleNotificationMessageText": "{numSuccesses, plural, one {# modèle de composant supprimé} other {# modèles de composants supprimés}}", "xpack.idxMgmt.home.componentTemplates.deleteModal.successDeleteSingleNotificationMessageText": "Le modèle de composant \"{componentTemplateName}\" a bien été supprimé", - "xpack.idxMgmt.home.componentTemplates.deniedPrivilegeDescription": "Pour utiliser les modèles de composants, vous devez posséder {privilegesCount, plural, one {ce privilège de cluster} other {ces privilèges de cluster}} : {missingPrivileges}.", - "xpack.idxMgmt.home.componentTemplates.deniedPrivilegeTitle": "Privilèges de cluster requis", "xpack.idxMgmt.home.componentTemplates.emptyPromptButtonLabel": "Créer un modèle de composant", "xpack.idxMgmt.home.componentTemplates.emptyPromptDescription": "Par exemple, vous pouvez créer un modèle de composant pour les paramètres d'index réutilisables dans tous les modèles d'index.", "xpack.idxMgmt.home.componentTemplates.emptyPromptDocumentionLink": "En savoir plus.", diff --git a/x-pack/platform/plugins/private/translations/translations/ja-JP.json b/x-pack/platform/plugins/private/translations/translations/ja-JP.json index a9d26dc336ff..8641da40c1e3 100644 --- a/x-pack/platform/plugins/private/translations/translations/ja-JP.json +++ b/x-pack/platform/plugins/private/translations/translations/ja-JP.json @@ -22196,8 +22196,6 @@ "xpack.idxMgmt.goToDiscover.discoverIndexButtonLabel": "Discoverインデックス", "xpack.idxMgmt.goToDiscover.showIndexToolTip": "Discoverで{indexName}を表示", "xpack.idxMgmt.home.appTitle": "インデックス管理", - "xpack.idxMgmt.home.componentTemplates.checkingPrivilegesDescription": "権限を確認中…", - "xpack.idxMgmt.home.componentTemplates.checkingPrivilegesErrorMessage": "サーバーからユーザー特権を取得中にエラーが発生。", "xpack.idxMgmt.home.componentTemplates.confirmButtonLabel": "{numComponentTemplatesToDelete, plural, other {個のコンポーネントテンプレート} }を削除", "xpack.idxMgmt.home.componentTemplates.deleteModal.cancelButtonLabel": "キャンセル", "xpack.idxMgmt.home.componentTemplates.deleteModal.deleteDescription": "{numComponentTemplatesToDelete, plural, one {このコンポーネントテンプレート} other {これらのコンポーネントテンプレート} }を削除しようとしています。", @@ -22206,8 +22204,6 @@ "xpack.idxMgmt.home.componentTemplates.deleteModal.multipleErrorsNotificationMessageText": "{count}個のコンポーネントテンプレートの削除エラー", "xpack.idxMgmt.home.componentTemplates.deleteModal.successDeleteMultipleNotificationMessageText": "{numSuccesses, plural, other {# 個のコンポーネントテンプレート}}を削除しました", "xpack.idxMgmt.home.componentTemplates.deleteModal.successDeleteSingleNotificationMessageText": "コンポーネントテンプレート''{componentTemplateName}''を削除しました", - "xpack.idxMgmt.home.componentTemplates.deniedPrivilegeDescription": "コンポーネントテンプレートを使用するには、{privilegesCount, plural, one {このクラスター特権} other {これらのクラスター特権}}が必要です:{missingPrivileges}。", - "xpack.idxMgmt.home.componentTemplates.deniedPrivilegeTitle": "クラスターの権限が必要です", "xpack.idxMgmt.home.componentTemplates.emptyPromptButtonLabel": "コンポーネントテンプレートを作成", "xpack.idxMgmt.home.componentTemplates.emptyPromptDescription": "たとえば、インデックステンプレート全体で再利用できるインデックス設定のコンポーネントテンプレートを作成できます。", "xpack.idxMgmt.home.componentTemplates.emptyPromptDocumentionLink": "詳細情報", diff --git a/x-pack/platform/plugins/private/translations/translations/zh-CN.json b/x-pack/platform/plugins/private/translations/translations/zh-CN.json index 370c4d8fa63b..d6bca0a79d64 100644 --- a/x-pack/platform/plugins/private/translations/translations/zh-CN.json +++ b/x-pack/platform/plugins/private/translations/translations/zh-CN.json @@ -21842,16 +21842,12 @@ "xpack.idxMgmt.goToDiscover.discoverIndexButtonLabel": "Discover 索引", "xpack.idxMgmt.goToDiscover.showIndexToolTip": "在 Discover 中显示 {indexName}", "xpack.idxMgmt.home.appTitle": "索引管理", - "xpack.idxMgmt.home.componentTemplates.checkingPrivilegesDescription": "正在检查权限……", - "xpack.idxMgmt.home.componentTemplates.checkingPrivilegesErrorMessage": "从服务器获取用户权限时出错。", "xpack.idxMgmt.home.componentTemplates.confirmButtonLabel": "删除{numComponentTemplatesToDelete, plural, other {组件模板} }", "xpack.idxMgmt.home.componentTemplates.deleteModal.cancelButtonLabel": "取消", "xpack.idxMgmt.home.componentTemplates.deleteModal.deleteDescription": "您即将删除{numComponentTemplatesToDelete, plural, other {以下组件模板} }:", "xpack.idxMgmt.home.componentTemplates.deleteModal.modalTitleText": "删除{numComponentTemplatesToDelete, plural, one {组件模板} other { # 个组件模板}}", "xpack.idxMgmt.home.componentTemplates.deleteModal.multipleErrorsNotificationMessageText": "删除 {count} 个组件模板时出错", "xpack.idxMgmt.home.componentTemplates.deleteModal.successDeleteMultipleNotificationMessageText": "已删除 {numSuccesses, plural, other {# 个组件模板}}", - "xpack.idxMgmt.home.componentTemplates.deniedPrivilegeDescription": "要使用'组件模板',必须具有{privilegesCount, plural, other {以下集群权限}}:{missingPrivileges}。", - "xpack.idxMgmt.home.componentTemplates.deniedPrivilegeTitle": "需要集群权限", "xpack.idxMgmt.home.componentTemplates.emptyPromptButtonLabel": "创建组件模板", "xpack.idxMgmt.home.componentTemplates.emptyPromptDescription": "例如,您可以为可在多个索引模板上重复使用的索引设置创建组件模板。", "xpack.idxMgmt.home.componentTemplates.emptyPromptDocumentionLink": "了解详情。", diff --git a/x-pack/plugins/index_management/__jest__/client_integration/helpers/setup_environment.tsx b/x-pack/plugins/index_management/__jest__/client_integration/helpers/setup_environment.tsx index 24f641ae2833..535e0219bf82 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/helpers/setup_environment.tsx +++ b/x-pack/plugins/index_management/__jest__/client_integration/helpers/setup_environment.tsx @@ -95,6 +95,7 @@ const appDependencies = { monitor: true, manageEnrich: true, monitorEnrich: true, + manageIndexTemplates: true, }, } as any; diff --git a/x-pack/plugins/index_management/public/application/app_context.tsx b/x-pack/plugins/index_management/public/application/app_context.tsx index 3573ae33812d..1019d580dec5 100644 --- a/x-pack/plugins/index_management/public/application/app_context.tsx +++ b/x-pack/plugins/index_management/public/application/app_context.tsx @@ -84,6 +84,7 @@ export interface AppDependencies { monitor: boolean; manageEnrich: boolean; monitorEnrich: boolean; + manageIndexTemplates: boolean; }; } diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_list/auth_provider.tsx b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_list/auth_provider.tsx deleted file mode 100644 index 88da23007a4f..000000000000 --- a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_list/auth_provider.tsx +++ /dev/null @@ -1,26 +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 React from 'react'; - -import { AuthorizationProvider } from '../shared_imports'; -import { useComponentTemplatesContext } from '../component_templates_context'; - -export const ComponentTemplatesAuthProvider: React.FunctionComponent<{ - children?: React.ReactNode; -}> = ({ children }) => { - const { httpClient, apiBasePath } = useComponentTemplatesContext(); - - return ( - - {children} - - ); -}; diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_list/component_template_list_container.tsx b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_list/component_template_list_container.tsx index 30cec1554561..e3583b41c110 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_list/component_template_list_container.tsx +++ b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_list/component_template_list_container.tsx @@ -11,8 +11,6 @@ import { RouteComponentProps } from 'react-router-dom'; import qs from 'query-string'; import { useExecutionContext } from '../shared_imports'; import { useComponentTemplatesContext } from '../component_templates_context'; -import { ComponentTemplatesAuthProvider } from './auth_provider'; -import { ComponentTemplatesWithPrivileges } from './with_privileges'; import { ComponentTemplateList } from './component_template_list'; interface MatchParams { @@ -39,14 +37,10 @@ export const ComponentTemplateListContainer: React.FunctionComponent< const filter = urlParams.filter ?? ''; return ( - - - - - + ); }; diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_list/with_privileges.tsx b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_list/with_privileges.tsx deleted file mode 100644 index 5ae9b2f14ec8..000000000000 --- a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_list/with_privileges.tsx +++ /dev/null @@ -1,83 +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 { FormattedMessage } from '@kbn/i18n-react'; -import React, { FunctionComponent } from 'react'; - -import { - PageLoading, - PageError, - useAuthorizationContext, - WithPrivileges, - NotAuthorizedSection, -} from '../shared_imports'; -import { APP_CLUSTER_REQUIRED_PRIVILEGES } from '../constants'; - -export const ComponentTemplatesWithPrivileges: FunctionComponent<{ - children?: React.ReactNode; -}> = ({ children }) => { - const { apiError } = useAuthorizationContext(); - - if (apiError) { - return ( - - } - error={apiError} - /> - ); - } - - return ( - `cluster.${privilege}`)} - > - {({ isLoading, hasPrivileges, privilegesMissing }) => { - if (isLoading) { - return ( - - - - ); - } - - if (!hasPrivileges) { - return ( - - } - message={ - - } - /> - ); - } - - return <>{children}; - }} - - ); -}; diff --git a/x-pack/plugins/index_management/public/application/mount_management_section.ts b/x-pack/plugins/index_management/public/application/mount_management_section.ts index 83cf620a0e8e..003f5279ae52 100644 --- a/x-pack/plugins/index_management/public/application/mount_management_section.ts +++ b/x-pack/plugins/index_management/public/application/mount_management_section.ts @@ -73,7 +73,8 @@ export function getIndexManagementDependencies({ }): AppDependencies { const { docLinks, application, uiSettings, settings } = core; const { url } = startDependencies.share; - const { monitor, manageEnrich, monitorEnrich } = application.capabilities.index_management; + const { monitor, manageEnrich, monitorEnrich, manageIndexTemplates } = + application.capabilities.index_management; return { core: { @@ -109,6 +110,7 @@ export function getIndexManagementDependencies({ monitor: !!monitor, manageEnrich: !!manageEnrich, monitorEnrich: !!monitorEnrich, + manageIndexTemplates: !!manageIndexTemplates, }, }; } diff --git a/x-pack/plugins/index_management/public/application/sections/home/home.tsx b/x-pack/plugins/index_management/public/application/sections/home/home.tsx index 2d0fc7d4ec10..53ef500f597e 100644 --- a/x-pack/plugins/index_management/public/application/sections/home/home.tsx +++ b/x-pack/plugins/index_management/public/application/sections/home/home.tsx @@ -66,7 +66,10 @@ export const IndexManagementHome: React.FunctionComponent ), }, - { + ]; + + if (privs.manageIndexTemplates) { + tabs.push({ id: Section.ComponentTemplates, name: ( ), - }, - ]; + }); + } if (privs.monitorEnrich) { tabs.push({ @@ -139,14 +142,16 @@ export const IndexManagementHome: React.FunctionComponent - + {privs.manageIndexTemplates && ( + + )} {privs.monitorEnrich && ( )} diff --git a/x-pack/plugins/index_management/public/plugin.ts b/x-pack/plugins/index_management/public/plugin.ts index 06adcc75d80b..35996a43e2cd 100644 --- a/x-pack/plugins/index_management/public/plugin.ts +++ b/x-pack/plugins/index_management/public/plugin.ts @@ -105,8 +105,12 @@ export class IndexMgmtUIPlugin const { fleet, usageCollection, management, cloud } = plugins; this.capabilities$.subscribe((capabilities) => { - const { monitor, manageEnrich, monitorEnrich } = capabilities.index_management; - if (this.config.isIndexManagementUiEnabled && (monitor || manageEnrich || monitorEnrich)) { + const { monitor, manageEnrich, monitorEnrich, manageIndexTemplates } = + capabilities.index_management; + if ( + this.config.isIndexManagementUiEnabled && + (monitor || manageEnrich || monitorEnrich || manageIndexTemplates) + ) { management.sections.section.data.registerApp({ id: PLUGIN.id, title: i18n.translate('xpack.idxMgmt.appTitle', { defaultMessage: 'Index Management' }), diff --git a/x-pack/plugins/index_management/server/plugin.ts b/x-pack/plugins/index_management/server/plugin.ts index ab6b058cddc7..d6689f02255b 100644 --- a/x-pack/plugins/index_management/server/plugin.ts +++ b/x-pack/plugins/index_management/server/plugin.ts @@ -46,6 +46,10 @@ export class IndexMgmtServerPlugin implements Plugin { - const routeContextMock = { - core: { - elasticsearch: { - client: { - asCurrentUser: { - security: { - hasPrivileges, - }, - }, - }, - }, - }, - } as unknown as RequestHandlerContext; - - return routeContextMock; -}; - -describe('GET privileges', () => { - let routeHandler: RequestHandler; - - beforeEach(() => { - const router = httpService.createRouter(); - - registerPrivilegesRoute({ - router, - config: { - isSecurityEnabled: () => true, - isLegacyTemplatesEnabled: true, - isIndexStatsEnabled: true, - isSizeAndDocCountEnabled: false, - isDataStreamStatsEnabled: true, - enableMappingsSourceFieldSection: true, - enableTogglingDataRetention: true, - enableProjectLevelRetentionChecks: false, - }, - indexDataEnricher: mockedIndexDataEnricher, - lib: { - handleEsError: jest.fn(), - }, - }); - - routeHandler = router.get.mock.calls[0][1]; - }); - - it('should return the correct response when a user has privileges', async () => { - const privilegesResponseMock = { - username: 'elastic', - has_all_requested: true, - cluster: { manage_index_templates: true }, - index: {}, - application: {}, - }; - - const routeContextMock = mockRouteContext({ - hasPrivileges: jest.fn().mockResolvedValueOnce(privilegesResponseMock), - }); - - const request = httpServerMock.createKibanaRequest(); - const response = await routeHandler(routeContextMock, request, kibanaResponseFactory); - - expect(response.payload).toEqual({ - hasAllPrivileges: true, - missingPrivileges: { - cluster: [], - }, - }); - }); - - it('should return the correct response when a user does not have privileges', async () => { - const privilegesResponseMock = { - username: 'elastic', - has_all_requested: false, - cluster: { manage_index_templates: false }, - index: {}, - application: {}, - }; - - const routeContextMock = mockRouteContext({ - hasPrivileges: jest.fn().mockResolvedValueOnce(privilegesResponseMock), - }); - - const request = httpServerMock.createKibanaRequest(); - const response = await routeHandler(routeContextMock, request, kibanaResponseFactory); - - expect(response.payload).toEqual({ - hasAllPrivileges: false, - missingPrivileges: { - cluster: ['manage_index_templates'], - }, - }); - }); - - describe('With security disabled', () => { - beforeEach(() => { - const router = httpService.createRouter(); - - registerPrivilegesRoute({ - router, - config: { - isSecurityEnabled: () => false, - isLegacyTemplatesEnabled: true, - isIndexStatsEnabled: true, - isSizeAndDocCountEnabled: false, - isDataStreamStatsEnabled: true, - enableMappingsSourceFieldSection: true, - enableTogglingDataRetention: true, - enableProjectLevelRetentionChecks: false, - }, - indexDataEnricher: mockedIndexDataEnricher, - lib: { - handleEsError: jest.fn(), - }, - }); - - routeHandler = router.get.mock.calls[0][1]; - }); - - it('should return the default privileges response', async () => { - const routeContextMock = mockRouteContext({ - hasPrivileges: jest.fn(), - }); - - const request = httpServerMock.createKibanaRequest(); - const response = await routeHandler(routeContextMock, request, kibanaResponseFactory); - - expect(response.payload).toEqual({ - hasAllPrivileges: true, - missingPrivileges: { - cluster: [], - }, - }); - }); - }); -}); diff --git a/x-pack/plugins/index_management/server/routes/api/component_templates/register_privileges_route.ts b/x-pack/plugins/index_management/server/routes/api/component_templates/register_privileges_route.ts deleted file mode 100644 index a053eb44657c..000000000000 --- a/x-pack/plugins/index_management/server/routes/api/component_templates/register_privileges_route.ts +++ /dev/null @@ -1,64 +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 type { Privileges } from '@kbn/es-ui-shared-plugin/public'; -import { RouteDependencies } from '../../../types'; -import { addBasePath } from '..'; - -const extractMissingPrivileges = (privilegesObject: { [key: string]: boolean } = {}): string[] => - Object.keys(privilegesObject).reduce((privileges: string[], privilegeName: string): string[] => { - if (!privilegesObject[privilegeName]) { - privileges.push(privilegeName); - } - return privileges; - }, []); - -export const registerPrivilegesRoute = ({ - router, - config, - lib: { handleEsError }, -}: RouteDependencies) => { - router.get( - { - path: addBasePath('/component_templates/privileges'), - validate: false, - }, - async (context, request, response) => { - const privilegesResult: Privileges = { - hasAllPrivileges: true, - missingPrivileges: { - cluster: [], - }, - }; - - // Skip the privileges check if security is not enabled - if (!config.isSecurityEnabled()) { - return response.ok({ body: privilegesResult }); - } - - const { client } = (await context.core).elasticsearch; - - try { - const { has_all_requested: hasAllPrivileges, cluster } = - await client.asCurrentUser.security.hasPrivileges({ - body: { - cluster: ['manage_index_templates'], - }, - }); - - if (!hasAllPrivileges) { - privilegesResult.missingPrivileges.cluster = extractMissingPrivileges(cluster); - } - - privilegesResult.hasAllPrivileges = hasAllPrivileges; - return response.ok({ body: privilegesResult }); - } catch (error) { - return handleEsError({ error, response }); - } - } - ); -}; diff --git a/x-pack/test/api_integration/apis/management/index_management/component_templates.ts b/x-pack/test/api_integration/apis/management/index_management/component_templates.ts index fb57f0813d84..e325f4bbfa58 100644 --- a/x-pack/test/api_integration/apis/management/index_management/component_templates.ts +++ b/x-pack/test/api_integration/apis/management/index_management/component_templates.ts @@ -10,13 +10,11 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; import { componentTemplatesApi } from './lib/component_templates.api'; import { componentTemplateHelpers } from './lib/component_template.helpers'; -import { API_BASE_PATH } from './constants'; const CACHE_TEMPLATES = true; export default function ({ getService }: FtrProviderContext) { const log = getService('log'); - const supertest = getService('supertest'); const { createComponentTemplate, @@ -395,21 +393,6 @@ export default function ({ getService }: FtrProviderContext) { }); }); - describe('Privileges', () => { - it('should return privileges result', async () => { - const uri = `${API_BASE_PATH}/component_templates/privileges`; - - const { body } = await supertest.get(uri).set('kbn-xsrf', 'xxx').expect(200); - - expect(body).to.eql({ - hasAllPrivileges: true, - missingPrivileges: { - cluster: [], - }, - }); - }); - }); - describe('Get datastreams', () => { const COMPONENT_NAME = 'test_get_component_template_datastreams'; const COMPONENT = { diff --git a/x-pack/test_serverless/functional/test_suites/common/management/index_management/component_templates.ts b/x-pack/test_serverless/functional/test_suites/common/management/index_management/component_templates.ts index d72aadd9dbb1..66a0a0f33d54 100644 --- a/x-pack/test_serverless/functional/test_suites/common/management/index_management/component_templates.ts +++ b/x-pack/test_serverless/functional/test_suites/common/management/index_management/component_templates.ts @@ -13,94 +13,125 @@ import { FtrProviderContext } from '../../../../ftr_provider_context'; export default ({ getPageObjects, getService }: FtrProviderContext) => { const pageObjects = getPageObjects(['svlCommonPage', 'common', 'indexManagement', 'header']); const browser = getService('browser'); - const security = getService('security'); + const samlAuth = getService('samlAuth'); const testSubjects = getService('testSubjects'); const es = getService('es'); const TEST_COMPONENT_TEMPLATE = '.a_test_component_template'; describe('Index component templates', function () { - before(async () => { - await security.testUser.setRoles(['index_management_user']); - await pageObjects.svlCommonPage.loginAsAdmin(); - }); + describe('with access', () => { + before(async () => { + await pageObjects.svlCommonPage.loginAsAdmin(); + }); - beforeEach(async () => { - await pageObjects.common.navigateToApp('indexManagement'); - // Navigate to the index templates tab - await pageObjects.indexManagement.changeTabs('component_templatesTab'); - await pageObjects.header.waitUntilLoadingHasFinished(); - }); + beforeEach(async () => { + await pageObjects.common.navigateToApp('indexManagement'); + // Navigate to the index templates tab + await pageObjects.indexManagement.changeTabs('component_templatesTab'); + await pageObjects.header.waitUntilLoadingHasFinished(); + }); - it('renders the component templates tab', async () => { - const url = await browser.getCurrentUrl(); - expect(url).to.contain(`/component_templates`); - }); + it('renders the component templates tab', async () => { + const url = await browser.getCurrentUrl(); + expect(url).to.contain(`/component_templates`); + }); - describe('Component templates list', () => { - before(async () => { - await es.cluster.putComponentTemplate({ - name: TEST_COMPONENT_TEMPLATE, - body: { - template: { - settings: { - index: { - number_of_shards: 1, + describe('Component templates list', () => { + before(async () => { + await es.cluster.putComponentTemplate({ + name: TEST_COMPONENT_TEMPLATE, + body: { + template: { + settings: { + index: { + number_of_shards: 1, + }, }, }, }, - }, + }); }); - }); - after(async () => { - await es.cluster.deleteComponentTemplate( - { name: TEST_COMPONENT_TEMPLATE }, - { ignore: [404] } - ); + after(async () => { + await es.cluster.deleteComponentTemplate( + { name: TEST_COMPONENT_TEMPLATE }, + { ignore: [404] } + ); + }); + + it('Displays the test component template in the list', async () => { + const templates = await testSubjects.findAll('componentTemplateTableRow'); + + const getTemplateName = async (template: WebElementWrapper) => { + const templateNameElement = await template.findByTestSubject('templateDetailsLink'); + return await templateNameElement.getVisibleText(); + }; + + const componentTemplateList = await Promise.all( + templates.map((template) => getTemplateName(template)) + ); + + const newComponentTemplateExists = Boolean( + componentTemplateList.find((templateName) => templateName === TEST_COMPONENT_TEMPLATE) + ); + + expect(newComponentTemplateExists).to.be(true); + }); }); - it('Displays the test component template in the list', async () => { - const templates = await testSubjects.findAll('componentTemplateTableRow'); + describe('Create component template', () => { + after(async () => { + await es.cluster.deleteComponentTemplate( + { name: TEST_COMPONENT_TEMPLATE }, + { ignore: [404] } + ); + }); - const getTemplateName = async (template: WebElementWrapper) => { - const templateNameElement = await template.findByTestSubject('templateDetailsLink'); - return await templateNameElement.getVisibleText(); - }; + it('Creates component template', async () => { + await testSubjects.click('createPipelineButton'); - const componentTemplateList = await Promise.all( - templates.map((template) => getTemplateName(template)) - ); + await testSubjects.setValue('nameField', TEST_COMPONENT_TEMPLATE); - const newComponentTemplateExists = Boolean( - componentTemplateList.find((templateName) => templateName === TEST_COMPONENT_TEMPLATE) - ); + // Finish wizard flow + await testSubjects.click('nextButton'); + await testSubjects.click('nextButton'); + await testSubjects.click('nextButton'); + await testSubjects.click('nextButton'); + await testSubjects.click('nextButton'); - expect(newComponentTemplateExists).to.be(true); + expect(await testSubjects.getVisibleText('title')).to.contain(TEST_COMPONENT_TEMPLATE); + }); }); }); - describe('Create component template', () => { - after(async () => { - await es.cluster.deleteComponentTemplate( - { name: TEST_COMPONENT_TEMPLATE }, - { ignore: [404] } - ); + describe('no access', () => { + this.tags(['skipSvlOblt', 'skipMKI']); + before(async () => { + await samlAuth.setCustomRole({ + elasticsearch: { + cluster: ['monitor'], + indices: [{ names: ['*'], privileges: ['all'] }], + }, + kibana: [ + { + base: ['all'], + feature: {}, + spaces: ['*'], + }, + ], + }); + await pageObjects.svlCommonPage.loginWithCustomRole(); + await pageObjects.common.navigateToApp('indexManagement'); + await pageObjects.header.waitUntilLoadingHasFinished(); }); - it('Creates component template', async () => { - await testSubjects.click('createPipelineButton'); - - await testSubjects.setValue('nameField', TEST_COMPONENT_TEMPLATE); - - // Finish wizard flow - await testSubjects.click('nextButton'); - await testSubjects.click('nextButton'); - await testSubjects.click('nextButton'); - await testSubjects.click('nextButton'); - await testSubjects.click('nextButton'); + after(async () => { + await samlAuth.deleteCustomRole(); + }); - expect(await testSubjects.getVisibleText('title')).to.contain(TEST_COMPONENT_TEMPLATE); + it('hides the component templates tab', async () => { + await testSubjects.missingOrFail('component_templatesTab'); }); }); }); From 860d5b6b3599dcdf1a090923224b5c315156c1a5 Mon Sep 17 00:00:00 2001 From: Katerina Date: Wed, 18 Dec 2024 17:06:54 +0200 Subject: [PATCH 45/60] [Performance] Update `onPageReady` documentation (#204179) ## Summary Related to this: https://github.com/elastic/kibana/pull/202889 Update the documentation with the recent changes --- .../adding_custom_performance_metrics.mdx | 66 +++++++++++++++++-- 1 file changed, 62 insertions(+), 4 deletions(-) diff --git a/dev_docs/tutorials/performance/adding_custom_performance_metrics.mdx b/dev_docs/tutorials/performance/adding_custom_performance_metrics.mdx index 37322e3f55e0..41570826ad2b 100644 --- a/dev_docs/tutorials/performance/adding_custom_performance_metrics.mdx +++ b/dev_docs/tutorials/performance/adding_custom_performance_metrics.mdx @@ -294,7 +294,63 @@ This event will be indexed with the following structure: } ``` +#### Add time ranges + +The meta field supports telemetry on time ranges, providing calculated metrics for enhanced context. This includes: + +- **Query range in ceconds:** + + - Calculated as the time difference in seconds between `rangeFrom` and `rangeTo`. + +- **Offset calculation:** + - A **negative offset** indicates that `rangeTo` is in the past. + - A **positive offset** indicates that `rangeTo` is in the future. + - An offset of **zero** indicates that `rangeTo` matches `'now'`. + +###### Code example + +``` +onPageReady({ + meta: { + rangeFrom: 'now-15m', + rangeTo: 'now', + } +}); +``` + +This will be indexed as: + +```typescript +{ + "_index": "backing-ebt-kibana-browser-performance-metrics-000001", // Performance metrics are stored in a dedicated simplified index (browser \ server). + "_source": { + "timestamp": "2024-08-13T11:29:58.275Z" + "event_type": "performance_metric", // All performance events share a common event type to simplify mapping + "eventName": 'kibana:plugin_render_time', // Event name as specified when reporting it + "duration": 736, // Event duration as specified when reporting it + "meta": { + "target": '/home', + "query_range_secs": 900 + "query_offset_secs": 0 // now + }, + "context": { // Context holds information identifying the deployment, version, application and page that generated the event + "version": "8.16.0-SNAPSHOT", + "cluster_name": "elasticsearch", + "pageName": "application:home:app", + "applicationId": "home", + "page": "app", + "entityId": "61c58ad0-3dd3-11e8-b2b9-5d5dc1715159", + "branch": "main", + ... + }, + + ... + }, +} +``` + #### Add custom metrics + Having `kibana:plugin_render_time` metric event is not always enough, depending on the use case you would likely need some complementary information to give some sense to the value reported by the metric (e.g. number of hosts, number of services, number of dataStreams, etc). `kibana:plugin_render_time` metric API supports up to 9 numbered free fields that can be used to report numeric metrics that you intend to analyze. Note that they can be used for any type of numeric information you may want to report. @@ -304,10 +360,12 @@ We could make use of these custom metrics using the following format: ... // Call onPageReady once the meaningful data has rendered and visible to the user onPageReady({ - key1: 'datasets', - value1: 5, - key2: 'documents', - value2: 1000, + customMetrics: { + key1: 'datasets', + value1: 5, + key2: 'documents', + value2: 1000, + } }); ... ``` From 6490c45550446a79794135ae66e4b75e473c38f5 Mon Sep 17 00:00:00 2001 From: Marco Liberati Date: Wed, 18 Dec 2024 16:15:43 +0100 Subject: [PATCH 46/60] [Lens][Embeddable] Unify internal api into a single object (#204194) ## Summary Fixes #198753 Initially `visualizationContext` was migrated from the legacy system "as-is" when refactoring to the new system. This PR merges the `visualizationContextHelpers` within the Lens `internalApi` to avoid: * attributes unsync (it rely on the `attributes` variable which is hold by the `internalApi` already) * single place to find internal variables Took also the opportunity to simplify the mocks here: * use the actual implementation for the internalApi vs mocks * this would simplify also the maintenance of types in the future * adapted the tests to use the new implementation and `internalApi` --- .../public/react_embeddable/data_loader.ts | 16 ++---- .../lens/public/react_embeddable/helper.ts | 2 +- .../initializers/initialize_actions.test.ts | 13 +++-- .../initializers/initialize_actions.ts | 27 ++++++---- .../initializers/initialize_internal_api.ts | 24 ++++++++- .../initialize_visualization_context.ts | 32 ----------- .../react_embeddable/lens_embeddable.tsx | 8 +-- .../public/react_embeddable/mocks/index.tsx | 53 ++++--------------- .../lens_embeddable_component.test.tsx | 5 +- .../lens/public/react_embeddable/types.ts | 10 +++- .../react_embeddable/user_messages/api.ts | 22 ++++---- 11 files changed, 87 insertions(+), 125 deletions(-) delete mode 100644 x-pack/plugins/lens/public/react_embeddable/initializers/initialize_visualization_context.ts diff --git a/x-pack/plugins/lens/public/react_embeddable/data_loader.ts b/x-pack/plugins/lens/public/react_embeddable/data_loader.ts index ac69b79b4223..a1d2e713d3f8 100644 --- a/x-pack/plugins/lens/public/react_embeddable/data_loader.ts +++ b/x-pack/plugins/lens/public/react_embeddable/data_loader.ts @@ -22,13 +22,7 @@ import { import fastIsEqual from 'fast-deep-equal'; import { pick } from 'lodash'; import { getEditPath } from '../../common/constants'; -import type { - GetStateType, - LensApi, - LensInternalApi, - LensPublicCallbacks, - VisualizationContextHelper, -} from './types'; +import type { GetStateType, LensApi, LensInternalApi, LensPublicCallbacks } from './types'; import { getExpressionRendererParams } from './expressions/expression_params'; import type { LensEmbeddableStartServices } from './types'; import { prepareCallbacks } from './expressions/callbacks'; @@ -84,7 +78,6 @@ export function loadEmbeddableData( parentApi: unknown, internalApi: LensInternalApi, services: LensEmbeddableStartServices, - { getVisualizationContext, updateVisualizationContext }: VisualizationContextHelper, metaInfo?: SharingSavedObjectProps ) { const { onLoad, onBeforeBadgesRender, ...callbacks } = apiHasLensComponentCallbacks(parentApi) @@ -103,7 +96,6 @@ export function loadEmbeddableData( } = buildUserMessagesHelpers( api, internalApi, - getVisualizationContext, services, onBeforeBadgesRender, services.spaces, @@ -174,7 +166,7 @@ export function loadEmbeddableData( }; const onDataCallback = (adapters: Partial | undefined) => { - updateVisualizationContext({ + internalApi.updateVisualizationContext({ activeData: adapters?.tables?.tables, }); // data has loaded @@ -243,8 +235,8 @@ export function loadEmbeddableData( // update the visualization context before anything else // as it will be used to compute blocking errors also in case of issues - updateVisualizationContext({ - doc: currentState.attributes, + internalApi.updateVisualizationContext({ + activeAttributes: currentState.attributes, mergedSearchContext: params?.searchContext || {}, ...rest, }); diff --git a/x-pack/plugins/lens/public/react_embeddable/helper.ts b/x-pack/plugins/lens/public/react_embeddable/helper.ts index 3ee63d907068..bc0b7c957b9d 100644 --- a/x-pack/plugins/lens/public/react_embeddable/helper.ts +++ b/x-pack/plugins/lens/public/react_embeddable/helper.ts @@ -40,7 +40,7 @@ export function createEmptyLensState( query: query || { query: '', language: 'kuery' }, filters: filters || [], internalReferences: [], - datasourceStates: { ...(isTextBased ? { text_based: {} } : { form_based: {} }) }, + datasourceStates: { ...(isTextBased ? { textBased: {} } : { formBased: {} }) }, visualization: {}, }, }, diff --git a/x-pack/plugins/lens/public/react_embeddable/initializers/initialize_actions.test.ts b/x-pack/plugins/lens/public/react_embeddable/initializers/initialize_actions.test.ts index 016bc0e87f11..d7a073f10e02 100644 --- a/x-pack/plugins/lens/public/react_embeddable/initializers/initialize_actions.test.ts +++ b/x-pack/plugins/lens/public/react_embeddable/initializers/initialize_actions.test.ts @@ -13,8 +13,8 @@ import { getLensApiMock, makeEmbeddableServices, getLensRuntimeStateMock, - getVisualizationContextHelperMock, createUnifiedSearchApi, + getLensInternalApiMock, } from '../mocks'; import { createEmptyLensState } from '../helper'; const DATAVIEW_ID = 'myDataView'; @@ -40,11 +40,17 @@ function setupActionsApi( ) { const services = makeEmbeddableServices(undefined, undefined, { visOverrides: { id: 'lnsXY' }, - dataOverrides: { id: 'form_based' }, + dataOverrides: { id: 'formBased' }, }); const uuid = faker.string.uuid(); const runtimeState = getLensRuntimeStateMock(stateOverrides); const apiMock = getLensApiMock(); + // create the internal API and customize internal state + const internalApi = getLensInternalApiMock(); + internalApi.updateVisualizationContext({ + ...contextOverrides, + activeAttributes: runtimeState.attributes, + }); const { api } = initializeActionApi( uuid, @@ -53,7 +59,7 @@ function setupActionsApi( createUnifiedSearchApi(), pick(apiMock, ['timeRange$']), pick(apiMock, ['panelTitle']), - getVisualizationContextHelperMock(stateOverrides?.attributes, contextOverrides), + internalApi, { ...services, data: { @@ -85,6 +91,7 @@ describe('Dashboard actions', () => { describe('Explore in Discover', () => { // make it pass the basic check on viewUnderlyingData const visualizationContextMockOverrides = { + activeAttributes: undefined, mergedSearchContext: {}, indexPatterns: { [DATAVIEW_ID]: { diff --git a/x-pack/plugins/lens/public/react_embeddable/initializers/initialize_actions.ts b/x-pack/plugins/lens/public/react_embeddable/initializers/initialize_actions.ts index 65fd13c8fca5..ac6739d9ded1 100644 --- a/x-pack/plugins/lens/public/react_embeddable/initializers/initialize_actions.ts +++ b/x-pack/plugins/lens/public/react_embeddable/initializers/initialize_actions.ts @@ -34,10 +34,10 @@ import { buildObservableVariable, isTextBasedLanguage } from '../helper'; import type { GetStateType, LensEmbeddableStartServices, + LensInternalApi, LensRuntimeState, ViewInDiscoverCallbacks, ViewUnderlyingDataArgs, - VisualizationContextHelper, } from '../types'; import { getActiveDatasourceIdFromDoc, getActiveVisualizationIdFromDoc } from '../../utils'; @@ -120,7 +120,7 @@ function getViewUnderlyingDataArgs({ function loadViewUnderlyingDataArgs( state: LensRuntimeState, - { getVisualizationContext }: VisualizationContextHelper, + { getVisualizationContext }: LensInternalApi, searchContextApi: { timeRange$: PublishingSubject }, parentApi: unknown, { @@ -132,16 +132,21 @@ function loadViewUnderlyingDataArgs( visualizationMap, }: LensEmbeddableStartServices ) { - const { doc, activeData, activeDatasourceState, activeVisualizationState, indexPatterns } = - getVisualizationContext(); - const activeVisualizationId = getActiveVisualizationIdFromDoc(doc); - const activeDatasourceId = getActiveDatasourceIdFromDoc(doc); + const { + activeAttributes, + activeData, + activeDatasourceState, + activeVisualizationState, + indexPatterns, + } = getVisualizationContext(); + const activeVisualizationId = getActiveVisualizationIdFromDoc(activeAttributes); + const activeDatasourceId = getActiveDatasourceIdFromDoc(activeAttributes); const activeVisualization = activeVisualizationId ? visualizationMap[activeVisualizationId] : undefined; const activeDatasource = activeDatasourceId ? datasourceMap[activeDatasourceId] : undefined; if ( - !doc || + !activeAttributes || !activeData || !activeDatasource || !activeDatasourceState || @@ -199,7 +204,7 @@ function loadViewUnderlyingDataArgs( function createViewUnderlyingDataApis( getState: GetStateType, - visualizationContextHelper: VisualizationContextHelper, + internalApi: LensInternalApi, searchContextApi: { timeRange$: PublishingSubject }, parentApi: unknown, services: LensEmbeddableStartServices @@ -213,7 +218,7 @@ function createViewUnderlyingDataApis( loadViewUnderlyingData: () => { viewUnderlyingDataArgs = loadViewUnderlyingDataArgs( getState(), - visualizationContextHelper, + internalApi, searchContextApi, parentApi, services @@ -237,7 +242,7 @@ export function initializeActionApi( parentApi: unknown, searchContextApi: { timeRange$: PublishingSubject }, titleApi: { panelTitle: PublishingSubject }, - visualizationContextHelper: VisualizationContextHelper, + internalApi: LensInternalApi, services: LensEmbeddableStartServices ): { api: ViewInDiscoverCallbacks & HasDynamicActions; @@ -257,7 +262,7 @@ export function initializeActionApi( ...(isTextBasedLanguage(initialState) ? {} : dynamicActionsApi?.dynamicActionsApi ?? {}), ...createViewUnderlyingDataApis( getLatestState, - visualizationContextHelper, + internalApi, searchContextApi, parentApi, services diff --git a/x-pack/plugins/lens/public/react_embeddable/initializers/initialize_internal_api.ts b/x-pack/plugins/lens/public/react_embeddable/initializers/initialize_internal_api.ts index e366c24a6c0e..2c89ed463e1c 100644 --- a/x-pack/plugins/lens/public/react_embeddable/initializers/initialize_internal_api.ts +++ b/x-pack/plugins/lens/public/react_embeddable/initializers/initialize_internal_api.ts @@ -15,6 +15,7 @@ import type { LensInternalApi, LensOverrides, LensRuntimeState, + VisualizationContext, } from '../types'; import { apiHasAbortController, apiHasLensComponentProps } from '../type_guards'; import type { UserMessage } from '../../types'; @@ -52,6 +53,18 @@ export function initializeInternalApi( // the isNewPanel won't be serialized so it will be always false after the edit panel closes applying the changes const isNewlyCreated$ = new BehaviorSubject(initialState.isNewPanel || false); + const visualizationContext$ = new BehaviorSubject({ + // doc can point to a different set of attributes for the visualization + // i.e. when inline editing or applying a suggestion + activeAttributes: initialState.attributes, + mergedSearchContext: {}, + indexPatterns: {}, + indexPatternRefs: [], + activeVisualizationState: undefined, + activeDatasourceState: undefined, + activeData: undefined, + }); + // No need to expose anything at public API right now, that would happen later on // where each initializer will pick what it needs and publish it return { @@ -65,6 +78,8 @@ export function initializeInternalApi( renderCount$, isNewlyCreated$, dataViews: dataViews$, + messages$, + validationMessages$, dispatchError: () => { hasRenderCompleted$.next(true); renderCount$.next(renderCount$.getValue() + 1); @@ -82,9 +97,7 @@ export function initializeInternalApi( updateAbortController: (abortController: AbortController | undefined) => expressionAbortController$.next(abortController), updateDataViews: (dataViews: DataView[] | undefined) => dataViews$.next(dataViews), - messages$, updateMessages: (newMessages: UserMessage[]) => messages$.next(newMessages), - validationMessages$, updateValidationMessages: (newMessages: UserMessage[]) => validationMessages$.next(newMessages), resetAllMessages: () => { messages$.next([]); @@ -116,5 +129,12 @@ export function initializeInternalApi( return displayOptions; }, + getVisualizationContext: () => visualizationContext$.getValue(), + updateVisualizationContext: (newVisualizationContext: Partial) => { + visualizationContext$.next({ + ...visualizationContext$.getValue(), + ...newVisualizationContext, + }); + }, }; } diff --git a/x-pack/plugins/lens/public/react_embeddable/initializers/initialize_visualization_context.ts b/x-pack/plugins/lens/public/react_embeddable/initializers/initialize_visualization_context.ts deleted file mode 100644 index 93d544013e71..000000000000 --- a/x-pack/plugins/lens/public/react_embeddable/initializers/initialize_visualization_context.ts +++ /dev/null @@ -1,32 +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 type { LensInternalApi, VisualizationContext, VisualizationContextHelper } from '../types'; - -export function initializeVisualizationContext( - internalApi: LensInternalApi -): VisualizationContextHelper { - // TODO: this will likely be merged together with the state$ observable - let visualizationContext: VisualizationContext = { - doc: internalApi.attributes$.getValue(), - mergedSearchContext: {}, - indexPatterns: {}, - indexPatternRefs: [], - activeVisualizationState: undefined, - activeDatasourceState: undefined, - activeData: undefined, - }; - return { - getVisualizationContext: () => visualizationContext, - updateVisualizationContext: (newVisualizationContext: Partial) => { - visualizationContext = { - ...visualizationContext, - ...newVisualizationContext, - }; - }, - }; -} diff --git a/x-pack/plugins/lens/public/react_embeddable/lens_embeddable.tsx b/x-pack/plugins/lens/public/react_embeddable/lens_embeddable.tsx index 074ae451115b..2fc1928dc40c 100644 --- a/x-pack/plugins/lens/public/react_embeddable/lens_embeddable.tsx +++ b/x-pack/plugins/lens/public/react_embeddable/lens_embeddable.tsx @@ -22,7 +22,6 @@ import { initializeInspector } from './initializers/initialize_inspector'; import { initializeDashboardServices } from './initializers/initialize_dashboard_services'; import { initializeInternalApi } from './initializers/initialize_internal_api'; import { initializeSearchContext } from './initializers/initialize_search_context'; -import { initializeVisualizationContext } from './initializers/initialize_visualization_context'; import { initializeActionApi } from './initializers/initialize_actions'; import { initializeIntegrations } from './initializers/initialize_integrations'; import { initializeStateManagement } from './initializers/initialize_state_management'; @@ -61,8 +60,6 @@ export const createLensEmbeddableFactory = ( */ const internalApi = initializeInternalApi(initialState, parentApi, services); - const visualizationContextHelper = initializeVisualizationContext(internalApi); - /** * Initialize various configurations required to build all the required * parts for the Lens embeddable. @@ -108,7 +105,7 @@ export const createLensEmbeddableFactory = ( parentApi, searchContextConfig.api, dashboardConfig.api, - visualizationContextHelper, + internalApi, services ); @@ -165,8 +162,7 @@ export const createLensEmbeddableFactory = ( api, parentApi, internalApi, - services, - visualizationContextHelper + services ); const onUnmount = () => { diff --git a/x-pack/plugins/lens/public/react_embeddable/mocks/index.tsx b/x-pack/plugins/lens/public/react_embeddable/mocks/index.tsx index 30a0920f9557..96ba1b547a5d 100644 --- a/x-pack/plugins/lens/public/react_embeddable/mocks/index.tsx +++ b/x-pack/plugins/lens/public/react_embeddable/mocks/index.tsx @@ -32,19 +32,9 @@ import { LensSerializedState, VisualizationContext, } from '../types'; -import { - createMockDatasource, - createMockVisualization, - defaultDoc, - makeDefaultServices, -} from '../../mocks'; -import { - Datasource, - DatasourceMap, - UserMessage, - Visualization, - VisualizationMap, -} from '../../types'; +import { createMockDatasource, createMockVisualization, makeDefaultServices } from '../../mocks'; +import { Datasource, DatasourceMap, Visualization, VisualizationMap } from '../../types'; +import { initializeInternalApi } from '../initializers/initialize_internal_api'; const LensApiMock: LensApi = { // Static props @@ -263,7 +253,7 @@ export function createExpressionRendererMock(): jest.Mock< )); } -function getValidExpressionParams( +export function getValidExpressionParams( overrides: Partial = {} ): ExpressionWrapperProps { return { @@ -284,34 +274,11 @@ function getValidExpressionParams( }; } -const LensInternalApiMock: LensInternalApi = { - dataViews: new BehaviorSubject(undefined), - attributes$: new BehaviorSubject(defaultDoc), - overrides$: new BehaviorSubject(undefined), - disableTriggers$: new BehaviorSubject(undefined), - dataLoading$: new BehaviorSubject(undefined), - hasRenderCompleted$: new BehaviorSubject(true), - expressionParams$: new BehaviorSubject(getValidExpressionParams()), - expressionAbortController$: new BehaviorSubject(undefined), - renderCount$: new BehaviorSubject(0), - messages$: new BehaviorSubject([]), - validationMessages$: new BehaviorSubject([]), - isNewlyCreated$: new BehaviorSubject(true), - updateAttributes: jest.fn(), - updateOverrides: jest.fn(), - dispatchRenderStart: jest.fn(), - dispatchRenderComplete: jest.fn(), - updateDataLoading: jest.fn(), - updateExpressionParams: jest.fn(), - updateAbortController: jest.fn(), - updateDataViews: jest.fn(), - updateMessages: jest.fn(), - resetAllMessages: jest.fn(), - dispatchError: jest.fn(), - updateValidationMessages: jest.fn(), - setAsCreated: jest.fn(), - getDisplayOptions: jest.fn(() => ({})), -}; +const LensInternalApiMock = initializeInternalApi( + getLensRuntimeStateMock(), + {}, + makeEmbeddableServices() +); export function getLensInternalApiMock(overrides: Partial = {}): LensInternalApi { return { @@ -326,6 +293,7 @@ export function getVisualizationContextHelperMock( ) { return { getVisualizationContext: jest.fn(() => ({ + activeAttributes: getLensAttributesMock(attributesOverrides), mergedSearchContext: {}, indexPatterns: {}, indexPatternRefs: [], @@ -333,7 +301,6 @@ export function getVisualizationContextHelperMock( activeDatasourceState: undefined, activeData: undefined, ...contextOverrides, - doc: getLensAttributesMock(attributesOverrides), })), updateVisualizationContext: jest.fn(), }; diff --git a/x-pack/plugins/lens/public/react_embeddable/renderer/lens_embeddable_component.test.tsx b/x-pack/plugins/lens/public/react_embeddable/renderer/lens_embeddable_component.test.tsx index f444f429250b..fd6d271e2c9b 100644 --- a/x-pack/plugins/lens/public/react_embeddable/renderer/lens_embeddable_component.test.tsx +++ b/x-pack/plugins/lens/public/react_embeddable/renderer/lens_embeddable_component.test.tsx @@ -6,7 +6,7 @@ */ import { render, screen } from '@testing-library/react'; -import { getLensApiMock, getLensInternalApiMock } from '../mocks'; +import { getLensApiMock, getLensInternalApiMock, getValidExpressionParams } from '../mocks'; import { LensApi, LensInternalApi } from '../types'; import { BehaviorSubject } from 'rxjs'; import { PublishingSubject } from '@kbn/presentation-publishing'; @@ -25,6 +25,9 @@ function getDefaultProps({ internalApiOverrides = undefined, apiOverrides = undefined, }: { internalApiOverrides?: Partial; apiOverrides?: Partial } = {}) { + const internalApi = getLensInternalApiMock(internalApiOverrides); + // provide a valid expression to render + internalApi.updateExpressionParams(getValidExpressionParams()); return { internalApi: getLensInternalApiMock(internalApiOverrides), api: getLensApiMock(apiOverrides), diff --git a/x-pack/plugins/lens/public/react_embeddable/types.ts b/x-pack/plugins/lens/public/react_embeddable/types.ts index 1a4bf45b11f1..98b85860f414 100644 --- a/x-pack/plugins/lens/public/react_embeddable/types.ts +++ b/x-pack/plugins/lens/public/react_embeddable/types.ts @@ -100,8 +100,12 @@ interface LensApiProps {} export type LensSavedObjectAttributes = Omit; +/** + * This visualization context can have a different attributes than the + * one stored in the Lens API attributes + */ export interface VisualizationContext { - doc: LensDocument | undefined; + activeAttributes: LensDocument | undefined; mergedSearchContext: ExecutionContextSearch; indexPatterns: IndexPatternMap; indexPatternRefs: IndexPatternRef[]; @@ -111,6 +115,7 @@ export interface VisualizationContext { } export interface VisualizationContextHelper { + // the doc prop here is a convenience reference to the internalApi.attributes getVisualizationContext: () => VisualizationContext; updateVisualizationContext: (newContext: Partial) => void; } @@ -399,7 +404,8 @@ export type LensApi = Simplify< // there's some overlapping between this and the LensApi but they are shared references export type LensInternalApi = Simplify< Pick & - PublishesDataViews & { + PublishesDataViews & + VisualizationContextHelper & { attributes$: PublishingSubject; overrides$: PublishingSubject; disableTriggers$: PublishingSubject; diff --git a/x-pack/plugins/lens/public/react_embeddable/user_messages/api.ts b/x-pack/plugins/lens/public/react_embeddable/user_messages/api.ts index 90061cfb7c2f..8058f7961955 100644 --- a/x-pack/plugins/lens/public/react_embeddable/user_messages/api.ts +++ b/x-pack/plugins/lens/public/react_embeddable/user_messages/api.ts @@ -28,7 +28,6 @@ import { import { LensPublicCallbacks, LensEmbeddableStartServices, - VisualizationContext, VisualizationContextHelper, LensApi, LensInternalApi, @@ -43,7 +42,7 @@ function getUpdatedState( datasourceMap: LensEmbeddableStartServices['datasourceMap'] ) { const { - doc, + activeAttributes, mergedSearchContext, indexPatterns, indexPatternRefs, @@ -51,15 +50,15 @@ function getUpdatedState( activeDatasourceState, activeData, } = getVisualizationContext(); - const activeVisualizationId = getActiveVisualizationIdFromDoc(doc); - const activeDatasourceId = getActiveDatasourceIdFromDoc(doc); + const activeVisualizationId = getActiveVisualizationIdFromDoc(activeAttributes); + const activeDatasourceId = getActiveDatasourceIdFromDoc(activeAttributes); const activeDatasource = activeDatasourceId ? datasourceMap[activeDatasourceId] : null; const activeVisualization = activeVisualizationId ? visualizationMap[activeVisualizationId] : undefined; const dataViewObject = getInitialDataViewsObject(indexPatterns, indexPatternRefs); return { - doc, + activeAttributes, mergedSearchContext, activeDatasource, activeVisualization, @@ -100,7 +99,6 @@ function getWarningMessages( export function buildUserMessagesHelpers( api: LensApi, internalApi: LensInternalApi, - getVisualizationContext: () => VisualizationContext, { coreStart, data, visualizationMap, datasourceMap }: LensEmbeddableStartServices, onBeforeBadgesRender: LensPublicCallbacks['onBeforeBadgesRender'], spaces?: SpacesApi, @@ -131,7 +129,7 @@ export function buildUserMessagesHelpers( const getUserMessages: UserMessagesGetter = (locationId, filters) => { const { - doc, + activeAttributes, activeVisualizationState, activeVisualization, activeVisualizationId, @@ -141,12 +139,12 @@ export function buildUserMessagesHelpers( dataViewObject, mergedSearchContext, activeData, - } = getUpdatedState(getVisualizationContext, visualizationMap, datasourceMap); + } = getUpdatedState(internalApi.getVisualizationContext, visualizationMap, datasourceMap); const userMessages: UserMessage[] = []; userMessages.push( ...getApplicationUserMessages({ - visualizationType: doc?.visualizationType, + visualizationType: activeAttributes?.visualizationType, visualizationState: { state: activeVisualizationState, activeId: activeVisualizationId, @@ -162,7 +160,7 @@ export function buildUserMessagesHelpers( }) ); - if (!doc || !activeDatasourceState || !activeVisualizationState) { + if (!activeAttributes || !activeDatasourceState || !activeVisualizationState) { return userMessages; } @@ -178,7 +176,7 @@ export function buildUserMessagesHelpers( datasourceMap, dataViewObject.indexPatterns ), - query: doc.state.query, + query: activeAttributes.state.query, filters: mergedSearchContext.filters ?? [], dateRange: { fromDate: mergedSearchContext.timeRange?.from ?? '', @@ -278,7 +276,7 @@ export function buildUserMessagesHelpers( updateWarnings: () => { addUserMessages( getWarningMessages( - getUpdatedState(getVisualizationContext, visualizationMap, datasourceMap), + getUpdatedState(internalApi.getVisualizationContext, visualizationMap, datasourceMap), api.adapters$.getValue(), data ) From 529a4e3b196309c5b181703a9f0bdd94c7baf758 Mon Sep 17 00:00:00 2001 From: Ido Cohen <90558359+CohenIdo@users.noreply.github.com> Date: Wed, 18 Dec 2024 17:20:53 +0200 Subject: [PATCH 47/60] Deprecate Cloud Defend billing logic --- config/serverless.security.yml | 2 +- .../cloud_security/cloud_security_metering.ts | 20 +- .../cloud_security_metering_task.test.ts | 180 +----------------- .../server/cloud_security/constants.ts | 7 - .../defend_for_containers_metering.ts | 148 -------------- .../server/cloud_security/types.ts | 4 +- .../tsconfig.json | 1 - .../cloud_security_metering.ts | 76 +------- 8 files changed, 10 insertions(+), 428 deletions(-) delete mode 100644 x-pack/solutions/security/plugins/security_solution_serverless/server/cloud_security/defend_for_containers_metering.ts diff --git a/config/serverless.security.yml b/config/serverless.security.yml index 47a67c293565..0e3a0c92f854 100644 --- a/config/serverless.security.yml +++ b/config/serverless.security.yml @@ -106,7 +106,7 @@ xpack.fleet.internal.registry.excludePackages: [ 'dga', # Unsupported in serverless - 'cloud-defend', + 'cloud_defend', ] # fleet_server package installed to publish agent metrics xpack.fleet.packages: diff --git a/x-pack/solutions/security/plugins/security_solution_serverless/server/cloud_security/cloud_security_metering.ts b/x-pack/solutions/security/plugins/security_solution_serverless/server/cloud_security/cloud_security_metering.ts index 1a5fb8e64a26..08d5b0d088aa 100644 --- a/x-pack/solutions/security/plugins/security_solution_serverless/server/cloud_security/cloud_security_metering.ts +++ b/x-pack/solutions/security/plugins/security_solution_serverless/server/cloud_security/cloud_security_metering.ts @@ -7,11 +7,10 @@ import type { Logger } from '@kbn/core/server'; import { ProductLine } from '../../common/product'; import { getCloudSecurityUsageRecord } from './cloud_security_metering_task'; -import { CLOUD_DEFEND, CNVM, CSPM, KSPM } from './constants'; +import { CNVM, CSPM, KSPM } from './constants'; import type { CloudSecuritySolutions } from './types'; import type { MeteringCallBackResponse, MeteringCallbackInput, Tier, UsageRecord } from '../types'; import type { ServerlessSecurityConfig } from '../config'; -import { getCloudDefendUsageRecords } from './defend_for_containers_metering'; export const cloudSecurityMetringCallback = async ({ esClient, @@ -35,24 +34,11 @@ export const cloudSecurityMetringCallback = async ({ const tier: Tier = getCloudProductTier(config, logger); try { - const cloudSecuritySolutions: CloudSecuritySolutions[] = [CSPM, KSPM, CNVM, CLOUD_DEFEND]; + const cloudSecuritySolutions: CloudSecuritySolutions[] = [CSPM, KSPM, CNVM]; const promiseResults = await Promise.allSettled( cloudSecuritySolutions.map((cloudSecuritySolution) => { - if (cloudSecuritySolution !== CLOUD_DEFEND) { - return getCloudSecurityUsageRecord({ - esClient, - projectId, - logger, - taskId, - lastSuccessfulReport, - cloudSecuritySolution, - tier, - }); - } - - // since lastSuccessfulReport is not used by getCloudSecurityUsageRecord, we want to verify if it is used by getCloudDefendUsageRecords before getCloudSecurityUsageRecord. - return getCloudDefendUsageRecords({ + return getCloudSecurityUsageRecord({ esClient, projectId, logger, diff --git a/x-pack/solutions/security/plugins/security_solution_serverless/server/cloud_security/cloud_security_metering_task.test.ts b/x-pack/solutions/security/plugins/security_solution_serverless/server/cloud_security/cloud_security_metering_task.test.ts index 6d55e5246928..423b26b5f7e9 100644 --- a/x-pack/solutions/security/plugins/security_solution_serverless/server/cloud_security/cloud_security_metering_task.test.ts +++ b/x-pack/solutions/security/plugins/security_solution_serverless/server/cloud_security/cloud_security_metering_task.test.ts @@ -16,15 +16,7 @@ import { import type { ServerlessSecurityConfig } from '../config'; import type { ProductTier } from '../../common/product'; -import { - CLOUD_SECURITY_TASK_TYPE, - CSPM, - KSPM, - CNVM, - CLOUD_DEFEND, - BILLABLE_ASSETS_CONFIG, -} from './constants'; -import { getCloudDefendUsageRecords } from './defend_for_containers_metering'; +import { CLOUD_SECURITY_TASK_TYPE, CSPM, KSPM, CNVM, BILLABLE_ASSETS_CONFIG } from './constants'; const mockEsClient = elasticsearchServiceMock.createStart().client.asInternalUser; const logger: ReturnType = loggingSystemMock.createLogger(); @@ -336,173 +328,3 @@ describe('should return the relevant product tier', () => { expect(tier).toBe('none'); }); }); - -describe('cloud defend metering', () => { - it('should return usageRecords with correct values', async () => { - const cloudSecuritySolution = 'cloud_defend'; - const agentId1 = chance.guid(); - const eventIngestedStr = '2024-05-28T12:10:51Z'; - const eventIngestedTimestamp = new Date(eventIngestedStr); - - // @ts-ignore - mockEsClient.search.mockResolvedValueOnce({ - hits: { - hits: [ - { - _id: 'someRecord', - _index: 'mockIndex', - _source: { - 'cloud_defend.block_action_enabled': true, - 'agent.id': agentId1, - event: { - ingested: eventIngestedStr, - }, - }, - }, - ], - }, - }); - - const projectId = chance.guid(); - const taskId = chance.guid(); - - const tier = 'essentials' as ProductTier; - - const result = await getCloudDefendUsageRecords({ - esClient: mockEsClient, - projectId, - taskId, - lastSuccessfulReport: new Date(), - cloudSecuritySolution, - logger, - tier, - }); - - const roundedIngestedTimestamp = eventIngestedTimestamp; - roundedIngestedTimestamp.setMinutes(0); - roundedIngestedTimestamp.setSeconds(0); - roundedIngestedTimestamp.setMilliseconds(0); - - expect(result).toEqual([ - { - id: expect.stringContaining( - `${projectId}_${agentId1}_${roundedIngestedTimestamp.toISOString()}` - ), - usage_timestamp: eventIngestedStr, - creation_timestamp: expect.any(String), - usage: { - type: CLOUD_SECURITY_TASK_TYPE, - sub_type: CLOUD_DEFEND, - quantity: 1, - period_seconds: 3600, - }, - source: { - id: taskId, - instance_group_id: projectId, - metadata: { - tier: 'essentials', - }, - }, - }, - ]); - }); - - it('should return an empty array when Elasticsearch returns an empty response', async () => { - // @ts-ignore - mockEsClient.search.mockResolvedValueOnce({ - hits: { - hits: [], - }, - }); - const tier = 'essentials' as ProductTier; - // Call the function with mock parameters - const result = await getCloudDefendUsageRecords({ - esClient: mockEsClient, - projectId: chance.guid(), - taskId: chance.guid(), - lastSuccessfulReport: new Date(), - cloudSecuritySolution: 'cloud_defend', - logger, - tier, - }); - - // Assert that the result is an empty array - expect(result).toEqual([]); - }); - - it('should handle errors from Elasticsearch', async () => { - // Mock Elasticsearch client's search method to throw an error - mockEsClient.search.mockRejectedValueOnce(new Error('Elasticsearch query failed')); - - const tier = 'essentials' as ProductTier; - - // Call the function with mock parameters - await getCloudDefendUsageRecords({ - esClient: mockEsClient, - projectId: chance.guid(), - taskId: chance.guid(), - lastSuccessfulReport: new Date(), - cloudSecuritySolution: 'cloud_defend', - logger, - tier, - }); - - // Assert that the logger's error method was called with the correct error message - expect(logger.error).toHaveBeenCalledWith( - 'Failed to fetch cloud_defend metering data Error: Elasticsearch query failed' - ); - }); - - it('should return usageRecords when Elasticsearch returns multiple records', async () => { - // Mock Elasticsearch response with multiple records - const agentId1 = chance.guid(); - const agentId2 = chance.guid(); - const eventIngestedStr1 = '2024-05-28T12:10:51Z'; - const eventIngestedStr2 = '2024-05-28T13:10:51Z'; - - // @ts-ignore - mockEsClient.search.mockResolvedValueOnce({ - hits: { - hits: [ - { - _id: 'record1', - _index: 'mockIndex', - _source: { - 'cloud_defend.block_action_enabled': true, - 'agent.id': agentId1, - event: { - ingested: eventIngestedStr1, - }, - }, - }, - { - _id: 'record2', - _index: 'mockIndex', - _source: { - 'cloud_defend.block_action_enabled': true, - 'agent.id': agentId2, - event: { - ingested: eventIngestedStr2, - }, - }, - }, - ], - }, - }); - const tier = 'essentials' as ProductTier; - - // Call the function with mock parameters - const result = await getCloudDefendUsageRecords({ - esClient: mockEsClient, - projectId: chance.guid(), - taskId: chance.guid(), - lastSuccessfulReport: new Date(), - cloudSecuritySolution: 'cloud_defend', - logger, - tier, - }); - - // Assert that the result contains usage records for both records - expect(result).toHaveLength(2); - }); -}); diff --git a/x-pack/solutions/security/plugins/security_solution_serverless/server/cloud_security/constants.ts b/x-pack/solutions/security/plugins/security_solution_serverless/server/cloud_security/constants.ts index fa98707e5ebe..774f7e7fd2ae 100644 --- a/x-pack/solutions/security/plugins/security_solution_serverless/server/cloud_security/constants.ts +++ b/x-pack/solutions/security/plugins/security_solution_serverless/server/cloud_security/constants.ts @@ -12,9 +12,7 @@ import { CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN, } from '@kbn/cloud-security-posture-common'; import { CNVM_POLICY_TEMPLATE } from '@kbn/cloud-security-posture-plugin/common/constants'; -import { INTEGRATION_PACKAGE_NAME } from '@kbn/cloud-defend-plugin/common/constants'; -export const CLOUD_DEFEND_HEARTBEAT_INDEX = 'metrics-cloud_defend.heartbeat-*'; export const CLOUD_SECURITY_TASK_TYPE = 'cloud_security'; export const AGGREGATION_PRECISION_THRESHOLD = 40000; export const ASSETS_SAMPLE_GRANULARITY = '24h'; @@ -23,7 +21,6 @@ export const THRESHOLD_MINUTES = 30; export const CSPM = CSPM_POLICY_TEMPLATE; export const KSPM = KSPM_POLICY_TEMPLATE; export const CNVM = CNVM_POLICY_TEMPLATE; -export const CLOUD_DEFEND = INTEGRATION_PACKAGE_NAME; export const METERING_CONFIGS = { [CSPM]: { @@ -38,10 +35,6 @@ export const METERING_CONFIGS = { index: CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN, assets_identifier: 'cloud.instance.id', }, - [CLOUD_DEFEND]: { - index: CLOUD_DEFEND_HEARTBEAT_INDEX, - assets_identifier: 'agent.id', - }, }; // see https://github.com/elastic/security-team/issues/8970 for billable asset definition diff --git a/x-pack/solutions/security/plugins/security_solution_serverless/server/cloud_security/defend_for_containers_metering.ts b/x-pack/solutions/security/plugins/security_solution_serverless/server/cloud_security/defend_for_containers_metering.ts deleted file mode 100644 index 61240df94f9b..000000000000 --- a/x-pack/solutions/security/plugins/security_solution_serverless/server/cloud_security/defend_for_containers_metering.ts +++ /dev/null @@ -1,148 +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 type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; -import type { - AggregationsAggregate, - SearchResponse, - SortResults, -} from '@elastic/elasticsearch/lib/api/types'; -import type { Tier, UsageRecord } from '../types'; -import type { CloudSecurityMeteringCallbackInput } from './types'; -import { CLOUD_DEFEND, CLOUD_SECURITY_TASK_TYPE, CLOUD_DEFEND_HEARTBEAT_INDEX } from './constants'; - -const BATCH_SIZE = 1000; -const SAMPLE_WEIGHT_SECONDS = 3600; // 1 Hour - -export interface CloudDefendHeartbeat { - '@timestamp': string; - 'agent.id': string; - event: { - ingested: string; - }; -} - -const buildMeteringRecord = ( - agentId: string, - timestampStr: string, - taskId: string, - tier: Tier, - projectId: string -): UsageRecord => { - const timestamp = new Date(timestampStr); - timestamp.setMinutes(0); - timestamp.setSeconds(0); - timestamp.setMilliseconds(0); - const creationTimestamp = new Date(); - const usageRecord = { - id: `${projectId}_${agentId}_${timestamp.toISOString()}`, - usage_timestamp: timestampStr, - creation_timestamp: creationTimestamp.toISOString(), - usage: { - type: CLOUD_SECURITY_TASK_TYPE, - sub_type: CLOUD_DEFEND, - period_seconds: SAMPLE_WEIGHT_SECONDS, - quantity: 1, - }, - source: { - id: taskId, - instance_group_id: projectId, - metadata: { - tier, - }, - }, - }; - - return usageRecord; -}; -export const getUsageRecords = async ( - esClient: ElasticsearchClient, - searchFrom: Date, - searchAfter?: SortResults -): Promise>> => { - return esClient.search( - { - index: CLOUD_DEFEND_HEARTBEAT_INDEX, - size: BATCH_SIZE, - sort: [{ 'event.ingested': 'asc' }, { 'agent.id': 'asc' }], - search_after: searchAfter, - query: { - bool: { - must: [ - { - range: { - 'event.ingested': { - // gt: searchFrom.toISOString(), Tech debt: https://github.com/elastic/security-team/issues/9895 - gte: `now-30m`, - }, - }, - }, - { - term: { - 'cloud_defend.block_action_enabled': true, - }, - }, - ], - }, - }, - }, - { ignore: [404] } - ); -}; - -export const getCloudDefendUsageRecords = async ({ - esClient, - projectId, - taskId, - lastSuccessfulReport, - cloudSecuritySolution, - tier, - logger, -}: CloudSecurityMeteringCallbackInput): Promise => { - try { - let allRecords: UsageRecord[] = []; - let searchAfter: SortResults | undefined; - let fetchMore = true; - - while (fetchMore) { - const usageRecords = await getUsageRecords(esClient, lastSuccessfulReport, searchAfter); - - if (!usageRecords?.hits?.hits?.length) { - break; - } - - const records = usageRecords.hits.hits.reduce((acc, { _source }) => { - if (!_source) { - return acc; - } - - const { event } = _source; - const record = buildMeteringRecord( - _source['agent.id'], - event.ingested, - taskId, - tier, - projectId - ); - - return [...acc, record]; - }, [] as UsageRecord[]); - - allRecords = [...allRecords, ...records]; - - if (usageRecords.hits.hits.length < BATCH_SIZE) { - fetchMore = false; - } else { - searchAfter = usageRecords.hits.hits[usageRecords.hits.hits.length - 1].sort; - } - } - - return allRecords; - } catch (err) { - logger.error(`Failed to fetch ${cloudSecuritySolution} metering data ${err}`); - } -}; diff --git a/x-pack/solutions/security/plugins/security_solution_serverless/server/cloud_security/types.ts b/x-pack/solutions/security/plugins/security_solution_serverless/server/cloud_security/types.ts index 0ca9a7b5b943..c8149e75b720 100644 --- a/x-pack/solutions/security/plugins/security_solution_serverless/server/cloud_security/types.ts +++ b/x-pack/solutions/security/plugins/security_solution_serverless/server/cloud_security/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { CSPM, KSPM, CNVM, CLOUD_DEFEND } from './constants'; +import type { CSPM, KSPM, CNVM } from './constants'; import type { MeteringCallbackInput, Tier } from '../types'; export interface CloudDefendAssetCountAggregation { @@ -39,7 +39,7 @@ export interface MinTimestamp { value_as_string: string; } -export type CloudSecuritySolutions = typeof CSPM | typeof KSPM | typeof CNVM | typeof CLOUD_DEFEND; +export type CloudSecuritySolutions = typeof CSPM | typeof KSPM | typeof CNVM; export interface CloudSecurityMeteringCallbackInput extends Omit { diff --git a/x-pack/solutions/security/plugins/security_solution_serverless/tsconfig.json b/x-pack/solutions/security/plugins/security_solution_serverless/tsconfig.json index 7b9a77199aee..6b082dea68d8 100644 --- a/x-pack/solutions/security/plugins/security_solution_serverless/tsconfig.json +++ b/x-pack/solutions/security/plugins/security_solution_serverless/tsconfig.json @@ -38,7 +38,6 @@ "@kbn/fleet-plugin", "@kbn/serverless-security-settings", "@kbn/core-elasticsearch-server", - "@kbn/cloud-defend-plugin", "@kbn/core-logging-server-mocks", "@kbn/stack-connectors-plugin", "@kbn/actions-plugin", diff --git a/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/serverless_metering/cloud_security_metering.ts b/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/serverless_metering/cloud_security_metering.ts index b57dace68c4d..13ac5f96347c 100644 --- a/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/serverless_metering/cloud_security_metering.ts +++ b/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/serverless_metering/cloud_security_metering.ts @@ -9,18 +9,13 @@ import expect from '@kbn/expect'; import { CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN } from '@kbn/cloud-security-posture-common'; import { LATEST_FINDINGS_INDEX_DEFAULT_NS } from '@kbn/cloud-security-posture-plugin/common/constants'; import * as http from 'http'; -import { - createPackagePolicy, - createCloudDefendPackagePolicy, -} from '@kbn/test-suites-xpack/api_integration/apis/cloud_security_posture/helper'; +import { createPackagePolicy } from '@kbn/test-suites-xpack/api_integration/apis/cloud_security_posture/helper'; import { EsIndexDataProvider } from '@kbn/test-suites-xpack/cloud_security_posture_api/utils'; import { RoleCredentials } from '../../../../../shared/services'; -import { getMockFindings, getMockDefendForContainersHeartbeats } from './mock_data'; +import { getMockFindings } from './mock_data'; import type { FtrProviderContext } from '../../../../ftr_provider_context'; import { UsageRecord, getInterceptedRequestPayload, setupMockServer } from './mock_usage_server'; -const CLOUD_DEFEND_HEARTBEAT_INDEX_DEFAULT_NS = 'metrics-cloud_defend.heartbeat-default'; - export default function (providerContext: FtrProviderContext) { const mockUsageApiApp = setupMockServer(); const { getService } = providerContext; @@ -32,7 +27,6 @@ export default function (providerContext: FtrProviderContext) { const svlUserManager = getService('svlUserManager'); const supertestWithoutAuth = getService('supertestWithoutAuth'); const findingsIndex = new EsIndexDataProvider(es, LATEST_FINDINGS_INDEX_DEFAULT_NS); - const cloudDefinedIndex = new EsIndexDataProvider(es, CLOUD_DEFEND_HEARTBEAT_INDEX_DEFAULT_NS); const vulnerabilitiesIndex = new EsIndexDataProvider( es, CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN @@ -74,7 +68,6 @@ export default function (providerContext: FtrProviderContext) { await findingsIndex.deleteAll(); await vulnerabilitiesIndex.deleteAll(); - await cloudDefinedIndex.deleteAll(); }); afterEach(async () => { @@ -82,7 +75,6 @@ export default function (providerContext: FtrProviderContext) { await esArchiver.unload('x-pack/test/functional/es_archives/fleet/empty_fleet_server'); await findingsIndex.deleteAll(); await vulnerabilitiesIndex.deleteAll(); - await cloudDefinedIndex.deleteAll(); }); after(async () => { await svlUserManager.invalidateM2mApiKeyWithRoleScope(roleAuthc); @@ -202,43 +194,6 @@ export default function (providerContext: FtrProviderContext) { }); }); - it('Should intercept usage API request for Defend for Containers', async () => { - await createCloudDefendPackagePolicy( - supertestWithoutAuth, - agentPolicyId, - roleAuthc, - internalRequestHeader - ); - - const blockActionEnabledHeartbeats = getMockDefendForContainersHeartbeats({ - isBlockActionEnables: true, - numberOfHearbeats: 2, - }); - - const blockActionDisabledHeartbeats = getMockDefendForContainersHeartbeats({ - isBlockActionEnables: false, - numberOfHearbeats: 2, - }); - - await cloudDefinedIndex.addBulk([ - ...blockActionEnabledHeartbeats, - ...blockActionDisabledHeartbeats, - ]); - - let interceptedRequestBody: UsageRecord[] = []; - - await retry.try(async () => { - interceptedRequestBody = getInterceptedRequestPayload(); - expect(interceptedRequestBody.length).to.greaterThan(0); - if (interceptedRequestBody.length > 0) { - const usageSubTypes = interceptedRequestBody.map((record) => record.usage.sub_type); - expect(usageSubTypes).to.contain('cloud_defend'); - expect(interceptedRequestBody.length).to.be(blockActionEnabledHeartbeats.length); - expect(interceptedRequestBody[0].usage.type).to.be('cloud_security'); - } - }); - }); - it('Should intercept usage API request with all integrations usage records', async () => { // Create one package policy - it takes care forCSPM, KSMP and CNVM await createPackagePolicy( @@ -253,13 +208,6 @@ export default function (providerContext: FtrProviderContext) { internalRequestHeader ); - // Create Defend for Containers package policy - await createCloudDefendPackagePolicy( - supertestWithoutAuth, - agentPolicyId, - roleAuthc, - internalRequestHeader - ); const billableFindingsCSPM = getMockFindings({ postureType: 'cspm', isBillableAsset: true, @@ -289,16 +237,6 @@ export default function (providerContext: FtrProviderContext) { numberOfFindings: 11, }); - const blockActionEnabledHeartbeats = getMockDefendForContainersHeartbeats({ - isBlockActionEnables: true, - numberOfHearbeats: 2, - }); - - const blockActionDisabledHeartbeats = getMockDefendForContainersHeartbeats({ - isBlockActionEnables: false, - numberOfHearbeats: 2, - }); - await Promise.all([ findingsIndex.addBulk([ ...billableFindingsCSPM, @@ -307,10 +245,6 @@ export default function (providerContext: FtrProviderContext) { ...notBillableFindingsKSPM, ]), vulnerabilitiesIndex.addBulk([...billableFindingsCNVM]), - cloudDefinedIndex.addBulk([ - ...blockActionEnabledHeartbeats, - ...blockActionDisabledHeartbeats, - ]), ]); // Intercept and verify usage API request @@ -323,16 +257,12 @@ export default function (providerContext: FtrProviderContext) { expect(usageSubTypes).to.contain('cspm'); expect(usageSubTypes).to.contain('kspm'); expect(usageSubTypes).to.contain('cnvm'); - expect(usageSubTypes).to.contain('cloud_defend'); const totalUsageQuantity = interceptedRequestBody.reduce( (acc, record) => acc + record.usage.quantity, 0 ); expect(totalUsageQuantity).to.be( - billableFindingsCSPM.length + - billableFindingsKSPM.length + - billableFindingsCNVM.length + - blockActionEnabledHeartbeats.length + billableFindingsCSPM.length + billableFindingsKSPM.length + billableFindingsCNVM.length ); }); }); From e29a14d623d1034f6ea12bce679a8fceb95b4cdc Mon Sep 17 00:00:00 2001 From: Mason Herron <46727170+Supplementing@users.noreply.github.com> Date: Wed, 18 Dec 2024 08:37:32 -0700 Subject: [PATCH 48/60] [Fleet] removed extraneous '/downloads' in path for curl commands (#204660) ## Summary Removed the extra `/downloads` portion of the curl command, as it is already returned in the base url. Closes #204462 Before: ![image](https://github.com/user-attachments/assets/5a156aca-ea2b-4703-97b3-f7a5e4ae6ab1) After: ![image](https://github.com/user-attachments/assets/d5c9f0d4-1452-40c1-b8df-4473584ac288) --- .../enrollment_instructions/standalone/index.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/x-pack/plugins/fleet/public/components/enrollment_instructions/standalone/index.tsx b/x-pack/plugins/fleet/public/components/enrollment_instructions/standalone/index.tsx index dd8eafec86ec..8901c3b5f088 100644 --- a/x-pack/plugins/fleet/public/components/enrollment_instructions/standalone/index.tsx +++ b/x-pack/plugins/fleet/public/components/enrollment_instructions/standalone/index.tsx @@ -22,24 +22,24 @@ export const StandaloneInstructions = ({ const { windows: windowsDownloadSourceProxyArgs, curl: curlDownloadSourceProxyArgs } = getDownloadSourceProxyArgs(downloadSourceProxy); - const linuxDebCommand = `curl -L -O ${downloadBaseUrl}/downloads/beats/elastic-agent/elastic-agent-${agentVersion}-amd64.deb ${curlDownloadSourceProxyArgs} + const linuxDebCommand = `curl -L -O ${downloadBaseUrl}/beats/elastic-agent/elastic-agent-${agentVersion}-amd64.deb ${curlDownloadSourceProxyArgs} sudo dpkg -i elastic-agent-${agentVersion}-amd64.deb \nsudo systemctl enable elastic-agent \nsudo systemctl start elastic-agent`; - const linuxRpmCommand = `curl -L -O ${downloadBaseUrl}/downloads/beats/elastic-agent/elastic-agent-${agentVersion}-x86_64.rpm ${curlDownloadSourceProxyArgs} + const linuxRpmCommand = `curl -L -O ${downloadBaseUrl}/beats/elastic-agent/elastic-agent-${agentVersion}-x86_64.rpm ${curlDownloadSourceProxyArgs} sudo rpm -vi elastic-agent-${agentVersion}-x86_64.rpm \nsudo systemctl enable elastic-agent \nsudo systemctl start elastic-agent`; - const linuxCommand = `curl -L -O ${downloadBaseUrl}/downloads/beats/elastic-agent/elastic-agent-${agentVersion}-linux-x86_64.tar.gz ${curlDownloadSourceProxyArgs} + const linuxCommand = `curl -L -O ${downloadBaseUrl}/beats/elastic-agent/elastic-agent-${agentVersion}-linux-x86_64.tar.gz ${curlDownloadSourceProxyArgs} tar xzvf elastic-agent-${agentVersion}-linux-x86_64.tar.gz cd elastic-agent-${agentVersion}-linux-x86_64 sudo ./elastic-agent install`; - const macCommand = `curl -L -O ${downloadBaseUrl}/downloads/beats/elastic-agent/elastic-agent-${agentVersion}-darwin-aarch64.tar.gz ${curlDownloadSourceProxyArgs} + const macCommand = `curl -L -O ${downloadBaseUrl}/beats/elastic-agent/elastic-agent-${agentVersion}-darwin-aarch64.tar.gz ${curlDownloadSourceProxyArgs} tar xzvf elastic-agent-${agentVersion}-darwin-aarch64.tar.gz cd elastic-agent-${agentVersion}-darwin-aarch64 sudo ./elastic-agent install`; const windowsCommand = `$ProgressPreference = 'SilentlyContinue' -Invoke-WebRequest -Uri ${downloadBaseUrl}/downloads/beats/elastic-agent/elastic-agent-${agentVersion}-windows-x86_64.zip -OutFile elastic-agent-${agentVersion}-windows-x86_64.zip ${windowsDownloadSourceProxyArgs} +Invoke-WebRequest -Uri ${downloadBaseUrl}/beats/elastic-agent/elastic-agent-${agentVersion}-windows-x86_64.zip -OutFile elastic-agent-${agentVersion}-windows-x86_64.zip ${windowsDownloadSourceProxyArgs} Expand-Archive .\elastic-agent-${agentVersion}-windows-x86_64.zip -DestinationPath . cd elastic-agent-${agentVersion}-windows-x86_64 .\\elastic-agent.exe install`; From 4bb6521f265554aa659700fdf2d974f1ce6c8ff0 Mon Sep 17 00:00:00 2001 From: Mykola Harmash Date: Wed, 18 Dec 2024 16:58:05 +0100 Subject: [PATCH 49/60] [Observability Onboarding] Migrate e2e Playwright tests from oblt-playwright repo (#203616) Closes https://github.com/elastic/kibana/issues/199016 This change migrates and and expands tests from [oblt-playwright](https://github.com/elastic/oblt-playwright) repo. These tests are part of the [Nightly workflow](https://github.com/elastic/ensemble/actions/workflows/nightly.yml) and being run by an Ensemble story on the CI. The Nightly workflow itself is still in development and does not support some of the use cases, that's why kubernetes tests are skipped for now in this PR. See the `./README.md` on how to run the tests locally. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .../lib/config/run_check_ftr_configs_cli.ts | 4 + .../e2e/playwright/.gitignore | 2 + .../e2e/playwright/README.md | 25 +++++ .../e2e/playwright/lib/assert_env.ts | 12 +++ .../e2e/playwright/lib/helpers.ts | 35 ++++++ .../e2e/playwright/lib/logger.ts | 13 +++ .../e2e/playwright/playwright.config.ts | 102 ++++++++++++++++++ .../e2e/playwright/stateful/auth.ts | 50 +++++++++ .../playwright/stateful/auto_detect.spec.ts | 65 +++++++++++ .../playwright/stateful/fixtures/base_page.ts | 47 ++++++++ .../playwright/stateful/kubernetes_ea.spec.ts | 66 ++++++++++++ .../pom/components/header_bar.component.ts | 22 ++++ .../components/space_selector.component.ts | 23 ++++ .../pom/pages/auto_detect_flow.page.ts | 51 +++++++++ .../stateful/pom/pages/host_details.page.ts | 38 +++++++ .../pom/pages/kubernetes_ea_flow.page.ts | 51 +++++++++ .../kubernetes_overview_dashboard.page.ts | 48 +++++++++ .../pom/pages/onboarding_home.page.ts | 44 ++++++++ .../e2e/tsconfig.json | 3 +- .../auto_detect/auto_detect_panel.tsx | 6 +- .../kubernetes/command_snippet.tsx | 7 +- .../kubernetes/data_ingest_status.tsx | 1 + 22 files changed, 712 insertions(+), 3 deletions(-) create mode 100644 x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/.gitignore create mode 100644 x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/README.md create mode 100644 x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/lib/assert_env.ts create mode 100644 x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/lib/helpers.ts create mode 100644 x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/lib/logger.ts create mode 100644 x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/playwright.config.ts create mode 100644 x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/auth.ts create mode 100644 x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/auto_detect.spec.ts create mode 100644 x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/fixtures/base_page.ts create mode 100644 x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/kubernetes_ea.spec.ts create mode 100644 x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/pom/components/header_bar.component.ts create mode 100644 x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/pom/components/space_selector.component.ts create mode 100644 x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/pom/pages/auto_detect_flow.page.ts create mode 100644 x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/pom/pages/host_details.page.ts create mode 100644 x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/pom/pages/kubernetes_ea_flow.page.ts create mode 100644 x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/pom/pages/kubernetes_overview_dashboard.page.ts create mode 100644 x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/pom/pages/onboarding_home.page.ts diff --git a/packages/kbn-test/src/functional_test_runner/lib/config/run_check_ftr_configs_cli.ts b/packages/kbn-test/src/functional_test_runner/lib/config/run_check_ftr_configs_cli.ts index 5808c88901b1..265bdbe9e008 100644 --- a/packages/kbn-test/src/functional_test_runner/lib/config/run_check_ftr_configs_cli.ts +++ b/packages/kbn-test/src/functional_test_runner/lib/config/run_check_ftr_configs_cli.ts @@ -25,6 +25,10 @@ const THIS_REL = Path.relative(REPO_ROOT, THIS_PATH); const IGNORED_PATHS = [ THIS_PATH, Path.resolve(REPO_ROOT, 'packages/kbn-test/src/jest/run_check_jest_configs_cli.ts'), + Path.resolve( + REPO_ROOT, + 'x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/playwright.config.ts' + ), ]; export async function runCheckFtrConfigsCli() { diff --git a/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/.gitignore b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/.gitignore new file mode 100644 index 000000000000..b88cb2a2003a --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/.gitignore @@ -0,0 +1,2 @@ +.playwright +.env* diff --git a/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/README.md b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/README.md new file mode 100644 index 000000000000..f2952214127f --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/README.md @@ -0,0 +1,25 @@ +# Observability Onboarding Playwright Tests + +These tests are part of the [Nightly CI workflow](https://github.com/elastic/ensemble/actions/workflows/nightly.yml) and do not run on PRs. + +Playwright tests are only responsible for UI checks and do not automate onboarding flows fully. On the CI, the missing parts (like executing code snippets on the host) are automated by Ensemble stories, but when running locally you need to do those steps manually. + +## Running The Tests Locally + +1. Run ES and Kibana +2. Create a `.env` file in the `./x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/` directory with the following content (adjust the values like Kibana URL according yo your local setup): +```bash +KIBANA_BASE_URL = "http://localhost:5601/ftw" +ELASTICSEARCH_HOST = "http://localhost:9200" +KIBANA_USERNAME = "elastic" +KIBANA_PASSWORD = "changeme" +CLUSTER_ENVIRONMENT = local +ARTIFACTS_FOLDER = ./.playwright +``` +3. Run the `playwright test` +```bash +# Assuming the working directory is the root of the Kibana repo +npx playwright test -c ./x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/playwright.config.ts --project stateful --reporter list --headed +``` +4. Once the test reaches one of the required manual steps, like executing auto-detect command snippet, do the step manually. +5. The test will proceed once the manual step is done. diff --git a/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/lib/assert_env.ts b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/lib/assert_env.ts new file mode 100644 index 000000000000..6c54cabdc160 --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/lib/assert_env.ts @@ -0,0 +1,12 @@ +/* + * 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. + */ + +export function assertEnv(variable: unknown, message: string): asserts variable is string { + if (typeof variable !== 'string') { + throw new Error(message); + } +} diff --git a/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/lib/helpers.ts b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/lib/helpers.ts new file mode 100644 index 000000000000..e7c6afaefbd2 --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/lib/helpers.ts @@ -0,0 +1,35 @@ +/* + * 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 { Locator } from '@playwright/test'; +import { HeaderBar } from '../stateful/pom/components/header_bar.component'; +import { SpaceSelector } from '../stateful/pom/components/space_selector.component'; + +type WaitForRes = [locatorIndex: number, locator: Locator]; + +export async function waitForOneOf(locators: Locator[]): Promise { + const res = await Promise.race([ + ...locators.map(async (locator, index): Promise => { + let timedOut = false; + await locator.waitFor({ state: 'visible' }).catch(() => (timedOut = true)); + return [timedOut ? -1 : index, locator]; + }), + ]); + if (res[0] === -1) { + throw new Error('No locator is visible before timeout.'); + } + return res; +} + +export async function spaceSelectorStateful(headerBar: HeaderBar, spaceSelector: SpaceSelector) { + const [index] = await waitForOneOf([headerBar.helpMenuButton(), spaceSelector.spaceSelector()]); + const selector = index === 1; + if (selector) { + await spaceSelector.selectDefault(); + await headerBar.assertHelpMenuButton(); + } +} diff --git a/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/lib/logger.ts b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/lib/logger.ts new file mode 100644 index 000000000000..92ec2ba6918f --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/lib/logger.ts @@ -0,0 +1,13 @@ +/* + * 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 { ToolingLog } from '@kbn/tooling-log'; + +export const log: ToolingLog = new ToolingLog({ + level: 'info', + writeTo: process.stdout, +}); diff --git a/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/playwright.config.ts b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/playwright.config.ts new file mode 100644 index 000000000000..39217999f5a2 --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/playwright.config.ts @@ -0,0 +1,102 @@ +/* + * 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 dotenv from 'dotenv'; +import { defineConfig, devices } from '@playwright/test'; +import path from 'path'; +import { log } from './lib/logger'; +import { assertEnv } from './lib/assert_env'; + +const dotEnvPath = process.env.DOTENV_PATH ?? path.join(__dirname, '.env'); + +dotenv.config({ path: dotEnvPath }); + +assertEnv(process.env.ARTIFACTS_FOLDER, 'ARTIFACTS_FOLDER is not defined.'); + +export const STORAGE_STATE = path.join(__dirname, process.env.ARTIFACTS_FOLDER, '.auth/user.json'); + +// eslint-disable-next-line import/no-default-export +export default defineConfig({ + testDir: './', + outputDir: './.playwright', + /* Run tests in files in parallel */ + fullyParallel: true, + /* Fail the build on CI if you accidentally left test.only in the source code. */ + forbidOnly: !!process.env.CI, + /* Retry on CI only */ + retries: process.env.CI ? 2 : 0, + /* Opt out of parallel tests on CI. */ + workers: process.env.CI ? 1 : undefined, + // workers: 4, + /* Reporter to use. See https://playwright.dev/docs/test-reporters */ + reporter: [ + ['json'], + ['json', { outputFile: path.join(process.env.ARTIFACTS_FOLDER, 'results.json') }], + ], + /* Timeouts */ + timeout: 400000, + expect: { timeout: 400000 }, + + /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ + use: { + /* Base URL to use in actions like `await page.goto('/')`. */ + baseURL: process.env.KIBANA_BASE_URL, + + /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ + trace: 'on-first-retry', + testIdAttribute: 'data-test-subj', + permissions: ['clipboard-read'], + screenshot: 'only-on-failure', + }, + + projects: [ + { + name: 'auth', + testMatch: '*stateful/auth.ts', + use: { + viewport: { width: 1920, height: 1080 }, + launchOptions: { + logger: { + isEnabled: () => true, + log: (name, severity, message) => log.info(`[${severity}] ${name} ${message}`), + }, + }, + }, + }, + { + name: 'stateful', + testMatch: '*stateful/*.spec.ts', + use: { + ...devices['Desktop Chrome'], + viewport: { width: 1920, height: 1200 }, + storageState: STORAGE_STATE, + launchOptions: { + logger: { + isEnabled: () => true, + log: (name, severity, message) => log.info(`[${severity}] ${name} ${message}`), + }, + }, + }, + dependencies: ['auth'], + }, + { + name: 'teardown', + testMatch: 'teardown.setup.ts', + use: { + viewport: { width: 1920, height: 1080 }, + storageState: STORAGE_STATE, + testIdAttribute: 'data-test-subj', + launchOptions: { + logger: { + isEnabled: () => true, + log: (name, severity, message) => log.info(`[${severity}] ${name} ${message}`), + }, + }, + }, + }, + ], +}); diff --git a/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/auth.ts b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/auth.ts new file mode 100644 index 000000000000..726085fbabc3 --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/auth.ts @@ -0,0 +1,50 @@ +/* + * 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 { test as ess_auth, expect } from '@playwright/test'; +import { STORAGE_STATE } from '../playwright.config'; +import { waitForOneOf } from '../lib/helpers'; +import { log } from '../lib/logger'; +import { assertEnv } from '../lib/assert_env'; + +const isLocalCluster = process.env.CLUSTER_ENVIRONMENT === 'local'; + +ess_auth('Authentication', async ({ page }) => { + assertEnv(process.env.KIBANA_BASE_URL, 'KIBANA_BASE_URL is not defined.'); + assertEnv(process.env.KIBANA_USERNAME, 'KIBANA_USERNAME is not defined.'); + assertEnv(process.env.KIBANA_PASSWORD, 'KIBANA_PASSWORD is not defined.'); + + await page.goto(process.env.KIBANA_BASE_URL); + log.info(`...waiting for login page elements to appear.`); + if (!isLocalCluster) { + await page.getByRole('button', { name: 'Log in with Elasticsearch' }).click(); + } + await page.getByLabel('Username').fill(process.env.KIBANA_USERNAME); + await page.getByLabel('Password', { exact: true }).click(); + await page.getByLabel('Password', { exact: true }).fill(process.env.KIBANA_PASSWORD); + await page.getByRole('button', { name: 'Log in' }).click(); + + const [index] = await waitForOneOf([ + page.getByTestId('helpMenuButton'), + page.getByText('Select your space'), + page.getByTestId('loginErrorMessage'), + ]); + + const spaceSelector = index === 1; + const isAuthenticated = index === 0; + + if (isAuthenticated) { + await page.context().storageState({ path: STORAGE_STATE }); + } else if (spaceSelector) { + await page.getByRole('link', { name: 'Default' }).click(); + await expect(page.getByTestId('helpMenuButton')).toBeVisible(); + await page.context().storageState({ path: STORAGE_STATE }); + } else { + log.error('Username or password is incorrect.'); + throw new Error('Authentication is failed.'); + } +}); diff --git a/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/auto_detect.spec.ts b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/auto_detect.spec.ts new file mode 100644 index 000000000000..cff927a2061c --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/auto_detect.spec.ts @@ -0,0 +1,65 @@ +/* + * 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 fs from 'node:fs'; +import path from 'node:path'; +import { test } from './fixtures/base_page'; +import { HostDetailsPage } from './pom/pages/host_details.page'; +import { assertEnv } from '../lib/assert_env'; + +test.beforeEach(async ({ page }) => { + await page.goto(`${process.env.KIBANA_BASE_URL}/app/observabilityOnboarding`); +}); + +test('Auto-detect logs and metrics', async ({ page, onboardingHomePage, autoDetectFlowPage }) => { + assertEnv(process.env.ARTIFACTS_FOLDER, 'ARTIFACTS_FOLDER is not defined.'); + + const fileName = 'code_snippet_logs_auto_detect.sh'; + const outputPath = path.join(__dirname, '..', process.env.ARTIFACTS_FOLDER, fileName); + + await onboardingHomePage.selectHostUseCase(); + await onboardingHomePage.selectAutoDetectWithElasticAgent(); + + await autoDetectFlowPage.assertVisibilityCodeBlock(); + await autoDetectFlowPage.copyToClipboard(); + + const clipboardData = (await page.evaluate('navigator.clipboard.readText()')) as string; + + /** + * Ensemble story watches for the code snippet file + * to be created and then executes it + */ + fs.writeFileSync(outputPath, clipboardData); + + await autoDetectFlowPage.assertReceivedDataIndicator(); + await autoDetectFlowPage.clickAutoDetectSystemIntegrationCTA(); + + /** + * Host Details pages open in a new tab, so it + * needs to be captured using the `popup` event. + */ + const hostDetailsPage = new HostDetailsPage(await page.waitForEvent('popup')); + + /** + * There is a glitch on the Hosts page where it can show "No data" + * screen even though data is available and it can show it with a delay + * after the Hosts page layout was loaded. This workaround waits for + * the No Data screen to be visible, and if so - reloads the page. + * If the No Data screen does not appear, the test can proceed normally. + * Seems like some caching issue with the Hosts page. + */ + try { + await hostDetailsPage.noData().waitFor({ state: 'visible', timeout: 10000 }); + await hostDetailsPage.page.waitForTimeout(2000); + await hostDetailsPage.page.reload(); + } catch { + /* Ignore if "No Data" screen never showed up */ + } + + await hostDetailsPage.clickHostDetailsLogsTab(); + await hostDetailsPage.assertHostDetailsLogsStream(); +}); diff --git a/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/fixtures/base_page.ts b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/fixtures/base_page.ts new file mode 100644 index 000000000000..e10be1d60cc1 --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/fixtures/base_page.ts @@ -0,0 +1,47 @@ +/* + * 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 { test as base } from '@playwright/test'; +import { HeaderBar } from '../pom/components/header_bar.component'; +import { OnboardingHomePage } from '../pom/pages/onboarding_home.page'; +import { SpaceSelector } from '../pom/components/space_selector.component'; +import { KubernetesOverviewDashboardPage } from '../pom/pages/kubernetes_overview_dashboard.page'; +import { AutoDetectFlowPage } from '../pom/pages/auto_detect_flow.page'; +import { KubernetesEAFlowPage } from '../pom/pages/kubernetes_ea_flow.page'; + +export const test = base.extend<{ + headerBar: HeaderBar; + spaceSelector: SpaceSelector; + onboardingHomePage: OnboardingHomePage; + autoDetectFlowPage: AutoDetectFlowPage; + kubernetesEAFlowPage: KubernetesEAFlowPage; + kubernetesOverviewDashboardPage: KubernetesOverviewDashboardPage; +}>({ + headerBar: async ({ page }, use) => { + await use(new HeaderBar(page)); + }, + + spaceSelector: async ({ page }, use) => { + await use(new SpaceSelector(page)); + }, + + onboardingHomePage: async ({ page }, use) => { + await use(new OnboardingHomePage(page)); + }, + + autoDetectFlowPage: async ({ page }, use) => { + await use(new AutoDetectFlowPage(page)); + }, + + kubernetesEAFlowPage: async ({ page }, use) => { + await use(new KubernetesEAFlowPage(page)); + }, + + kubernetesOverviewDashboardPage: async ({ page }, use) => { + await use(new KubernetesOverviewDashboardPage(page)); + }, +}); diff --git a/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/kubernetes_ea.spec.ts b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/kubernetes_ea.spec.ts new file mode 100644 index 000000000000..8478630b232f --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/kubernetes_ea.spec.ts @@ -0,0 +1,66 @@ +/* + * 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 fs from 'node:fs'; +import path from 'node:path'; +import { test } from './fixtures/base_page'; +import { assertEnv } from '../lib/assert_env'; + +test.beforeEach(async ({ page }) => { + await page.goto(`${process.env.KIBANA_BASE_URL}/app/observabilityOnboarding`); +}); + +test('Kubernetes EA', async ({ + page, + onboardingHomePage, + kubernetesEAFlowPage, + kubernetesOverviewDashboardPage, +}) => { + assertEnv(process.env.ARTIFACTS_FOLDER, 'ARTIFACTS_FOLDER is not defined.'); + + const fileName = 'code_snippet_kubernetes.sh'; + const outputPath = path.join(__dirname, '..', process.env.ARTIFACTS_FOLDER, fileName); + + await onboardingHomePage.selectKubernetesUseCase(); + await onboardingHomePage.selectKubernetesQuickstart(); + + await kubernetesEAFlowPage.assertVisibilityCodeBlock(); + await kubernetesEAFlowPage.copyToClipboard(); + + const clipboardData = (await page.evaluate('navigator.clipboard.readText()')) as string; + /** + * The page waits for the browser window to loose + * focus as a signal to start checking for incoming data + */ + await page.evaluate('window.dispatchEvent(new Event("blur"))'); + + /** + * Ensemble story watches for the code snippet file + * to be created and then executes it + */ + fs.writeFileSync(outputPath, clipboardData); + + await kubernetesEAFlowPage.assertReceivedDataIndicatorKubernetes(); + await kubernetesEAFlowPage.clickKubernetesAgentCTA(); + + await kubernetesOverviewDashboardPage.openNodesInspector(); + /** + * There might be a case that dashboard still does not show + * the data even though it was ingested already. This usually + * happens during in the test when navigation from the onboarding + * flow to the dashboard happens almost immediately. + * Waiting for a few seconds and reloading the page handles + * this case and makes the test a bit more robust. + */ + try { + await kubernetesOverviewDashboardPage.assertNodesNoResultsNotVisible(); + } catch { + await kubernetesOverviewDashboardPage.page.waitForTimeout(2000); + await kubernetesOverviewDashboardPage.page.reload(); + } + await kubernetesOverviewDashboardPage.assetNodesInspectorStatusTableCells(); +}); diff --git a/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/pom/components/header_bar.component.ts b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/pom/components/header_bar.component.ts new file mode 100644 index 000000000000..9165622bf6ce --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/pom/components/header_bar.component.ts @@ -0,0 +1,22 @@ +/* + * 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 { expect, Page } from '@playwright/test'; + +export class HeaderBar { + page: Page; + + constructor(page: Page) { + this.page = page; + } + + public readonly helpMenuButton = () => this.page.getByTestId('helpMenuButton'); + + public async assertHelpMenuButton() { + await expect(this.helpMenuButton(), 'Help menu button').toBeVisible(); + } +} diff --git a/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/pom/components/space_selector.component.ts b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/pom/components/space_selector.component.ts new file mode 100644 index 000000000000..8527141d455a --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/pom/components/space_selector.component.ts @@ -0,0 +1,23 @@ +/* + * 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 { Page } from '@playwright/test'; + +export class SpaceSelector { + page: Page; + + constructor(page: Page) { + this.page = page; + } + + public readonly spaceSelector = () => this.page.getByText('Select your space'); + private readonly spaceSelectorDefault = () => this.page.getByRole('link', { name: 'Default' }); + + public async selectDefault() { + await this.spaceSelectorDefault().click(); + } +} diff --git a/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/pom/pages/auto_detect_flow.page.ts b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/pom/pages/auto_detect_flow.page.ts new file mode 100644 index 000000000000..b1090b3cf091 --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/pom/pages/auto_detect_flow.page.ts @@ -0,0 +1,51 @@ +/* + * 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 { expect, Page } from '@playwright/test'; + +export class AutoDetectFlowPage { + page: Page; + + constructor(page: Page) { + this.page = page; + } + + private readonly copyToClipboardButton = () => + this.page.getByTestId('observabilityOnboardingCopyToClipboardButton'); + + private readonly receivedDataIndicator = () => + this.page + .getByTestId('observabilityOnboardingAutoDetectPanelDataReceivedProgressIndicator') + .getByText('Your data is ready to explore!'); + + private readonly autoDetectSystemIntegrationActionLink = () => + this.page.getByTestId( + 'observabilityOnboardingDataIngestStatusActionLink-inventory-host-details' + ); + + private readonly codeBlock = () => + this.page.getByTestId('observabilityOnboardingAutoDetectPanelCodeSnippet'); + + public async copyToClipboard() { + await this.copyToClipboardButton().click(); + } + + public async assertVisibilityCodeBlock() { + await expect(this.codeBlock(), 'Code block should be visible').toBeVisible(); + } + + public async assertReceivedDataIndicator() { + await expect( + this.receivedDataIndicator(), + 'Received data indicator should be visible' + ).toBeVisible(); + } + + public async clickAutoDetectSystemIntegrationCTA() { + await this.autoDetectSystemIntegrationActionLink().click(); + } +} diff --git a/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/pom/pages/host_details.page.ts b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/pom/pages/host_details.page.ts new file mode 100644 index 000000000000..d22b33d85163 --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/pom/pages/host_details.page.ts @@ -0,0 +1,38 @@ +/* + * 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 { expect, Page } from '@playwright/test'; + +export class HostDetailsPage { + page: Page; + + public readonly hostDetailsLogsTab = () => this.page.getByTestId('infraAssetDetailsLogsTab'); + + private readonly hostDetailsLogsStream = () => this.page.getByTestId('logStream'); + + public readonly noData = () => this.page.getByTestId('kbnNoDataPage'); + + constructor(page: Page) { + this.page = page; + } + + public async clickHostDetailsLogsTab() { + await this.hostDetailsLogsTab().click(); + } + + public async assertHostDetailsLogsStream() { + await expect( + this.hostDetailsLogsStream(), + 'Host details log stream should be visible' + /** + * Using toBeAttached() instead of toBeVisible() because the element + * we're selecting here has a bit weird layout with 0 height and + * overflowing child elements. 0 height makes toBeVisible() fail. + */ + ).toBeAttached(); + } +} diff --git a/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/pom/pages/kubernetes_ea_flow.page.ts b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/pom/pages/kubernetes_ea_flow.page.ts new file mode 100644 index 000000000000..e956de485557 --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/pom/pages/kubernetes_ea_flow.page.ts @@ -0,0 +1,51 @@ +/* + * 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 { expect, Page } from '@playwright/test'; + +export class KubernetesEAFlowPage { + page: Page; + + constructor(page: Page) { + this.page = page; + } + + private readonly receivedDataIndicatorKubernetes = () => + this.page + .getByTestId('observabilityOnboardingKubernetesPanelDataProgressIndicator') + .getByText('We are monitoring your cluster'); + + private readonly kubernetesAgentExploreDataActionLink = () => + this.page.getByTestId( + 'observabilityOnboardingDataIngestStatusActionLink-kubernetes-f4dc26db-1b53-4ea2-a78b-1bfab8ea267c' + ); + + private readonly codeBlock = () => + this.page.getByTestId('observabilityOnboardingKubernetesPanelCodeSnippet'); + + private readonly copyToClipboardButton = () => + this.page.getByTestId('observabilityOnboardingCopyToClipboardButton'); + + public async assertVisibilityCodeBlock() { + await expect(this.codeBlock(), 'Code block should be visible').toBeVisible(); + } + + public async copyToClipboard() { + await this.copyToClipboardButton().click(); + } + + public async assertReceivedDataIndicatorKubernetes() { + await expect( + this.receivedDataIndicatorKubernetes(), + 'Received data indicator should be visible' + ).toBeVisible(); + } + + public async clickKubernetesAgentCTA() { + await this.kubernetesAgentExploreDataActionLink().click(); + } +} diff --git a/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/pom/pages/kubernetes_overview_dashboard.page.ts b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/pom/pages/kubernetes_overview_dashboard.page.ts new file mode 100644 index 000000000000..9562f0262994 --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/pom/pages/kubernetes_overview_dashboard.page.ts @@ -0,0 +1,48 @@ +/* + * 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 { expect, Page } from '@playwright/test'; + +export class KubernetesOverviewDashboardPage { + page: Page; + + constructor(page: Page) { + this.page = page; + } + + private readonly nodesPanelHeader = () => this.page.getByTestId('embeddablePanelHeading-Nodes'); + + private readonly nodesInspectorButton = () => + this.page + .getByTestId('embeddablePanelHoverActions-Nodes') + .getByTestId('embeddablePanelAction-openInspector'); + + private readonly nodesInspectorTableNoResults = () => + this.page.getByTestId('inspectorTable').getByText('No items found'); + + private readonly nodesInspectorTableStatusTableCells = () => + this.page.getByTestId('inspectorTable').getByText('Status'); + + public async assertNodesNoResultsNotVisible() { + await expect( + this.nodesInspectorTableNoResults(), + 'Nodes "No results" message should not be visible' + ).toBeHidden(); + } + + public async openNodesInspector() { + await this.nodesPanelHeader().hover(); + await this.nodesInspectorButton().click(); + } + + public async assetNodesInspectorStatusTableCells() { + await expect( + this.nodesInspectorTableStatusTableCells(), + 'Status table cell should exist' + ).toBeVisible(); + } +} diff --git a/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/pom/pages/onboarding_home.page.ts b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/pom/pages/onboarding_home.page.ts new file mode 100644 index 000000000000..699700149652 --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_onboarding/e2e/playwright/stateful/pom/pages/onboarding_home.page.ts @@ -0,0 +1,44 @@ +/* + * 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 { Page } from '@playwright/test'; + +export class OnboardingHomePage { + page: Page; + + constructor(page: Page) { + this.page = page; + } + + private readonly useCaseKubernetes = () => + this.page.getByTestId('observabilityOnboardingUseCaseCard-kubernetes').getByRole('radio'); + + private readonly kubernetesQuickStartCard = () => + this.page.getByTestId('integration-card:kubernetes-quick-start'); + + private readonly useCaseHost = () => + this.page.getByTestId('observabilityOnboardingUseCaseCard-host').getByRole('radio'); + + private readonly autoDetectElasticAgent = () => + this.page.getByTestId('integration-card:auto-detect-logs'); + + public async selectHostUseCase() { + await this.useCaseHost().click(); + } + + public async selectKubernetesUseCase() { + await this.useCaseKubernetes().click(); + } + + public async selectAutoDetectWithElasticAgent() { + await this.autoDetectElasticAgent().click(); + } + + public async selectKubernetesQuickstart() { + await this.kubernetesQuickStartCard().click(); + } +} diff --git a/x-pack/plugins/observability_solution/observability_onboarding/e2e/tsconfig.json b/x-pack/plugins/observability_solution/observability_onboarding/e2e/tsconfig.json index 94d4f2278cb6..a18951aeb8cf 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/e2e/tsconfig.json +++ b/x-pack/plugins/observability_solution/observability_onboarding/e2e/tsconfig.json @@ -14,6 +14,7 @@ "@kbn/cypress-config", "@kbn/observability-onboarding-plugin", "@kbn/ftr-common-functional-services", - "@kbn/ftr-common-functional-ui-services" + "@kbn/ftr-common-functional-ui-services", + "@kbn/tooling-log" ] } diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/auto_detect/auto_detect_panel.tsx b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/auto_detect/auto_detect_panel.tsx index d12f0cae583f..2891d4c47834 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/auto_detect/auto_detect_panel.tsx +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/auto_detect/auto_detect_panel.tsx @@ -95,7 +95,11 @@ export const AutoDetectPanel: FunctionComponent = () => { {/* Bash syntax highlighting only highlights a few random numbers (badly) so it looks less messy to go with plain text */} - + {command} diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/kubernetes/command_snippet.tsx b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/kubernetes/command_snippet.tsx index ac00190fb268..ce22e3182973 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/kubernetes/command_snippet.tsx +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/kubernetes/command_snippet.tsx @@ -63,7 +63,12 @@ export function CommandSnippet({ - + {command} diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/kubernetes/data_ingest_status.tsx b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/kubernetes/data_ingest_status.tsx index 659c1e5bd7b5..50725e262eb5 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/kubernetes/data_ingest_status.tsx +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/kubernetes/data_ingest_status.tsx @@ -80,6 +80,7 @@ export function DataIngestStatus({ onboardingId }: Props) { css={css` max-width: 40%; `} + data-test-subj="observabilityOnboardingKubernetesPanelDataProgressIndicator" /> {isTroubleshootingVisible && ( From 96af6fa88057a8ec42cb643735c77412d9033108 Mon Sep 17 00:00:00 2001 From: Gerard Soldevila Date: Wed, 18 Dec 2024 17:05:37 +0100 Subject: [PATCH 50/60] Sustainable Kibana Architecture: Move modules owned by `@elastic/security-detection-rule-management` (#202846) ## Summary This PR aims at relocating some of the Kibana modules (plugins and packages) into a new folder structure, according to the _Sustainable Kibana Architecture_ initiative. > [!IMPORTANT] > * We kindly ask you to: > * Manually fix the errors in the error section below (if there are any). > * Search for the `packages[\/\\]` and `plugins[\/\\]` patterns in the source code (Babel and Eslint config files), and update them appropriately. > * Manually review `.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that any CI pipeline customizations continue to be correctly applied after the changed path names > * Review all of the updated files, specially the `.ts` and `.js` files listed in the sections below, as some of them contain relative paths that have been updated. > * Think of potential impact of the move, including tooling and configuration files that can be pointing to the relocated modules. E.g.: > * customised eslint rules > * docs pointing to source code > [!NOTE] > * This PR has been auto-generated. > * Any manual contributions will be lost if the 'relocate' script is re-run. > * Try to obtain the missing reviews / approvals before applying manual fixes, and/or keep your changes in a .patch / git stash. > * Please use [#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E) Slack channel for feedback. Are you trying to rebase this PR to solve merge conflicts? Please follow the steps describe [here](https://elastic.slack.com/archives/C07TCKTA22E/p1734019532879269?thread_ts=1734019339.935419&cid=C07TCKTA22E). #### 2 packages(s) are going to be relocated: | Id | Target folder | | -- | ------------- | | `@kbn/openapi-common` | `src/platform/packages/shared/kbn-openapi-common` | | `@kbn/zod-helpers` | `src/platform/packages/shared/kbn-zod-helpers` |
    Updated references ``` ./.buildkite/scripts/steps/code_generation/security_solution_codegen.sh ./package.json ./packages/kbn-repo-packages/package-map.json ./packages/kbn-ts-projects/config-paths.json ./src/platform/packages/shared/kbn-openapi-common/jest.config.js ./src/platform/packages/shared/kbn-zod-helpers/jest.config.js ./tsconfig.base.json ./tsconfig.base.type_check.json ./tsconfig.refs.json ./x-pack/platform/plugins/shared/fleet/tsconfig.type_check.json ./x-pack/plugins/integration_assistant/tsconfig.type_check.json ./x-pack/plugins/osquery/tsconfig.type_check.json ./x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list/create_endpoint_list.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/delete_endpoint_list_item/delete_endpoint_list_item.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/find_endpoint_list_item/find_endpoint_list_item.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/read_endpoint_list_item/read_endpoint_list_item.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list/create_exception_list.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list_item/create_exception_list_item.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_rule_exceptions/create_rule_exceptions.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_shared_exceptions_list/create_shared_exceptions_list.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list/delete_exception_list.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list_item/delete_exception_list_item.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/duplicate_exception_list/duplicate_exception_list.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/export_exception_list/export_exception_list.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_list_items/find_exception_list_items.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_lists/find_exception_lists.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/import_exceptions/import_exceptions.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list/read_exception_list.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_item/read_exception_list_item.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_summary/read_exception_list_summary.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list/update_exception_list.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list_item/update_exception_list_item.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list/create_list.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_index/create_list_index.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_item/create_list_item.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list/delete_list.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_index/delete_list_index.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_item/delete_list_item.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/export_list_items/export_list_items.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_list_items/find_list_items.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_lists/find_lists.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/import_list_items/import_list_items.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/model/list_common.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list/patch_list.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list_item/patch_list_item.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list/read_list.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_index/read_list_index.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_item/read_list_item.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_privileges/read_list_privileges.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list/update_list.schema.yaml ./x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list_item/update_list_item.schema.yaml ./x-pack/solutions/security/plugins/lists/tsconfig.type_check.json ./x-pack/test/api_integration/apis/entity_manager/fixture_plugin/tsconfig.type_check.json ./x-pack/test/tsconfig.type_check.json ./yarn.lock .github/CODEOWNERS ```
    Updated relative paths ``` src/platform/packages/shared/kbn-openapi-common/jest.config.js:12 src/platform/packages/shared/kbn-openapi-common/scripts/openapi_generate.js:10 src/platform/packages/shared/kbn-openapi-common/tsconfig.json:7 src/platform/packages/shared/kbn-openapi-common/tsconfig.type_check.json:14 src/platform/packages/shared/kbn-zod-helpers/jest.config.js:12 src/platform/packages/shared/kbn-zod-helpers/tsconfig.json:7 src/platform/packages/shared/kbn-zod-helpers/tsconfig.type_check.json:14 src/platform/packages/shared/kbn-zod-helpers/tsconfig.type_check.json:23 ```
    --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .../security_solution_codegen.sh | 2 +- .github/CODEOWNERS | 4 ++-- package.json | 4 ++-- .../shared}/kbn-openapi-common/README.md | 0 .../shared}/kbn-openapi-common/jest.config.js | 4 ++-- .../shared}/kbn-openapi-common/kibana.jsonc | 0 .../shared}/kbn-openapi-common/package.json | 0 .../schemas/error_responses.gen.ts | 0 .../schemas/error_responses.schema.yaml | 0 .../schemas/primitives.gen.ts | 0 .../schemas/primitives.schema.yaml | 0 .../schemas/primitives.test.ts | 0 .../scripts/openapi_generate.js | 2 +- .../kbn-openapi-common/shared/index.ts | 0 .../shared/path_params_replacer.ts | 0 .../shared}/kbn-openapi-common/tsconfig.json | 2 +- .../shared}/kbn-zod-helpers/README.md | 0 .../packages/shared}/kbn-zod-helpers/index.ts | 0 .../shared}/kbn-zod-helpers/jest.config.js | 4 ++-- .../shared}/kbn-zod-helpers/kibana.jsonc | 0 .../shared}/kbn-zod-helpers/package.json | 0 .../src/array_from_string.test.ts | 0 .../kbn-zod-helpers/src/array_from_string.ts | 0 .../src/boolean_from_string.test.ts | 0 .../src/boolean_from_string.ts | 0 .../src/build_route_validation_with_zod.ts | 0 .../kbn-zod-helpers/src/expect_parse_error.ts | 0 .../src/expect_parse_success.ts | 0 .../kbn-zod-helpers/src/is_valid_date_math.ts | 0 .../kbn-zod-helpers/src/non_empty_string.ts | 0 .../kbn-zod-helpers/src/required_optional.ts | 0 .../kbn-zod-helpers/src/safe_parse_result.ts | 0 .../src/stringify_zod_error.ts | 0 .../shared}/kbn-zod-helpers/tsconfig.json | 2 +- tsconfig.base.json | 8 +++---- .../create_endpoint_list.schema.yaml | 10 ++++----- .../create_endpoint_list_item.schema.yaml | 12 +++++----- .../delete_endpoint_list_item.schema.yaml | 12 +++++----- .../find_endpoint_list_item.schema.yaml | 16 +++++++------- .../read_endpoint_list_item.schema.yaml | 12 +++++----- .../update_endpoint_list_item.schema.yaml | 12 +++++----- .../create_exception_list.schema.yaml | 12 +++++----- .../create_exception_list_item.schema.yaml | 14 ++++++------ .../create_rule_exceptions.schema.yaml | 14 ++++++------ .../create_shared_exceptions_list.schema.yaml | 12 +++++----- .../delete_exception_list.schema.yaml | 12 +++++----- .../delete_exception_list_item.schema.yaml | 12 +++++----- .../duplicate_exception_list.schema.yaml | 12 +++++----- .../export_exception_list.schema.yaml | 12 +++++----- .../find_exception_list_items.schema.yaml | 16 +++++++------- .../find_exception_lists.schema.yaml | 10 ++++----- .../import_exceptions.schema.yaml | 10 ++++----- .../model/exception_list_common.schema.yaml | 22 +++++++++---------- .../exception_list_item_entry.schema.yaml | 18 +++++++-------- .../read_exception_list.schema.yaml | 12 +++++----- .../read_exception_list_item.schema.yaml | 12 +++++----- .../read_exception_list_summary.schema.yaml | 12 +++++----- .../update_exception_list.schema.yaml | 12 +++++----- .../update_exception_list_item.schema.yaml | 16 +++++++------- .../api/create_list/create_list.schema.yaml | 12 +++++----- .../create_list_index.schema.yaml | 12 +++++----- .../create_list_item.schema.yaml | 12 +++++----- .../api/delete_list/delete_list.schema.yaml | 12 +++++----- .../delete_list_index.schema.yaml | 12 +++++----- .../delete_list_item.schema.yaml | 12 +++++----- .../export_list_items.schema.yaml | 12 +++++----- .../find_list_items.schema.yaml | 14 ++++++------ .../api/find_lists/find_lists.schema.yaml | 14 ++++++------ .../import_list_items.schema.yaml | 12 +++++----- .../api/model/list_common.schema.yaml | 12 +++++----- .../api/patch_list/patch_list.schema.yaml | 12 +++++----- .../patch_list_item.schema.yaml | 12 +++++----- .../api/read_list/read_list.schema.yaml | 12 +++++----- .../read_list_index.schema.yaml | 12 +++++----- .../read_list_item/read_list_item.schema.yaml | 12 +++++----- .../read_list_privileges.schema.yaml | 10 ++++----- .../api/update_list/update_list.schema.yaml | 12 +++++----- .../update_list_item.schema.yaml | 12 +++++----- yarn.lock | 4 ++-- 79 files changed, 290 insertions(+), 290 deletions(-) rename {packages => src/platform/packages/shared}/kbn-openapi-common/README.md (100%) rename {packages => src/platform/packages/shared}/kbn-openapi-common/jest.config.js (83%) rename {packages => src/platform/packages/shared}/kbn-openapi-common/kibana.jsonc (100%) rename {packages => src/platform/packages/shared}/kbn-openapi-common/package.json (100%) rename {packages => src/platform/packages/shared}/kbn-openapi-common/schemas/error_responses.gen.ts (100%) rename {packages => src/platform/packages/shared}/kbn-openapi-common/schemas/error_responses.schema.yaml (100%) rename {packages => src/platform/packages/shared}/kbn-openapi-common/schemas/primitives.gen.ts (100%) rename {packages => src/platform/packages/shared}/kbn-openapi-common/schemas/primitives.schema.yaml (100%) rename {packages => src/platform/packages/shared}/kbn-openapi-common/schemas/primitives.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-openapi-common/scripts/openapi_generate.js (95%) rename {packages => src/platform/packages/shared}/kbn-openapi-common/shared/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-openapi-common/shared/path_params_replacer.ts (100%) rename {packages => src/platform/packages/shared}/kbn-openapi-common/tsconfig.json (81%) rename {packages => src/platform/packages/shared}/kbn-zod-helpers/README.md (100%) rename {packages => src/platform/packages/shared}/kbn-zod-helpers/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-zod-helpers/jest.config.js (83%) rename {packages => src/platform/packages/shared}/kbn-zod-helpers/kibana.jsonc (100%) rename {packages => src/platform/packages/shared}/kbn-zod-helpers/package.json (100%) rename {packages => src/platform/packages/shared}/kbn-zod-helpers/src/array_from_string.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-zod-helpers/src/array_from_string.ts (100%) rename {packages => src/platform/packages/shared}/kbn-zod-helpers/src/boolean_from_string.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-zod-helpers/src/boolean_from_string.ts (100%) rename {packages => src/platform/packages/shared}/kbn-zod-helpers/src/build_route_validation_with_zod.ts (100%) rename {packages => src/platform/packages/shared}/kbn-zod-helpers/src/expect_parse_error.ts (100%) rename {packages => src/platform/packages/shared}/kbn-zod-helpers/src/expect_parse_success.ts (100%) rename {packages => src/platform/packages/shared}/kbn-zod-helpers/src/is_valid_date_math.ts (100%) rename {packages => src/platform/packages/shared}/kbn-zod-helpers/src/non_empty_string.ts (100%) rename {packages => src/platform/packages/shared}/kbn-zod-helpers/src/required_optional.ts (100%) rename {packages => src/platform/packages/shared}/kbn-zod-helpers/src/safe_parse_result.ts (100%) rename {packages => src/platform/packages/shared}/kbn-zod-helpers/src/stringify_zod_error.ts (100%) rename {packages => src/platform/packages/shared}/kbn-zod-helpers/tsconfig.json (82%) diff --git a/.buildkite/scripts/steps/code_generation/security_solution_codegen.sh b/.buildkite/scripts/steps/code_generation/security_solution_codegen.sh index 13bd0aaf7189..5f140efc5db8 100755 --- a/.buildkite/scripts/steps/code_generation/security_solution_codegen.sh +++ b/.buildkite/scripts/steps/code_generation/security_solution_codegen.sh @@ -7,7 +7,7 @@ source .buildkite/scripts/common/util.sh echo --- Security Solution OpenAPI Code Generation echo -e "\n[Security Solution OpenAPI Code Generation] OpenAPI Common Package\n" -(cd packages/kbn-openapi-common && yarn openapi:generate) +(cd src/platform/packages/shared/kbn-openapi-common && yarn openapi:generate) echo -e "\n[Security Solution OpenAPI Code Generation] Lists Common Package\n" (cd x-pack/solutions/security/packages/kbn-securitysolution-lists-common && yarn openapi:generate) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 05ba8d0ac18a..24d61d2740e5 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -395,7 +395,6 @@ packages/kbn-monaco @elastic/appex-sharedux packages/kbn-object-versioning @elastic/appex-sharedux packages/kbn-object-versioning-utils @elastic/appex-sharedux packages/kbn-openapi-bundler @elastic/security-detection-rule-management -packages/kbn-openapi-common @elastic/security-detection-rule-management packages/kbn-openapi-generator @elastic/security-detection-rule-management packages/kbn-optimizer @elastic/kibana-operations packages/kbn-optimizer-webpack-helpers @elastic/kibana-operations @@ -499,7 +498,6 @@ packages/kbn-whereis-pkg-cli @elastic/kibana-operations packages/kbn-xstate-utils @elastic/obs-ux-logs-team packages/kbn-yarn-lock-validator @elastic/kibana-operations packages/kbn-zod @elastic/kibana-core -packages/kbn-zod-helpers @elastic/security-detection-rule-management packages/presentation/presentation_containers @elastic/kibana-presentation packages/presentation/presentation_publishing @elastic/kibana-presentation packages/react/kibana_context/common @elastic/appex-sharedux @@ -595,6 +593,7 @@ src/platform/packages/shared/kbn-management/settings/components/field_row @elast src/platform/packages/shared/kbn-management/settings/field_definition @elastic/kibana-management src/platform/packages/shared/kbn-management/settings/types @elastic/kibana-management src/platform/packages/shared/kbn-management/settings/utilities @elastic/kibana-management +src/platform/packages/shared/kbn-openapi-common @elastic/security-detection-rule-management src/platform/packages/shared/kbn-osquery-io-ts-types @elastic/security-asset-management src/platform/packages/shared/kbn-securitysolution-ecs @elastic/security-threat-hunting-explore src/platform/packages/shared/kbn-securitysolution-es-utils @elastic/security-detection-engine @@ -609,6 +608,7 @@ src/platform/packages/shared/kbn-sse-utils-client @elastic/obs-knowledge-team src/platform/packages/shared/kbn-sse-utils-server @elastic/obs-knowledge-team src/platform/packages/shared/kbn-typed-react-router-config @elastic/obs-knowledge-team @elastic/obs-ux-infra_services-team src/platform/packages/shared/kbn-unsaved-changes-prompt @elastic/kibana-management +src/platform/packages/shared/kbn-zod-helpers @elastic/security-detection-rule-management src/platform/packages/shared/serverless/settings/security_project @elastic/security-solution @elastic/kibana-management src/platform/plugins/shared/ai_assistant_management/selection @elastic/obs-ai-assistant src/platform/plugins/shared/console @elastic/kibana-management diff --git a/package.json b/package.json index 7ac4a95fe563..a60710029650 100644 --- a/package.json +++ b/package.json @@ -713,7 +713,7 @@ "@kbn/observability-utils-server": "link:x-pack/packages/observability/observability_utils/observability_utils_server", "@kbn/oidc-provider-plugin": "link:x-pack/test/security_api_integration/plugins/oidc_provider", "@kbn/open-telemetry-instrumented-plugin": "link:test/common/plugins/otel_metrics", - "@kbn/openapi-common": "link:packages/kbn-openapi-common", + "@kbn/openapi-common": "link:src/platform/packages/shared/kbn-openapi-common", "@kbn/osquery-io-ts-types": "link:src/platform/packages/shared/kbn-osquery-io-ts-types", "@kbn/osquery-plugin": "link:x-pack/platform/plugins/shared/osquery", "@kbn/paertial-results-example-plugin": "link:examples/partial_results_example", @@ -1027,7 +1027,7 @@ "@kbn/watcher-plugin": "link:x-pack/platform/plugins/private/watcher", "@kbn/xstate-utils": "link:packages/kbn-xstate-utils", "@kbn/zod": "link:packages/kbn-zod", - "@kbn/zod-helpers": "link:packages/kbn-zod-helpers", + "@kbn/zod-helpers": "link:src/platform/packages/shared/kbn-zod-helpers", "@langchain/aws": "^0.1.2", "@langchain/community": "0.3.14", "@langchain/core": "^0.3.16", diff --git a/packages/kbn-openapi-common/README.md b/src/platform/packages/shared/kbn-openapi-common/README.md similarity index 100% rename from packages/kbn-openapi-common/README.md rename to src/platform/packages/shared/kbn-openapi-common/README.md diff --git a/packages/kbn-openapi-common/jest.config.js b/src/platform/packages/shared/kbn-openapi-common/jest.config.js similarity index 83% rename from packages/kbn-openapi-common/jest.config.js rename to src/platform/packages/shared/kbn-openapi-common/jest.config.js index c8e533f9d7ed..12c38e415465 100644 --- a/packages/kbn-openapi-common/jest.config.js +++ b/src/platform/packages/shared/kbn-openapi-common/jest.config.js @@ -9,6 +9,6 @@ module.exports = { preset: '@kbn/test/jest_node', - rootDir: '../..', - roots: ['/packages/kbn-openapi-common'], + rootDir: '../../../../..', + roots: ['/src/platform/packages/shared/kbn-openapi-common'], }; diff --git a/packages/kbn-openapi-common/kibana.jsonc b/src/platform/packages/shared/kbn-openapi-common/kibana.jsonc similarity index 100% rename from packages/kbn-openapi-common/kibana.jsonc rename to src/platform/packages/shared/kbn-openapi-common/kibana.jsonc diff --git a/packages/kbn-openapi-common/package.json b/src/platform/packages/shared/kbn-openapi-common/package.json similarity index 100% rename from packages/kbn-openapi-common/package.json rename to src/platform/packages/shared/kbn-openapi-common/package.json diff --git a/packages/kbn-openapi-common/schemas/error_responses.gen.ts b/src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.gen.ts similarity index 100% rename from packages/kbn-openapi-common/schemas/error_responses.gen.ts rename to src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.gen.ts diff --git a/packages/kbn-openapi-common/schemas/error_responses.schema.yaml b/src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml similarity index 100% rename from packages/kbn-openapi-common/schemas/error_responses.schema.yaml rename to src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml diff --git a/packages/kbn-openapi-common/schemas/primitives.gen.ts b/src/platform/packages/shared/kbn-openapi-common/schemas/primitives.gen.ts similarity index 100% rename from packages/kbn-openapi-common/schemas/primitives.gen.ts rename to src/platform/packages/shared/kbn-openapi-common/schemas/primitives.gen.ts diff --git a/packages/kbn-openapi-common/schemas/primitives.schema.yaml b/src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml similarity index 100% rename from packages/kbn-openapi-common/schemas/primitives.schema.yaml rename to src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml diff --git a/packages/kbn-openapi-common/schemas/primitives.test.ts b/src/platform/packages/shared/kbn-openapi-common/schemas/primitives.test.ts similarity index 100% rename from packages/kbn-openapi-common/schemas/primitives.test.ts rename to src/platform/packages/shared/kbn-openapi-common/schemas/primitives.test.ts diff --git a/packages/kbn-openapi-common/scripts/openapi_generate.js b/src/platform/packages/shared/kbn-openapi-common/scripts/openapi_generate.js similarity index 95% rename from packages/kbn-openapi-common/scripts/openapi_generate.js rename to src/platform/packages/shared/kbn-openapi-common/scripts/openapi_generate.js index 07b7c4c0e4a0..54fa109cfb2c 100644 --- a/packages/kbn-openapi-common/scripts/openapi_generate.js +++ b/src/platform/packages/shared/kbn-openapi-common/scripts/openapi_generate.js @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -require('../../../src/setup_node_env'); +require('../../../../../setup_node_env'); const { resolve } = require('path'); const { generate } = require('@kbn/openapi-generator'); diff --git a/packages/kbn-openapi-common/shared/index.ts b/src/platform/packages/shared/kbn-openapi-common/shared/index.ts similarity index 100% rename from packages/kbn-openapi-common/shared/index.ts rename to src/platform/packages/shared/kbn-openapi-common/shared/index.ts diff --git a/packages/kbn-openapi-common/shared/path_params_replacer.ts b/src/platform/packages/shared/kbn-openapi-common/shared/path_params_replacer.ts similarity index 100% rename from packages/kbn-openapi-common/shared/path_params_replacer.ts rename to src/platform/packages/shared/kbn-openapi-common/shared/path_params_replacer.ts diff --git a/packages/kbn-openapi-common/tsconfig.json b/src/platform/packages/shared/kbn-openapi-common/tsconfig.json similarity index 81% rename from packages/kbn-openapi-common/tsconfig.json rename to src/platform/packages/shared/kbn-openapi-common/tsconfig.json index 29a271ba4840..cf3d0ba7804a 100644 --- a/packages/kbn-openapi-common/tsconfig.json +++ b/src/platform/packages/shared/kbn-openapi-common/tsconfig.json @@ -4,7 +4,7 @@ "types": ["jest", "node"] }, "exclude": ["target/**/*"], - "extends": "../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "include": ["**/*.ts"], "kbn_references": [ "@kbn/zod", diff --git a/packages/kbn-zod-helpers/README.md b/src/platform/packages/shared/kbn-zod-helpers/README.md similarity index 100% rename from packages/kbn-zod-helpers/README.md rename to src/platform/packages/shared/kbn-zod-helpers/README.md diff --git a/packages/kbn-zod-helpers/index.ts b/src/platform/packages/shared/kbn-zod-helpers/index.ts similarity index 100% rename from packages/kbn-zod-helpers/index.ts rename to src/platform/packages/shared/kbn-zod-helpers/index.ts diff --git a/packages/kbn-zod-helpers/jest.config.js b/src/platform/packages/shared/kbn-zod-helpers/jest.config.js similarity index 83% rename from packages/kbn-zod-helpers/jest.config.js rename to src/platform/packages/shared/kbn-zod-helpers/jest.config.js index 4f66c7eed2ee..a24e94098381 100644 --- a/packages/kbn-zod-helpers/jest.config.js +++ b/src/platform/packages/shared/kbn-zod-helpers/jest.config.js @@ -9,6 +9,6 @@ module.exports = { preset: '@kbn/test', - rootDir: '../..', - roots: ['/packages/kbn-zod-helpers'], + rootDir: '../../../../..', + roots: ['/src/platform/packages/shared/kbn-zod-helpers'], }; diff --git a/packages/kbn-zod-helpers/kibana.jsonc b/src/platform/packages/shared/kbn-zod-helpers/kibana.jsonc similarity index 100% rename from packages/kbn-zod-helpers/kibana.jsonc rename to src/platform/packages/shared/kbn-zod-helpers/kibana.jsonc diff --git a/packages/kbn-zod-helpers/package.json b/src/platform/packages/shared/kbn-zod-helpers/package.json similarity index 100% rename from packages/kbn-zod-helpers/package.json rename to src/platform/packages/shared/kbn-zod-helpers/package.json diff --git a/packages/kbn-zod-helpers/src/array_from_string.test.ts b/src/platform/packages/shared/kbn-zod-helpers/src/array_from_string.test.ts similarity index 100% rename from packages/kbn-zod-helpers/src/array_from_string.test.ts rename to src/platform/packages/shared/kbn-zod-helpers/src/array_from_string.test.ts diff --git a/packages/kbn-zod-helpers/src/array_from_string.ts b/src/platform/packages/shared/kbn-zod-helpers/src/array_from_string.ts similarity index 100% rename from packages/kbn-zod-helpers/src/array_from_string.ts rename to src/platform/packages/shared/kbn-zod-helpers/src/array_from_string.ts diff --git a/packages/kbn-zod-helpers/src/boolean_from_string.test.ts b/src/platform/packages/shared/kbn-zod-helpers/src/boolean_from_string.test.ts similarity index 100% rename from packages/kbn-zod-helpers/src/boolean_from_string.test.ts rename to src/platform/packages/shared/kbn-zod-helpers/src/boolean_from_string.test.ts diff --git a/packages/kbn-zod-helpers/src/boolean_from_string.ts b/src/platform/packages/shared/kbn-zod-helpers/src/boolean_from_string.ts similarity index 100% rename from packages/kbn-zod-helpers/src/boolean_from_string.ts rename to src/platform/packages/shared/kbn-zod-helpers/src/boolean_from_string.ts diff --git a/packages/kbn-zod-helpers/src/build_route_validation_with_zod.ts b/src/platform/packages/shared/kbn-zod-helpers/src/build_route_validation_with_zod.ts similarity index 100% rename from packages/kbn-zod-helpers/src/build_route_validation_with_zod.ts rename to src/platform/packages/shared/kbn-zod-helpers/src/build_route_validation_with_zod.ts diff --git a/packages/kbn-zod-helpers/src/expect_parse_error.ts b/src/platform/packages/shared/kbn-zod-helpers/src/expect_parse_error.ts similarity index 100% rename from packages/kbn-zod-helpers/src/expect_parse_error.ts rename to src/platform/packages/shared/kbn-zod-helpers/src/expect_parse_error.ts diff --git a/packages/kbn-zod-helpers/src/expect_parse_success.ts b/src/platform/packages/shared/kbn-zod-helpers/src/expect_parse_success.ts similarity index 100% rename from packages/kbn-zod-helpers/src/expect_parse_success.ts rename to src/platform/packages/shared/kbn-zod-helpers/src/expect_parse_success.ts diff --git a/packages/kbn-zod-helpers/src/is_valid_date_math.ts b/src/platform/packages/shared/kbn-zod-helpers/src/is_valid_date_math.ts similarity index 100% rename from packages/kbn-zod-helpers/src/is_valid_date_math.ts rename to src/platform/packages/shared/kbn-zod-helpers/src/is_valid_date_math.ts diff --git a/packages/kbn-zod-helpers/src/non_empty_string.ts b/src/platform/packages/shared/kbn-zod-helpers/src/non_empty_string.ts similarity index 100% rename from packages/kbn-zod-helpers/src/non_empty_string.ts rename to src/platform/packages/shared/kbn-zod-helpers/src/non_empty_string.ts diff --git a/packages/kbn-zod-helpers/src/required_optional.ts b/src/platform/packages/shared/kbn-zod-helpers/src/required_optional.ts similarity index 100% rename from packages/kbn-zod-helpers/src/required_optional.ts rename to src/platform/packages/shared/kbn-zod-helpers/src/required_optional.ts diff --git a/packages/kbn-zod-helpers/src/safe_parse_result.ts b/src/platform/packages/shared/kbn-zod-helpers/src/safe_parse_result.ts similarity index 100% rename from packages/kbn-zod-helpers/src/safe_parse_result.ts rename to src/platform/packages/shared/kbn-zod-helpers/src/safe_parse_result.ts diff --git a/packages/kbn-zod-helpers/src/stringify_zod_error.ts b/src/platform/packages/shared/kbn-zod-helpers/src/stringify_zod_error.ts similarity index 100% rename from packages/kbn-zod-helpers/src/stringify_zod_error.ts rename to src/platform/packages/shared/kbn-zod-helpers/src/stringify_zod_error.ts diff --git a/packages/kbn-zod-helpers/tsconfig.json b/src/platform/packages/shared/kbn-zod-helpers/tsconfig.json similarity index 82% rename from packages/kbn-zod-helpers/tsconfig.json rename to src/platform/packages/shared/kbn-zod-helpers/tsconfig.json index 9eab856c8c4d..d3b33b22966b 100644 --- a/packages/kbn-zod-helpers/tsconfig.json +++ b/src/platform/packages/shared/kbn-zod-helpers/tsconfig.json @@ -4,7 +4,7 @@ "types": ["jest", "node"] }, "exclude": ["target/**/*"], - "extends": "../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "include": ["**/*.ts"], "kbn_references": [ "@kbn/datemath", diff --git a/tsconfig.base.json b/tsconfig.base.json index 15e2e250e0d0..6e1e67c3aa14 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1364,8 +1364,8 @@ "@kbn/open-telemetry-instrumented-plugin/*": ["test/common/plugins/otel_metrics/*"], "@kbn/openapi-bundler": ["packages/kbn-openapi-bundler"], "@kbn/openapi-bundler/*": ["packages/kbn-openapi-bundler/*"], - "@kbn/openapi-common": ["packages/kbn-openapi-common"], - "@kbn/openapi-common/*": ["packages/kbn-openapi-common/*"], + "@kbn/openapi-common": ["src/platform/packages/shared/kbn-openapi-common"], + "@kbn/openapi-common/*": ["src/platform/packages/shared/kbn-openapi-common/*"], "@kbn/openapi-generator": ["packages/kbn-openapi-generator"], "@kbn/openapi-generator/*": ["packages/kbn-openapi-generator/*"], "@kbn/optimizer": ["packages/kbn-optimizer"], @@ -2076,8 +2076,8 @@ "@kbn/yarn-lock-validator/*": ["packages/kbn-yarn-lock-validator/*"], "@kbn/zod": ["packages/kbn-zod"], "@kbn/zod/*": ["packages/kbn-zod/*"], - "@kbn/zod-helpers": ["packages/kbn-zod-helpers"], - "@kbn/zod-helpers/*": ["packages/kbn-zod-helpers/*"], + "@kbn/zod-helpers": ["src/platform/packages/shared/kbn-zod-helpers"], + "@kbn/zod-helpers/*": ["src/platform/packages/shared/kbn-zod-helpers/*"], // END AUTOMATED PACKAGE LISTING // Allows for importing from `kibana` package for the exported types. "@emotion/core": ["typings/@emotion"] diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list/create_endpoint_list.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list/create_endpoint_list.schema.yaml index 12b131e728c5..cdc9004ce7e6 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list/create_endpoint_list.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list/create_endpoint_list.schema.yaml @@ -23,23 +23,23 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Insufficient privileges content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 500: description: Internal server error content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.schema.yaml index 0393fa3d943e..6948df21afbb 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/create_endpoint_list_item/create_endpoint_list_item.schema.yaml @@ -57,29 +57,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Insufficient privileges content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 409: description: Endpoint list item already exists content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/delete_endpoint_list_item/delete_endpoint_list_item.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/delete_endpoint_list_item/delete_endpoint_list_item.schema.yaml index fac5a12ecc5d..ae1010573e5e 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/delete_endpoint_list_item/delete_endpoint_list_item.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/delete_endpoint_list_item/delete_endpoint_list_item.schema.yaml @@ -36,29 +36,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Insufficient privileges content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: Endpoint list item not found content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/find_endpoint_list_item/find_endpoint_list_item.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/find_endpoint_list_item/find_endpoint_list_item.schema.yaml index 35f565bfa27f..400851ac5254 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/find_endpoint_list_item/find_endpoint_list_item.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/find_endpoint_list_item/find_endpoint_list_item.schema.yaml @@ -38,7 +38,7 @@ paths: required: false description: Determines which field is used to sort the results schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' - name: sort_order in: query required: false @@ -80,34 +80,34 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Insufficient privileges content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: Endpoint list not found content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' components: schemas: FindEndpointListItemsFilter: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/read_endpoint_list_item/read_endpoint_list_item.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/read_endpoint_list_item/read_endpoint_list_item.schema.yaml index 45f0c384c7f0..0b64bac231df 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/read_endpoint_list_item/read_endpoint_list_item.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/read_endpoint_list_item/read_endpoint_list_item.schema.yaml @@ -38,29 +38,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Insufficient privileges content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: Endpoint list item not found content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.schema.yaml index cd4cbf0c11d5..1fbe40d2b94e 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common/api/update_endpoint_list_item/update_endpoint_list_item.schema.yaml @@ -62,29 +62,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Insufficient privileges content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: Endpoint list item not found content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list/create_exception_list.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list/create_exception_list.schema.yaml index e7a399c2d7a8..e4aa39a5db30 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list/create_exception_list.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list/create_exception_list.schema.yaml @@ -59,29 +59,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 409: description: Exception list already exists response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list_item/create_exception_list_item.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list_item/create_exception_list_item.schema.yaml index 2913d8c5c07d..a86c6a21e25e 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list_item/create_exception_list_item.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_exception_list_item/create_exception_list_item.schema.yaml @@ -69,32 +69,32 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 409: description: Exception list item already exists response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' components: x-codegen-enabled: true @@ -103,7 +103,7 @@ components: type: object properties: comment: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' required: - comment diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_rule_exceptions/create_rule_exceptions.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_rule_exceptions/create_rule_exceptions.schema.yaml index b7b2db3fabef..246c8de363a6 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_rule_exceptions/create_rule_exceptions.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_rule_exceptions/create_rule_exceptions.schema.yaml @@ -45,37 +45,37 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' components: schemas: RuleId: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/UUID' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/UUID' CreateRuleExceptionListItemComment: type: object properties: comment: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' required: - comment diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_shared_exceptions_list/create_shared_exceptions_list.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_shared_exceptions_list/create_shared_exceptions_list.schema.yaml index 040acca3ebd7..5ac7e8e78ccb 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_shared_exceptions_list/create_shared_exceptions_list.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/create_shared_exceptions_list/create_shared_exceptions_list.schema.yaml @@ -40,29 +40,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 409: description: Exception list already exists response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list/delete_exception_list.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list/delete_exception_list.schema.yaml index 2912070635b8..709afe0fdff6 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list/delete_exception_list.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list/delete_exception_list.schema.yaml @@ -42,29 +42,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: Exception list not found response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list_item/delete_exception_list_item.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list_item/delete_exception_list_item.schema.yaml index 05f997307a4c..22344db77f61 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list_item/delete_exception_list_item.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/delete_exception_list_item/delete_exception_list_item.schema.yaml @@ -42,29 +42,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: Exception list item not found response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/duplicate_exception_list/duplicate_exception_list.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/duplicate_exception_list/duplicate_exception_list.schema.yaml index 80620c4adf7f..a758d2856123 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/duplicate_exception_list/duplicate_exception_list.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/duplicate_exception_list/duplicate_exception_list.schema.yaml @@ -43,29 +43,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 405: description: Exception list to duplicate not found response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/export_exception_list/export_exception_list.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/export_exception_list/export_exception_list.schema.yaml index 89f97ff8bbe6..2d5242131adb 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/export_exception_list/export_exception_list.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/export_exception_list/export_exception_list.schema.yaml @@ -51,29 +51,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: Exception list not found response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_list_items/find_exception_list_items.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_list_items/find_exception_list_items.schema.yaml index 6d390e9ecdf6..fc7680249242 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_list_items/find_exception_list_items.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_list_items/find_exception_list_items.schema.yaml @@ -65,7 +65,7 @@ paths: required: false description: Determines which field is used to sort the results schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' - name: sort_order in: query required: false @@ -107,34 +107,34 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: Exception list not found response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' components: schemas: FindExceptionListItemsFilter: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_lists/find_exception_lists.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_lists/find_exception_lists.schema.yaml index 49017d6d4591..e5ef4f83a134 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_lists/find_exception_lists.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/find_exception_lists/find_exception_lists.schema.yaml @@ -93,26 +93,26 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' components: schemas: diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/import_exceptions/import_exceptions.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/import_exceptions/import_exceptions.schema.yaml index 95bc9ee508e5..75778f07c0c8 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/import_exceptions/import_exceptions.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/import_exceptions/import_exceptions.schema.yaml @@ -92,26 +92,26 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' components: schemas: diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.schema.yaml index 4ca9326ec6c9..8d8cdf82b6d9 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_common.schema.yaml @@ -7,10 +7,10 @@ components: x-codegen-enabled: true schemas: ExceptionListId: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' ExceptionListHumanId: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' description: Human readable string identifier, e.g. `trusted-linux-processes` ExceptionListType: @@ -122,17 +122,17 @@ components: - updated_by ExceptionListItemId: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' ExceptionListItemHumanId: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' ExceptionListItemType: type: string enum: [simple] ExceptionListItemName: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' ExceptionListItemDescription: type: string @@ -144,7 +144,7 @@ components: ExceptionListItemTags: type: array items: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' ExceptionListItemOsType: type: string @@ -162,19 +162,19 @@ components: type: object properties: id: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' comment: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' created_at: type: string format: date-time created_by: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' updated_at: type: string format: date-time updated_by: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' required: - id - comment @@ -278,7 +278,7 @@ components: comments: $ref: '#/components/schemas/ExceptionListItemCommentArray' version: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' tie_breaker_id: type: string created_at: diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.schema.yaml index ab8c427344a0..73fe9ea229bc 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/model/exception_list_item_entry.schema.yaml @@ -17,9 +17,9 @@ components: type: string enum: [match] field: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' value: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' operator: $ref: '#/components/schemas/ExceptionListItemEntryOperator' required: @@ -35,11 +35,11 @@ components: type: string enum: [match_any] field: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' value: type: array items: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' minItems: 1 operator: $ref: '#/components/schemas/ExceptionListItemEntryOperator' @@ -56,7 +56,7 @@ components: type: string enum: [list] field: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' list: type: object properties: @@ -80,7 +80,7 @@ components: type: string enum: [exists] field: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' operator: $ref: '#/components/schemas/ExceptionListItemEntryOperator' required: @@ -101,7 +101,7 @@ components: type: string enum: [nested] field: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' entries: type: array items: @@ -119,9 +119,9 @@ components: type: string enum: [wildcard] field: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' value: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' operator: $ref: '#/components/schemas/ExceptionListItemEntryOperator' required: diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list/read_exception_list.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list/read_exception_list.schema.yaml index e50147083daf..001c56a3eafb 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list/read_exception_list.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list/read_exception_list.schema.yaml @@ -42,29 +42,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: Exception list item not found response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_item/read_exception_list_item.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_item/read_exception_list_item.schema.yaml index 6d7fac776718..82cac05e9781 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_item/read_exception_list_item.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_item/read_exception_list_item.schema.yaml @@ -42,29 +42,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: Exception list item not found response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_summary/read_exception_list_summary.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_summary/read_exception_list_summary.schema.yaml index 02fc3c9c8f6f..fe6bb93b9cdb 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_summary/read_exception_list_summary.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/read_exception_list_summary/read_exception_list_summary.schema.yaml @@ -61,29 +61,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: Exception list not found response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list/update_exception_list.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list/update_exception_list.schema.yaml index 0f7218a86c23..5a07623f4c93 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list/update_exception_list.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list/update_exception_list.schema.yaml @@ -59,29 +59,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: Exception list not found response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list_item/update_exception_list_item.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list_item/update_exception_list_item.schema.yaml index 9adc75141f56..d6021768492c 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list_item/update_exception_list_item.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common/api/update_exception_list_item/update_exception_list_item.schema.yaml @@ -70,32 +70,32 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: Exception list item not found response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' components: x-codegen-enabled: true @@ -104,9 +104,9 @@ components: type: object properties: id: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' comment: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' required: - comment diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list/create_list.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list/create_list.schema.yaml index df3e6b35ef65..3c1d090687fe 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list/create_list.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list/create_list.schema.yaml @@ -53,29 +53,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 409: description: List already exists response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_index/create_list_index.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_index/create_list_index.schema.yaml index 8ff9ad6ab1b2..8f7981114437 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_index/create_list_index.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_index/create_list_index.schema.yaml @@ -27,29 +27,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 409: description: List data stream exists response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_item/create_list_item.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_item/create_list_item.schema.yaml index 01d024f8b40d..bdf266c8926f 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_item/create_list_item.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/create_list_item/create_list_item.schema.yaml @@ -54,29 +54,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 409: description: List item already exists response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list/delete_list.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list/delete_list.schema.yaml index e8caef0eb2c6..d8440aa347cd 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list/delete_list.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list/delete_list.schema.yaml @@ -45,29 +45,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: List not found response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_index/delete_list_index.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_index/delete_list_index.schema.yaml index ae43c58726d5..8773925e358b 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_index/delete_list_index.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_index/delete_list_index.schema.yaml @@ -27,29 +27,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: List data stream not found response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_item/delete_list_item.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_item/delete_list_item.schema.yaml index b95afcdc1ed3..752a246bdd9b 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_item/delete_list_item.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/delete_list_item/delete_list_item.schema.yaml @@ -54,29 +54,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: List item not found response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/export_list_items/export_list_items.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/export_list_items/export_list_items.schema.yaml index 999eb4a0ae42..2dd518904d0f 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/export_list_items/export_list_items.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/export_list_items/export_list_items.schema.yaml @@ -32,29 +32,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: List not found response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_list_items/find_list_items.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_list_items/find_list_items.schema.yaml index 746b3e9fdbe3..5cb15220e17c 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_list_items/find_list_items.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_list_items/find_list_items.schema.yaml @@ -34,7 +34,7 @@ paths: required: false description: Determines which field is used to sort the results schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' - name: sort_order in: query required: false @@ -94,31 +94,31 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' components: schemas: FindListItemsCursor: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' FindListItemsFilter: type: string diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_lists/find_lists.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_lists/find_lists.schema.yaml index 9b0012e8d696..44713827d29f 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_lists/find_lists.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/find_lists/find_lists.schema.yaml @@ -28,7 +28,7 @@ paths: required: false description: Determines which field is used to sort the results schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' - name: sort_order in: query required: false @@ -88,31 +88,31 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' components: schemas: FindListsCursor: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' FindListsFilter: type: string diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/import_list_items/import_list_items.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/import_list_items/import_list_items.schema.yaml index f3fae4515934..78f44f7dd7f7 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/import_list_items/import_list_items.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/import_list_items/import_list_items.schema.yaml @@ -73,29 +73,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 409: description: List with specified list_id does not exist response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/model/list_common.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/model/list_common.schema.yaml index 808e99c7b1e1..ef29224a5b73 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/model/list_common.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/model/list_common.schema.yaml @@ -6,7 +6,7 @@ paths: {} components: schemas: ListId: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' ListType: type: string @@ -36,23 +36,23 @@ components: - text ListName: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' ListDescription: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' ListMetadata: type: object additionalProperties: true ListItemId: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' ListItemValue: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' ListItemDescription: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/primitives.schema.yaml#/components/schemas/NonEmptyString' ListItemMetadata: type: object diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list/patch_list.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list/patch_list.schema.yaml index 6a61e668ced8..be8c5871413f 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list/patch_list.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list/patch_list.schema.yaml @@ -46,29 +46,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: List not found response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list_item/patch_list_item.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list_item/patch_list_item.schema.yaml index fdd7a020d098..7802133dc4b1 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list_item/patch_list_item.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/patch_list_item/patch_list_item.schema.yaml @@ -48,29 +48,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: List item not found response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list/read_list.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list/read_list.schema.yaml index 280a6fdab754..e4a72d655509 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list/read_list.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list/read_list.schema.yaml @@ -30,29 +30,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: List not found response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_index/read_list_index.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_index/read_list_index.schema.yaml index 40dbddf25e69..b06b78ac3414 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_index/read_list_index.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_index/read_list_index.schema.yaml @@ -29,29 +29,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: List data stream(s) not found response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_item/read_list_item.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_item/read_list_item.schema.yaml index a41fb497f611..c1bb0697152b 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_item/read_list_item.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_item/read_list_item.schema.yaml @@ -46,29 +46,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: List item not found response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_privileges/read_list_privileges.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_privileges/read_list_privileges.schema.yaml index df7b4a5f5174..d51e420aa4a9 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_privileges/read_list_privileges.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/read_list_privileges/read_list_privileges.schema.yaml @@ -33,26 +33,26 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' components: schemas: diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list/update_list.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list/update_list.schema.yaml index a059ede38584..077a96d25d9e 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list/update_list.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list/update_list.schema.yaml @@ -51,29 +51,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: List not found response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list_item/update_list_item.schema.yaml b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list_item/update_list_item.schema.yaml index 04d86cf1947a..897137221047 100644 --- a/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list_item/update_list_item.schema.yaml +++ b/x-pack/solutions/security/packages/kbn-securitysolution-lists-common/api/update_list_item/update_list_item.schema.yaml @@ -45,29 +45,29 @@ paths: application/json: schema: oneOf: - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' - - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + - $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 401: description: Unsuccessful authentication response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 403: description: Not enough privileges response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/PlatformErrorResponse' 404: description: List item not found response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' 500: description: Internal server error response content: application/json: schema: - $ref: '../../../../../../../packages/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' + $ref: '../../../../../../../src/platform/packages/shared/kbn-openapi-common/schemas/error_responses.schema.yaml#/components/schemas/SiemErrorResponse' diff --git a/yarn.lock b/yarn.lock index 90597fb5545c..839171e5f713 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6545,7 +6545,7 @@ version "0.0.0" uid "" -"@kbn/openapi-common@link:packages/kbn-openapi-common": +"@kbn/openapi-common@link:src/platform/packages/shared/kbn-openapi-common": version "0.0.0" uid "" @@ -7965,7 +7965,7 @@ version "0.0.0" uid "" -"@kbn/zod-helpers@link:packages/kbn-zod-helpers": +"@kbn/zod-helpers@link:src/platform/packages/shared/kbn-zod-helpers": version "0.0.0" uid "" From f709e08d6dd5a3e1bf11aa56fc7b08621c5afa1e Mon Sep 17 00:00:00 2001 From: Jill Guyonnet Date: Wed, 18 Dec 2024 17:30:48 +0100 Subject: [PATCH 51/60] [Fleet][EUI Visual Refresh] Replace hardcoded colors with tokens (#204717) ## Summary Closes https://github.com/elastic/kibana/issues/202003 This PR replaces hardcoded custom colours with EUI tokens. Found occurrences in Fleet plugin codebase: - hex colours (`#[A-Fa-f0-9]{6}`) - colour names (`red`, `green`...). - [x] Agent activity flyout - [x] Multiple hardcoded colours changed to semantic tokens - [x] Missing security requirements page - [x] Border colour - [x] Multisteps integration installation - [x] There was an old styling polyfill that looks like it can be removed, the result is visually very similar. Note that [the proposal to introduce numberless steps was rejected based on accessibility concerns](https://github.com/elastic/eui/discussions/5836#discussioncomment-6480047). - [x] Agent donut chart - [x] Legacy component no longer in use - removed - [x] Quickstart package card styling - [x] Card border colour (cf. implementation in https://github.com/elastic/kibana/pull/179573) Not covered: - [Test custom space in Cypress test](https://github.com/elastic/kibana/blob/6cd2cd6cf83fcf18b7ab66ac3f38f11ab9d69f8a/x-pack/plugins/fleet/cypress/tasks/spaces.ts#L26) - [Mock useEuiTheme in Jest test](https://github.com/elastic/kibana/blob/6cd2cd6cf83fcf18b7ab66ac3f38f11ab9d69f8a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/installation_status.test.tsx#L26) - [Story](https://github.com/elastic/kibana/blob/6cd2cd6cf83fcf18b7ab66ac3f38f11ab9d69f8a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/integration_preference.stories.tsx#L24) - [Custom tag colours](https://github.com/elastic/kibana/blob/6cd2cd6cf83fcf18b7ab66ac3f38f11ab9d69f8a/x-pack/plugins/fleet/server/services/epm/kibana/assets/tag_assets.ts#L36-L57): note that these are defined in the backend. ## Screenshots Note: I'm struggling to test the integrations quick start (tested the colour by manually applying it on the normal Integrations page), any advice on this would be welcome. ### Before (`main` branch), Amsterdam theme Agent activity flyout, showing in progress and error activity items: agent-activity-1-amsterdam-main Agent activity flyout, showing a successful activity item: agent-activity-2-amsterdam-main Missing security requirements page: es-requirements-amsterdam-main Multisteps integration installation (step 1): multisteps-1-amsterdam-main Multisteps integration installation (step 2): multisteps-2-amsterdam-main For reference, the old agent donut chard component: ![old-fleet-ui](https://github.com/user-attachments/assets/6b309d8a-5417-45cb-bb6c-58d1d88009f5) ### After #### Amsterdam Agent activity flyout, showing in progress and error activity items: agent-activity-1-amsterdam-branch Agent activity flyout, showing a successful activity item: agent-activity-2-amsterdam-branch Missing security requirements page: es-requirements-amsterdam-branch Multisteps integration installation (step 1): multisteps-1-amsterdam-branch Multisteps integration installation (step 2): multisteps-2-amsterdam-branch #### Borealis Agent activity flyout, showing in progress and error activity items: agent-activity-1-borealis-branch Agent activity flyout, showing a successful activity item: agent-activity-2-borealis-branch Missing security requirements page: es-requirements-borealis-branch Multisteps integration installation (step 1): multisteps-1-borealis-branch Multisteps integration installation (step 2): multisteps-2-borealis-branch --- .../components/horizontal_page_steps.tsx | 26 +------- .../agent_activity_flyout/activity_item.tsx | 38 +++++------ .../agent_activity_flyout/helpers.tsx | 2 - .../upgrade_in_progress_activity_item.tsx | 15 +++-- .../components/view_errors.tsx | 9 ++- .../es_requirements_page.tsx | 22 ++++--- .../agents/components/donut_chart.tsx | 66 ------------------- .../sections/epm/components/package_card.tsx | 26 ++++---- 8 files changed, 59 insertions(+), 145 deletions(-) delete mode 100644 x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/donut_chart.tsx diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/horizontal_page_steps.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/horizontal_page_steps.tsx index 752b49431dad..a00ef9118b85 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/horizontal_page_steps.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/components/horizontal_page_steps.tsx @@ -7,31 +7,7 @@ import React from 'react'; import { EuiStepsHorizontal } from '@elastic/eui'; import type { EuiStepsHorizontalProps } from '@elastic/eui'; -import styled from 'styled-components'; -// polyfill until https://github.com/elastic/eui/discussions/5836 implemented -const NumberlessHorizontalSteps = styled(EuiStepsHorizontal)` - .euiStepNumber { - color: transparent; - width: 16px; - height: 16px; - outline-color: #07c; - } - .euiStepHorizontal::before { - width: calc(50% - 8px); - top: 32px; - } - .euiStepHorizontal::after { - width: calc(50% - 8px); - top: 32px; - } - .euiStepHorizontal { - padding: 25px 16px 16px; - } - .euiStepHorizontal[data-step-status='incomplete'] .euiStepHorizontal__title { - color: #69707d; - } -`; const getStepStatus = (currentStep: number, stepIndex: number, currentStepComplete: boolean) => { if (currentStep === stepIndex) { if (currentStepComplete) return 'complete'; @@ -58,5 +34,5 @@ export const PageSteps: React.FC<{ }; }) as EuiStepsHorizontalProps['steps']; - return ; + return ; }; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/agent_activity_flyout/activity_item.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/agent_activity_flyout/activity_item.tsx index 06300480dfa5..f95e81de6d3d 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/agent_activity_flyout/activity_item.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/agent_activity_flyout/activity_item.tsx @@ -16,25 +16,22 @@ import { EuiText, EuiPanel, EuiSpacer, + useEuiTheme, } from '@elastic/eui'; import type { ActionStatus } from '../../../../../types'; import { ViewErrors } from '../view_errors'; -import { - formattedTime, - getAction, - inProgressDescription, - inProgressTitle, - inProgressTitleColor, -} from './helpers'; +import { formattedTime, getAction, inProgressDescription, inProgressTitle } from './helpers'; import { ViewAgentsButton } from './view_agents_button'; export const ActivityItem: React.FunctionComponent<{ action: ActionStatus; onClickViewAgents: (action: ActionStatus) => void; }> = ({ action, onClickViewAgents }) => { + const theme = useEuiTheme(); + const completeTitle = action.type === 'POLICY_CHANGE' && action.nbAgentsActioned === 0 ? ( @@ -104,18 +101,21 @@ export const ActivityItem: React.FunctionComponent<{ IN_PROGRESS: { icon: , title: {inProgressTitle(action)}, - titleColor: inProgressTitleColor, + titleColor: theme.euiTheme.colors.textPrimary, description: {inProgressDescription(action.creationTime)}, }, ROLLOUT_PASSED: { icon: action.nbAgentsFailed > 0 ? ( - + ) : ( - + ), title: completeTitle, - titleColor: action.nbAgentsFailed > 0 ? 'red' : 'green', + titleColor: + action.nbAgentsFailed > 0 + ? theme.euiTheme.colors.textDanger + : theme.euiTheme.colors.textSuccess, description: action.nbAgentsFailed > 0 ? ( failedDescription @@ -124,9 +124,9 @@ export const ActivityItem: React.FunctionComponent<{ ), }, COMPLETE: { - icon: , + icon: , title: completeTitle, - titleColor: 'green', + titleColor: theme.euiTheme.colors.textSuccess, description: action.type === 'POLICY_REASSIGN' && action.newPolicyId ? ( @@ -160,14 +160,14 @@ export const ActivityItem: React.FunctionComponent<{ ), }, FAILED: { - icon: , + icon: , title: completeTitle, - titleColor: 'red', + titleColor: theme.euiTheme.colors.textDanger, description: failedDescription, }, CANCELLED: { - icon: , - titleColor: 'grey', + icon: , + titleColor: theme.euiTheme.colors.textSubdued, title: ( , - titleColor: 'grey', + icon: , + titleColor: theme.euiTheme.colors.textSubdued, title: ( void; }> = ({ action, abortUpgrade, onClickViewAgents }) => { const { docLinks } = useStartServices(); + const theme = useEuiTheme(); + const [isAborting, setIsAborting] = useState(false); const onClickAbortUpgrade = useCallback(async () => { try { @@ -69,7 +67,10 @@ export const UpgradeInProgressActivityItem: React.FunctionComponent<{ {isScheduled ? : } - + {isScheduled && action.startTime ? ( = ({ action }) => { const coreStart = useStartServices(); + const theme = useEuiTheme(); const getLogsButton = (agentId: string, timestamp: string) => { const start = moment(timestamp).subtract(5, 'm').toISOString(); @@ -70,7 +71,11 @@ export const ViewErrors: React.FunctionComponent<{ action: ActionStatus }> = ({ }), render: (error: string) => ( - + {error} diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_requirements_page/es_requirements_page.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_requirements_page/es_requirements_page.tsx index 969f9357a21d..3128b05f3af8 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_requirements_page/es_requirements_page.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_requirements_page/es_requirements_page.tsx @@ -20,9 +20,10 @@ import { EuiCode, EuiCodeBlock, EuiLink, + useEuiTheme, } from '@elastic/eui'; -import styled from 'styled-components'; +import { css } from '@emotion/react'; import { WithoutHeaderLayout } from '../../../layouts'; import type { GetFleetStatusResponse } from '../../../types'; @@ -50,20 +51,21 @@ export const RequirementItem: React.FunctionComponent<{ ); }; -const borderColor = '#d3dae6'; - -const StyledPageBody = styled(EuiPageBody)` - border: 1px solid ${borderColor}; - border-radius: 5px; -`; - export const MissingESRequirementsPage: React.FunctionComponent<{ missingRequirements: GetFleetStatusResponse['missing_requirements']; }> = ({ missingRequirements }) => { const { docLinks } = useStartServices(); + const theme = useEuiTheme(); + return ( - + - + ); }; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/donut_chart.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/donut_chart.tsx deleted file mode 100644 index 6f3d865b2284..000000000000 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/donut_chart.tsx +++ /dev/null @@ -1,66 +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 React, { useEffect, useRef } from 'react'; -import d3 from 'd3'; -import { EuiFlexItem } from '@elastic/eui'; - -interface DonutChartProps { - data: { - [key: string]: number; - }; - height: number; - width: number; -} - -export const DonutChart = ({ height, width, data }: DonutChartProps) => { - const chartElement = useRef(null); - - useEffect(() => { - if (chartElement.current !== null) { - // we must remove any existing paths before painting - d3.selectAll('g').remove(); - const svgElement = d3 - .select(chartElement.current) - .append('g') - .attr('transform', `translate(${width / 2}, ${height / 2})`); - const color = d3.scale - .ordinal() - // @ts-ignore - .domain(data) - .range(['#017D73', '#98A2B3', '#BD271E', '#F5A700']); - const pieGenerator = d3.layout - .pie() - .value(({ value }: any) => value) - // these start/end angles will reverse the direction of the pie, - // which matches our design - .startAngle(2 * Math.PI) - .endAngle(0); - - svgElement - .selectAll('g') - // @ts-ignore - .data(pieGenerator(d3.entries(data))) - .enter() - .append('path') - .attr( - 'd', - // @ts-ignore attr does not expect a param of type Arc but it behaves as desired - d3.svg - .arc() - .innerRadius(width * 0.36) - .outerRadius(Math.min(width, height) / 2) - ) - .attr('fill', (d: any) => color(d.data.key) as any); - } - }, [data, height, width]); - return ( - - - - ); -}; diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_card.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_card.tsx index 52a3a90ae641..2bf1f58a6e12 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_card.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_card.tsx @@ -6,7 +6,6 @@ */ import React from 'react'; -import styled from 'styled-components'; import { EuiBadge, EuiButton, @@ -15,6 +14,7 @@ import { EuiFlexItem, EuiSpacer, EuiToolTip, + useEuiTheme, } from '@elastic/eui'; import { css } from '@emotion/react'; @@ -43,15 +43,6 @@ import { export type PackageCardProps = IntegrationCardItem; -// Min-height is roughly 3 lines of content. -// This keeps the cards from looking overly unbalanced because of content differences. -const Card = styled(EuiCard)<{ isquickstart?: boolean; $maxCardHeight?: number }>` - min-height: 127px; - border-color: ${({ isquickstart }) => (isquickstart ? '#ba3d76' : null)}; - ${({ $maxCardHeight }) => - $maxCardHeight ? `max-height: ${$maxCardHeight}px; overflow: hidden;` : ''}; -`; - export function PackageCard({ description, name, @@ -78,6 +69,8 @@ export function PackageCard({ descriptionLineClamp, maxCardHeight, }: PackageCardProps) { + const theme = useEuiTheme(); + let releaseBadge: React.ReactNode | null = null; if (release && release !== 'ga') { releaseBadge = ( @@ -202,8 +195,10 @@ export function PackageCard({ tourOffset={10} > - } onClick={onClickProp ?? onCardClick} - $maxCardHeight={maxCardHeight} > {showLabels && extraLabelsBadges ? extraLabelsBadges : null} @@ -258,7 +256,7 @@ export function PackageCard({ showInstallationStatus={showInstallationStatus} /> - + ); From 16643d3357d60c9c486bf32747f5a47fd828209e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Wed, 18 Dec 2024 17:56:59 +0100 Subject: [PATCH 52/60] [UA] Shared ownership between Management and Core (#204723) ## Summary Let's see if this time sticks --- .github/CODEOWNERS | 2 +- x-pack/plugins/upgrade_assistant/kibana.jsonc | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 24d61d2740e5..1b608400f6e3 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -938,7 +938,7 @@ x-pack/plugins/stack_connectors @elastic/response-ops x-pack/plugins/task_manager @elastic/response-ops x-pack/plugins/telemetry_collection_xpack @elastic/kibana-core x-pack/plugins/triggers_actions_ui @elastic/response-ops -x-pack/plugins/upgrade_assistant @elastic/kibana-management +x-pack/plugins/upgrade_assistant @elastic/kibana-core x-pack/solutions/observability/packages/alert_details @elastic/obs-ux-management-team x-pack/solutions/observability/packages/alerting_test_data @elastic/obs-ux-management-team x-pack/solutions/observability/packages/get_padded_alert_time_range_util @elastic/obs-ux-management-team diff --git a/x-pack/plugins/upgrade_assistant/kibana.jsonc b/x-pack/plugins/upgrade_assistant/kibana.jsonc index 55a08297937b..24b328c1294b 100644 --- a/x-pack/plugins/upgrade_assistant/kibana.jsonc +++ b/x-pack/plugins/upgrade_assistant/kibana.jsonc @@ -1,7 +1,9 @@ { "type": "plugin", "id": "@kbn/upgrade-assistant-plugin", - "owner": "@elastic/kibana-management", + "owner": [ + "@elastic/kibana-core" + ], "group": "platform", "visibility": "private", "plugin": { From cd3c5b6704ce5c97f272e4552c4cfa81cc58f630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loix?= Date: Wed, 18 Dec 2024 16:58:47 +0000 Subject: [PATCH 53/60] [Spaces] Remove forceSolutionVisibility yml setting (#204726) --- x-pack/plugins/spaces/server/config.test.ts | 9 --------- x-pack/plugins/spaces/server/config.ts | 7 ------- 2 files changed, 16 deletions(-) diff --git a/x-pack/plugins/spaces/server/config.test.ts b/x-pack/plugins/spaces/server/config.test.ts index cc210e7e4e5a..19d4a7cbe7f9 100644 --- a/x-pack/plugins/spaces/server/config.test.ts +++ b/x-pack/plugins/spaces/server/config.test.ts @@ -23,9 +23,6 @@ describe('config schema', () => { "allowFeatureVisibility": true, "allowSolutionVisibility": true, "enabled": true, - "experimental": Object { - "forceSolutionVisibility": false, - }, "maxSpaces": 1000, } `); @@ -35,9 +32,6 @@ describe('config schema', () => { "allowFeatureVisibility": true, "allowSolutionVisibility": true, "enabled": true, - "experimental": Object { - "forceSolutionVisibility": false, - }, "maxSpaces": 1000, } `); @@ -47,9 +41,6 @@ describe('config schema', () => { "allowFeatureVisibility": true, "allowSolutionVisibility": true, "enabled": true, - "experimental": Object { - "forceSolutionVisibility": false, - }, "maxSpaces": 1000, } `); diff --git a/x-pack/plugins/spaces/server/config.ts b/x-pack/plugins/spaces/server/config.ts index ef6b300d4396..a7c9606e7454 100644 --- a/x-pack/plugins/spaces/server/config.ts +++ b/x-pack/plugins/spaces/server/config.ts @@ -54,13 +54,6 @@ export const ConfigSchema = schema.object({ defaultValue: true, }), }), - experimental: schema.maybe( - offeringBasedSchema({ - traditional: schema.object({ - forceSolutionVisibility: schema.boolean({ defaultValue: false }), - }), - }) - ), }); export function createConfig$(context: PluginInitializerContext) { From 639143ac59e9bb8bf2e629d30a4ffe363f974cce Mon Sep 17 00:00:00 2001 From: Nikita Indik Date: Wed, 18 Dec 2024 18:07:35 +0100 Subject: [PATCH 54/60] [Security Solution] Add `history_window_start` and `new_terms_fields` editable fields (#200304) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Partially addresses: https://github.com/elastic/kibana/issues/171520** ## Summary **Changes in this PR**: - `history_window_start` and `new_terms_fields` are now editable in the Rule Upgrade flyout - Extracted fields into separate components that are easier to reuse (`NewTermsFieldsEdit` and `HistoryWindowStartEdit`) Scherm­afbeelding 2024-11-15 om 15 51 04 ### Testing - Ensure the `prebuiltRulesCustomizationEnabled` feature flag is enabled. - To simulate the availability of prebuilt rule upgrades, downgrade a currently installed prebuilt rule using the `PATCH api/detection_engine/rules` API. - Set `version: 1` in the request body to downgrade it to version 1. - Modify other rule fields in the request body as needed to test the changes. --- .../translations/translations/fr-FR.json | 20 +- .../translations/translations/ja-JP.json | 20 +- .../translations/translations/zh-CN.json | 20 +- .../components/ml/hooks/use_ml_rule_config.ts | 8 +- .../public/common/constants.ts | 2 + .../hooks/use_terms_aggregation_fields.ts | 29 +++ .../public/common/utils/date_math.ts | 29 +++ .../history_window_start_edit.tsx | 44 +++++ .../history_window_start_edit/index.tsx} | 9 +- .../history_window_start_edit/translations.ts | 36 ++++ .../validate_history_window_start.ts | 31 +++ .../new_terms_fields_edit/index.tsx | 8 + .../new_terms_fields_edit.tsx | 43 +++++ .../new_terms_fields_field.tsx | 40 ++++ .../new_terms_fields_edit/translations.ts | 47 +++++ .../components/schedule_item_field/index.ts | 8 + .../schedule_item_field.test.tsx | 96 ++++++++++ .../schedule_item_field.tsx | 181 ++++++++++++++++++ .../schedule_item_field/translations.ts | 36 ++++ .../components/description_step/index.tsx | 8 + .../components/new_terms_fields/index.tsx | 42 ---- .../components/rule_preview/helpers.ts | 2 +- .../components/step_define_rule/index.tsx | 62 +++--- .../components/step_define_rule/schema.tsx | 104 +--------- .../use_persistent_new_terms_state.tsx | 73 +++++++ .../components/step_schedule_rule/index.tsx | 6 +- .../pages/rule_creation/helpers.ts | 3 +- .../rule_details/rule_definition_section.tsx | 7 +- .../history_window_start_edit_adapter.tsx | 13 ++ .../history_window_start_edit_form.tsx | 48 +++++ .../new_terms_fields_edit_adapter.tsx | 26 +++ .../new_terms_fields_edit_form.tsx | 18 ++ .../final_edit/fields/rule_schedule.tsx | 6 +- .../final_edit/new_terms_rule_field_edit.tsx | 21 +- .../bulk_actions/forms/schedule_form.tsx | 6 +- .../pages/detection_engine/rules/helpers.tsx | 14 +- .../cypress/screens/create_new_rule.ts | 4 +- 37 files changed, 908 insertions(+), 262 deletions(-) create mode 100644 x-pack/solutions/security/plugins/security_solution/public/common/hooks/use_terms_aggregation_fields.ts create mode 100644 x-pack/solutions/security/plugins/security_solution/public/common/utils/date_math.ts create mode 100644 x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/history_window_start_edit/history_window_start_edit.tsx rename x-pack/solutions/security/plugins/security_solution/public/detection_engine/{rule_creation_ui/components/new_terms_fields/translations.ts => rule_creation/components/history_window_start_edit/index.tsx} (51%) create mode 100644 x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/history_window_start_edit/translations.ts create mode 100644 x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/history_window_start_edit/validate_history_window_start.ts create mode 100644 x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/new_terms_fields_edit/index.tsx create mode 100644 x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/new_terms_fields_edit/new_terms_fields_edit.tsx create mode 100644 x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/new_terms_fields_edit/new_terms_fields_field.tsx create mode 100644 x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/new_terms_fields_edit/translations.ts create mode 100644 x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/schedule_item_field/index.ts create mode 100644 x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/schedule_item_field/schedule_item_field.test.tsx create mode 100644 x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/schedule_item_field/schedule_item_field.tsx create mode 100644 x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/schedule_item_field/translations.ts delete mode 100644 x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/new_terms_fields/index.tsx create mode 100644 x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/use_persistent_new_terms_state.tsx create mode 100644 x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/history_window_start/history_window_start_edit_adapter.tsx create mode 100644 x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/history_window_start/history_window_start_edit_form.tsx create mode 100644 x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/new_terms_fields/new_terms_fields_edit_adapter.tsx create mode 100644 x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/new_terms_fields/new_terms_fields_edit_form.tsx diff --git a/x-pack/platform/plugins/private/translations/translations/fr-FR.json b/x-pack/platform/plugins/private/translations/translations/fr-FR.json index 07bc02dbceec..132e0cb4051c 100644 --- a/x-pack/platform/plugins/private/translations/translations/fr-FR.json +++ b/x-pack/platform/plugins/private/translations/translations/fr-FR.json @@ -7261,6 +7261,14 @@ "securitySolutionPackages.alertSuppressionRuleDetails.upsell": "La suppression d'alertes est configurée mais elle ne sera pas appliquée en raison d'une licence insuffisante", "securitySolutionPackages.alertSuppressionRuleForm.upsell": "La suppression d'alertes est activée avec la licence {requiredLicense} ou supérieure", "securitySolutionPackages.beta.label": "Bêta", + "securitySolutionPackages.csp.cspEvaluationBadge.failLabel": "Échec", + "securitySolutionPackages.csp.cspEvaluationBadge.naLabel": "S. O.", + "securitySolutionPackages.csp.cspEvaluationBadge.passLabel": "Réussite", + "securitySolutionPackages.csp.findings.findingsErrorToast.searchFailedTitle": "Échec de la recherche", + "securitySolutionPackages.csp.navigation.dashboardNavItemLabel": "Niveau de sécurité du cloud", + "securitySolutionPackages.csp.navigation.findingsNavItemLabel": "Résultats", + "securitySolutionPackages.csp.navigation.rulesNavItemLabel": "Règles", + "securitySolutionPackages.csp.navigation.vulnerabilityDashboardNavItemLabel": "Gestion des vulnérabilités natives du cloud", "securitySolutionPackages.dataTable.ariaLabel": "Alertes", "securitySolutionPackages.dataTable.columnHeaders.flyout.pane.removeColumnButtonLabel": "Supprimer la colonne", "securitySolutionPackages.dataTable.eventRenderedView.eventSummary.column": "Résumé des événements", @@ -7590,6 +7598,7 @@ "share.urlService.redirect.RedirectManager.missingParamLocator": "ID du localisateur non spécifié. Spécifiez le paramètre de recherche \"l\" dans l'URL ; ce devrait être un ID de localisateur existant.", "share.urlService.redirect.RedirectManager.missingParamParams": "Paramètres du localisateur non spécifiés. Spécifiez le paramètre de recherche \"p\" dans l'URL ; ce devrait être un objet sérialisé JSON des paramètres du localisateur.", "share.urlService.redirect.RedirectManager.missingParamVersion": "Version des paramètres du localisateur non spécifiée. Spécifiez le paramètre de recherche \"v\" dans l'URL ; ce devrait être la version de Kibana au moment de la génération des paramètres du localisateur.", + "sharedPlatformPackages.csp.common.utils.helpers.unknownError": "Erreur inconnue", "sharedUXPackages.buttonToolbar.buttons.addFromLibrary.libraryButtonLabel": "Ajouter depuis la bibliothèque", "sharedUXPackages.buttonToolbar.toolbar.errorToolbarText": "Il y a plus de 120 boutons supplémentaires. Nous vous invitons à limiter le nombre de boutons.", "sharedUXPackages.card.noData.description": "Utilisez Elastic Agent pour collecter de manière simple et unifiée les données de vos machines.", @@ -14597,7 +14606,6 @@ "xpack.csp.cnvmDashboardTable.section.topVulnerableResources.column.vulnerabilities": "Vulnérabilités", "xpack.csp.cnvmDashboardTable.section.topVulnerableResources.column.vulnerabilityCount": "Vulnérabilités", "xpack.csp.common.component.multiSelectFilter.searchWord": "Recherche", - "sharedPlatformPackages.csp.common.utils.helpers.unknownError": "Erreur inconnue", "xpack.csp.compactFormattedNumber.naTitle": "S. O.", "xpack.csp.complianceScoreBar.tooltipTitle": "{failed} échecs et {passed} réussites de résultats", "xpack.csp.complianceScoreChart.counterButtonLink.failedFindingsTooltip": "Échec des résultats", @@ -14612,9 +14620,6 @@ "xpack.csp.createPackagePolicy.customAssetsTab.rulesViewLabel": "Afficher les règles CSP", "xpack.csp.createPackagePolicy.customAssetsTab.vulnerabilityDashboardViewLabel": "Afficher le tableau de bord CNVM", "xpack.csp.createPackagePolicy.customAssetsTab.vulnerabilityFindingsViewLabel": "Afficher les résultats des vulnérabilités", - "securitySolutionPackages.csp.cspEvaluationBadge.failLabel": "Échec", - "securitySolutionPackages.csp.cspEvaluationBadge.naLabel": "S. O.", - "securitySolutionPackages.csp.cspEvaluationBadge.passLabel": "Réussite", "xpack.csp.cspIntegration.gcpCloudCredentials.cloudFormationSupportedMessage": "La fonctionnalité Lancer Cloud Shell pour obtenir les informations d'identification de façon automatisée n’est pas pris en charge dans la version d'intégration actuelle. Veuillez effectuer une mise à niveau vers la dernière version pour activer Lancer Cloud Shell pour les informations d'identification automatisées.", "xpack.csp.cspmIntegration.awsOption.benchmarkTitle": "CIS AWS", "xpack.csp.cspmIntegration.awsOption.nameTitle": "AWS", @@ -14698,7 +14703,6 @@ "xpack.csp.findings.distributionBar.totalPassedLabel": "Réussite des résultats", "xpack.csp.findings.errorCallout.pageSearchErrorTitle": "Une erreur s’est produite lors de la récupération des résultats de recherche.", "xpack.csp.findings.errorCallout.showErrorButtonLabel": "Afficher le message d'erreur", - "securitySolutionPackages.csp.findings.findingsErrorToast.searchFailedTitle": "Échec de la recherche", "xpack.csp.findings.findingsFlyout.calloutTitle": "Certains champs ne sont pas fournis par {vendor}", "xpack.csp.findings.findingsFlyout.flyoutDescriptionList.resourceId": "ID ressource", "xpack.csp.findings.findingsFlyout.flyoutDescriptionList.resourceName": "Nom de ressource", @@ -14868,10 +14872,6 @@ "xpack.csp.kspmIntegration.integration.shortNameTitle": "KSPM", "xpack.csp.kspmIntegration.vanillaOption.benchmarkTitle": "CIS Kubernetes", "xpack.csp.kspmIntegration.vanillaOption.nameTitle": "Autogéré", - "securitySolutionPackages.csp.navigation.dashboardNavItemLabel": "Niveau de sécurité du cloud", - "securitySolutionPackages.csp.navigation.findingsNavItemLabel": "Résultats", - "securitySolutionPackages.csp.navigation.rulesNavItemLabel": "Règles", - "securitySolutionPackages.csp.navigation.vulnerabilityDashboardNavItemLabel": "Gestion des vulnérabilités natives du cloud", "xpack.csp.noFindingsStates.indexing.indexingButtonTitle": "Évaluation du niveau en cours", "xpack.csp.noFindingsStates.indexing.indexingDescription": "En attente de la collecte et de l'indexation des données. Revenez plus tard pour voir vos résultats", "xpack.csp.noFindingsStates.indexTimeout.indexTimeoutDescription": "La collecte des résultats prend plus de temps que prévu. {docs}.", @@ -37703,7 +37703,6 @@ "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.multiSelectFields.placeholderText": "Sélectionner un champ", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.newTermsField.placeholderText": "Sélectionner un champ", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.newTermsFieldsLabel": "Champs", - "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.newTermsFieldsMin": "Au moins un champ est requis.", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.referencesUrlInvalidError": "Le format de l’URL n’est pas valide.", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.resetDefaultIndicesButton": "Réinitialiser sur les modèles d'indexation par défaut", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.rulePreviewTitle": "Aperçu de la règle", @@ -39008,7 +39007,6 @@ "xpack.securitySolution.detectionEngine.userUnauthenticatedMsgBody": "Vous ne disposez pas des autorisations requises pour visualiser le moteur de détection. Pour une aide supplémentaire, contactez votre administrateur.", "xpack.securitySolution.detectionEngine.userUnauthenticatedTitle": "Autorisations de moteur de détection requises", "xpack.securitySolution.detectionEngine.validations.stepDefineRule.historyWindowSize.errMin": "La taille de la fenêtre d'historique doit être supérieure à 0.", - "xpack.securitySolution.detectionEngine.validations.stepDefineRule.newTermsFieldsMax": "Le nombre de champs doit être de 3 au maximum.", "xpack.securitySolution.detectionEngine.validations.thresholdCardinalityFieldFieldData.thresholdCardinalityFieldNotSuppliedMessage": "Un champ Cardinalité est requis.", "xpack.securitySolution.detectionEngine.validations.thresholdCardinalityValueFieldData.numberGreaterThanOrEqualOneErrorMessage": "La valeur doit être supérieure ou égale à un.", "xpack.securitySolution.detectionEngine.validations.thresholdFieldFieldData.arrayLengthGreaterThanMaxErrorMessage": "Le nombre de champs doit être de 3 au maximum.", diff --git a/x-pack/platform/plugins/private/translations/translations/ja-JP.json b/x-pack/platform/plugins/private/translations/translations/ja-JP.json index 8641da40c1e3..ceafc1e58d00 100644 --- a/x-pack/platform/plugins/private/translations/translations/ja-JP.json +++ b/x-pack/platform/plugins/private/translations/translations/ja-JP.json @@ -7139,6 +7139,14 @@ "securitySolutionPackages.alertSuppressionRuleDetails.upsell": "アラート非表示が構成されていますが、ライセンス不足のため適用されません", "securitySolutionPackages.alertSuppressionRuleForm.upsell": "アラートの非表示は、{requiredLicense}ライセンス以上で有効です", "securitySolutionPackages.beta.label": "ベータ", + "securitySolutionPackages.csp.cspEvaluationBadge.failLabel": "失敗", + "securitySolutionPackages.csp.cspEvaluationBadge.naLabel": "N/A", + "securitySolutionPackages.csp.cspEvaluationBadge.passLabel": "合格", + "securitySolutionPackages.csp.findings.findingsErrorToast.searchFailedTitle": "検索失敗", + "securitySolutionPackages.csp.navigation.dashboardNavItemLabel": "クラウドセキュリティ態勢", + "securitySolutionPackages.csp.navigation.findingsNavItemLabel": "調査結果", + "securitySolutionPackages.csp.navigation.rulesNavItemLabel": "ルール", + "securitySolutionPackages.csp.navigation.vulnerabilityDashboardNavItemLabel": "Cloud Native Vulnerability Management", "securitySolutionPackages.dataTable.ariaLabel": "アラート", "securitySolutionPackages.dataTable.columnHeaders.flyout.pane.removeColumnButtonLabel": "列を削除", "securitySolutionPackages.dataTable.eventRenderedView.eventSummary.column": "イベント概要", @@ -7467,6 +7475,7 @@ "share.urlService.redirect.RedirectManager.missingParamLocator": "ロケーターIDが指定されていません。URLで「l」検索パラメーターを指定します。これは既存のロケーターIDにしてください。", "share.urlService.redirect.RedirectManager.missingParamParams": "ロケーターパラメーターが指定されていません。URLで「p」検索パラメーターを指定します。これはロケーターパラメーターのJSONシリアル化オブジェクトにしてください。", "share.urlService.redirect.RedirectManager.missingParamVersion": "ロケーターパラメーターバージョンが指定されていません。URLで「v」検索パラメーターを指定します。これはロケーターパラメーターが生成されたときのKibanaのリリースバージョンです。", + "sharedPlatformPackages.csp.common.utils.helpers.unknownError": "不明なエラー", "sharedUXPackages.buttonToolbar.buttons.addFromLibrary.libraryButtonLabel": "ライブラリから追加", "sharedUXPackages.buttonToolbar.toolbar.errorToolbarText": "120以上のボタンがあります。ボタンの数を制限することを検討してください。", "sharedUXPackages.card.noData.description": "Elasticエージェントを使用すると、シンプルで統一された方法でコンピューターからデータを収集するできます。", @@ -14464,7 +14473,6 @@ "xpack.csp.cnvmDashboardTable.section.topVulnerableResources.column.vulnerabilities": "脆弱性", "xpack.csp.cnvmDashboardTable.section.topVulnerableResources.column.vulnerabilityCount": "脆弱性", "xpack.csp.common.component.multiSelectFilter.searchWord": "検索", - "sharedPlatformPackages.csp.common.utils.helpers.unknownError": "不明なエラー", "xpack.csp.compactFormattedNumber.naTitle": "N/A", "xpack.csp.complianceScoreBar.tooltipTitle": "{failed}が失敗し、{passed}が調査結果に合格しました", "xpack.csp.complianceScoreChart.counterButtonLink.failedFindingsTooltip": "失敗した調査結果", @@ -14479,9 +14487,6 @@ "xpack.csp.createPackagePolicy.customAssetsTab.rulesViewLabel": "CSPルールを表示", "xpack.csp.createPackagePolicy.customAssetsTab.vulnerabilityDashboardViewLabel": "CNVMダッシュボードを表示", "xpack.csp.createPackagePolicy.customAssetsTab.vulnerabilityFindingsViewLabel": "脆弱性の調査結果を表示", - "securitySolutionPackages.csp.cspEvaluationBadge.failLabel": "失敗", - "securitySolutionPackages.csp.cspEvaluationBadge.naLabel": "N/A", - "securitySolutionPackages.csp.cspEvaluationBadge.passLabel": "合格", "xpack.csp.cspIntegration.gcpCloudCredentials.cloudFormationSupportedMessage": "Launch Cloud ShellLaunch Cloud Formation for Automated Credentialsは、現在の統合バージョンではサポートされていません。Launch Cloud Shell for Automated Credentialsを有効化するには、最新バージョンにアップグレードしてください。", "xpack.csp.cspmIntegration.awsOption.benchmarkTitle": "CIS AWS", "xpack.csp.cspmIntegration.awsOption.nameTitle": "AWS", @@ -14564,7 +14569,6 @@ "xpack.csp.findings.distributionBar.totalPassedLabel": "合格した調査結果", "xpack.csp.findings.errorCallout.pageSearchErrorTitle": "検索結果の取得中にエラーが発生しました", "xpack.csp.findings.errorCallout.showErrorButtonLabel": "エラーメッセージを表示", - "securitySolutionPackages.csp.findings.findingsErrorToast.searchFailedTitle": "検索失敗", "xpack.csp.findings.findingsFlyout.calloutTitle": "一部のフィールドは{vendor}によって提供されていません", "xpack.csp.findings.findingsFlyout.flyoutDescriptionList.resourceId": "リソースID", "xpack.csp.findings.findingsFlyout.flyoutDescriptionList.resourceName": "リソース名", @@ -14733,10 +14737,6 @@ "xpack.csp.kspmIntegration.integration.shortNameTitle": "KSPM", "xpack.csp.kspmIntegration.vanillaOption.benchmarkTitle": "CIS Kubernetes", "xpack.csp.kspmIntegration.vanillaOption.nameTitle": "自己管理", - "securitySolutionPackages.csp.navigation.dashboardNavItemLabel": "クラウドセキュリティ態勢", - "securitySolutionPackages.csp.navigation.findingsNavItemLabel": "調査結果", - "securitySolutionPackages.csp.navigation.rulesNavItemLabel": "ルール", - "securitySolutionPackages.csp.navigation.vulnerabilityDashboardNavItemLabel": "Cloud Native Vulnerability Management", "xpack.csp.noFindingsStates.indexing.indexingButtonTitle": "態勢評価中", "xpack.csp.noFindingsStates.indexing.indexingDescription": "データの収集とインデックス作成を待機しています。結果を表示するには、しばらくたってから確認してください", "xpack.csp.noFindingsStates.indexTimeout.indexTimeoutDescription": "調査結果の収集に想定よりも時間がかかっています。{docs}。", @@ -37561,7 +37561,6 @@ "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.multiSelectFields.placeholderText": "フィールドを選択", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.newTermsField.placeholderText": "フィールドを選択", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.newTermsFieldsLabel": "フィールド", - "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.newTermsFieldsMin": "1つ以上のフィールドが必要です。", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.referencesUrlInvalidError": "URLの形式が無効です", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.resetDefaultIndicesButton": "デフォルトインデックスパターンにリセット", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.rulePreviewTitle": "ルールプレビュー", @@ -38865,7 +38864,6 @@ "xpack.securitySolution.detectionEngine.userUnauthenticatedMsgBody": "検出エンジンを表示するための必要なアクセス権がありません。ヘルプについては、管理者にお問い合わせください。", "xpack.securitySolution.detectionEngine.userUnauthenticatedTitle": "検出エンジンアクセス権が必要です", "xpack.securitySolution.detectionEngine.validations.stepDefineRule.historyWindowSize.errMin": "履歴ウィンドウサイズは0よりも大きい値でなければなりません。", - "xpack.securitySolution.detectionEngine.validations.stepDefineRule.newTermsFieldsMax": "フィールド数は3以下でなければなりません。", "xpack.securitySolution.detectionEngine.validations.thresholdCardinalityFieldFieldData.thresholdCardinalityFieldNotSuppliedMessage": "カーディナリティフィールドは必須です。", "xpack.securitySolution.detectionEngine.validations.thresholdCardinalityValueFieldData.numberGreaterThanOrEqualOneErrorMessage": "値は 1 以上でなければなりません。", "xpack.securitySolution.detectionEngine.validations.thresholdFieldFieldData.arrayLengthGreaterThanMaxErrorMessage": "フィールド数は3以下でなければなりません。", diff --git a/x-pack/platform/plugins/private/translations/translations/zh-CN.json b/x-pack/platform/plugins/private/translations/translations/zh-CN.json index d6bca0a79d64..6a3f3c2e483a 100644 --- a/x-pack/platform/plugins/private/translations/translations/zh-CN.json +++ b/x-pack/platform/plugins/private/translations/translations/zh-CN.json @@ -7023,6 +7023,14 @@ "securitySolutionPackages.alertSuppressionRuleDetails.upsell": "已配置告警阻止,但由于许可不足而无法应用", "securitySolutionPackages.alertSuppressionRuleForm.upsell": "告警阻止通过{requiredLicense}或更高级许可证启用", "securitySolutionPackages.beta.label": "公测版", + "securitySolutionPackages.csp.cspEvaluationBadge.failLabel": "失败", + "securitySolutionPackages.csp.cspEvaluationBadge.naLabel": "不可用", + "securitySolutionPackages.csp.cspEvaluationBadge.passLabel": "通过", + "securitySolutionPackages.csp.findings.findingsErrorToast.searchFailedTitle": "搜索失败", + "securitySolutionPackages.csp.navigation.dashboardNavItemLabel": "云安全态势", + "securitySolutionPackages.csp.navigation.findingsNavItemLabel": "结果", + "securitySolutionPackages.csp.navigation.rulesNavItemLabel": "规则", + "securitySolutionPackages.csp.navigation.vulnerabilityDashboardNavItemLabel": "云原生漏洞管理", "securitySolutionPackages.dataTable.ariaLabel": "告警", "securitySolutionPackages.dataTable.columnHeaders.flyout.pane.removeColumnButtonLabel": "移除列", "securitySolutionPackages.dataTable.eventRenderedView.eventSummary.column": "事件摘要", @@ -7352,6 +7360,7 @@ "share.urlService.redirect.RedirectManager.missingParamLocator": "未指定定位器 ID。在 URL 中指定'l'搜索参数,其应为现有定位器 ID。", "share.urlService.redirect.RedirectManager.missingParamParams": "定位器参数未指定。在 URL 中指定'p'搜索参数,其应为定位器参数的 JSON 序列化对象。", "share.urlService.redirect.RedirectManager.missingParamVersion": "定位器参数版本未指定。在 URL 中指定'v'搜索参数,其应为生成定位器参数时 Kibana 的版本。", + "sharedPlatformPackages.csp.common.utils.helpers.unknownError": "未知错误", "sharedUXPackages.buttonToolbar.buttons.addFromLibrary.libraryButtonLabel": "从库中添加", "sharedUXPackages.buttonToolbar.toolbar.errorToolbarText": "有 120 多个附加按钮。请考虑限制按钮数量。", "sharedUXPackages.card.noData.description": "使用 Elastic 代理以简单统一的方式从您的计算机中收集数据。", @@ -14194,7 +14203,6 @@ "xpack.csp.cnvmDashboardTable.section.topVulnerableResources.column.vulnerabilities": "漏洞", "xpack.csp.cnvmDashboardTable.section.topVulnerableResources.column.vulnerabilityCount": "漏洞", "xpack.csp.common.component.multiSelectFilter.searchWord": "搜索", - "sharedPlatformPackages.csp.common.utils.helpers.unknownError": "未知错误", "xpack.csp.compactFormattedNumber.naTitle": "不可用", "xpack.csp.complianceScoreBar.tooltipTitle": "{failed} 个失败和 {passed} 个通过的结果", "xpack.csp.complianceScoreChart.counterButtonLink.failedFindingsTooltip": "失败的结果", @@ -14209,9 +14217,6 @@ "xpack.csp.createPackagePolicy.customAssetsTab.rulesViewLabel": "查看 CSP 规则", "xpack.csp.createPackagePolicy.customAssetsTab.vulnerabilityDashboardViewLabel": "查看 CNVM 仪表板", "xpack.csp.createPackagePolicy.customAssetsTab.vulnerabilityFindingsViewLabel": "查看漏洞结果", - "securitySolutionPackages.csp.cspEvaluationBadge.failLabel": "失败", - "securitySolutionPackages.csp.cspEvaluationBadge.naLabel": "不可用", - "securitySolutionPackages.csp.cspEvaluationBadge.passLabel": "通过", "xpack.csp.cspIntegration.gcpCloudCredentials.cloudFormationSupportedMessage": "当前集成版本不支持为自动化凭据启动 Cloud Shell。请升级到最新版本以启用为自动化凭据启动 Cloud Shell。", "xpack.csp.cspmIntegration.awsOption.benchmarkTitle": "CIS AWS", "xpack.csp.cspmIntegration.awsOption.nameTitle": "AWS", @@ -14295,7 +14300,6 @@ "xpack.csp.findings.distributionBar.totalPassedLabel": "通过的结果", "xpack.csp.findings.errorCallout.pageSearchErrorTitle": "检索搜索结果时遇到问题", "xpack.csp.findings.errorCallout.showErrorButtonLabel": "显示错误消息", - "securitySolutionPackages.csp.findings.findingsErrorToast.searchFailedTitle": "搜索失败", "xpack.csp.findings.findingsFlyout.calloutTitle": "{vendor} 未提供某些字段", "xpack.csp.findings.findingsFlyout.flyoutDescriptionList.resourceId": "资源 ID", "xpack.csp.findings.findingsFlyout.flyoutDescriptionList.resourceName": "资源名称", @@ -14465,10 +14469,6 @@ "xpack.csp.kspmIntegration.integration.shortNameTitle": "KSPM", "xpack.csp.kspmIntegration.vanillaOption.benchmarkTitle": "CIS Kubernetes", "xpack.csp.kspmIntegration.vanillaOption.nameTitle": "自管型", - "securitySolutionPackages.csp.navigation.dashboardNavItemLabel": "云安全态势", - "securitySolutionPackages.csp.navigation.findingsNavItemLabel": "结果", - "securitySolutionPackages.csp.navigation.rulesNavItemLabel": "规则", - "securitySolutionPackages.csp.navigation.vulnerabilityDashboardNavItemLabel": "云原生漏洞管理", "xpack.csp.noFindingsStates.indexing.indexingButtonTitle": "正进行态势评估", "xpack.csp.noFindingsStates.indexing.indexingDescription": "正在等待要收集和索引的数据。请稍后返回检查以查看结果", "xpack.csp.noFindingsStates.indexTimeout.indexTimeoutDescription": "收集结果所需的时间长于预期。{docs}。", @@ -36993,7 +36993,6 @@ "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.multiSelectFields.placeholderText": "选择字段", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.newTermsField.placeholderText": "选择字段", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.newTermsFieldsLabel": "字段", - "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.newTermsFieldsMin": "至少需要一个字段。", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.referencesUrlInvalidError": "URL 的格式无效", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.resetDefaultIndicesButton": "重置为默认索引模式", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.rulePreviewTitle": "规则预览", @@ -38292,7 +38291,6 @@ "xpack.securitySolution.detectionEngine.userUnauthenticatedMsgBody": "您没有所需的权限,无法查看检测引擎。若需要更多帮助,请联系您的管理员。", "xpack.securitySolution.detectionEngine.userUnauthenticatedTitle": "需要检测引擎权限", "xpack.securitySolution.detectionEngine.validations.stepDefineRule.historyWindowSize.errMin": "历史记录窗口大小必须大于 0。", - "xpack.securitySolution.detectionEngine.validations.stepDefineRule.newTermsFieldsMax": "字段数目不得超过 3 个。", "xpack.securitySolution.detectionEngine.validations.thresholdCardinalityFieldFieldData.thresholdCardinalityFieldNotSuppliedMessage": "基数字段必填。", "xpack.securitySolution.detectionEngine.validations.thresholdCardinalityValueFieldData.numberGreaterThanOrEqualOneErrorMessage": "值必须大于或等于 1。", "xpack.securitySolution.detectionEngine.validations.thresholdFieldFieldData.arrayLengthGreaterThanMaxErrorMessage": "字段数目不得超过 3 个。", diff --git a/x-pack/solutions/security/plugins/security_solution/public/common/components/ml/hooks/use_ml_rule_config.ts b/x-pack/solutions/security/plugins/security_solution/public/common/components/ml/hooks/use_ml_rule_config.ts index 139acb0473c8..9b60c15dc135 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/common/components/ml/hooks/use_ml_rule_config.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/common/components/ml/hooks/use_ml_rule_config.ts @@ -5,16 +5,15 @@ * 2.0. */ -import { useMemo } from 'react'; import type { DataViewFieldBase } from '@kbn/es-query'; import type { FieldSpec } from '@kbn/data-plugin/common'; -import { getTermsAggregationFields } from '../../../../detection_engine/rule_creation_ui/components/step_define_rule/utils'; import { useRuleFields } from '../../../../detection_engine/rule_management/logic/use_rule_fields'; import { useMlCapabilities } from './use_ml_capabilities'; import { useMlRuleValidations } from './use_ml_rule_validations'; import { hasMlAdminPermissions } from '../../../../../common/machine_learning/has_ml_admin_permissions'; import { hasMlLicense } from '../../../../../common/machine_learning/has_ml_license'; +import { useTermsAggregationFields } from '../../../hooks/use_terms_aggregation_fields'; export interface UseMlRuleConfigReturn { hasMlAdminPermissions: boolean; @@ -45,10 +44,7 @@ export const useMLRuleConfig = ({ const { loading: mlFieldsLoading, fields: mlFields } = useRuleFields({ machineLearningJobId, }); - const mlSuppressionFields = useMemo( - () => getTermsAggregationFields(mlFields as FieldSpec[]), - [mlFields] - ); + const mlSuppressionFields = useTermsAggregationFields(mlFields); return { hasMlAdminPermissions: hasMlAdminPermissions(mlCapabilities), diff --git a/x-pack/solutions/security/plugins/security_solution/public/common/constants.ts b/x-pack/solutions/security/plugins/security_solution/public/common/constants.ts index c114f70915a7..a9761e87c20e 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/common/constants.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/common/constants.ts @@ -18,3 +18,5 @@ export const RISK_SCORE_HIGH = 73; export const RISK_SCORE_CRITICAL = 99; export const ONBOARDING_VIDEO_SOURCE = '//play.vidyard.com/K6kKDBbP9SpXife9s2tHNP.html?'; + +export const DEFAULT_HISTORY_WINDOW_SIZE = '7d'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/common/hooks/use_terms_aggregation_fields.ts b/x-pack/solutions/security/plugins/security_solution/public/common/hooks/use_terms_aggregation_fields.ts new file mode 100644 index 000000000000..e62b16e82676 --- /dev/null +++ b/x-pack/solutions/security/plugins/security_solution/public/common/hooks/use_terms_aggregation_fields.ts @@ -0,0 +1,29 @@ +/* + * 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 { useMemo } from 'react'; +import type { FieldSpec } from '@kbn/data-views-plugin/common'; +import type { DataViewFieldBase } from '@kbn/es-query'; +import { getTermsAggregationFields } from '../../detection_engine/rule_creation_ui/components/step_define_rule/utils'; + +export function useTermsAggregationFields(fields?: DataViewFieldBase[]) { + const termsAggregationFields = useMemo( + /** + * Typecasting to FieldSpec because fields is + * typed as DataViewFieldBase[] which does not have + * the 'aggregatable' property, however the type is incorrect + * + * fields does contain elements with the aggregatable property. + * We will need to determine where these types are defined and + * figure out where the discrepancy is. + */ + () => getTermsAggregationFields((fields as FieldSpec[]) ?? []), + [fields] + ); + + return termsAggregationFields; +} diff --git a/x-pack/solutions/security/plugins/security_solution/public/common/utils/date_math.ts b/x-pack/solutions/security/plugins/security_solution/public/common/utils/date_math.ts new file mode 100644 index 000000000000..28dbe15955a2 --- /dev/null +++ b/x-pack/solutions/security/plugins/security_solution/public/common/utils/date_math.ts @@ -0,0 +1,29 @@ +/* + * 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. + */ + +/** + * Converts a date math string to a duration string by removing the 'now-' prefix. + * + * @param historyStart - Date math string to convert. For example, "now-30d". + * @returns Resulting duration string. For example, "30d". + */ +export const convertDateMathToDuration = (dateMathString: string): string => { + if (dateMathString.startsWith('now-')) { + return dateMathString.substring(4); + } + + return dateMathString; +}; + +/** + * Converts a duration string to a dateMath string by adding the 'now-' prefix. + * + * @param durationString - Duration string to convert. For example, "30d". + * @returns Resulting date math string. For example, "now-30d". + */ +export const convertDurationToDateMath = (durationString: string): string => + `now-${durationString}`; diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/history_window_start_edit/history_window_start_edit.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/history_window_start_edit/history_window_start_edit.tsx new file mode 100644 index 000000000000..c876fe926ce4 --- /dev/null +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/history_window_start_edit/history_window_start_edit.tsx @@ -0,0 +1,44 @@ +/* + * 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 React from 'react'; +import { ScheduleItemField } from '../schedule_item_field'; +import { type FieldConfig, UseField } from '../../../../shared_imports'; +import { type HistoryWindowStart } from '../../../../../common/api/detection_engine'; +import * as i18n from './translations'; +import { validateHistoryWindowStart } from './validate_history_window_start'; + +const COMPONENT_PROPS = { + idAria: 'historyWindowSize', + dataTestSubj: 'historyWindowSize', + timeTypes: ['m', 'h', 'd'], +}; + +interface HistoryWindowStartEditProps { + path: string; +} + +export function HistoryWindowStartEdit({ path }: HistoryWindowStartEditProps): JSX.Element { + return ( + + ); +} + +const HISTORY_WINDOW_START_FIELD_CONFIG: FieldConfig = { + label: i18n.HISTORY_WINDOW_START_LABEL, + helpText: i18n.HELP_TEXT, + validations: [ + { + validator: validateHistoryWindowStart, + }, + ], +}; diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/new_terms_fields/translations.ts b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/history_window_start_edit/index.tsx similarity index 51% rename from x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/new_terms_fields/translations.ts rename to x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/history_window_start_edit/index.tsx index 1bf73b4a46b4..a904f5d42771 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/new_terms_fields/translations.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/history_window_start_edit/index.tsx @@ -5,11 +5,4 @@ * 2.0. */ -import { i18n } from '@kbn/i18n'; - -export const NEW_TERMS_FIELD_PLACEHOLDER = i18n.translate( - 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.newTermsField.placeholderText', - { - defaultMessage: 'Select a field', - } -); +export { HistoryWindowStartEdit } from './history_window_start_edit'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/history_window_start_edit/translations.ts b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/history_window_start_edit/translations.ts new file mode 100644 index 000000000000..75ff11fe5e1b --- /dev/null +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/history_window_start_edit/translations.ts @@ -0,0 +1,36 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const HISTORY_WINDOW_START_LABEL = i18n.translate( + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.historyWindowSizeLabel', + { + defaultMessage: 'History Window Size', + } +); + +export const HELP_TEXT = i18n.translate( + 'xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.historyWindowSizeHelpText', + { + defaultMessage: "New terms rules only alert if terms don't appear in historical data.", + } +); + +export const MUST_BE_POSITIVE_INTEGER_VALIDATION_ERROR = i18n.translate( + 'xpack.securitySolution.detectionEngine.validations.stepDefineRule.historyWindowSize.errNumber', + { + defaultMessage: 'History window size must be a positive number.', + } +); + +export const MUST_BE_GREATER_THAN_ZERO_VALIDATION_ERROR = i18n.translate( + 'xpack.securitySolution.detectionEngine.validations.stepDefineRule.historyWindowSize.errMin', + { + defaultMessage: 'History window size must be greater than 0.', + } +); diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/history_window_start_edit/validate_history_window_start.ts b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/history_window_start_edit/validate_history_window_start.ts new file mode 100644 index 000000000000..4e274683ad08 --- /dev/null +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/history_window_start_edit/validate_history_window_start.ts @@ -0,0 +1,31 @@ +/* + * 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 { type ValidationFunc } from '../../../../shared_imports'; +import * as i18n from './translations'; + +export function validateHistoryWindowStart(...args: Parameters) { + const [{ path, value }] = args; + + const historyWindowSize = Number.parseInt(String(value), 10); + + if (Number.isNaN(historyWindowSize)) { + return { + code: 'ERR_NOT_INT_NUMBER', + path, + message: i18n.MUST_BE_POSITIVE_INTEGER_VALIDATION_ERROR, + }; + } + + if (historyWindowSize <= 0) { + return { + code: 'ERR_MIN_LENGTH', + path, + message: i18n.MUST_BE_GREATER_THAN_ZERO_VALIDATION_ERROR, + }; + } +} diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/new_terms_fields_edit/index.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/new_terms_fields_edit/index.tsx new file mode 100644 index 000000000000..22c3c9e9047c --- /dev/null +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/new_terms_fields_edit/index.tsx @@ -0,0 +1,8 @@ +/* + * 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. + */ + +export { NewTermsFieldsEdit } from './new_terms_fields_edit'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/new_terms_fields_edit/new_terms_fields_edit.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/new_terms_fields_edit/new_terms_fields_edit.tsx new file mode 100644 index 000000000000..f50c62ed8f7a --- /dev/null +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/new_terms_fields_edit/new_terms_fields_edit.tsx @@ -0,0 +1,43 @@ +/* + * 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 React, { memo } from 'react'; +import { UseField, fieldValidators } from '../../../../shared_imports'; +import { NewTermsFieldsField } from './new_terms_fields_field'; +import * as i18n from './translations'; + +interface NewTermsFieldsEditProps { + path: string; + fieldNames: string[]; +} + +export const NewTermsFieldsEdit = memo(function NewTermsFieldsEdit({ + path, + fieldNames, +}: NewTermsFieldsEditProps): JSX.Element { + return ( + + ); +}); + +const NEW_TERMS_FIELDS_CONFIG = { + label: i18n.NEW_TERMS_FIELDS_LABEL, + helpText: i18n.HELP_TEXT, + validations: [ + { + validator: fieldValidators.emptyField(i18n.MIN_FIELDS_COUNT_VALIDATION_ERROR), + }, + { + validator: fieldValidators.maxLengthField(i18n.MAX_FIELDS_COUNT_VALIDATION_ERROR), + }, + ], +}; diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/new_terms_fields_edit/new_terms_fields_field.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/new_terms_fields_edit/new_terms_fields_field.tsx new file mode 100644 index 000000000000..a9c1148402f1 --- /dev/null +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/new_terms_fields_edit/new_terms_fields_field.tsx @@ -0,0 +1,40 @@ +/* + * 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 React, { memo } from 'react'; + +import type { DataViewFieldBase } from '@kbn/es-query'; +import { ComboBoxField } from '@kbn/es-ui-shared-plugin/static/forms/components'; +import type { FieldHook } from '../../../../shared_imports'; +import { PLACEHOLDER } from './translations'; + +interface NewTermsFieldsProps { + fieldNames: DataViewFieldBase[]; + field: FieldHook; +} + +const FIELD_COMBO_BOX_WIDTH = 410; + +const fieldDescribedByIds = 'newTermsFieldEdit'; + +export const NewTermsFieldsField = memo(function NewTermsFieldsField({ + fieldNames, + field, +}: NewTermsFieldsProps): JSX.Element { + const fieldEuiFieldProps = { + fullWidth: true, + noSuggestions: false, + options: fieldNames.map((name) => ({ label: name })), + placeholder: PLACEHOLDER, + onCreateOption: undefined, + style: { width: `${FIELD_COMBO_BOX_WIDTH}px` }, + }; + + return ( + + ); +}); diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/new_terms_fields_edit/translations.ts b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/new_terms_fields_edit/translations.ts new file mode 100644 index 000000000000..4eb18b9a318e --- /dev/null +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/new_terms_fields_edit/translations.ts @@ -0,0 +1,47 @@ +/* + * 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 { i18n } from '@kbn/i18n'; +import { MAX_NUMBER_OF_NEW_TERMS_FIELDS } from '../../../../../common/constants'; + +export const NEW_TERMS_FIELDS_LABEL = i18n.translate( + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.newTermsFieldsLabel', + { + defaultMessage: 'Fields', + } +); + +export const PLACEHOLDER = i18n.translate( + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.newTermsField.placeholderText', + { + defaultMessage: 'Select a field', + } +); + +export const HELP_TEXT = i18n.translate( + 'xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldNewTermsFieldHelpText', + { + defaultMessage: 'Select a field to check for new terms.', + } +); + +export const MIN_FIELDS_COUNT_VALIDATION_ERROR = i18n.translate( + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.newTermsField.minFieldsCountError', + { + defaultMessage: 'A minimum of one field is required.', + } +); + +export const MAX_FIELDS_COUNT_VALIDATION_ERROR = { + length: MAX_NUMBER_OF_NEW_TERMS_FIELDS, + message: i18n.translate( + 'xpack.securitySolution.detectionEngine.validations.stepDefineRule.newTermsField.maxFieldsCountError', + { + defaultMessage: 'Number of fields must be 3 or less.', + } + ), +}; diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/schedule_item_field/index.ts b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/schedule_item_field/index.ts new file mode 100644 index 000000000000..f2458bbb5a4e --- /dev/null +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/schedule_item_field/index.ts @@ -0,0 +1,8 @@ +/* + * 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. + */ + +export { ScheduleItemField } from './schedule_item_field'; diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/schedule_item_field/schedule_item_field.test.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/schedule_item_field/schedule_item_field.test.tsx new file mode 100644 index 000000000000..bf019bd43f2f --- /dev/null +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/schedule_item_field/schedule_item_field.test.tsx @@ -0,0 +1,96 @@ +/* + * 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 React from 'react'; +import { mount, shallow } from 'enzyme'; + +import { ScheduleItemField } from './schedule_item_field'; +import { TestProviders, useFormFieldMock } from '../../../../common/mock'; + +describe('ScheduleItemField', () => { + it('renders correctly', () => { + const mockField = useFormFieldMock(); + const wrapper = shallow( + + ); + + expect(wrapper.find('[data-test-subj="schedule-item"]')).toHaveLength(1); + }); + + it('accepts a large number via user input', () => { + const mockField = useFormFieldMock(); + const wrapper = mount( + + + + ); + + wrapper + .find('[data-test-subj="interval"]') + .last() + .simulate('change', { target: { value: '5000000' } }); + + expect(mockField.setValue).toHaveBeenCalledWith('5000000s'); + }); + + it('clamps a number value greater than MAX_SAFE_INTEGER to MAX_SAFE_INTEGER', () => { + const unsafeInput = '99999999999999999999999'; + + const mockField = useFormFieldMock(); + const wrapper = mount( + + + + ); + + wrapper + .find('[data-test-subj="interval"]') + .last() + .simulate('change', { target: { value: unsafeInput } }); + + const expectedValue = `${Number.MAX_SAFE_INTEGER}s`; + expect(mockField.setValue).toHaveBeenCalledWith(expectedValue); + }); + + it('converts a non-numeric value to 0', () => { + const unsafeInput = 'this is not a number'; + + const mockField = useFormFieldMock(); + const wrapper = mount( + + + + ); + + wrapper + .find('[data-test-subj="interval"]') + .last() + .simulate('change', { target: { value: unsafeInput } }); + + expect(mockField.setValue).toHaveBeenCalledWith('0s'); + }); +}); diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/schedule_item_field/schedule_item_field.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/schedule_item_field/schedule_item_field.tsx new file mode 100644 index 000000000000..241e3869958a --- /dev/null +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/schedule_item_field/schedule_item_field.tsx @@ -0,0 +1,181 @@ +/* + * 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 type { EuiSelectProps, EuiFieldNumberProps } from '@elastic/eui'; +import { + EuiFlexGroup, + EuiFlexItem, + EuiFieldNumber, + EuiFormRow, + EuiSelect, + transparentize, +} from '@elastic/eui'; +import { isEmpty } from 'lodash/fp'; +import React, { useCallback, useEffect, useMemo, useState } from 'react'; +import styled from 'styled-components'; + +import type { FieldHook } from '../../../../shared_imports'; +import { getFieldValidityAndErrorMessage } from '../../../../shared_imports'; + +import * as I18n from './translations'; + +interface ScheduleItemProps { + field: FieldHook; + dataTestSubj: string; + idAria: string; + isDisabled: boolean; + minimumValue?: number; + timeTypes?: string[]; + fullWidth?: boolean; +} + +const timeTypeOptions = [ + { value: 's', text: I18n.SECONDS }, + { value: 'm', text: I18n.MINUTES }, + { value: 'h', text: I18n.HOURS }, + { value: 'd', text: I18n.DAYS }, +]; + +// move optional label to the end of input +const StyledLabelAppend = styled(EuiFlexItem)` + &.euiFlexItem { + margin-left: 31px; + } +`; + +const StyledEuiFormRow = styled(EuiFormRow)` + max-width: none; + + .euiFormControlLayout__append { + padding-inline: 0 !important; + } + + .euiFormControlLayoutIcons { + color: ${({ theme }) => theme.eui.euiColorPrimary}; + } +`; + +const MyEuiSelect = styled(EuiSelect)` + min-width: 106px; // Preserve layout when disabled & dropdown arrow is not rendered + background: ${({ theme }) => + transparentize(theme.eui.euiColorPrimary, 0.1)} !important; // Override focus states etc. + color: ${({ theme }) => theme.eui.euiColorPrimary}; + box-shadow: none; +`; + +const getNumberFromUserInput = (input: string, minimumValue = 0): number => { + const number = parseInt(input, 10); + if (Number.isNaN(number)) { + return minimumValue; + } else { + return Math.max(minimumValue, Math.min(number, Number.MAX_SAFE_INTEGER)); + } +}; + +export const ScheduleItemField = ({ + dataTestSubj, + field, + idAria, + isDisabled, + minimumValue = 0, + timeTypes = ['s', 'm', 'h'], + fullWidth = false, +}: ScheduleItemProps) => { + const [timeType, setTimeType] = useState(timeTypes[0]); + const [timeVal, setTimeVal] = useState(0); + const { isInvalid, errorMessage } = getFieldValidityAndErrorMessage(field); + const { value, setValue } = field; + + const onChangeTimeType = useCallback>( + (e) => { + setTimeType(e.target.value); + setValue(`${timeVal}${e.target.value}`); + }, + [setValue, timeVal] + ); + + const onChangeTimeVal = useCallback>( + (e) => { + const sanitizedValue = getNumberFromUserInput(e.target.value, minimumValue); + setTimeVal(sanitizedValue); + setValue(`${sanitizedValue}${timeType}`); + }, + [minimumValue, setValue, timeType] + ); + + useEffect(() => { + if (value !== `${timeVal}${timeType}`) { + const filterTimeVal = value.match(/\d+/g); + const filterTimeType = value.match(/[a-zA-Z]+/g); + if ( + !isEmpty(filterTimeVal) && + filterTimeVal != null && + !isNaN(Number(filterTimeVal[0])) && + Number(filterTimeVal[0]) !== Number(timeVal) + ) { + setTimeVal(Number(filterTimeVal[0])); + } + if ( + !isEmpty(filterTimeType) && + filterTimeType != null && + timeTypes.includes(filterTimeType[0]) && + filterTimeType[0] !== timeType + ) { + setTimeType(filterTimeType[0]); + } + } + }, [timeType, timeTypes, timeVal, value]); + + // EUI missing some props + const rest = { disabled: isDisabled }; + const label = useMemo( + () => ( + + + {field.label} + + + {field.labelAppend} + + + ), + [field.label, field.labelAppend] + ); + + return ( + + timeTypes.includes(type.value))} + onChange={onChangeTimeType} + value={timeType} + aria-label={field.label} + data-test-subj="timeType" + {...rest} + /> + } + fullWidth + min={minimumValue} + max={Number.MAX_SAFE_INTEGER} + onChange={onChangeTimeVal} + value={timeVal} + data-test-subj="interval" + {...rest} + /> + + ); +}; diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/schedule_item_field/translations.ts b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/schedule_item_field/translations.ts new file mode 100644 index 000000000000..c460d2f7198b --- /dev/null +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/schedule_item_field/translations.ts @@ -0,0 +1,36 @@ +/* + * 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 { i18n } from '@kbn/i18n'; + +export const SECONDS = i18n.translate( + 'xpack.securitySolution.detectionEngine.createRule.stepScheduleRuleForm.secondsOptionDescription', + { + defaultMessage: 'Seconds', + } +); + +export const MINUTES = i18n.translate( + 'xpack.securitySolution.detectionEngine.createRule.stepScheduleRuleForm.minutesOptionDescription', + { + defaultMessage: 'Minutes', + } +); + +export const HOURS = i18n.translate( + 'xpack.securitySolution.detectionEngine.createRule.stepScheduleRuleForm.hoursOptionDescription', + { + defaultMessage: 'Hours', + } +); + +export const DAYS = i18n.translate( + 'xpack.securitySolution.detectionEngine.createRule.stepScheduleRuleForm.daysOptionDescription', + { + defaultMessage: 'Days', + } +); diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/index.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/index.tsx index 26c81f325ea1..a91487afc448 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/index.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/index.tsx @@ -72,6 +72,8 @@ import { ALERT_SUPPRESSION_MISSING_FIELDS_FIELD_NAME, } from '../../../rule_creation/components/alert_suppression_edit'; import { THRESHOLD_ALERT_SUPPRESSION_ENABLED } from '../../../rule_creation/components/threshold_alert_suppression_edit'; +import { NEW_TERMS_FIELDS_LABEL } from '../../../rule_creation/components/new_terms_fields_edit/translations'; +import { HISTORY_WINDOW_START_LABEL } from '../../../rule_creation/components/history_window_start_edit/translations'; import type { FieldValueQueryBar } from '../query_bar_field'; const DescriptionListContainer = styled(EuiDescriptionList)` @@ -341,6 +343,9 @@ export const getDescriptionItem = ( } else if (field === 'threatMapping') { const threatMap: ThreatMapping = get(field, data); return buildThreatMappingDescription(label, threatMap); + } else if (field === 'newTermsFields') { + const values: string[] = get(field, data); + return buildStringArrayDescription(NEW_TERMS_FIELDS_LABEL, field, values); } else if (Array.isArray(get(field, data)) && field !== 'threatMapping') { const values: string[] = get(field, data); return buildStringArrayDescription(label, field, values); @@ -357,6 +362,9 @@ export const getDescriptionItem = ( } else if (field === 'maxSignals') { const value: number | undefined = get(field, data); return value ? [{ title: label, description: value }] : []; + } else if (field === 'historyWindowSize') { + const value: number = get(field, data); + return value ? [{ title: HISTORY_WINDOW_START_LABEL, description: value }] : []; } const description: string = get(field, data); diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/new_terms_fields/index.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/new_terms_fields/index.tsx deleted file mode 100644 index 7dfb24200e64..000000000000 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/new_terms_fields/index.tsx +++ /dev/null @@ -1,42 +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 React, { useMemo } from 'react'; - -import type { DataViewFieldBase } from '@kbn/es-query'; -import type { FieldHook } from '../../../../shared_imports'; -import { Field } from '../../../../shared_imports'; -import { NEW_TERMS_FIELD_PLACEHOLDER } from './translations'; - -interface NewTermsFieldsProps { - browserFields: DataViewFieldBase[]; - field: FieldHook; -} - -const FIELD_COMBO_BOX_WIDTH = 410; - -const fieldDescribedByIds = 'detectionEngineStepDefineRuleNewTermsField'; - -export const NewTermsFieldsComponent: React.FC = ({ - browserFields, - field, -}: NewTermsFieldsProps) => { - const fieldEuiFieldProps = useMemo( - () => ({ - fullWidth: true, - noSuggestions: false, - options: browserFields.map((browserField) => ({ label: browserField.name })), - placeholder: NEW_TERMS_FIELD_PLACEHOLDER, - onCreateOption: undefined, - style: { width: `${FIELD_COMBO_BOX_WIDTH}px` }, - }), - [browserFields] - ); - return ; -}; - -export const NewTermsFields = React.memo(NewTermsFieldsComponent); diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/helpers.ts b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/helpers.ts index 045e957c4e12..fcbdfdf4f86b 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/helpers.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/helpers.ts @@ -107,7 +107,7 @@ export const getIsRulePreviewDisabled = ({ threatMapping, machineLearningJobId, queryBar, - newTermsFields, + newTermsFields = [], }: { ruleType: Type; isQueryBarValid: boolean; diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/index.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/index.tsx index 7b056b596979..f7845c31378a 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/index.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/index.tsx @@ -55,7 +55,6 @@ import { } from '../../../../shared_imports'; import type { FormHook, FieldHook } from '../../../../shared_imports'; import { schema } from './schema'; -import { getTermsAggregationFields } from './utils'; import { useExperimentalFeatureFieldsTransform } from './use_experimental_feature_fields_transform'; import * as i18n from './translations'; import { @@ -72,8 +71,6 @@ import { EqlQueryEdit } from '../../../rule_creation/components/eql_query_edit'; import { DataViewSelectorField } from '../data_view_selector_field'; import { ThreatMatchInput } from '../threatmatch_input'; import { useFetchIndex } from '../../../../common/containers/source'; -import { NewTermsFields } from '../new_terms_fields'; -import { ScheduleItem } from '../../../rule_creation/components/schedule_item_form'; import { RequiredFields } from '../../../rule_creation/components/required_fields'; import { DocLink } from '../../../../common/components/links_to_docs/doc_link'; import { useLicense } from '../../../../common/hooks/use_license'; @@ -90,6 +87,10 @@ import { } from '../../../rule_creation/components/alert_suppression_edit'; import { ThresholdAlertSuppressionEdit } from '../../../rule_creation/components/threshold_alert_suppression_edit'; import { usePersistentAlertSuppressionState } from './use_persistent_alert_suppression_state'; +import { useTermsAggregationFields } from '../../../../common/hooks/use_terms_aggregation_fields'; +import { HistoryWindowStartEdit } from '../../../rule_creation/components/history_window_start_edit'; +import { NewTermsFieldsEdit } from '../../../rule_creation/components/new_terms_fields_edit'; +import { usePersistentNewTermsState } from './use_persistent_new_terms_state'; import { EsqlQueryEdit } from '../../../rule_creation/components/esql_query_edit'; import { usePersistentQuery } from './use_persistent_query'; @@ -211,18 +212,11 @@ const StepDefineRuleComponent: FC = ({ () => (indexPattern.fields as FieldSpec[]).filter((field) => field.aggregatable === true), [indexPattern.fields] ); - const termsAggregationFields = useMemo( - /** - * Typecasting to FieldSpec because fields is - * typed as DataViewFieldBase[] which does not have - * the 'aggregatable' property, however the type is incorrect - * - * fields does contain elements with the aggregatable property. - * We will need to determine where these types are defined and - * figure out where the discrepency is. - */ - () => getTermsAggregationFields(indexPattern.fields as FieldSpec[]), - [indexPattern.fields] + + const termsAggregationFields = useTermsAggregationFields(indexPattern.fields); + const termsAggregationFieldNames = useMemo( + () => termsAggregationFields.map((field) => field.name), + [termsAggregationFields] ); const [threatIndexPatternsLoading, { indexPatterns: threatIndexPatterns }] = @@ -245,6 +239,12 @@ const StepDefineRuleComponent: FC = ({ form, }); usePersistentAlertSuppressionState({ form }); + usePersistentNewTermsState({ + form, + ruleTypePath: 'ruleType', + newTermsFieldsPath: 'newTermsFields', + historyWindowStartPath: 'historyWindowSize', + }); const handleSetRuleFromTimeline = useCallback( ({ index: timelineIndex, queryBar: timelineQueryBar, eqlOptions }) => { @@ -730,30 +730,14 @@ const StepDefineRuleComponent: FC = ({ - - <> - - - - + {isNewTermsRule(ruleType) && ( + + <> + + + + + )} diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/schema.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/schema.tsx index 323e321eee8d..4f168d94388d 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/schema.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/schema.tsx @@ -17,12 +17,10 @@ import { } from '../../../../common/components/threat_match/helpers'; import { isEsqlRule, - isNewTermsRule, isThreatMatchRule, isThresholdRule, isSuppressionRuleConfiguredWithGroupBy, } from '../../../../../common/detection_engine/utils'; -import { MAX_NUMBER_OF_NEW_TERMS_FIELDS } from '../../../../../common/constants'; import { isMlRule } from '../../../../../common/machine_learning/helpers'; import type { ERROR_CODE, FormSchema, ValidationFunc } from '../../../../shared_imports'; import { FIELD_TYPES, fieldValidators } from '../../../../shared_imports'; @@ -478,106 +476,8 @@ export const schema: FormSchema = { }, ], }, - newTermsFields: { - type: FIELD_TYPES.COMBO_BOX, - label: i18n.translate( - 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.newTermsFieldsLabel', - { - defaultMessage: 'Fields', - } - ), - helpText: i18n.translate( - 'xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldNewTermsFieldHelpText', - { - defaultMessage: 'Select a field to check for new terms.', - } - ), - validations: [ - { - validator: ( - ...args: Parameters - ): ReturnType> | undefined => { - const [{ formData }] = args; - const needsValidation = isNewTermsRule(formData.ruleType); - if (!needsValidation) { - return; - } - - return fieldValidators.emptyField( - i18n.translate( - 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.newTermsFieldsMin', - { - defaultMessage: 'A minimum of one field is required.', - } - ) - )(...args); - }, - }, - { - validator: ( - ...args: Parameters - ): ReturnType> | undefined => { - const [{ formData }] = args; - const needsValidation = isNewTermsRule(formData.ruleType); - if (!needsValidation) { - return; - } - return fieldValidators.maxLengthField({ - length: MAX_NUMBER_OF_NEW_TERMS_FIELDS, - message: i18n.translate( - 'xpack.securitySolution.detectionEngine.validations.stepDefineRule.newTermsFieldsMax', - { - defaultMessage: 'Number of fields must be 3 or less.', - } - ), - })(...args); - }, - }, - ], - }, - historyWindowSize: { - label: i18n.translate( - 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.historyWindowSizeLabel', - { - defaultMessage: 'History Window Size', - } - ), - helpText: i18n.translate( - 'xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.historyWindowSizeHelpText', - { - defaultMessage: "New terms rules only alert if terms don't appear in historical data.", - } - ), - validations: [ - { - validator: ( - ...args: Parameters - ): ReturnType> | undefined => { - const [{ path, formData }] = args; - const needsValidation = isNewTermsRule(formData.ruleType); - - if (!needsValidation) { - return; - } - - const filterTimeVal = formData.historyWindowSize.match(/\d+/g); - - if (filterTimeVal <= 0) { - return { - code: 'ERR_MIN_LENGTH', - path, - message: i18n.translate( - 'xpack.securitySolution.detectionEngine.validations.stepDefineRule.historyWindowSize.errMin', - { - defaultMessage: 'History window size must be greater than 0.', - } - ), - }; - } - }, - }, - ], - }, + newTermsFields: {}, + historyWindowSize: {}, [ALERT_SUPPRESSION_FIELDS_FIELD_NAME]: { validations: [ { diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/use_persistent_new_terms_state.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/use_persistent_new_terms_state.tsx new file mode 100644 index 000000000000..61bfa45ba8a7 --- /dev/null +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/use_persistent_new_terms_state.tsx @@ -0,0 +1,73 @@ +/* + * 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 { useEffect, useRef } from 'react'; +import usePrevious from 'react-use/lib/usePrevious'; +import { isNewTermsRule } from '../../../../../common/detection_engine/utils'; +import type { FormHook } from '../../../../shared_imports'; +import { useFormData } from '../../../../shared_imports'; +import { type DefineStepRule } from '../../../../detections/pages/detection_engine/rules/types'; +import { + type NewTermsFields, + type HistoryWindowStart, +} from '../../../../../common/api/detection_engine'; + +interface UsePersistentNewTermsStateParams { + form: FormHook; + ruleTypePath: string; + newTermsFieldsPath: string; + historyWindowStartPath: string; +} + +interface LastNewTermsState { + newTermsFields: NewTermsFields; + historyWindowStart: HistoryWindowStart; +} + +export function usePersistentNewTermsState({ + form, + ruleTypePath, + newTermsFieldsPath, + historyWindowStartPath, +}: UsePersistentNewTermsStateParams): void { + const lastNewTermsState = useRef(); + const [formData] = useFormData({ form, watch: [newTermsFieldsPath, historyWindowStartPath] }); + + const { + [ruleTypePath]: ruleType, + [newTermsFieldsPath]: newTermsFields, + [historyWindowStartPath]: historyWindowStart, + } = formData; + const previousRuleType = usePrevious(ruleType); + + useEffect(() => { + if ( + isNewTermsRule(ruleType) && + !isNewTermsRule(previousRuleType) && + lastNewTermsState.current + ) { + form.updateFieldValues({ + [newTermsFieldsPath]: lastNewTermsState.current.newTermsFields, + [historyWindowStartPath]: lastNewTermsState.current.historyWindowStart, + }); + + return; + } + + if (isNewTermsRule(ruleType)) { + lastNewTermsState.current = { newTermsFields, historyWindowStart }; + } + }, [ + form, + ruleType, + previousRuleType, + newTermsFieldsPath, + historyWindowStartPath, + newTermsFields, + historyWindowStart, + ]); +} diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_schedule_rule/index.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_schedule_rule/index.tsx index 2197b069de40..7c309ed32a68 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_schedule_rule/index.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_schedule_rule/index.tsx @@ -13,11 +13,11 @@ import type { ScheduleStepRule, } from '../../../../detections/pages/detection_engine/rules/types'; import { StepRuleDescription } from '../description_step'; -import { ScheduleItem } from '../../../rule_creation/components/schedule_item_form'; import { Form, UseField } from '../../../../shared_imports'; import type { FormHook } from '../../../../shared_imports'; import { StepContentWrapper } from '../../../rule_creation/components/step_content_wrapper'; import { schema } from './schema'; +import { ScheduleItemField } from '../../../rule_creation/components/schedule_item_field'; const StyledForm = styled(Form)` max-width: 235px !important; @@ -43,7 +43,7 @@ const StepScheduleRuleComponent: FC = ({ = ({ /> { const timeObj: { unit: Unit; value: number } = { @@ -530,7 +531,7 @@ export const formatDefineStepData = (defineStepData: DefineStepRule): DefineStep query: ruleFields.queryBar?.query?.query as string, required_fields: requiredFields, new_terms_fields: ruleFields.newTermsFields, - history_window_start: `now-${ruleFields.historyWindowSize}`, + history_window_start: convertDurationToDateMath(ruleFields.historyWindowSize), ...alertSuppressionFields, } : isEsqlFields(ruleFields) && !('index' in ruleFields) diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_definition_section.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_definition_section.tsx index 177ff4e18d42..de4fce3da368 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_definition_section.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_definition_section.tsx @@ -41,7 +41,6 @@ import { useGetSavedQuery } from '../../../../detections/pages/detection_engine/ import * as threatMatchI18n from '../../../../common/components/threat_match/translations'; import * as timelinesI18n from '../../../../timelines/components/timeline/translations'; import type { Duration } from '../../../../detections/pages/detection_engine/rules/types'; -import { convertHistoryStartToSize } from '../../../../detections/pages/detection_engine/rules/helpers'; import { MlJobsDescription } from '../../../rule_creation/components/ml_jobs_description/ml_jobs_description'; import { MlJobLink } from '../../../rule_creation/components/ml_job_link/ml_job_link'; import { useSecurityJobs } from '../../../../common/components/ml_popover/hooks/use_security_jobs'; @@ -58,6 +57,8 @@ import { } from './rule_definition_section.styles'; import { getQueryLanguageLabel } from './helpers'; import { useDefaultIndexPattern } from '../../hooks/use_default_index_pattern'; +import { convertDateMathToDuration } from '../../../../common/utils/date_math'; +import { DEFAULT_HISTORY_WINDOW_SIZE } from '../../../../common/constants'; import { EQL_OPTIONS_EVENT_CATEGORY_FIELD_LABEL, EQL_OPTIONS_EVENT_TIEBREAKER_FIELD_LABEL, @@ -435,7 +436,9 @@ interface HistoryWindowSizeProps { } export const HistoryWindowSize = ({ historyWindowStart }: HistoryWindowSizeProps) => { - const size = historyWindowStart ? convertHistoryStartToSize(historyWindowStart) : '7d'; + const size = historyWindowStart + ? convertDateMathToDuration(historyWindowStart) + : DEFAULT_HISTORY_WINDOW_SIZE; return ( diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/history_window_start/history_window_start_edit_adapter.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/history_window_start/history_window_start_edit_adapter.tsx new file mode 100644 index 000000000000..084a81e3b959 --- /dev/null +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/history_window_start/history_window_start_edit_adapter.tsx @@ -0,0 +1,13 @@ +/* + * 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 React from 'react'; +import { HistoryWindowStartEdit } from '../../../../../../../rule_creation/components/history_window_start_edit'; + +export function HistoryWindowStartEditAdapter(): JSX.Element { + return ; +} diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/history_window_start/history_window_start_edit_form.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/history_window_start/history_window_start_edit_form.tsx new file mode 100644 index 000000000000..87ac2fee64e7 --- /dev/null +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/history_window_start/history_window_start_edit_form.tsx @@ -0,0 +1,48 @@ +/* + * 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 React from 'react'; +import { type FormData } from '../../../../../../../../shared_imports'; +import { HistoryWindowStartEditAdapter } from './history_window_start_edit_adapter'; +import type { HistoryWindowStart } from '../../../../../../../../../common/api/detection_engine'; +import { + convertDurationToDateMath, + convertDateMathToDuration, +} from '../../../../../../../../common/utils/date_math'; +import { DEFAULT_HISTORY_WINDOW_SIZE } from '../../../../../../../../common/constants'; +import { RuleFieldEditFormWrapper } from '../../../field_final_side'; + +export function HistoryWindowStartEditForm(): JSX.Element { + return ( + + ); +} + +interface HistoryWindowFormData { + historyWindowSize: HistoryWindowStart; +} + +function deserializer(defaultValue: FormData): HistoryWindowFormData { + return { + historyWindowSize: defaultValue.history_window_start + ? convertDateMathToDuration(defaultValue.history_window_start) + : DEFAULT_HISTORY_WINDOW_SIZE, + }; +} + +function serializer(formData: FormData): { history_window_start: HistoryWindowStart } { + return { + history_window_start: convertDurationToDateMath(formData.historyWindowSize), + }; +} + +const schema = {}; diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/new_terms_fields/new_terms_fields_edit_adapter.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/new_terms_fields/new_terms_fields_edit_adapter.tsx new file mode 100644 index 000000000000..476bf9869bd9 --- /dev/null +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/new_terms_fields/new_terms_fields_edit_adapter.tsx @@ -0,0 +1,26 @@ +/* + * 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 React from 'react'; +import { NewTermsFieldsEdit } from '../../../../../../../rule_creation/components/new_terms_fields_edit'; +import { useDiffableRuleDataView } from '../hooks/use_diffable_rule_data_view'; +import type { DiffableRule } from '../../../../../../../../../common/api/detection_engine'; +import { useTermsAggregationFields } from '../../../../../../../../common/hooks/use_terms_aggregation_fields'; + +interface NewTermsFieldsEditAdapterProps { + finalDiffableRule: DiffableRule; +} + +export function NewTermsFieldsEditAdapter({ + finalDiffableRule, +}: NewTermsFieldsEditAdapterProps): JSX.Element { + const { dataView } = useDiffableRuleDataView(finalDiffableRule); + const termsAggregationFields = useTermsAggregationFields(dataView?.fields ?? []); + const fieldNames = termsAggregationFields.map((field) => field.name); + + return ; +} diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/new_terms_fields/new_terms_fields_edit_form.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/new_terms_fields/new_terms_fields_edit_form.tsx new file mode 100644 index 000000000000..9b8d709b27f0 --- /dev/null +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/new_terms_fields/new_terms_fields_edit_form.tsx @@ -0,0 +1,18 @@ +/* + * 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 React from 'react'; +import { RuleFieldEditFormWrapper } from '../../../field_final_side'; +import { NewTermsFieldsEditAdapter } from './new_terms_fields_edit_adapter'; + +export function NewTermsFieldsEditForm(): JSX.Element { + return ( + + ); +} + +const schema = {}; diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/rule_schedule.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/rule_schedule.tsx index 12e7bbea9a20..3acd7c3050fb 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/rule_schedule.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/rule_schedule.tsx @@ -10,8 +10,8 @@ import { parseDuration } from '@kbn/alerting-plugin/common'; import { type FormSchema, type FormData, UseField } from '../../../../../../../shared_imports'; import { schema } from '../../../../../../rule_creation_ui/components/step_schedule_rule/schema'; import type { RuleSchedule } from '../../../../../../../../common/api/detection_engine'; -import { ScheduleItem } from '../../../../../../rule_creation/components/schedule_item_form'; import { secondsToDurationString } from '../../../../../../../detections/pages/detection_engine/rules/helpers'; +import { ScheduleItemField } from '../../../../../../rule_creation/components/schedule_item_field'; export const ruleScheduleSchema = { interval: schema.interval, @@ -28,8 +28,8 @@ const componentProps = { export function RuleScheduleEdit(): JSX.Element { return ( <> - - + + ); } diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/new_terms_rule_field_edit.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/new_terms_rule_field_edit.tsx index e2860d431aff..f47607abe384 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/new_terms_rule_field_edit.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/new_terms_rule_field_edit.tsx @@ -7,9 +7,12 @@ import React from 'react'; import type { UpgradeableNewTermsFields } from '../../../../model/prebuilt_rule_upgrade/fields'; -import { KqlQueryEditForm } from './fields/kql_query'; -import { DataSourceEditForm } from './fields/data_source'; import { AlertSuppressionEditForm } from './fields/alert_suppression'; +import { DataSourceEditForm } from './fields/data_source'; +import { HistoryWindowStartEditForm } from './fields/history_window_start/history_window_start_edit_form'; +import { KqlQueryEditForm } from './fields/kql_query'; +import { NewTermsFieldsEditForm } from './fields/new_terms_fields/new_terms_fields_edit_form'; +import { assertUnreachable } from '../../../../../../../common/utility_types'; interface NewTermsRuleFieldEditProps { fieldName: UpgradeableNewTermsFields; @@ -17,13 +20,17 @@ interface NewTermsRuleFieldEditProps { export function NewTermsRuleFieldEdit({ fieldName }: NewTermsRuleFieldEditProps) { switch (fieldName) { - case 'kql_query': - return ; - case 'data_source': - return ; case 'alert_suppression': return ; + case 'data_source': + return ; + case 'history_window_start': + return ; + case 'kql_query': + return ; + case 'new_terms_fields': + return ; default: - return null; // Will be replaced with `assertUnreachable(fieldName)` once all fields are implemented + return assertUnreachable(fieldName); } } diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/forms/schedule_form.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/forms/schedule_form.tsx index 88e1411a5e0b..518c18a59a41 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/forms/schedule_form.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/forms/schedule_form.tsx @@ -9,11 +9,11 @@ import { EuiCallOut } from '@elastic/eui'; import React, { useCallback } from 'react'; import type { BulkActionEditPayload } from '../../../../../../../common/api/detection_engine/rule_management'; import { BulkActionEditTypeEnum } from '../../../../../../../common/api/detection_engine/rule_management'; -import { ScheduleItem } from '../../../../../rule_creation/components/schedule_item_form'; import type { FormSchema } from '../../../../../../shared_imports'; import { UseField, useForm } from '../../../../../../shared_imports'; import { bulkSetSchedule as i18n } from '../translations'; import { BulkEditFormWrapper } from './bulk_edit_form_wrapper'; +import { ScheduleItemField } from '../../../../../rule_creation/components/schedule_item_field'; export interface ScheduleFormData { interval: string; @@ -79,7 +79,7 @@ export const ScheduleForm = ({ rulesCount, onClose, onConfirm }: ScheduleFormCom > ({ newTermsFields: ('new_terms_fields' in rule && rule.new_terms_fields) || [], historyWindowSize: 'history_window_start' in rule && rule.history_window_start - ? convertHistoryStartToSize(rule.history_window_start) - : '7d', + ? convertDateMathToDuration(rule.history_window_start) + : DEFAULT_HISTORY_WINDOW_SIZE, shouldLoadQueryDynamically: Boolean(rule.type === 'saved_query' && rule.saved_id), [ALERT_SUPPRESSION_FIELDS_FIELD_NAME]: ('alert_suppression' in rule && @@ -189,14 +191,6 @@ export const getDefineStepsData = (rule: RuleResponse): DefineStepRule => ({ ), }); -export const convertHistoryStartToSize = (relativeTime: string) => { - if (relativeTime.startsWith('now-')) { - return relativeTime.substring(4); - } else { - return relativeTime; - } -}; - export const getScheduleStepsData = (rule: RuleResponse): ScheduleStepRule => { const { interval, from } = rule; const fromHumanizedValue = getHumanizedDuration(from, interval); diff --git a/x-pack/test/security_solution_cypress/cypress/screens/create_new_rule.ts b/x-pack/test/security_solution_cypress/cypress/screens/create_new_rule.ts index 903b463d6f58..483cbf06b625 100644 --- a/x-pack/test/security_solution_cypress/cypress/screens/create_new_rule.ts +++ b/x-pack/test/security_solution_cypress/cypress/screens/create_new_rule.ts @@ -275,10 +275,10 @@ export const ESQL_QUERY_BAR = '[data-test-subj="ruleEsqlQueryBar"]'; export const NEW_TERMS_INPUT_AREA = '[data-test-subj="newTermsInput"]'; export const NEW_TERMS_HISTORY_SIZE = - '[data-test-subj="detectionEngineStepDefineRuleHistoryWindowSize"] [data-test-subj="interval"]'; + '[data-test-subj="historyWindowSize"] [data-test-subj="interval"]'; export const NEW_TERMS_HISTORY_TIME_TYPE = - '[data-test-subj="detectionEngineStepDefineRuleHistoryWindowSize"] [data-test-subj="timeType"]'; + '[data-test-subj="historyWindowSize"] [data-test-subj="timeType"]'; export const LOAD_QUERY_DYNAMICALLY_CHECKBOX = '[data-test-subj="detectionEngineStepDefineRuleShouldLoadQueryDynamically"] input'; From fb0cb57b4fa039ed5be9a03f70df38d423c6a502 Mon Sep 17 00:00:00 2001 From: Miriam <31922082+MiriamAparicio@users.noreply.github.com> Date: Wed, 18 Dec 2024 17:13:24 +0000 Subject: [PATCH 55/60] [ObsUX] [APM] Migrate APM from styled-components to @emotion (#204222) Closes https://github.com/elastic/kibana/issues/202765 ### Summary While working on the visual refresh for the new EUI theme Borealis we figured that was a good time to do the recommended migration from `styled-components` to `@emotion` ### What has been done - Migrate apm plugin from `styled-components` to `@emotion` - Eui Visual Refresh for Borealis new theme - All usage of color palette tokens and functions now pull from the theme, and correctly update to use new colors when the theme changes from Borealis to Amsterdam and vice versa - All references to renamed tokens have been updated to use the new token name - Remove usage of deprecated `useEuiBackgroundColor` - All usages of "success" colors have been updated to `accentSecondary` and `textAccentSecondary` as needed ### Not this time There are some color values on the server side, and the values are static they would not update properly as dynamic tokens do. Eui guidance right now is to keep these as they are for now (meaning to keep using the JSON tokens). ### How to test #### Running Kibana with the Borealis theme In order to run Kibana with Borealis, you'll need to do the following: - Set the following in kibana.dev.yml: uiSettings.experimental.themeSwitcherEnabled: true - Run Kibana with the following environment variable set: KBN_OPTIMIZER_THEMES="borealislight,borealisdark,v8light,v8dark" yarn start - This will expose a toggle under Stack Management > Advanced Settings > Theme version, which you can use to toggle between Amsterdam and Borealis. --- .../styled_components_files.js | 4 +- x-pack/.gitignore | 1 + .../apm/common/service_health_status.ts | 28 +-- .../get_apm_timeseries.tsx | 185 +++++++++--------- .../ui_components/chart_preview/index.tsx | 12 +- .../context_popover/field_stats_popover.tsx | 10 +- .../app/correlations/correlations_table.tsx | 7 +- .../failed_transactions_correlations.tsx | 8 +- ...get_transaction_distribution_chart_data.ts | 10 +- .../app/correlations/latency_correlations.tsx | 4 +- ...ependency_operation_distribution_chart.tsx | 8 +- .../entities/entity_link/entity_link.test.tsx | 5 +- .../app/entities/entity_link/index.tsx | 14 +- .../distribution/index.tsx | 7 +- .../error_sampler/error_sample_detail.tsx | 6 +- .../exception_stacktrace.test.tsx | 17 +- .../error_sampler/sample_summary.tsx | 12 +- .../error_group_list/index.tsx | 18 +- .../app/help_popover/help_popover.tsx | 4 +- .../infra_tabs/empty_prompt.tsx | 7 +- .../metrics/jvm_metrics_overview/index.tsx | 4 +- .../serverless_function_name_link.tsx | 6 +- .../serverless_metrics/serverless_summary.tsx | 4 +- .../service_node_metrics/index.tsx | 4 +- .../crash_group_list.test.tsx | 4 +- .../crash_group_list/index.tsx | 14 +- .../error_group_list.test.tsx | 4 +- .../error_group_list/index.tsx | 14 +- .../service_overview/stats/location_stats.tsx | 13 +- .../mobile/service_overview/stats/stats.tsx | 13 +- .../service_dashboards/empty_dashboards.tsx | 7 +- .../service_group_save/select_services.tsx | 2 +- .../service_list/health_badge.tsx | 7 +- .../app/service_map/controls.test.tsx | 11 +- .../components/app/service_map/controls.tsx | 31 ++- .../components/app/service_map/cytoscape.tsx | 8 +- .../app/service_map/cytoscape_options.ts | 93 +++++---- .../app/service_map/empty_banner.tsx | 18 +- .../components/app/service_map/index.tsx | 7 +- .../service_map/popover/anomaly_detection.tsx | 33 ++-- .../popover/externals_list_contents.tsx | 4 +- .../app/service_map/popover/index.tsx | 8 +- .../app/service_map/popover/popover.test.tsx | 11 +- .../service_map/popover/resource_contents.tsx | 8 +- .../use_cytoscape_event_handlers.test.tsx | 49 ++--- .../use_cytoscape_event_handlers.ts | 18 +- .../service_overview.test.tsx | 5 +- .../intance_details.tsx | 9 +- .../agent_configurations/list/index.tsx | 20 +- .../delete_button.tsx | 7 +- .../app/storage_explorer/summary_stats.tsx | 2 +- .../app/top_traces_overview/trace_list.tsx | 8 +- .../components/app/trace_link/index.tsx | 4 +- ...use_transaction_distribution_chart_data.ts | 4 +- .../waterfall/accordion_waterfall.tsx | 65 +++--- .../waterfall/failure_badge.tsx | 15 +- .../waterfall_container/waterfall/index.tsx | 21 +- .../waterfall/responsive_flyout.tsx | 17 +- .../waterfall/span_flyout/index.tsx | 6 +- .../span_flyout/truncate_height_section.tsx | 6 +- .../waterfall/waterfall_item.tsx | 41 ++-- .../waterfall_container.test.tsx | 6 +- .../components/app/transaction_link/index.tsx | 16 +- .../agent_instructions_accordion.tsx | 2 +- .../settings_form/form_row_setting.tsx | 2 +- .../anomaly_detection_setup_link.tsx | 11 +- .../components/routing/app_root/index.tsx | 28 +-- .../shared/charts/breakdown_chart/index.tsx | 7 +- .../duration_distribution_chart/index.tsx | 11 +- .../helper/get_chart_anomaly_timeseries.tsx | 8 +- .../custom_tooltip.tsx | 19 +- .../index.tsx | 15 +- .../shared/charts/spark_plot/index.tsx | 9 +- .../__snapshots__/timeline.test.tsx.snap | 155 ++++----------- .../shared/charts/timeline/legend.tsx | 16 +- .../marker/__snapshots__/index.test.tsx.snap | 8 +- .../charts/timeline/marker/agent_marker.tsx | 21 +- .../charts/timeline/marker/error_marker.tsx | 23 ++- .../shared/charts/timeline/marker/index.tsx | 4 +- .../shared/charts/timeline/timeline_axis.tsx | 8 +- .../shared/charts/timeline/vertical_lines.tsx | 10 +- .../shared/charts/timeseries_chart.tsx | 12 +- .../charts/timeseries_chart_with_context.tsx | 7 +- .../charts/transaction_charts/ml_header.tsx | 10 +- .../index.tsx | 16 +- .../shared/errors_table/get_columns.tsx | 4 +- .../shared/key_value_filter_list/index.tsx | 5 +- .../key_value_table/formatted_value.tsx | 6 +- .../shared/kuery_bar/typeahead/suggestion.js | 49 ++--- .../shared/kuery_bar/typeahead/suggestions.js | 18 +- .../shared/links/apm/service_link/index.tsx | 6 +- .../shared/links/dependency_link.tsx | 8 +- .../shared/overview_table_container/index.tsx | 4 +- .../components/shared/service_icons/index.tsx | 10 +- .../shared/stacktrace/cause_stacktrace.tsx | 24 +-- .../components/shared/stacktrace/context.tsx | 40 ++-- .../shared/stacktrace/frame_heading.tsx | 19 +- .../shared/stacktrace/library_stacktrace.tsx | 6 +- .../shared/stacktrace/stackframe.tsx | 16 +- .../shared/stacktrace/variables.tsx | 12 +- .../sticky_properties.test.tsx.snap | 20 +- .../shared/sticky_properties/index.tsx | 20 +- .../sticky_properties.test.tsx | 2 +- .../error_count_summary_item_badge.tsx | 7 +- .../http_info_summary_item.test.tsx | 2 +- .../summary/http_info_summary_item/index.tsx | 10 +- .../summary/user_agent_summary_item.tsx | 8 +- .../shared/time_comparison/index.test.tsx | 2 +- .../shared/time_comparison/index.tsx | 8 +- .../shared/transaction_type_select.tsx | 2 +- .../shared/truncate_with_tooltip/index.tsx | 6 +- .../public/embeddable/embeddable_context.tsx | 25 ++- .../apm/public/hooks/use_theme.tsx | 15 -- .../public/tutorial/config_agent/index.tsx | 2 +- .../tutorial_fleet_instructions/index.tsx | 2 +- .../apm/public/utils/test_helpers.tsx | 14 +- .../observability_solution/infra/emotion.d.ts | 14 -- .../logging/log_minimap/density_chart.tsx | 5 +- .../logging/log_minimap/log_minimap.tsx | 3 +- .../logging/log_minimap/time_ruler.tsx | 4 +- .../infra/tsconfig.json | 1 - .../public/hooks/use_chart_theme.tsx | 10 +- 122 files changed, 866 insertions(+), 959 deletions(-) delete mode 100644 x-pack/plugins/observability_solution/apm/public/hooks/use_theme.tsx delete mode 100644 x-pack/plugins/observability_solution/infra/emotion.d.ts diff --git a/packages/kbn-babel-preset/styled_components_files.js b/packages/kbn-babel-preset/styled_components_files.js index 60dbb2b1053d..6f6e1ddbb14a 100644 --- a/packages/kbn-babel-preset/styled_components_files.js +++ b/packages/kbn-babel-preset/styled_components_files.js @@ -16,8 +16,8 @@ module.exports = { /packages[\/\\]kbn-ui-shared-deps-(npm|src)[\/\\]/, /src[\/\\]plugins[\/\\](kibana_react)[\/\\]/, /x-pack[\/\\]solutions[\/\\]observability[\/\\]plugins[\/\\](exploratory_view|investigate|investigate_app|observability|observability_ai_assistant_app|observability_ai_assistant_management|observability_solution|serverless_observability|streams|streams_app|synthetics|uptime|ux)[\/\\]/, - /x-pack[\/\\]plugins[\/\\](observability_solution\/apm|beats_management|fleet|observability_solution\/observability|observability_solution\/observability_shared|observability_solution\/exploratory_view|security_solution|timelines|observability_solution\/synthetics|observability_solution\/ux|observability_solution\/uptime)[\/\\]/, - /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\](observability_solution\/apm|beats_management|fleet|observability_solution\/infra|lists|observability_solution\/observability|observability_solution\/observability_shared|observability_solution\/exploratory_view|security_solution|timelines|observability_solution\/synthetics|observability_solution\/ux|observability_solution\/uptime)[\/\\]/, + /x-pack[\/\\]plugins[\/\\](beats_management|fleet|observability_solution\/observability|observability_solution\/observability_shared|observability_solution\/exploratory_view|security_solution|timelines|observability_solution\/synthetics|observability_solution\/ux|observability_solution\/uptime)[\/\\]/, + /x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\](beats_management|fleet|lists|observability_solution\/observability|observability_solution\/observability_shared|observability_solution\/exploratory_view|security_solution|timelines|observability_solution\/synthetics|observability_solution\/ux|observability_solution\/uptime)[\/\\]/, /x-pack[\/\\]test[\/\\]plugin_functional[\/\\]plugins[\/\\]resolver_test[\/\\]/, /x-pack[\/\\]packages[\/\\]elastic_assistant[\/\\]/, /x-pack[\/\\]solutions[\/\\]security[\/\\]packages[\/\\]ecs_data_quality_dashboard[\/\\]/, diff --git a/x-pack/.gitignore b/x-pack/.gitignore index 918a6a7d1c38..a5ef4968bd3b 100644 --- a/x-pack/.gitignore +++ b/x-pack/.gitignore @@ -7,6 +7,7 @@ /test/reporting/configs/failure_debug/ /plugins/reporting/.chromium/ /platform/plugins/shared/screenshotting/chromium/ +/plugins/screenshotting/chromium/ /plugins/reporting/.phantom/ /.aws-config.json /.env diff --git a/x-pack/plugins/observability_solution/apm/common/service_health_status.ts b/x-pack/plugins/observability_solution/apm/common/service_health_status.ts index 7f5530aa7fa0..65427caba747 100644 --- a/x-pack/plugins/observability_solution/apm/common/service_health_status.ts +++ b/x-pack/plugins/observability_solution/apm/common/service_health_status.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { EuiTheme } from '@kbn/kibana-react-plugin/common'; +import type { EuiThemeComputed } from '@elastic/eui'; import { ML_ANOMALY_SEVERITY } from '@kbn/ml-anomaly-utils/anomaly_severity'; export enum ServiceHealthStatus { @@ -34,29 +34,35 @@ export function getServiceHealthStatus({ severity }: { severity: ML_ANOMALY_SEVE } } -export function getServiceHealthStatusColor(theme: EuiTheme, status: ServiceHealthStatus) { +export function getServiceHealthStatusColor( + euiTheme: EuiThemeComputed, + status: ServiceHealthStatus +) { switch (status) { case ServiceHealthStatus.healthy: - return theme.eui.euiColorVis0; + return euiTheme.colors.success; case ServiceHealthStatus.warning: - return theme.eui.euiColorVis5; + return euiTheme.colors.warning; case ServiceHealthStatus.critical: - return theme.eui.euiColorVis9; + return euiTheme.colors.danger; case ServiceHealthStatus.unknown: - return theme.eui.euiColorMediumShade; + return euiTheme.colors.mediumShade; } } -export function getServiceHealthStatusBadgeColor(theme: EuiTheme, status: ServiceHealthStatus) { +export function getServiceHealthStatusBadgeColor( + euiTheme: EuiThemeComputed, + status: ServiceHealthStatus +) { switch (status) { case ServiceHealthStatus.healthy: - return theme.eui.euiColorVis0_behindText; + return euiTheme.colors.success; case ServiceHealthStatus.warning: - return theme.eui.euiColorVis5_behindText; + return euiTheme.colors.warning; case ServiceHealthStatus.critical: - return theme.eui.euiColorVis9_behindText; + return euiTheme.colors.danger; case ServiceHealthStatus.unknown: - return theme.eui.euiColorMediumShade; + return euiTheme.colors.mediumShade; } } diff --git a/x-pack/plugins/observability_solution/apm/public/assistant_functions/get_apm_timeseries.tsx b/x-pack/plugins/observability_solution/apm/public/assistant_functions/get_apm_timeseries.tsx index 16d5d077a9b4..9c29bb936db8 100644 --- a/x-pack/plugins/observability_solution/apm/public/assistant_functions/get_apm_timeseries.tsx +++ b/x-pack/plugins/observability_solution/apm/public/assistant_functions/get_apm_timeseries.tsx @@ -20,7 +20,6 @@ import type { GetApmTimeseriesFunctionResponse, } from '../../server/assistant_functions/get_apm_timeseries'; import { Coordinate, TimeSeries } from '../../typings/timeseries'; -import { ApmThemeProvider } from '../components/routing/app_root'; import { ChartType, getTimeSeriesColor, @@ -54,101 +53,99 @@ export function registerGetApmTimeseriesFunction({ return ( - - - {Object.values(groupedSeries).map((groupSeries) => { - const groupId = groupSeries[0].group; - - const maxY = getMaxY(groupSeries); - const latencyFormatter = getDurationFormatter(maxY, 10, 1000); - - let yLabelFormat: (value: number) => string; - - const firstStat = groupSeries[0].stat; - - switch (firstStat.timeseries.name) { - case 'transaction_throughput': - case 'exit_span_throughput': - case 'error_event_rate': - yLabelFormat = asTransactionRate; - break; - - case 'transaction_latency': - case 'exit_span_latency': - yLabelFormat = getResponseTimeTickFormatter(latencyFormatter); - break; - - case 'transaction_failure_rate': - case 'exit_span_failure_rate': - yLabelFormat = (y) => asPercent(y || 0, 100); - break; - } - - const timeseries: Array> = groupSeries.map( - (series): TimeSeries => { - let chartType: ChartType; - - const data = series.data; - - switch (series.stat.timeseries.name) { - case 'transaction_throughput': - case 'exit_span_throughput': - chartType = ChartType.THROUGHPUT; - break; - - case 'transaction_failure_rate': - case 'exit_span_failure_rate': - chartType = ChartType.FAILED_TRANSACTION_RATE; - break; - - case 'transaction_latency': - if (series.stat.timeseries.function === LatencyAggregationType.p99) { - chartType = ChartType.LATENCY_P99; - } else if (series.stat.timeseries.function === LatencyAggregationType.p95) { - chartType = ChartType.LATENCY_P95; - } else { - chartType = ChartType.LATENCY_AVG; - } - break; - - case 'exit_span_latency': + + {Object.values(groupedSeries).map((groupSeries) => { + const groupId = groupSeries[0].group; + + const maxY = getMaxY(groupSeries); + const latencyFormatter = getDurationFormatter(maxY, 10, 1000); + + let yLabelFormat: (value: number) => string; + + const firstStat = groupSeries[0].stat; + + switch (firstStat.timeseries.name) { + case 'transaction_throughput': + case 'exit_span_throughput': + case 'error_event_rate': + yLabelFormat = asTransactionRate; + break; + + case 'transaction_latency': + case 'exit_span_latency': + yLabelFormat = getResponseTimeTickFormatter(latencyFormatter); + break; + + case 'transaction_failure_rate': + case 'exit_span_failure_rate': + yLabelFormat = (y) => asPercent(y || 0, 100); + break; + } + + const timeseries: Array> = groupSeries.map( + (series): TimeSeries => { + let chartType: ChartType; + + const data = series.data; + + switch (series.stat.timeseries.name) { + case 'transaction_throughput': + case 'exit_span_throughput': + chartType = ChartType.THROUGHPUT; + break; + + case 'transaction_failure_rate': + case 'exit_span_failure_rate': + chartType = ChartType.FAILED_TRANSACTION_RATE; + break; + + case 'transaction_latency': + if (series.stat.timeseries.function === LatencyAggregationType.p99) { + chartType = ChartType.LATENCY_P99; + } else if (series.stat.timeseries.function === LatencyAggregationType.p95) { + chartType = ChartType.LATENCY_P95; + } else { chartType = ChartType.LATENCY_AVG; - break; - - case 'error_event_rate': - chartType = ChartType.ERROR_OCCURRENCES; - break; - } - - return { - title: series.id, - type: 'line', - color: getTimeSeriesColor(chartType!).currentPeriodColor, - data, - }; + } + break; + + case 'exit_span_latency': + chartType = ChartType.LATENCY_AVG; + break; + + case 'error_event_rate': + chartType = ChartType.ERROR_OCCURRENCES; + break; } - ); - - return ( - - - - {groupId} - - - - - ); - })} - - + + return { + title: series.id, + type: 'line', + color: getTimeSeriesColor(chartType!).currentPeriodColor, + data, + }; + } + ); + + return ( + + + + {groupId} + + + + + ); + })} + ); }); diff --git a/x-pack/plugins/observability_solution/apm/public/components/alerting/ui_components/chart_preview/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/alerting/ui_components/chart_preview/index.tsx index 8e7cce37b5be..0136fcfb88f3 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/alerting/ui_components/chart_preview/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/alerting/ui_components/chart_preview/index.tsx @@ -10,6 +10,8 @@ import { Axis, BarSeries, Chart, + LIGHT_THEME, + DARK_THEME, LineAnnotation, Position, RectAnnotation, @@ -20,7 +22,7 @@ import { Tooltip, niceTimeFormatter, } from '@elastic/charts'; -import { EuiSpacer } from '@elastic/eui'; +import { COLOR_MODES_STANDARD, EuiSpacer, useEuiTheme } from '@elastic/eui'; import React, { useMemo } from 'react'; import { IUiSettingsClient } from '@kbn/core/public'; import { TimeUnitChar } from '@kbn/observability-plugin/common'; @@ -28,7 +30,6 @@ import { UI_SETTINGS } from '@kbn/data-plugin/public'; import moment from 'moment'; import { i18n } from '@kbn/i18n'; import { Coordinate } from '../../../../../typings/timeseries'; -import { useTheme } from '../../../../hooks/use_theme'; import { getTimeZone } from '../../../shared/charts/helper/timezone'; import { TimeLabelForData, TIME_LABELS, getDomain } from './chart_preview_helper'; import { ALERT_PREVIEW_BUCKET_SIZE } from '../../utils/helper'; @@ -52,15 +53,15 @@ export function ChartPreview({ timeUnit = 'm', totalGroups, }: ChartPreviewProps) { - const theme = useTheme(); + const theme = useEuiTheme(); const thresholdOpacity = 0.3; const DEFAULT_DATE_FORMAT = 'Y-MM-DD HH:mm:ss'; const style = { - fill: theme.eui.euiColorVis2, + fill: theme.euiTheme.colors.vis.euiColorVis2, line: { strokeWidth: 2, - stroke: theme.eui.euiColorVis2, + stroke: theme.euiTheme.colors.vis.euiColorVis2, opacity: 1, }, opacity: thresholdOpacity, @@ -121,6 +122,7 @@ export function ChartPreview({ legendPosition={'bottom'} legendSize={legendSize} locale={i18n.getLocale()} + theme={theme.colorMode === COLOR_MODES_STANDARD.dark ? DARK_THEME : LIGHT_THEME} /> setInfoOpen(false), []); - const theme = useTheme(); + const { euiTheme } = useEuiTheme(); const params = useFetchParams(); @@ -280,7 +280,9 @@ export function FieldStatsPopover({ } )} data-test-subj={'apmCorrelationsContextPopoverButton'} - style={{ marginLeft: theme.eui.euiSizeXS }} + css={css` + margin-left: ${euiTheme.size.xs}; + `} /> ); diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/correlations/correlations_table.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/correlations/correlations_table.tsx index ea79b1ef198b..8524a29fb4b6 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/correlations/correlations_table.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/correlations/correlations_table.tsx @@ -7,13 +7,12 @@ import React, { useCallback, useMemo, useState } from 'react'; import { debounce } from 'lodash'; -import { EuiBasicTable, EuiBasicTableColumn } from '@elastic/eui'; +import { EuiBasicTable, EuiBasicTableColumn, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import type { EuiTableSortingType } from '@elastic/eui/src/components/basic_table/table_types'; import type { Criteria } from '@elastic/eui/src/components/basic_table/basic_table'; import { useUiTracker } from '@kbn/observability-shared-plugin/public'; import { FETCH_STATUS } from '../../../hooks/use_fetcher'; -import { useTheme } from '../../../hooks/use_theme'; import type { FieldValuePair } from '../../../../common/correlations/types'; const PAGINATION_SIZE_OPTIONS = [5, 10, 20, 50]; @@ -43,7 +42,7 @@ export function CorrelationsTable({ sorting, rowHeader, }: CorrelationsTableProps) { - const euiTheme = useTheme(); + const { euiTheme } = useEuiTheme(); const trackApmEvent = useUiTracker({ app: 'apm' }); const trackSelectSignificantCorrelationTerm = useCallback( () => debounce(() => trackApmEvent({ metric: 'select_significant_term' }), 1000), @@ -105,7 +104,7 @@ export function CorrelationsTable({ selectedTerm.fieldValue === term.fieldValue && selectedTerm.fieldName === term.fieldName ? { - backgroundColor: euiTheme.eui.euiColorLightestShade, + backgroundColor: euiTheme.colors.lightestShade, } : null, }; diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/correlations/failed_transactions_correlations.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/correlations/failed_transactions_correlations.tsx index d02eed810acd..e6c6ce65dfff 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/correlations/failed_transactions_correlations.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/correlations/failed_transactions_correlations.tsx @@ -18,6 +18,7 @@ import { EuiBadge, EuiSwitch, EuiIconTip, + useEuiTheme, } from '@elastic/eui'; import type { EuiTableSortingType } from '@elastic/eui/src/components/basic_table/table_types'; import type { Direction } from '@elastic/eui/src/services/sort/sort_direction'; @@ -34,7 +35,6 @@ import { FailedTransactionsCorrelation } from '../../../../common/correlations/f import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; import { useLocalStorage } from '../../../hooks/use_local_storage'; import { FETCH_STATUS } from '../../../hooks/use_fetcher'; -import { useTheme } from '../../../hooks/use_theme'; import { push } from '../../shared/links/url_helpers'; import { CorrelationsTable } from './correlations_table'; @@ -54,7 +54,7 @@ import { MIN_TAB_TITLE_HEIGHT } from '../../shared/charts/duration_distribution_ import { TotalDocCountLabel } from '../../shared/charts/duration_distribution_chart/total_doc_count_label'; export function FailedTransactionsCorrelations({ onFilter }: { onFilter: () => void }) { - const euiTheme = useTheme(); + const { euiTheme } = useEuiTheme(); const { core: { notifications }, @@ -456,7 +456,7 @@ export function FailedTransactionsCorrelations({ onFilter }: { onFilter: () => v style={{ display: 'flex', flexDirection: 'row', - paddingLeft: euiTheme.eui.euiSizeS, + paddingLeft: euiTheme.size.s, }} > v void }) { core: { notifications }, } = useApmPluginContext(); - const euiTheme = useTheme(); + const { euiTheme } = useEuiTheme(); const { progress, response, startFetch, cancelFetch } = useLatencyCorrelations(); const { overallHistogram, hasData, status } = getOverallHistogram(response, progress.isRunning); diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/dependency_operation_detail_view/dependency_operation_distribution_chart.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/dependency_operation_detail_view/dependency_operation_distribution_chart.tsx index 3f8b8728fd48..f7cd26fab3f8 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/dependency_operation_detail_view/dependency_operation_distribution_chart.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/dependency_operation_detail_view/dependency_operation_distribution_chart.tsx @@ -7,11 +7,11 @@ import { i18n } from '@kbn/i18n'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import React from 'react'; +import { useEuiTheme } from '@elastic/eui'; import { DEFAULT_PERCENTILE_THRESHOLD } from '../../../../common/correlations/constants'; import { useApmParams } from '../../../hooks/use_apm_params'; import { useFetcher } from '../../../hooks/use_fetcher'; import { useSampleChartSelection } from '../../../hooks/use_sample_chart_selection'; -import { useTheme } from '../../../hooks/use_theme'; import { useTimeRange } from '../../../hooks/use_time_range'; import { DurationDistributionChartData } from '../../shared/charts/duration_distribution_chart'; import { DurationDistributionChartWithScrubber } from '../../shared/charts/duration_distribution_chart_with_scrubber'; @@ -22,7 +22,7 @@ export function DependencyOperationDistributionChart() { // there is no "current" event in the dependency operation detail view const markerCurrentEvent = undefined; - const euiTheme = useTheme(); + const { euiTheme } = useEuiTheme(); const { query: { @@ -67,14 +67,14 @@ export function DependencyOperationDistributionChart() { const chartData: DurationDistributionChartData[] = [ { - areaSeriesColor: euiTheme.eui.euiColorVis1, + areaSeriesColor: euiTheme.colors.vis.euiColorVis1, histogram: data?.allSpansDistribution.overallHistogram ?? [], id: i18n.translate('xpack.apm.dependencyOperationDistributionChart.allSpansLegendLabel', { defaultMessage: 'All spans', }), }, { - areaSeriesColor: euiTheme.eui.euiColorVis7, + areaSeriesColor: euiTheme.colors.vis.euiColorVis7, histogram: data?.failedSpansDistribution?.overallHistogram ?? [], id: i18n.translate('xpack.apm.dependencyOperationDistributionChart.failedSpansLegendLabel', { defaultMessage: 'Failed spans', diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/entities/entity_link/entity_link.test.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/entities/entity_link/entity_link.test.tsx index 4515c2cdd571..7bbfb43af71b 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/entities/entity_link/entity_link.test.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/entities/entity_link/entity_link.test.tsx @@ -17,7 +17,6 @@ import { fromQuery } from '../../../shared/links/url_helpers'; import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { Redirect } from 'react-router-dom'; import { ApmPluginContextValue } from '../../../../context/apm_plugin/apm_plugin_context'; -import { ApmThemeProvider } from '../../../routing/app_root'; import * as useEntityCentricExperienceSetting from '../../../../hooks/use_entity_centric_experience_setting'; jest.mock('react-router-dom', () => ({ @@ -85,9 +84,7 @@ const renderEntityLink = ({ } as unknown as ApmPluginContextValue } > - - - + ); return { rerender, ...tools }; diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/entities/entity_link/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/entities/entity_link/index.tsx index 2ea10868957b..7ad5661159fd 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/entities/entity_link/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/entities/entity_link/index.tsx @@ -5,7 +5,14 @@ * 2.0. */ -import { EuiButtonEmpty, EuiEmptyPrompt, EuiImage, EuiLink, EuiLoadingSpinner } from '@elastic/eui'; +import { + EuiButtonEmpty, + EuiEmptyPrompt, + EuiImage, + EuiLink, + EuiLoadingSpinner, + useEuiTheme, +} from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { useKibana } from '@kbn/kibana-react-plugin/public'; @@ -18,7 +25,6 @@ import { useApmParams } from '../../../../hooks/use_apm_params'; import { useApmRouter } from '../../../../hooks/use_apm_router'; import { useEntityCentricExperienceSetting } from '../../../../hooks/use_entity_centric_experience_setting'; import { FETCH_STATUS, isPending, useFetcher } from '../../../../hooks/use_fetcher'; -import { useTheme } from '../../../../hooks/use_theme'; import { ApmPluginStartDeps } from '../../../../plugin'; const pageHeader = { @@ -27,7 +33,7 @@ const pageHeader = { export function EntityLink() { const router = useApmRouter({ prependBasePath: false }); - const theme = useTheme(); + const { colorMode } = useEuiTheme(); const { services } = useKibana(); const { observabilityShared, data } = services; const timeRange = data.query.timefilter.timefilter.getTime(); @@ -65,7 +71,7 @@ export function EntityLink() { icon={ } diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/error_group_details/distribution/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/error_group_details/distribution/index.tsx index b8902b30dcff..47101471a551 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/error_group_details/distribution/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/error_group_details/distribution/index.tsx @@ -18,14 +18,13 @@ import { DARK_THEME, LegendValue, } from '@elastic/charts'; -import { EuiTitle } from '@elastic/eui'; +import { EuiTitle, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; import { useLegacyUrlParams } from '../../../../context/url_params_context/use_url_params'; import { FETCH_STATUS } from '../../../../hooks/use_fetcher'; import { usePreviousPeriodLabel } from '../../../../hooks/use_previous_period_text'; -import { useTheme } from '../../../../hooks/use_theme'; import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { ChartContainer } from '../../../shared/charts/chart_container'; import { ChartType, getTimeSeriesColor } from '../../../shared/charts/helper/get_timeseries_color'; @@ -42,7 +41,7 @@ interface Props { export function ErrorDistribution({ distribution, title, fetchStatus }: Props) { const { core } = useApmPluginContext(); - const theme = useTheme(); + const { colorMode } = useEuiTheme(); const { urlParams } = useLegacyUrlParams(); const { comparisonEnabled } = urlParams; @@ -97,7 +96,7 @@ export function ErrorDistribution({ distribution, title, fetchStatus }: Props) { showLegend legendValues={[LegendValue.CurrentAndLastValue]} legendPosition={Position.Bottom} - theme={theme.darkMode ? DARK_THEME : LIGHT_THEME} + theme={colorMode === 'DARK' ? DARK_THEME : LIGHT_THEME} locale={i18n.getLocale()} /> theme.eui.euiSizeS}; +const TransactionLinkName = styled.div` + margin-left: ${({ theme }) => theme.euiTheme.size.s}; display: inline-block; vertical-align: middle; `; diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/error_group_details/error_sampler/exception_stacktrace.test.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/error_group_details/error_sampler/exception_stacktrace.test.tsx index a4c23555edda..3740edcbfe7d 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/error_group_details/error_sampler/exception_stacktrace.test.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/error_group_details/error_sampler/exception_stacktrace.test.tsx @@ -8,6 +8,7 @@ import { composeStories } from '@storybook/testing-react'; import React from 'react'; import { mount } from 'enzyme'; +import { EuiThemeProvider } from '@elastic/eui'; import * as stories from './exception_stacktrace.stories'; import { ExceptionStackTraceTitleProps } from './exception_stacktrace_title'; @@ -17,10 +18,16 @@ describe('ExceptionStacktrace', () => { describe('render', () => { describe('with stacktraces', () => { it('renders the stacktraces', () => { - expect(mount().find('Stacktrace')).toHaveLength(3); + expect( + mount(, { + wrappingComponent: EuiThemeProvider, + }).find('Stacktrace') + ).toHaveLength(3); }); it('should have the title in a specific format', function () { - const wrapper = mount().find('ExceptionStacktraceTitle'); + const wrapper = mount(, { + wrappingComponent: EuiThemeProvider, + }).find('ExceptionStacktraceTitle'); expect(wrapper).toHaveLength(1); const { type, message } = wrapper.props() as ExceptionStackTraceTitleProps; expect(wrapper.text()).toContain(`${type}: ${message}`); @@ -29,7 +36,11 @@ describe('ExceptionStacktrace', () => { describe('with more than one stack trace', () => { it('renders cause stacktraces', () => { - expect(mount().find('CauseStacktrace')).toHaveLength(2); + expect( + mount(, { + wrappingComponent: EuiThemeProvider, + }).find('CauseStacktrace') + ).toHaveLength(2); }); }); }); diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/error_group_details/error_sampler/sample_summary.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/error_group_details/error_sampler/sample_summary.tsx index c7acbfee7e45..40d9a21bee35 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/error_group_details/error_sampler/sample_summary.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/error_group_details/error_sampler/sample_summary.tsx @@ -4,17 +4,17 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { EuiText, EuiSpacer, EuiCodeBlock } from '@elastic/eui'; +import { EuiText, EuiSpacer, EuiCodeBlock, useEuiFontSize } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { APMError } from '../../../../../typings/es_schemas/ui/apm_error'; import { NOT_AVAILABLE_LABEL } from '../../../../../common/i18n'; -const Label = euiStyled.div` - margin-bottom: ${({ theme }) => theme.eui.euiSizeXS}; - font-size: ${({ theme }) => theme.eui.euiFontSizeS}; - color: ${({ theme }) => theme.eui.euiColorDarkestShade}; +const Label = styled.div` + margin-bottom: ${({ theme }) => theme.euiTheme.size.xs}; + font-size: ${() => useEuiFontSize('s').fontSize}; + color: ${({ theme }) => theme.euiTheme.colors.darkestShade}; `; interface Props { diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/error_group_overview/error_group_list/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/error_group_overview/error_group_list/index.tsx index 51377d5e3770..c6593806191f 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/error_group_overview/error_group_list/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/error_group_overview/error_group_list/index.tsx @@ -7,7 +7,7 @@ import { EuiBadge, EuiIconTip, EuiToolTip, RIGHT_ALIGNMENT } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import React, { useMemo, useState } from 'react'; import { apmEnableTableSearchBar } from '@kbn/observability-plugin/common'; import { isPending } from '../../../../hooks/use_fetcher'; @@ -30,25 +30,25 @@ import { isTimeComparison } from '../../../shared/time_comparison/get_comparison import { ErrorGroupItem, useErrorGroupListData } from './use_error_group_list_data'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; -const GroupIdLink = euiStyled(ErrorDetailLink)` - font-family: ${({ theme }) => theme.eui.euiCodeFontFamily}; +const GroupIdLink = styled(ErrorDetailLink)` + font-family: ${({ theme }) => theme.euiTheme.font.familyCode}; `; -const MessageAndCulpritCell = euiStyled.div` +const MessageAndCulpritCell = styled.div` ${truncate('100%')}; `; -const ErrorLink = euiStyled(ErrorOverviewLink)` +const ErrorLink = styled(ErrorOverviewLink)` ${truncate('100%')}; `; -const MessageLink = euiStyled(ErrorDetailLink)` - font-family: ${({ theme }) => theme.eui.euiCodeFontFamily}; +const MessageLink = styled(ErrorDetailLink)` + font-family: ${({ theme }) => theme.euiTheme.font.familyCode}; ${truncate('100%')}; `; -const Culprit = euiStyled.div` - font-family: ${({ theme }) => theme.eui.euiCodeFontFamily}; +const Culprit = styled.div` + font-family: ${({ theme }) => theme.euiTheme.font.familyCode}; `; interface Props { diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/help_popover/help_popover.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/help_popover/help_popover.tsx index c883376cac4e..cfb50f983fdb 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/help_popover/help_popover.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/help_popover/help_popover.tsx @@ -16,9 +16,9 @@ import { EuiPopoverTitle, EuiText, } from '@elastic/eui'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; -const PopoverContent = euiStyled(EuiText)` +const PopoverContent = styled(EuiText)` max-width: 480px; max-height: 40vh; `; diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/infra_overview/infra_tabs/empty_prompt.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/infra_overview/infra_tabs/empty_prompt.tsx index 293dff7b6080..0d212682145f 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/infra_overview/infra_tabs/empty_prompt.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/infra_overview/infra_tabs/empty_prompt.tsx @@ -11,12 +11,12 @@ import { EuiDescriptionListTitle, EuiEmptyPrompt, EuiImage, + useEuiTheme, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; import noResultsIllustrationDark from '../../../../assets/no_results_dark.svg'; import noResultsIllustrationLight from '../../../../assets/no_results_light.svg'; -import { useTheme } from '../../../../hooks/use_theme'; export function EmptyPrompt() { return ( @@ -52,9 +52,10 @@ export function EmptyPrompt() { } function NoResultsIllustration() { - const theme = useTheme(); + const { colorMode } = useEuiTheme(); - const illustration = theme.darkMode ? noResultsIllustrationDark : noResultsIllustrationLight; + const illustration = + colorMode === 'DARK' ? noResultsIllustrationDark : noResultsIllustrationLight; return ( diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/metrics/jvm_metrics_overview/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/metrics/jvm_metrics_overview/index.tsx index 63a1dac2017b..a936ec601ebe 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/metrics/jvm_metrics_overview/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/metrics/jvm_metrics_overview/index.tsx @@ -7,7 +7,7 @@ import { EuiToolTip, EuiIcon } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { getServiceNodeName, SERVICE_NODE_NAME_MISSING } from '../../../../../common/service_nodes'; import { asDynamicBytes, asInteger, asPercent } from '../../../../../common/utils/formatters'; import { useApmServiceContext } from '../../../../context/apm_service/use_apm_service_context'; @@ -21,7 +21,7 @@ import { ITableColumn, ManagedTable } from '../../../shared/managed_table'; const INITIAL_SORT_FIELD = 'cpu'; const INITIAL_SORT_DIRECTION = 'desc'; -const ServiceNodeName = euiStyled.div` +const ServiceNodeName = styled.div` ${truncate(8 * unit)} `; diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/metrics/serverless_metrics/serverless_function_name_link.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/metrics/serverless_metrics/serverless_function_name_link.tsx index 2de5991b19b4..eb1ab41f1dfa 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/metrics/serverless_metrics/serverless_function_name_link.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/metrics/serverless_metrics/serverless_function_name_link.tsx @@ -5,14 +5,16 @@ * 2.0. */ import { EuiLink } from '@elastic/eui'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import React from 'react'; import { useApmServiceContext } from '../../../../context/apm_service/use_apm_service_context'; import { useApmParams } from '../../../../hooks/use_apm_params'; import { useApmRouter } from '../../../../hooks/use_apm_router'; import { truncate } from '../../../../utils/style'; -const StyledLink = euiStyled(EuiLink)`${truncate('100%')};`; +const StyledLink = styled(EuiLink)` + ${truncate('100%')}; +`; interface Props { serverlessFunctionName: string; diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/metrics/serverless_metrics/serverless_summary.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/metrics/serverless_metrics/serverless_summary.tsx index ab662e53d9d8..30544489eb0d 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/metrics/serverless_metrics/serverless_summary.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/metrics/serverless_metrics/serverless_summary.tsx @@ -15,7 +15,7 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import styled from 'styled-components'; +import styled from '@emotion/styled'; import { asMillisecondDuration, asPercent } from '../../../../../common/utils/formatters'; import { useApmServiceContext } from '../../../../context/apm_service/use_apm_service_context'; import { useApmParams } from '../../../../hooks/use_apm_params'; @@ -34,7 +34,7 @@ const CentralizedContainer = styled.div` const Border = styled.div` height: 55px; - border-right: 1px solid ${({ theme }) => theme.eui.euiColorLightShade}; + border-right: ${({ theme }) => theme.euiTheme.border.thin}; `; function VerticalRule() { diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/metrics_details/service_node_metrics/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/metrics_details/service_node_metrics/index.tsx index 89ffc3b0be3f..e01dc55447f2 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/metrics_details/service_node_metrics/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/metrics_details/service_node_metrics/index.tsx @@ -20,7 +20,7 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import React from 'react'; import { ApmDocumentType } from '../../../../../common/document_type'; import { getServiceNodeName, SERVICE_NODE_NAME_MISSING } from '../../../../../common/service_nodes'; @@ -42,7 +42,7 @@ const INITIAL_DATA = { containerId: '', }; -const Truncate = euiStyled.span` +const Truncate = styled.span` display: block; ${truncate(unit * 12)} `; diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/mobile/errors_and_crashes_overview/crash_group_list/crash_group_list.test.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/mobile/errors_and_crashes_overview/crash_group_list/crash_group_list.test.tsx index cd1d4110e32f..aab5a3a3af20 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/mobile/errors_and_crashes_overview/crash_group_list/crash_group_list.test.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/mobile/errors_and_crashes_overview/crash_group_list/crash_group_list.test.tsx @@ -6,14 +6,14 @@ */ import { composeStories } from '@storybook/testing-react'; -import { render } from '@testing-library/react'; import React from 'react'; import * as stories from './crash_group_list.stories'; +import { renderWithTheme } from '../../../../../utils/test_helpers'; const { Example } = composeStories(stories); describe('MobileCrashGroupList', () => { it('renders', () => { - expect(() => render()).not.toThrowError(); + expect(() => renderWithTheme()).not.toThrowError(); }); }); diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/mobile/errors_and_crashes_overview/crash_group_list/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/mobile/errors_and_crashes_overview/crash_group_list/index.tsx index 4923ed35a6d4..403a5ff03db7 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/mobile/errors_and_crashes_overview/crash_group_list/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/mobile/errors_and_crashes_overview/crash_group_list/index.tsx @@ -7,7 +7,7 @@ import { EuiToolTip, RIGHT_ALIGNMENT, LEFT_ALIGNMENT, EuiIconTip } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import React, { useMemo } from 'react'; import { NOT_AVAILABLE_LABEL } from '../../../../../../common/i18n'; import { asInteger } from '../../../../../../common/utils/formatters'; @@ -25,20 +25,20 @@ import { ITableColumn, ManagedTable } from '../../../../shared/managed_table'; import { TimestampTooltip } from '../../../../shared/timestamp_tooltip'; import { isTimeComparison } from '../../../../shared/time_comparison/get_comparison_options'; -const MessageAndCulpritCell = euiStyled.div` +const MessageAndCulpritCell = styled.div` ${truncate('100%')}; `; -const ErrorLink = euiStyled(ErrorOverviewLink)` +const ErrorLink = styled(ErrorOverviewLink)` ${truncate('100%')}; `; -const GroupIdLink = euiStyled(CrashDetailLink)` - font-family: ${({ theme }) => theme.eui.euiCodeFontFamily}; +const GroupIdLink = styled(CrashDetailLink)` + font-family: ${({ theme }) => theme.euiTheme.font.familyCode}; `; -const MessageLink = euiStyled(CrashDetailLink)` - font-family: ${({ theme }) => theme.eui.euiCodeFontFamily}; +const MessageLink = styled(CrashDetailLink)` + font-family: ${({ theme }) => theme.euiTheme.font.familyCode}; ${truncate('100%')}; `; diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/mobile/errors_and_crashes_overview/error_group_list/error_group_list.test.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/mobile/errors_and_crashes_overview/error_group_list/error_group_list.test.tsx index 278825c25c68..92cad40623c0 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/mobile/errors_and_crashes_overview/error_group_list/error_group_list.test.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/mobile/errors_and_crashes_overview/error_group_list/error_group_list.test.tsx @@ -6,14 +6,14 @@ */ import { composeStories } from '@storybook/testing-react'; -import { render } from '@testing-library/react'; import React from 'react'; import * as stories from './error_group_list.stories'; +import { renderWithTheme } from '../../../../../utils/test_helpers'; const { Example } = composeStories(stories); describe('ErrorGroupList', () => { it('renders', () => { - expect(() => render()).not.toThrowError(); + expect(() => renderWithTheme()).not.toThrowError(); }); }); diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/mobile/errors_and_crashes_overview/error_group_list/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/mobile/errors_and_crashes_overview/error_group_list/index.tsx index 0938c97d737d..7153b673b319 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/mobile/errors_and_crashes_overview/error_group_list/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/mobile/errors_and_crashes_overview/error_group_list/index.tsx @@ -7,7 +7,7 @@ import { EuiBadge, EuiToolTip, RIGHT_ALIGNMENT, LEFT_ALIGNMENT, EuiIconTip } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import React, { useMemo } from 'react'; import { NOT_AVAILABLE_LABEL } from '../../../../../../common/i18n'; import { asInteger } from '../../../../../../common/utils/formatters'; @@ -25,20 +25,20 @@ import { ITableColumn, ManagedTable } from '../../../../shared/managed_table'; import { TimestampTooltip } from '../../../../shared/timestamp_tooltip'; import { isTimeComparison } from '../../../../shared/time_comparison/get_comparison_options'; -const GroupIdLink = euiStyled(ErrorDetailLink)` - font-family: ${({ theme }) => theme.eui.euiCodeFontFamily}; +const GroupIdLink = styled(ErrorDetailLink)` + font-family: ${({ theme }) => theme.euiTheme.font.familyCode}; `; -const MessageAndCulpritCell = euiStyled.div` +const MessageAndCulpritCell = styled.div` ${truncate('100%')}; `; -const ErrorLink = euiStyled(ErrorOverviewLink)` +const ErrorLink = styled(ErrorOverviewLink)` ${truncate('100%')}; `; -const MessageLink = euiStyled(ErrorDetailLink)` - font-family: ${({ theme }) => theme.eui.euiCodeFontFamily}; +const MessageLink = styled(ErrorDetailLink)` + font-family: ${({ theme }) => theme.euiTheme.font.familyCode}; ${truncate('100%')}; `; diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/mobile/service_overview/stats/location_stats.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/mobile/service_overview/stats/location_stats.tsx index 47451fac265c..b514277a5dc9 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/mobile/service_overview/stats/location_stats.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/mobile/service_overview/stats/location_stats.tsx @@ -6,9 +6,8 @@ */ import { MetricDatum, MetricTrendShape } from '@elastic/charts'; import { i18n } from '@kbn/i18n'; -import { EuiIcon, EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner } from '@elastic/eui'; +import { EuiIcon, EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner, useEuiTheme } from '@elastic/eui'; import React, { useCallback } from 'react'; -import { useTheme } from '@kbn/observability-shared-plugin/public'; import { useFetcher, isPending, FETCH_STATUS } from '../../../../../hooks/use_fetcher'; import { CLIENT_GEO_COUNTRY_NAME } from '../../../../../../common/es_fields/apm'; import { NOT_AVAILABLE_LABEL } from '../../../../../../common/i18n'; @@ -45,7 +44,7 @@ export function MobileLocationStats({ environment: string; comparisonEnabled: boolean; }) { - const euiTheme = useTheme(); + const { euiTheme } = useEuiTheme(); const previousPeriodLabel = usePreviousPeriodLabel(); @@ -107,7 +106,7 @@ export function MobileLocationStats({ const metrics: MetricDatum[] = [ { - color: euiTheme.eui.euiColorLightestShade, + color: euiTheme.colors.lightestShade, title: i18n.translate('xpack.apm.mobile.location.metrics.http.requests.title', { defaultMessage: 'Most used in', }), @@ -121,7 +120,7 @@ export function MobileLocationStats({ trendShape: MetricTrendShape.Area, }, { - color: euiTheme.eui.euiColorLightestShade, + color: euiTheme.colors.lightestShade, title: i18n.translate('xpack.apm.mobile.location.metrics.mostCrashes', { defaultMessage: 'Most crashes', }), @@ -135,7 +134,7 @@ export function MobileLocationStats({ trendShape: MetricTrendShape.Area, }, { - color: euiTheme.eui.euiColorLightestShade, + color: euiTheme.colors.lightestShade, title: i18n.translate('xpack.apm.mobile.location.metrics.sessions', { defaultMessage: 'Most sessions', }), @@ -149,7 +148,7 @@ export function MobileLocationStats({ trendShape: MetricTrendShape.Area, }, { - color: euiTheme.eui.euiColorLightestShade, + color: euiTheme.colors.lightestShade, title: i18n.translate('xpack.apm.mobile.location.metrics.launches', { defaultMessage: 'Most launches', }), diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/mobile/service_overview/stats/stats.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/mobile/service_overview/stats/stats.tsx index 59f6020d61c3..4376eeccab5c 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/mobile/service_overview/stats/stats.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/mobile/service_overview/stats/stats.tsx @@ -6,9 +6,8 @@ */ import { MetricDatum, MetricTrendShape } from '@elastic/charts'; import { i18n } from '@kbn/i18n'; -import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiLoadingSpinner } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiLoadingSpinner, useEuiTheme } from '@elastic/eui'; import React, { useCallback } from 'react'; -import { useTheme } from '@kbn/observability-shared-plugin/public'; import { NOT_AVAILABLE_LABEL } from '../../../../../../common/i18n'; import { useAnyOfApmParams } from '../../../../../hooks/use_apm_params'; import { FETCH_STATUS, isPending, useFetcher } from '../../../../../hooks/use_fetcher'; @@ -20,7 +19,7 @@ const valueFormatter = (value: number, suffix = '') => { }; export function MobileStats({ start, end, kuery }: { start: string; end: string; kuery: string }) { - const euiTheme = useTheme(); + const { euiTheme } = useEuiTheme(); const { path: { serviceName }, @@ -77,7 +76,7 @@ export function MobileStats({ start, end, kuery }: { start: string; end: string; const metrics: MetricDatum[] = [ { - color: euiTheme.eui.euiColorLightestShade, + color: euiTheme.colors.lightestShade, title: i18n.translate('xpack.apm.mobile.metrics.crash.rate', { defaultMessage: 'Crash rate', }), @@ -92,7 +91,7 @@ export function MobileStats({ start, end, kuery }: { start: string; end: string; trendShape: MetricTrendShape.Area, }, { - color: euiTheme.eui.euiColorLightestShade, + color: euiTheme.colors.lightestShade, title: i18n.translate('xpack.apm.mobile.metrics.load.time', { defaultMessage: 'Average app load time', }), @@ -105,7 +104,7 @@ export function MobileStats({ start, end, kuery }: { start: string; end: string; trendShape: MetricTrendShape.Area, }, { - color: euiTheme.eui.euiColorLightestShade, + color: euiTheme.colors.lightestShade, title: i18n.translate('xpack.apm.mobile.metrics.sessions', { defaultMessage: 'Sessions', }), @@ -118,7 +117,7 @@ export function MobileStats({ start, end, kuery }: { start: string; end: string; trendShape: MetricTrendShape.Area, }, { - color: euiTheme.eui.euiColorLightestShade, + color: euiTheme.colors.lightestShade, title: i18n.translate('xpack.apm.mobile.metrics.http.requests', { defaultMessage: 'HTTP requests', }), diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/empty_dashboards.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/empty_dashboards.tsx index 9b7ace008206..bf4c23406099 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/empty_dashboards.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_dashboards/empty_dashboards.tsx @@ -5,17 +5,16 @@ * 2.0. */ import React from 'react'; -import { EuiEmptyPrompt, EuiImage } from '@elastic/eui'; +import { EuiEmptyPrompt, EuiImage, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { dashboardsDark, dashboardsLight } from '@kbn/shared-svg'; -import { useTheme } from '../../../hooks/use_theme'; interface Props { actions: React.ReactNode; } export function EmptyDashboards({ actions }: Props) { - const theme = useTheme(); + const { colorMode } = useEuiTheme(); return ( <> @@ -25,7 +24,7 @@ export function EmptyDashboards({ actions }: Props) { icon={ } diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_groups/service_group_save/select_services.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_groups/service_group_save/select_services.tsx index b6a901bac8d2..38f681921a6c 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_groups/service_group_save/select_services.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_groups/service_group_save/select_services.tsx @@ -23,7 +23,7 @@ import { import { i18n } from '@kbn/i18n'; import { css } from '@emotion/react'; import React, { useEffect, useState, useMemo } from 'react'; -import styled from 'styled-components'; +import styled from '@emotion/styled'; import { isEmpty } from 'lodash'; import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; import { KueryBar } from '../../../shared/kuery_bar'; diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_inventory/service_list/health_badge.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_inventory/service_list/health_badge.tsx index aa4299006cc4..1c21826c80d3 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_inventory/service_list/health_badge.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_inventory/service_list/health_badge.tsx @@ -6,19 +6,18 @@ */ import React from 'react'; -import { EuiBadge } from '@elastic/eui'; +import { EuiBadge, useEuiTheme } from '@elastic/eui'; import { getServiceHealthStatusBadgeColor, getServiceHealthStatusLabel, ServiceHealthStatus, } from '../../../../../common/service_health_status'; -import { useTheme } from '../../../../hooks/use_theme'; export function HealthBadge({ healthStatus }: { healthStatus: ServiceHealthStatus }) { - const theme = useTheme(); + const { euiTheme } = useEuiTheme(); return ( - + {getServiceHealthStatusLabel(healthStatus)} ); diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_map/controls.test.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_map/controls.test.tsx index 21d7bbf6d120..71d3f7aa271d 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_map/controls.test.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_map/controls.test.tsx @@ -5,15 +5,13 @@ * 2.0. */ -import { euiLightVars as lightTheme } from '@kbn/ui-theme'; -import { render } from '@testing-library/react'; import cytoscape from 'cytoscape'; import React, { ReactNode } from 'react'; import { MemoryRouter } from 'react-router-dom'; -import { ThemeContext } from 'styled-components'; import { MockApmPluginContextWrapper } from '../../../context/apm_plugin/mock_apm_plugin_context'; import { Controls } from './controls'; import { CytoscapeContext } from './cytoscape'; +import { renderWithTheme } from '../../../utils/test_helpers'; const cy = cytoscape({ elements: [{ classes: 'primary', data: { id: 'test node' } }], @@ -27,11 +25,8 @@ function Wrapper({ children }: { children?: ReactNode }) { '/service-map?rangeFrom=now-15m&rangeTo=now&environment=ENVIRONMENT_ALL&kuery=', ]} > - - {children} - + {children} - s ); } @@ -39,7 +34,7 @@ function Wrapper({ children }: { children?: ReactNode }) { describe('Controls', () => { describe('with a primary node', () => { it('links to the full map', async () => { - const result = render(, { wrapper: Wrapper }); + const result = renderWithTheme(, { wrapper: Wrapper }); const { findByTestId } = result; const button = await findByTestId('viewFullMapButton'); diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_map/controls.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_map/controls.tsx index ac15281d6121..e3a293a279e2 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_map/controls.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_map/controls.tsx @@ -5,12 +5,11 @@ * 2.0. */ -import { EuiButtonIcon, EuiPanel, EuiToolTip } from '@elastic/eui'; +import { EuiButtonIcon, EuiPanel, EuiToolTip, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useContext, useEffect, useState } from 'react'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; -import { useTheme } from '../../../hooks/use_theme'; import { getLegacyApmHref } from '../../shared/links/apm/apm_link'; import { useLegacyUrlParams } from '../../../context/url_params_context/use_url_params'; import { APMQueryParams } from '../../shared/links/url_helpers'; @@ -18,24 +17,24 @@ import { CytoscapeContext } from './cytoscape'; import { getAnimationOptions, getNodeHeight } from './cytoscape_options'; import { useAnyOfApmParams } from '../../../hooks/use_apm_params'; -const ControlsContainer = euiStyled('div')` - left: ${({ theme }) => theme.eui.euiSize}; +const ControlsContainer = styled('div')` + left: ${({ theme }) => theme.euiTheme.size.base}; position: absolute; - top: ${({ theme }) => theme.eui.euiSizeS}; + top: ${({ theme }) => theme.euiTheme.size.s}; z-index: 1; /* The element containing the cytoscape canvas has z-index = 0. */ `; -const Button = euiStyled(EuiButtonIcon)` +const Button = styled(EuiButtonIcon)` display: block; - margin: ${({ theme }) => theme.eui.euiSizeXS}; + margin: ${({ theme }) => theme.euiTheme.size.xs}; `; -const ZoomInButton = euiStyled(Button)` - margin-bottom: ${({ theme }) => theme.eui.euiSizeS}; +const ZoomInButton = styled(Button)` + margin-bottom: ${({ theme }) => theme.euiTheme.size.s}; `; -const Panel = euiStyled(EuiPanel)` - margin-bottom: ${({ theme }) => theme.eui.euiSizeS}; +const Panel = styled(EuiPanel)` + margin-bottom: ${({ theme }) => theme.euiTheme.size.s}; `; const steps = 5; @@ -97,7 +96,7 @@ function useDebugDownloadUrl(cy?: cytoscape.Core) { export function Controls() { const { core } = useApmPluginContext(); const { basePath } = core.http; - const theme = useTheme(); + const { euiTheme } = useEuiTheme(); const cy = useContext(CytoscapeContext); const { urlParams } = useLegacyUrlParams(); @@ -110,7 +109,7 @@ export function Controls() { ); const [zoom, setZoom] = useState((cy && cy.zoom()) || 1); - const duration = parseInt(theme.eui.euiAnimSpeedFast, 10); + const duration = euiTheme.animation.fast ? parseInt(euiTheme.animation.fast, 10) : 0; const downloadUrl = useDebugDownloadUrl(cy); const viewFullMapUrl = getLegacyApmHref({ basePath, @@ -140,9 +139,9 @@ export function Controls() { if (cy) { const eles = cy.nodes(); cy.animate({ - ...getAnimationOptions(theme), + ...getAnimationOptions(euiTheme), center: { eles }, - fit: { eles, padding: getNodeHeight(theme) }, + fit: { eles, padding: getNodeHeight(euiTheme) }, }); } } diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_map/cytoscape.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_map/cytoscape.tsx index 8535c483529a..eacd67e6dabe 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_map/cytoscape.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_map/cytoscape.tsx @@ -17,7 +17,7 @@ import React, { useRef, useState, } from 'react'; -import { useTheme } from '../../../hooks/use_theme'; +import { useEuiTheme } from '@elastic/eui'; import { useTraceExplorerEnabledSetting } from '../../../hooks/use_trace_explorer_enabled_setting'; import { getCytoscapeOptions } from './cytoscape_options'; import { useCytoscapeEventHandlers } from './use_cytoscape_event_handlers'; @@ -57,13 +57,13 @@ function useCytoscape(options: cytoscape.CytoscapeOptions) { } function CytoscapeComponent({ children, elements, height, serviceName, style }: CytoscapeProps) { - const theme = useTheme(); + const { euiTheme } = useEuiTheme(); const isTraceExplorerEnabled = useTraceExplorerEnabledSetting(); const [ref, cy] = useCytoscape({ - ...getCytoscapeOptions(theme, isTraceExplorerEnabled), + ...getCytoscapeOptions(euiTheme, isTraceExplorerEnabled), elements, }); - useCytoscapeEventHandlers({ cy, serviceName, theme }); + useCytoscapeEventHandlers({ cy, serviceName, euiTheme }); // Add items from the elements prop to the cytoscape collection and remove // items that no longer are in the list, then trigger an event to notify diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_map/cytoscape_options.ts b/x-pack/plugins/observability_solution/apm/public/components/app/service_map/cytoscape_options.ts index af0befbc0616..fa6fdbce3c76 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_map/cytoscape_options.ts +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_map/cytoscape_options.ts @@ -7,7 +7,7 @@ import cytoscape from 'cytoscape'; import { CSSProperties } from 'react'; -import { EuiTheme } from '@kbn/kibana-react-plugin/common'; +import type { EuiThemeComputed } from '@elastic/eui'; import { ServiceAnomalyStats } from '../../../../common/anomaly_detection'; import { SERVICE_NAME, SPAN_DESTINATION_SERVICE_RESOURCE } from '../../../../common/es_fields/apm'; import { @@ -26,21 +26,21 @@ function getServiceAnomalyStats(el: cytoscape.NodeSingular) { } function getBorderColorFn( - theme: EuiTheme + euiTheme: EuiThemeComputed ): cytoscape.Css.MapperFunction { return (el: cytoscape.NodeSingular) => { const hasAnomalyDetectionJob = el.data('serviceAnomalyStats') !== undefined; const anomalyStats = getServiceAnomalyStats(el); if (hasAnomalyDetectionJob) { return getServiceHealthStatusColor( - theme, + euiTheme, anomalyStats?.healthStatus ?? ServiceHealthStatus.unknown ); } if (el.hasClass('primary') || el.selected()) { - return theme.eui.euiColorPrimary; + return euiTheme.colors.primary; } - return theme.eui.euiColorMediumShade; + return euiTheme.colors.mediumShade; }; } @@ -79,10 +79,10 @@ function getBorderWidth(el: cytoscape.NodeSingular) { // @ts-expect-error `documentMode` is not recognized as a valid property of `document`. const isIE11 = !!window.MSInputMethodContext && !!document.documentMode; -export const getAnimationOptions = (theme: EuiTheme): cytoscape.AnimationOptions => ({ - duration: parseInt(theme.eui.euiAnimSpeedNormal, 10), +export const getAnimationOptions = (euiTheme: EuiThemeComputed): cytoscape.AnimationOptions => ({ + duration: euiTheme.animation.normal ? parseInt(euiTheme.animation.normal, 10) : 0, // @ts-expect-error The cubic-bezier options here are not recognized by the cytoscape types - easing: theme.eui.euiAnimSlightBounce, + easing: euiTheme.animation.bounce, }); const zIndexNode = 200; @@ -90,14 +90,18 @@ const zIndexEdge = 100; const zIndexEdgeHighlight = 110; const zIndexEdgeHover = 120; -export const getNodeHeight = (theme: EuiTheme): number => parseInt(theme.eui.euiSizeXXL, 10); +export const getNodeHeight = (euiTheme: EuiThemeComputed): number => + parseInt(euiTheme.size.xxl, 10); function isService(el: cytoscape.NodeSingular) { return el.data(SERVICE_NAME) !== undefined; } -const getStyle = (theme: EuiTheme, isTraceExplorerEnabled: boolean): cytoscape.Stylesheet[] => { - const lineColor = theme.eui.euiColorMediumShade; +const getStyle = ( + euiTheme: EuiThemeComputed, + isTraceExplorerEnabled: boolean +): cytoscape.Stylesheet[] => { + const lineColor = euiTheme.colors.mediumShade; return [ { selector: 'core', @@ -107,46 +111,46 @@ const getStyle = (theme: EuiTheme, isTraceExplorerEnabled: boolean): cytoscape.S { selector: 'node', style: { - 'background-color': theme.eui.euiColorGhost, + 'background-color': euiTheme.colors.backgroundBasePlain, // The DefinitelyTyped definitions don't specify that a function can be // used here. 'background-image': (el: cytoscape.NodeSingular) => iconForNode(el), 'background-height': (el: cytoscape.NodeSingular) => (isService(el) ? '60%' : '40%'), 'background-width': (el: cytoscape.NodeSingular) => (isService(el) ? '60%' : '40%'), - 'border-color': getBorderColorFn(theme), + 'border-color': getBorderColorFn(euiTheme), 'border-style': getBorderStyle, 'border-width': getBorderWidth, color: (el: cytoscape.NodeSingular) => el.hasClass('primary') || el.selected() - ? theme.eui.euiColorPrimaryText - : theme.eui.euiTextColor, + ? euiTheme.colors.textPrimary + : euiTheme.colors.textParagraph, // theme.euiFontFamily doesn't work here for some reason, so we're just // specifying a subset of the fonts for the label text. 'font-family': 'Inter UI, Segoe UI, Helvetica, Arial, sans-serif', - 'font-size': theme.eui.euiFontSizeS, + 'font-size': euiTheme.size.s, ghost: 'yes', 'ghost-offset-x': 0, 'ghost-offset-y': 2, 'ghost-opacity': 0.15, - height: getNodeHeight(theme), + height: getNodeHeight(euiTheme), label: (el: cytoscape.NodeSingular) => isService(el) ? el.data(SERVICE_NAME) : el.data('label') || el.data(SPAN_DESTINATION_SERVICE_RESOURCE), - 'min-zoomed-font-size': parseInt(theme.eui.euiSizeS, 10), + 'min-zoomed-font-size': parseInt(euiTheme.size.s, 10), 'overlay-opacity': 0, shape: (el: cytoscape.NodeSingular) => isService(el) ? (isIE11 ? 'rectangle' : 'ellipse') : 'diamond', - 'text-background-color': theme.eui.euiColorPrimary, + 'text-background-color': euiTheme.colors.primary, 'text-background-opacity': (el: cytoscape.NodeSingular) => el.hasClass('primary') || el.selected() ? 0.1 : 0, - 'text-background-padding': theme.eui.euiSizeXS, + 'text-background-padding': euiTheme.size.xs, 'text-background-shape': 'roundrectangle', - 'text-margin-y': parseInt(theme.eui.euiSizeS, 10), + 'text-margin-y': parseInt(euiTheme.size.s, 10), 'text-max-width': '200px', 'text-valign': 'bottom', 'text-wrap': 'ellipsis', - width: theme.eui.euiSizeXXL, + width: euiTheme.size.xxl, 'z-index': zIndexNode, }, }, @@ -162,7 +166,7 @@ const getStyle = (theme: EuiTheme, isTraceExplorerEnabled: boolean): cytoscape.S // fairly new. // // @ts-expect-error - 'target-distance-from-node': isIE11 ? undefined : theme.eui.euiSizeXS, + 'target-distance-from-node': isIE11 ? undefined : euiTheme.size.xs, width: 1, 'source-arrow-shape': 'none', 'z-index': zIndexEdge, @@ -175,8 +179,8 @@ const getStyle = (theme: EuiTheme, isTraceExplorerEnabled: boolean): cytoscape.S 'source-arrow-color': lineColor, 'target-arrow-shape': isIE11 ? 'none' : 'triangle', // @ts-expect-error - 'source-distance-from-node': isIE11 ? undefined : parseInt(theme.eui.euiSizeXS, 10), - 'target-distance-from-node': isIE11 ? undefined : parseInt(theme.eui.euiSizeXS, 10), + 'source-distance-from-node': isIE11 ? undefined : parseInt(euiTheme.size.xs, 10), + 'target-distance-from-node': isIE11 ? undefined : parseInt(euiTheme.size.xs, 10), }, }, { @@ -190,9 +194,9 @@ const getStyle = (theme: EuiTheme, isTraceExplorerEnabled: boolean): cytoscape.S style: { width: 4, 'z-index': zIndexEdgeHover, - 'line-color': theme.eui.euiColorDarkShade, - 'source-arrow-color': theme.eui.euiColorDarkShade, - 'target-arrow-color': theme.eui.euiColorDarkShade, + 'line-color': euiTheme.colors.darkShade, + 'source-arrow-color': euiTheme.colors.darkShade, + 'target-arrow-color': euiTheme.colors.darkShade, }, }, ...(isTraceExplorerEnabled @@ -202,9 +206,9 @@ const getStyle = (theme: EuiTheme, isTraceExplorerEnabled: boolean): cytoscape.S style: { width: 4, 'z-index': zIndexEdgeHover, - 'line-color': theme.eui.euiColorDarkShade, - 'source-arrow-color': theme.eui.euiColorDarkShade, - 'target-arrow-color': theme.eui.euiColorDarkShade, + 'line-color': euiTheme.colors.darkShade, + 'source-arrow-color': euiTheme.colors.darkShade, + 'target-arrow-color': euiTheme.colors.darkShade, }, }, ] @@ -219,9 +223,9 @@ const getStyle = (theme: EuiTheme, isTraceExplorerEnabled: boolean): cytoscape.S selector: 'edge.highlight', style: { width: 4, - 'line-color': theme.eui.euiColorPrimary, - 'source-arrow-color': theme.eui.euiColorPrimary, - 'target-arrow-color': theme.eui.euiColorPrimary, + 'line-color': euiTheme.colors.primary, + 'source-arrow-color': euiTheme.colors.primary, + 'target-arrow-color': euiTheme.colors.primary, 'z-index': zIndexEdgeHighlight, }, }, @@ -230,32 +234,35 @@ const getStyle = (theme: EuiTheme, isTraceExplorerEnabled: boolean): cytoscape.S // The CSS styles for the div containing the cytoscape element. Makes a // background grid of dots. -export const getCytoscapeDivStyle = (theme: EuiTheme, status: FETCH_STATUS): CSSProperties => ({ +export const getCytoscapeDivStyle = ( + euiTheme: EuiThemeComputed, + status: FETCH_STATUS +): CSSProperties => ({ background: `linear-gradient( 90deg, - ${theme.eui.euiPageBackgroundColor} - calc(${theme.eui.euiSizeL} - calc(${theme.eui.euiSizeXS} / 2)), + ${euiTheme.colors.backgroundBasePlain} + calc(${euiTheme.size.l} - calc(${euiTheme.size.xs} / 2)), transparent 1% ) center, linear-gradient( - ${theme.eui.euiPageBackgroundColor} - calc(${theme.eui.euiSizeL} - calc(${theme.eui.euiSizeXS} / 2)), + ${euiTheme.colors.backgroundBasePlain} + calc(${euiTheme.size.l} - calc(${euiTheme.size.xs} / 2)), transparent 1% ) center, -${theme.eui.euiColorLightShade}`, - backgroundSize: `${theme.eui.euiSizeL} ${theme.eui.euiSizeL}`, +${euiTheme.colors.lightShade}`, + backgroundSize: `${euiTheme.size.l} ${euiTheme.size.l}`, cursor: `${status === FETCH_STATUS.LOADING ? 'wait' : 'grab'}`, marginTop: 0, }); export const getCytoscapeOptions = ( - theme: EuiTheme, + euiTheme: EuiThemeComputed, isTraceExplorerEnabled: boolean ): cytoscape.CytoscapeOptions => ({ boxSelectionEnabled: false, maxZoom: 3, minZoom: 0.2, - style: getStyle(theme, isTraceExplorerEnabled), + style: getStyle(euiTheme, isTraceExplorerEnabled), }); diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_map/empty_banner.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_map/empty_banner.tsx index 7d419baecc9e..9de1e5486141 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_map/empty_banner.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_map/empty_banner.tsx @@ -6,26 +6,22 @@ */ import React, { useContext, useEffect, useState } from 'react'; -import { EuiCallOut, EuiLink } from '@elastic/eui'; +import { EuiCallOut, EuiLink, useEuiTheme } from '@elastic/eui'; +import styled from '@emotion/styled'; import { i18n } from '@kbn/i18n'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; import { CytoscapeContext } from './cytoscape'; -import { useTheme } from '../../../hooks/use_theme'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; -const EmptyBannerContainer = euiStyled.div` - margin: ${({ theme }) => theme.eui.euiSizeS}; +const EmptyBannerContainer = styled.div` + margin: ${({ theme }) => theme.euiTheme.size.s}; /* Add some extra margin so it displays to the right of the controls. */ - left: calc( - ${({ theme }) => theme.eui.euiSizeXXL} + - ${({ theme }) => theme.eui.euiSizeS} - ); + left: calc(${({ theme }) => theme.euiTheme.size.xxl} + ${({ theme }) => theme.euiTheme.size.s}); position: absolute; z-index: 1; `; export function EmptyBanner() { - const theme = useTheme(); + const { euiTheme } = useEuiTheme(); const cy = useContext(CytoscapeContext); const [nodeCount, setNodeCount] = useState(0); const { docLinks } = useApmPluginContext().core; @@ -51,7 +47,7 @@ export function EmptyBanner() { // Since we're absolutely positioned, we need to get the full width and // subtract the space for controls and margins. - const width = cy.width() - parseInt(theme.eui.euiSizeXXL, 10) - parseInt(theme.eui.euiSizeL, 10); + const width = cy.width() - parseInt(euiTheme.size.xxl, 10) - parseInt(euiTheme.size.l, 10); return ( diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_map/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_map/index.tsx index 113be5407c07..7d6bcbe69cfa 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_map/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_map/index.tsx @@ -6,14 +6,13 @@ */ import { usePerformanceContext } from '@kbn/ebt-tools'; -import { EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner, EuiPanel } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner, EuiPanel, useEuiTheme } from '@elastic/eui'; import React, { ReactNode } from 'react'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; import { isActivePlatinumLicense } from '../../../../common/license_check'; import { invalidLicenseMessage, SERVICE_MAP_TIMEOUT_ERROR } from '../../../../common/service_map'; import { FETCH_STATUS, useFetcher } from '../../../hooks/use_fetcher'; import { useLicenseContext } from '../../../context/license/use_license_context'; -import { useTheme } from '../../../hooks/use_theme'; import { LicensePrompt } from '../../shared/license_prompt'; import { Controls } from './controls'; import { Cytoscape } from './cytoscape'; @@ -103,7 +102,7 @@ export function ServiceMap({ end: string; serviceGroupId?: string; }) { - const theme = useTheme(); + const { euiTheme } = useEuiTheme(); const license = useLicenseContext(); const serviceName = useServiceName(); const { config } = useApmPluginContext(); @@ -200,7 +199,7 @@ export function ServiceMap({ elements={data.elements} height={heightWithPadding} serviceName={serviceName} - style={getCytoscapeDivStyle(theme, status)} + style={getCytoscapeDivStyle(euiTheme, status)} > {serviceName && } diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_map/popover/anomaly_detection.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_map/popover/anomaly_detection.tsx index 307887148e3e..562093976177 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_map/popover/anomaly_detection.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_map/popover/anomaly_detection.tsx @@ -5,10 +5,18 @@ * 2.0. */ -import { EuiFlexGroup, EuiFlexItem, EuiHealth, EuiIconTip, EuiTitle } from '@elastic/eui'; +import { + EuiFlexGroup, + EuiFlexItem, + EuiHealth, + EuiIconTip, + EuiTitle, + useEuiFontSize, + useEuiTheme, +} from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { getSeverity, ServiceAnomalyStats } from '../../../../../common/anomaly_detection'; import { getServiceHealthStatus, @@ -16,32 +24,31 @@ import { } from '../../../../../common/service_health_status'; import { TRANSACTION_REQUEST } from '../../../../../common/transaction_types'; import { asDuration, asInteger } from '../../../../../common/utils/formatters'; -import { useTheme } from '../../../../hooks/use_theme'; import { MLSingleMetricLink } from '../../../shared/links/machine_learning_links/mlsingle_metric_link'; import { popoverWidth } from '../cytoscape_options'; -const HealthStatusTitle = euiStyled(EuiTitle)` +const HealthStatusTitle = styled(EuiTitle)` display: inline; text-transform: uppercase; `; -const VerticallyCentered = euiStyled.div` +const VerticallyCentered = styled.div` display: flex; align-items: center; `; -const SubduedText = euiStyled.span` - color: ${({ theme }) => theme.eui.euiTextSubduedColor}; +const SubduedText = styled.span` + color: ${({ theme }) => theme.euiTheme.colors.textSubdued}; `; -const EnableText = euiStyled.section` - color: ${({ theme }) => theme.eui.euiTextSubduedColor}; +const EnableText = styled.section` + color: ${({ theme }) => theme.euiTheme.colors.textSubdued}; line-height: 1.4; - font-size: ${({ theme }) => theme.eui.euiFontSizeS}; + font-size: ${() => useEuiFontSize('s').fontSize}; width: ${popoverWidth}px; `; -export const ContentLine = euiStyled.section` +export const ContentLine = styled.section` line-height: 2; `; @@ -50,7 +57,7 @@ interface Props { serviceAnomalyStats: ServiceAnomalyStats | undefined; } export function AnomalyDetection({ serviceName, serviceAnomalyStats }: Props) { - const theme = useTheme(); + const { euiTheme } = useEuiTheme(); const anomalyScore = serviceAnomalyStats?.anomalyScore; const severity = getSeverity(anomalyScore); @@ -76,7 +83,7 @@ export function AnomalyDetection({ serviceName, serviceAnomalyStats }: Props) { - + {ANOMALY_DETECTION_SCORE_METRIC} diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_map/popover/externals_list_contents.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_map/popover/externals_list_contents.tsx index 523a4e1ea415..a81df94c3d6f 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_map/popover/externals_list_contents.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_map/popover/externals_list_contents.tsx @@ -12,7 +12,7 @@ import { EuiFlexItem, } from '@elastic/eui'; import React, { Fragment } from 'react'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { NodeDataDefinition } from 'cytoscape'; import { ContentsProps } from '.'; import { @@ -22,7 +22,7 @@ import { } from '../../../../../common/es_fields/apm'; import { ExternalConnectionNode } from '../../../../../common/service_map'; -const ExternalResourcesList = euiStyled.section` +const ExternalResourcesList = styled.section` max-height: 360px; overflow: auto; `; diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_map/popover/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_map/popover/index.tsx index a66f77909072..827ea59015f2 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_map/popover/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_map/popover/index.tsx @@ -13,6 +13,7 @@ import { EuiTitle, EuiToolTip, EuiIcon, + useEuiTheme, } from '@elastic/eui'; import cytoscape from 'cytoscape'; import React, { @@ -27,7 +28,6 @@ import React, { import { i18n } from '@kbn/i18n'; import { SERVICE_NAME, SPAN_TYPE } from '../../../../../common/es_fields/apm'; import { Environment } from '../../../../../common/environment_rt'; -import { useTheme } from '../../../../hooks/use_theme'; import { useTraceExplorerEnabledSetting } from '../../../../hooks/use_trace_explorer_enabled_setting'; import { CytoscapeContext } from '../cytoscape'; import { getAnimationOptions, popoverWidth } from '../cytoscape_options'; @@ -83,7 +83,7 @@ interface PopoverProps { } export function Popover({ focusedServiceName, environment, kuery, start, end }: PopoverProps) { - const theme = useTheme(); + const { euiTheme } = useEuiTheme(); const cy = useContext(CytoscapeContext); const [selectedElement, setSelectedElement] = useState< cytoscape.NodeSingular | cytoscape.EdgeSingular | undefined @@ -164,12 +164,12 @@ export function Popover({ focusedServiceName, environment, kuery, start, end }: event.preventDefault(); if (cy) { cy.animate({ - ...getAnimationOptions(theme), + ...getAnimationOptions(euiTheme), center: { eles: cy.getElementById(selectedElementId) }, }); } }, - [cy, selectedElementId, theme] + [cy, selectedElementId, euiTheme] ); const isAlreadyFocused = focusedServiceName === selectedElementId; diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_map/popover/popover.test.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_map/popover/popover.test.tsx index 2bafca33d06f..1e8f1f7b5d0e 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_map/popover/popover.test.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_map/popover/popover.test.tsx @@ -6,16 +6,17 @@ */ import { composeStories } from '@storybook/testing-react'; -import { render, screen, waitFor } from '@testing-library/react'; +import { screen, waitFor } from '@testing-library/react'; import React from 'react'; import * as stories from './popover.stories'; +import { renderWithTheme } from '../../../../utils/test_helpers'; const { Dependency, ExternalsList, Resource, Service } = composeStories(stories); describe('Popover', () => { describe('with dependency data', () => { it('renders a dependency link', async () => { - render(); + renderWithTheme(); await waitFor(() => { expect(screen.getByRole('link', { name: /Dependency Details/i })).toBeInTheDocument(); @@ -25,7 +26,7 @@ describe('Popover', () => { describe('with externals list data', () => { it('renders an externals list', async () => { - render(); + renderWithTheme(); await waitFor(() => { expect(screen.getByText(/813-mam-392.mktoresp.com:443/)).toBeInTheDocument(); @@ -35,7 +36,7 @@ describe('Popover', () => { describe('with resource data', () => { it('renders with no buttons', async () => { - render(); + renderWithTheme(); await waitFor(() => { expect(screen.queryByRole('link')).not.toBeInTheDocument(); @@ -45,7 +46,7 @@ describe('Popover', () => { describe('with service data', () => { it('renders contents for a service', async () => { - render(); + renderWithTheme(); await waitFor(() => { expect(screen.getByRole('link', { name: /service details/i })).toBeInTheDocument(); diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_map/popover/resource_contents.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_map/popover/resource_contents.tsx index fb1414382ed5..272a5e97dfd1 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_map/popover/resource_contents.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_map/popover/resource_contents.tsx @@ -8,18 +8,18 @@ import { EuiDescriptionListDescription, EuiDescriptionListTitle } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { NodeDataDefinition } from 'cytoscape'; import type { ContentsProps } from '.'; import { SPAN_SUBTYPE, SPAN_TYPE } from '../../../../../common/es_fields/apm'; -const ItemRow = euiStyled.div` +const ItemRow = styled.div` line-height: 2; `; -const SubduedDescriptionListTitle = euiStyled(EuiDescriptionListTitle)` +const SubduedDescriptionListTitle = styled(EuiDescriptionListTitle)` &&& { - color: ${({ theme }) => theme.eui.euiTextSubduedColor}; + color: ${({ theme }) => theme.euiTheme.colors.textSubdued}; } `; diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_map/use_cytoscape_event_handlers.test.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_map/use_cytoscape_event_handlers.test.tsx index 31604d893401..c7df75312c79 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_map/use_cytoscape_event_handlers.test.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_map/use_cytoscape_event_handlers.test.tsx @@ -8,24 +8,25 @@ import { renderHook } from '@testing-library/react'; import cytoscape from 'cytoscape'; import dagre from 'cytoscape-dagre'; -import { EuiTheme } from '@kbn/kibana-react-plugin/common'; import { useUiTracker } from '@kbn/observability-shared-plugin/public'; import { useCytoscapeEventHandlers } from './use_cytoscape_event_handlers'; import lodash from 'lodash'; +import type { EuiThemeComputed } from '@elastic/eui'; jest.mock('@kbn/observability-shared-plugin/public'); cytoscape.use(dagre); -const theme = { - eui: { avatarSizing: { l: { size: 10 } } }, -} as unknown as EuiTheme; +const euiTheme = { + size: { avatarSizing: { l: { size: 10 } } }, + animation: { normal: '1s' }, +} as unknown as EuiThemeComputed; describe('useCytoscapeEventHandlers', () => { describe('when cytoscape is undefined', () => { it('runs', () => { expect(() => { - renderHook(() => useCytoscapeEventHandlers({ cy: undefined, theme })); + renderHook(() => useCytoscapeEventHandlers({ cy: undefined, euiTheme })); }).not.toThrowError(); }); }); @@ -45,7 +46,7 @@ describe('useCytoscapeEventHandlers', () => { } as unknown as cytoscape.CollectionReturnValue), } as unknown as cytoscape.CollectionReturnValue); - renderHook(() => useCytoscapeEventHandlers({ serviceName: 'test', cy, theme })); + renderHook(() => useCytoscapeEventHandlers({ serviceName: 'test', cy, euiTheme })); cy.trigger('custom:data'); expect(cy.getElementById('test').hasClass('primary')).toEqual(true); @@ -66,7 +67,7 @@ describe('useCytoscapeEventHandlers', () => { } as unknown as cytoscape.CollectionReturnValue), } as unknown as cytoscape.CollectionReturnValue); - renderHook(() => useCytoscapeEventHandlers({ cy, theme })); + renderHook(() => useCytoscapeEventHandlers({ cy, euiTheme })); cy.trigger('custom:data'); expect(run).toHaveBeenCalled(); @@ -85,7 +86,7 @@ describe('useCytoscapeEventHandlers', () => { const edge = cy.getElementById('test'); const style = jest.spyOn(edge, 'style'); - renderHook(() => useCytoscapeEventHandlers({ cy, theme })); + renderHook(() => useCytoscapeEventHandlers({ cy, euiTheme })); cy.trigger('layoutstop'); expect(style).toHaveBeenCalledWith('control-point-distances', [-0, 0]); @@ -97,7 +98,7 @@ describe('useCytoscapeEventHandlers', () => { const cy = cytoscape({ elements: [{ data: { id: 'test' } }] }); const node = cy.getElementById('test'); - renderHook(() => useCytoscapeEventHandlers({ cy, theme })); + renderHook(() => useCytoscapeEventHandlers({ cy, euiTheme })); node.trigger('drag'); expect(node.data('hasBeenDragged')).toEqual(true); @@ -110,7 +111,7 @@ describe('useCytoscapeEventHandlers', () => { }); const node = cy.getElementById('test'); - renderHook(() => useCytoscapeEventHandlers({ cy, theme })); + renderHook(() => useCytoscapeEventHandlers({ cy, euiTheme })); node.trigger('drag'); expect(node.data('hasBeenDragged')).toEqual(true); @@ -126,7 +127,7 @@ describe('useCytoscapeEventHandlers', () => { } as unknown as HTMLElement; jest.spyOn(cy, 'container').mockReturnValueOnce(container); - renderHook(() => useCytoscapeEventHandlers({ cy, theme })); + renderHook(() => useCytoscapeEventHandlers({ cy, euiTheme })); cy.getElementById('test').trigger('dragfree'); expect(container.style.cursor).toEqual('pointer'); @@ -140,7 +141,7 @@ describe('useCytoscapeEventHandlers', () => { }); const node = cy.getElementById('test'); - renderHook(() => useCytoscapeEventHandlers({ cy, theme })); + renderHook(() => useCytoscapeEventHandlers({ cy, euiTheme })); node.trigger('mouseover'); expect(node.hasClass('hover')).toEqual(true); @@ -153,7 +154,7 @@ describe('useCytoscapeEventHandlers', () => { } as unknown as HTMLElement; jest.spyOn(cy, 'container').mockReturnValueOnce(container); - renderHook(() => useCytoscapeEventHandlers({ cy, theme })); + renderHook(() => useCytoscapeEventHandlers({ cy, euiTheme })); cy.getElementById('test').trigger('mouseover'); expect(container.style.cursor).toEqual('pointer'); @@ -168,7 +169,7 @@ describe('useCytoscapeEventHandlers', () => { return fn; }); - renderHook(() => useCytoscapeEventHandlers({ cy, theme })); + renderHook(() => useCytoscapeEventHandlers({ cy, euiTheme })); cy.getElementById('test').trigger('mouseover'); expect(trackApmEvent).toHaveBeenCalledWith({ @@ -184,7 +185,7 @@ describe('useCytoscapeEventHandlers', () => { }); const node = cy.getElementById('test'); - renderHook(() => useCytoscapeEventHandlers({ cy, theme })); + renderHook(() => useCytoscapeEventHandlers({ cy, euiTheme })); node.trigger('mouseout'); expect(node.hasClass('hover')).toEqual(false); @@ -197,7 +198,7 @@ describe('useCytoscapeEventHandlers', () => { } as unknown as HTMLElement; jest.spyOn(cy, 'container').mockReturnValueOnce(container); - renderHook(() => useCytoscapeEventHandlers({ cy, theme })); + renderHook(() => useCytoscapeEventHandlers({ cy, euiTheme })); cy.getElementById('test').trigger('mouseout'); expect(container.style.cursor).toEqual('grab'); @@ -218,7 +219,7 @@ describe('useCytoscapeEventHandlers', () => { } as unknown as HTMLElement; jest.spyOn(cy, 'container').mockReturnValueOnce(container); - renderHook(() => useCytoscapeEventHandlers({ cy, theme })); + renderHook(() => useCytoscapeEventHandlers({ cy, euiTheme })); cy.getElementById('test').trigger('mouseover'); expect(container.style.cursor).toEqual('default'); @@ -235,7 +236,7 @@ describe('useCytoscapeEventHandlers', () => { return fn; }); - renderHook(() => useCytoscapeEventHandlers({ cy, theme })); + renderHook(() => useCytoscapeEventHandlers({ cy, euiTheme })); cy.getElementById('test').trigger('select'); expect(trackApmEvent).toHaveBeenCalledWith({ @@ -258,7 +259,7 @@ describe('useCytoscapeEventHandlers', () => { useCytoscapeEventHandlers({ serviceName: 'test', cy, - theme, + euiTheme, }) ); cy.getElementById('test').trigger('unselect'); @@ -275,7 +276,7 @@ describe('useCytoscapeEventHandlers', () => { } as unknown as HTMLElement; jest.spyOn(cy, 'container').mockReturnValueOnce(container); - renderHook(() => useCytoscapeEventHandlers({ cy, theme })); + renderHook(() => useCytoscapeEventHandlers({ cy, euiTheme })); cy.trigger('tapstart'); expect(container.style.cursor).toEqual('grabbing'); @@ -289,7 +290,7 @@ describe('useCytoscapeEventHandlers', () => { } as unknown as HTMLElement; jest.spyOn(cy, 'container').mockReturnValueOnce(container); - renderHook(() => useCytoscapeEventHandlers({ cy, theme })); + renderHook(() => useCytoscapeEventHandlers({ cy, euiTheme })); cy.getElementById('test').trigger('tapstart'); expect(container.style.cursor).toEqual('grab'); @@ -305,7 +306,7 @@ describe('useCytoscapeEventHandlers', () => { } as unknown as HTMLElement; jest.spyOn(cy, 'container').mockReturnValueOnce(container); - renderHook(() => useCytoscapeEventHandlers({ cy, theme })); + renderHook(() => useCytoscapeEventHandlers({ cy, euiTheme })); cy.trigger('tapend'); expect(container.style.cursor).toEqual('grab'); @@ -319,7 +320,7 @@ describe('useCytoscapeEventHandlers', () => { } as unknown as HTMLElement; jest.spyOn(cy, 'container').mockReturnValueOnce(container); - renderHook(() => useCytoscapeEventHandlers({ cy, theme })); + renderHook(() => useCytoscapeEventHandlers({ cy, euiTheme })); cy.getElementById('test').trigger('tapend'); expect(container.style.cursor).toEqual('pointer'); @@ -334,7 +335,7 @@ describe('useCytoscapeEventHandlers', () => { jest.spyOn(Storage.prototype, 'getItem').mockReturnValueOnce('true'); const debug = jest.spyOn(window.console, 'debug').mockReturnValueOnce(undefined); - renderHook(() => useCytoscapeEventHandlers({ cy, theme })); + renderHook(() => useCytoscapeEventHandlers({ cy, euiTheme })); cy.getElementById('test').trigger('select'); expect(debug).toHaveBeenCalled(); diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_map/use_cytoscape_event_handlers.ts b/x-pack/plugins/observability_solution/apm/public/components/app/service_map/use_cytoscape_event_handlers.ts index e40ee3e80eaa..fdf607c340fe 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_map/use_cytoscape_event_handlers.ts +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_map/use_cytoscape_event_handlers.ts @@ -8,8 +8,8 @@ import cytoscape from 'cytoscape'; import { debounce } from 'lodash'; import { useEffect } from 'react'; -import { EuiTheme } from '@kbn/kibana-react-plugin/common'; import { useUiTracker } from '@kbn/observability-shared-plugin/public'; +import type { EuiThemeComputed } from '@elastic/eui'; import { getAnimationOptions, getNodeHeight } from './cytoscape_options'; /* @@ -39,13 +39,13 @@ function applyCubicBezierStyles(edges: cytoscape.EdgeCollection) { function getLayoutOptions({ fit = false, nodeHeight, - theme, + euiTheme, }: { fit?: boolean; nodeHeight: number; - theme: EuiTheme; + euiTheme: EuiThemeComputed; }): cytoscape.LayoutOptions { - const animationOptions = getAnimationOptions(theme); + const animationOptions = getAnimationOptions(euiTheme); return { animationDuration: animationOptions.duration, @@ -82,16 +82,16 @@ function resetConnectedEdgeStyle(cytoscapeInstance: cytoscape.Core, node?: cytos export function useCytoscapeEventHandlers({ cy, serviceName, - theme, + euiTheme, }: { cy?: cytoscape.Core; serviceName?: string; - theme: EuiTheme; + euiTheme: EuiThemeComputed; }) { const trackApmEvent = useUiTracker({ app: 'apm' }); useEffect(() => { - const nodeHeight = getNodeHeight(theme); + const nodeHeight = getNodeHeight(euiTheme); const dataHandler: cytoscape.EventHandler = (event, fit) => { if (serviceName) { @@ -111,7 +111,7 @@ export function useCytoscapeEventHandlers({ event.cy .elements('[!hasBeenDragged]') .difference('node:selected') - .layout(getLayoutOptions({ fit, nodeHeight, theme })) + .layout(getLayoutOptions({ fit, nodeHeight, euiTheme })) .run(); }; @@ -216,5 +216,5 @@ export function useCytoscapeEventHandlers({ cy.removeListener('tapend', undefined, tapendHandler); } }; - }, [cy, serviceName, trackApmEvent, theme]); + }, [cy, serviceName, trackApmEvent, euiTheme]); } diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_overview/service_overview.test.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_overview/service_overview.test.tsx index 98cdc1e65c3a..71974cfbe75b 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_overview/service_overview.test.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_overview/service_overview.test.tsx @@ -6,10 +6,11 @@ */ import { composeStories } from '@storybook/testing-react'; -import { render, screen } from '@testing-library/react'; +import { screen } from '@testing-library/react'; import React from 'react'; import * as stories from './service_overview.stories'; import * as useAdHocApmDataView from '../../../hooks/use_adhoc_apm_data_view'; +import { renderWithTheme } from '../../../utils/test_helpers'; const { Example } = composeStories(stories); @@ -32,7 +33,7 @@ describe('ServiceOverview', () => { jest.clearAllMocks(); }); it('renders', async () => { - render(); + renderWithTheme(); expect(await screen.findByRole('heading', { name: 'Latency' })).toBeInTheDocument(); }); diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_overview/service_overview_instances_table/intance_details.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_overview/service_overview_instances_table/intance_details.tsx index f2682b2cce2d..bd9ade55866e 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_overview/service_overview_instances_table/intance_details.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_overview/service_overview_instances_table/intance_details.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiFlexGroup, EuiFlexItem, EuiSkeletonText } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiSkeletonText, useEuiTheme } from '@elastic/eui'; import { CloudProvider, getAgentIcon, getCloudProviderIcon } from '@kbn/custom-icons'; import { i18n } from '@kbn/i18n'; import { get } from 'lodash'; @@ -35,7 +35,6 @@ import { } from '../../../../../common/es_fields/infra_metrics'; import { isPending } from '../../../../hooks/use_fetcher'; -import { useTheme } from '../../../../hooks/use_theme'; import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { KeyValueFilterList } from '../../../shared/key_value_filter_list'; import { pushNewItemToKueryBar } from '../../../shared/kuery_bar/utils'; @@ -89,7 +88,7 @@ const cloudDetailsKeys = [ ]; export function InstanceDetails({ serviceName, serviceNodeName, kuery }: Props) { - const theme = useTheme(); + const { colorMode } = useEuiTheme(); const history = useHistory(); const { data, status } = useInstanceDetailsFetcher({ @@ -132,6 +131,8 @@ export function InstanceDetails({ serviceName, serviceNodeName, kuery }: Props) }); const containerType = data.kubernetes?.pod?.name ? 'Kubernetes' : 'Docker'; + + const isDarkMode = colorMode === 'DARK'; return ( @@ -140,7 +141,7 @@ export function InstanceDetails({ serviceName, serviceNodeName, kuery }: Props) title={i18n.translate('xpack.apm.serviceOverview.instanceTable.details.serviceTitle', { defaultMessage: 'Service', })} - icon={getAgentIcon(data.agent?.name, theme.darkMode)} + icon={getAgentIcon(data.agent?.name, isDarkMode)} keyValueList={serviceDetailsKeyValuePairs} onClickFilter={addKueryBarFilter} /> diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/settings/agent_configurations/list/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/settings/agent_configurations/list/index.tsx index ae36d8b0434d..ddd74716ceef 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/settings/agent_configurations/list/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/settings/agent_configurations/list/index.tsx @@ -13,6 +13,7 @@ import { EuiHealth, EuiToolTip, RIGHT_ALIGNMENT, + useEuiTheme, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { isEmpty } from 'lodash'; @@ -22,7 +23,6 @@ import { APIReturnType } from '../../../../../services/rest/create_call_apm_api' import { getOptionLabel } from '../../../../../../common/agent_configuration/all_option'; import { useApmPluginContext } from '../../../../../context/apm_plugin/use_apm_plugin_context'; import { FETCH_STATUS } from '../../../../../hooks/use_fetcher'; -import { useTheme } from '../../../../../hooks/use_theme'; import { LoadingStatePrompt } from '../../../../shared/loading_state_prompt'; import { ITableColumn, ManagedTable } from '../../../../shared/managed_table'; import { TimestampTooltip } from '../../../../shared/timestamp_tooltip'; @@ -40,7 +40,7 @@ interface Props { export function AgentConfigurationList({ status, configurations, refetch }: Props) { const { core } = useApmPluginContext(); const canSave = core.application.capabilities.apm['settings:save']; - const theme = useTheme(); + const { euiTheme } = useEuiTheme(); const [configToBeDeleted, setConfigToBeDeleted] = useState(null); const apmRouter = useApmRouter(); @@ -110,7 +110,7 @@ export function AgentConfigurationList({ status, configurations, refetch }: Prop { field: 'applied_by_agent', align: 'center', - width: theme.eui.euiSizeXL, + width: euiTheme.size.xl, name: '', sortable: true, render: (_, { applied_by_agent: appliedByAgent }) => ( @@ -125,7 +125,7 @@ export function AgentConfigurationList({ status, configurations, refetch }: Prop }) } > - + ), }, @@ -172,12 +172,14 @@ export function AgentConfigurationList({ status, configurations, refetch }: Prop ...(canSave ? [ { - width: theme.eui.euiSizeXL, + width: euiTheme.size.xl, name: '', render: (config: Config) => ( ( setConfigToBeDeleted(config)} /> diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/delete_button.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/delete_button.tsx index 02ef3b97222b..564381f78a4a 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/delete_button.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/delete_button.tsx @@ -5,13 +5,12 @@ * 2.0. */ -import { EuiButtonEmpty } from '@elastic/eui'; +import { EuiButtonEmpty, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { NotificationsStart } from '@kbn/core/public'; import React, { useState } from 'react'; import { callApmApi } from '../../../../../services/rest/create_call_apm_api'; import { useApmPluginContext } from '../../../../../context/apm_plugin/use_apm_plugin_context'; -import { useTheme } from '../../../../../hooks/use_theme'; interface Props { onDelete: () => void; @@ -21,7 +20,7 @@ interface Props { export function DeleteButton({ onDelete, customLinkId }: Props) { const [isDeleting, setIsDeleting] = useState(false); const { toasts } = useApmPluginContext().core.notifications; - const theme = useTheme(); + const { euiTheme } = useEuiTheme(); return ( {i18n.translate('xpack.apm.settings.customLink.delete', { defaultMessage: 'Delete', diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/storage_explorer/summary_stats.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/storage_explorer/summary_stats.tsx index bd76025d9606..30053480eb4e 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/storage_explorer/summary_stats.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/storage_explorer/summary_stats.tsx @@ -204,7 +204,7 @@ function SummaryMetric({ css={css` ${xlFontSize} font-weight: ${euiTheme.font.weight.bold}; - color: ${euiTheme.colors.text}; + color: ${euiTheme.colors.textParagraph}; `} > {value} diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/top_traces_overview/trace_list.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/top_traces_overview/trace_list.tsx index 9b3d54d4efad..74461fcb7920 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/top_traces_overview/trace_list.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/top_traces_overview/trace_list.tsx @@ -5,12 +5,12 @@ * 2.0. */ -import { EuiIcon, EuiToolTip, RIGHT_ALIGNMENT } from '@elastic/eui'; +import { EuiIcon, EuiToolTip, RIGHT_ALIGNMENT, useEuiFontSize } from '@elastic/eui'; import { usePerformanceContext } from '@kbn/ebt-tools'; import { TypeOf } from '@kbn/typed-react-router-config'; import { i18n } from '@kbn/i18n'; import React, { useEffect, useMemo } from 'react'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { ApmRoutes } from '../../routing/apm_route_config'; import { asMillisecondDuration, asTransactionRate } from '../../../../common/utils/formatters'; import { useApmParams } from '../../../hooks/use_apm_params'; @@ -25,8 +25,8 @@ import { ServiceLink } from '../../shared/links/apm/service_link'; import { TruncateWithTooltip } from '../../shared/truncate_with_tooltip'; import { NOT_AVAILABLE_LABEL } from '../../../../common/i18n'; -const StyledTransactionLink = euiStyled(TransactionDetailLink)` - font-size: ${({ theme }) => theme.eui.euiFontSizeS}; +const StyledTransactionLink = styled(TransactionDetailLink)` + font-size: ${() => useEuiFontSize('s').fontSize}; ${truncate('100%')}; `; diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/trace_link/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/trace_link/index.tsx index 74b3975335c9..b1d1b0f8d745 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/trace_link/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/trace_link/index.tsx @@ -9,7 +9,7 @@ import { EuiEmptyPrompt } from '@elastic/eui'; import React from 'react'; import { i18n } from '@kbn/i18n'; import { Redirect } from 'react-router-dom'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { FETCH_STATUS, useFetcher } from '../../../hooks/use_fetcher'; import { getRedirectToTransactionDetailPageUrl } from './get_redirect_to_transaction_detail_page_url'; @@ -18,7 +18,7 @@ import { useApmParams } from '../../../hooks/use_apm_params'; import { useTimeRange } from '../../../hooks/use_time_range'; import { ApmPluginStartDeps } from '../../../plugin'; -const CentralizedContainer = euiStyled.div` +const CentralizedContainer = styled.div` height: 100%; display: flex; `; diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/distribution/use_transaction_distribution_chart_data.ts b/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/distribution/use_transaction_distribution_chart_data.ts index 66f346f36a5f..25acce3e5679 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/distribution/use_transaction_distribution_chart_data.ts +++ b/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/distribution/use_transaction_distribution_chart_data.ts @@ -7,6 +7,7 @@ import { useEffect } from 'react'; import { i18n } from '@kbn/i18n'; +import { useEuiTheme } from '@elastic/eui'; import { DEFAULT_PERCENTILE_THRESHOLD } from '../../../../../common/correlations/constants'; import { EVENT_OUTCOME } from '../../../../../common/es_fields/apm'; import { EventOutcome } from '../../../../../common/event_outcome'; @@ -16,11 +17,10 @@ import { useFetcher, FETCH_STATUS } from '../../../../hooks/use_fetcher'; import { isErrorMessage } from '../../correlations/utils/is_error_message'; import { useFetchParams } from '../../correlations/use_fetch_params'; import { getTransactionDistributionChartData } from '../../correlations/get_transaction_distribution_chart_data'; -import { useTheme } from '../../../../hooks/use_theme'; export const useTransactionDistributionChartData = () => { const params = useFetchParams(); - const euiTheme = useTheme(); + const { euiTheme } = useEuiTheme(); const { core: { notifications }, diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/accordion_waterfall.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/accordion_waterfall.tsx index a6520f964c7b..41d11ba74e2e 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/accordion_waterfall.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/accordion_waterfall.tsx @@ -7,20 +7,19 @@ import { EuiAccordion, - EuiAccordionProps, EuiFlexGroup, EuiFlexItem, EuiIcon, EuiText, EuiToolTip, + useEuiTheme, } from '@elastic/eui'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; import { transparentize } from 'polished'; import React, { useEffect, useRef } from 'react'; import { WindowScroller, AutoSizer } from 'react-virtualized'; import { areEqual, ListChildComponentProps, VariableSizeList as List } from 'react-window'; +import { css } from '@emotion/react'; import { asBigNumber } from '../../../../../../../common/utils/formatters'; -import { useTheme } from '../../../../../../hooks/use_theme'; import { Margins } from '../../../../../shared/charts/timeline'; import { IWaterfallNodeFlatten, @@ -53,38 +52,6 @@ interface WaterfallNodeProps extends WaterfallProps { const ACCORDION_HEIGHT = 48; -const StyledAccordion = euiStyled(EuiAccordion).withConfig({ - shouldForwardProp: (prop) => !['marginLeftLevel', 'hasError'].includes(prop), -})< - EuiAccordionProps & { - marginLeftLevel: number; - hasError: boolean; - } ->` - - border-top: 1px solid ${({ theme }) => theme.eui.euiColorLightShade}; - - ${(props) => { - const borderLeft = props.hasError - ? `2px solid ${props.theme.eui.euiColorDanger};` - : `1px solid ${props.theme.eui.euiColorLightShade};`; - return `.button_${props.id} { - width: 100%; - height: ${ACCORDION_HEIGHT}px; - margin-left: ${props.marginLeftLevel}px; - border-left: ${borderLeft} - &:hover { - background-color: ${props.theme.eui.euiColorLightestShade}; - } - }`; - }} - - .accordion__buttonContent { - width: 100%; - height: 100%; - } -`; - export function AccordionWaterfall({ maxLevelOpen, showCriticalPath, @@ -176,7 +143,7 @@ const VirtualRow = React.memo( ); const WaterfallNode = React.memo((props: WaterfallNodeProps) => { - const theme = useTheme(); + const { euiTheme } = useEuiTheme(); const { duration, waterfallItemId, onClickWaterfallItem, timelineMargins, node } = props; const { criticalPathSegmentsById, getErrorCount, updateTreeNode, showCriticalPath } = useWaterfallContext(); @@ -190,7 +157,7 @@ const WaterfallNode = React.memo((props: WaterfallNodeProps) => { ?.filter((segment) => segment.self) .map((segment) => ({ id: segment.item.id, - color: theme.eui.euiColorAccent, + color: euiTheme.colors.accent, left: (segment.offset - node.item.offset - node.item.skew) / node.item.duration, width: segment.duration / node.item.duration, })); @@ -203,14 +170,14 @@ const WaterfallNode = React.memo((props: WaterfallNodeProps) => { onClickWaterfallItem(node.item, flyoutDetailTab); }; + const hasError = node.item.doc.event?.outcome === 'failure'; + return ( - @@ -243,6 +210,24 @@ const WaterfallNode = React.memo((props: WaterfallNodeProps) => { initialIsOpen forceState={node.expanded ? 'open' : 'closed'} onToggle={toggleAccordion} + css={css` + border-top: ${euiTheme.border.thin}; + .button_${node.item.id} { + width: 100%; + height: ${ACCORDION_HEIGHT}px; + margin-left: ${marginLeftLevel}px; + border-left: ${hasError + ? `${euiTheme.border.width.thick} solid ${euiTheme.colors.danger};` + : `${euiTheme.border.thin};`}; + &:hover { + background-color: ${euiTheme.colors.lightestShade}; + } + } + .accordion__buttonContent { + width: 100%; + height: 100%; + } + `} /> ); }); diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/failure_badge.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/failure_badge.tsx index 29dd5ffde654..91f60fd9df84 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/failure_badge.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/failure_badge.tsx @@ -6,18 +6,17 @@ */ import React from 'react'; -import { EuiBadge, EuiToolTip } from '@elastic/eui'; +import { EuiBadge, EuiToolTip, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { EventOutcome } from '../../../../../../../typings/es_schemas/raw/fields/event_outcome'; -import { useTheme } from '../../../../../../hooks/use_theme'; -const ResetLineHeight = euiStyled.span` +const ResetLineHeight = styled.span` line-height: initial; `; export function FailureBadge({ outcome }: { outcome?: EventOutcome }) { - const theme = useTheme(); + const { euiTheme } = useEuiTheme(); if (outcome !== 'failure') { return null; @@ -30,7 +29,11 @@ export function FailureBadge({ outcome }: { outcome?: EventOutcome }) { defaultMessage: 'event.outcome = failure', })} > - failure + + {i18n.translate('xpack.apm.failure_badge.label', { + defaultMessage: 'failure', + })} + ); diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/index.tsx index dbdc877742e1..56a5367a4cfa 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/index.tsx @@ -5,14 +5,13 @@ * 2.0. */ -import { EuiButtonEmpty, EuiCallOut } from '@elastic/eui'; +import { EuiButtonEmpty, EuiCallOut, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { History } from 'history'; import React, { useMemo, useState } from 'react'; import { useHistory } from 'react-router-dom'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { css } from '@emotion/react'; -import { useTheme } from '../../../../../../hooks/use_theme'; import { VerticalLinesContainer, TimelineAxisContainer, @@ -24,7 +23,7 @@ import { AccordionWaterfall } from './accordion_waterfall'; import { WaterfallFlyout } from './waterfall_flyout'; import { IWaterfall, IWaterfallItem } from './waterfall_helpers/waterfall_helpers'; -const Container = euiStyled.div` +const Container = styled.div` transition: 0.1s padding ease; position: relative; `; @@ -48,8 +47,8 @@ const toggleFlyout = ({ }); }; -const WaterfallItemsContainer = euiStyled.div` - border-bottom: 1px solid ${({ theme }) => theme.eui.euiColorMediumShade}; +const WaterfallItemsContainer = styled.div` + border-bottom: 1px solid ${({ theme }) => theme.euiTheme.colors.mediumShade}; `; interface Props { @@ -90,7 +89,7 @@ const MAX_DEPTH_OPEN_LIMIT = 2; export function Waterfall({ waterfall, waterfallItemId, showCriticalPath }: Props) { const history = useHistory(); - const theme = useTheme(); + const { euiTheme } = useEuiTheme(); const [isAccordionOpen, setIsAccordionOpen] = useState(true); const { duration } = waterfall; @@ -134,16 +133,16 @@ export function Waterfall({ waterfall, waterfallItemId, showCriticalPath }: Prop display: flex; position: sticky; top: var(--euiFixedHeadersOffset, 0); - z-index: ${theme.eui.euiZLevel2}; - background-color: ${theme.eui.euiColorEmptyShade}; - border-bottom: 1px solid ${theme.eui.euiColorMediumShade}; + z-index: ${euiTheme.levels.content}; + background-color: ${euiTheme.colors.emptyShade}; + border-bottom: 1px solid ${euiTheme.colors.mediumShade}; `} > { diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/responsive_flyout.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/responsive_flyout.tsx index 16a80ce09efd..3c3440b7833c 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/responsive_flyout.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/responsive_flyout.tsx @@ -5,10 +5,21 @@ * 2.0. */ -import { EuiFlyout } from '@elastic/eui'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import React from 'react'; +import { EuiFlyout, EuiFlyoutProps } from '@elastic/eui'; +import styled, { type StyledComponent } from '@emotion/styled'; -export const ResponsiveFlyout = euiStyled(EuiFlyout)` +// The return type of this component needs to be specified because the inferred +// return type depends on types that are not exported from EUI. You get a TS4023 +// error if the return type is not specified. +export const ResponsiveFlyout: StyledComponent = styled( + ({ + className, + ...flyoutProps + }: { + className?: string; + } & EuiFlyoutProps) => +)` width: 100%; @media (min-width: 800px) { diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/index.tsx index e4c9f0cf2816..f412df0b099b 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/index.tsx @@ -21,7 +21,7 @@ import { EuiToolTip, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { isEmpty } from 'lodash'; import React, { Fragment } from 'react'; @@ -80,10 +80,10 @@ function getSpanTypes(span: Span) { }; } -const ContainerWithMarginRight = euiStyled.div` +const ContainerWithMarginRight = styled.div` /* add margin to all direct descendants */ & > * { - margin-right: ${({ theme }) => theme.eui.euiSizeXS}; + margin-right: ${({ theme }) => theme.euiTheme.size.xs}; } `; diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/truncate_height_section.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/truncate_height_section.tsx index 6416b6f24cf6..214cc8841b2c 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/truncate_height_section.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/truncate_height_section.tsx @@ -8,10 +8,10 @@ import { EuiIcon, EuiLink } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { Fragment, ReactNode, useEffect, useRef, useState } from 'react'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; -const ToggleButtonContainer = euiStyled.div` - margin-top: ${({ theme }) => theme.eui.euiSizeS} +const ToggleButtonContainer = styled.div` + margin-top: ${({ theme }) => theme.euiTheme.size.s} user-select: none; `; diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_item.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_item.tsx index 11d0f9bba929..296c98705294 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_item.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_item.tsx @@ -5,11 +5,10 @@ * 2.0. */ -import { EuiBadge, EuiIcon, EuiText, EuiTitle, EuiToolTip } from '@elastic/eui'; +import { EuiBadge, EuiIcon, EuiText, EuiTitle, EuiToolTip, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { ReactNode, useRef, useEffect, useState } from 'react'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; -import { useTheme } from '../../../../../../hooks/use_theme'; +import styled from '@emotion/styled'; import { isMobileAgentName, isRumAgentName } from '../../../../../../../common/agent_name'; import { TRACE_ID, TRANSACTION_ID } from '../../../../../../../common/es_fields/apm'; import { asDuration } from '../../../../../../../common/utils/formatters'; @@ -37,68 +36,68 @@ interface IBarStyleProps { color: string; } -const Container = euiStyled.div` +const Container = styled.div` position: relative; display: block; user-select: none; - padding-top: ${({ theme }) => theme.eui.euiSizeS}; - padding-bottom: ${({ theme }) => theme.eui.euiSizeM}; + padding-top: ${({ theme }) => theme.euiTheme.size.s}; + padding-bottom: ${({ theme }) => theme.euiTheme.size.m}; margin-right: ${(props) => props.timelineMargins.right}px; margin-left: ${(props) => props.hasToggle ? props.timelineMargins.left - 30 // fix margin if there is a toggle - : props.timelineMargins.left}px ; + : props.timelineMargins.left}px; background-color: ${({ isSelected, theme }) => - isSelected ? theme.eui.euiColorLightestShade : 'initial'}; + isSelected ? theme.euiTheme.colors.lightestShade : 'initial'}; cursor: pointer; &:hover { - background-color: ${({ theme }) => theme.eui.euiColorLightestShade}; + background-color: ${({ theme }) => theme.euiTheme.colors.lightestShade}; } `; -const ItemBar = euiStyled.div` +const ItemBar = styled.div` box-sizing: border-box; position: relative; - height: ${({ theme }) => theme.eui.euiSize}; + height: ${({ theme }) => theme.euiTheme.size.base}; min-width: 2px; background-color: ${(props) => props.color}; `; -const ItemText = euiStyled.span` +const ItemText = styled.span` position: absolute; right: 0; display: flex; align-items: center; - height: ${({ theme }) => theme.eui.euiSizeL}; + height: ${({ theme }) => theme.euiTheme.size.l}; max-width: 100%; /* add margin to all direct descendants */ & > * { - margin-right: ${({ theme }) => theme.eui.euiSizeS}; + margin-right: ${({ theme }) => theme.euiTheme.size.s}; white-space: nowrap; } `; -const CriticalPathItemBar = euiStyled.div` +const CriticalPathItemBar = styled.div` box-sizing: border-box; position: relative; - height: ${({ theme }) => theme.eui.euiSizeS}; - top : ${({ theme }) => theme.eui.euiSizeS}; + height: ${({ theme }) => theme.euiTheme.size.s}; + top: ${({ theme }) => theme.euiTheme.size.s}; min-width: 2px; background-color: transparent; display: flex; flex-direction: row; `; -const CriticalPathItemSegment = euiStyled.div<{ +const CriticalPathItemSegment = styled.div<{ left: number; width: number; color: string; }>` box-sizing: border-box; position: absolute; - height: ${({ theme }) => theme.eui.euiSizeS}; + height: ${({ theme }) => theme.euiTheme.size.s}; left: ${(props) => props.left * 100}%; width: ${(props) => props.width * 100}%; min-width: 2px; @@ -311,7 +310,7 @@ function RelatedErrors({ errorCount: number; }) { const apmRouter = useApmRouter(); - const theme = useTheme(); + const { euiTheme } = useEuiTheme(); const { query } = useAnyOfApmParams( '/services/{serviceName}/transactions/view', '/mobile-services/{serviceName}/transactions/view', @@ -348,7 +347,7 @@ function RelatedErrors({
    e.stopPropagation()}> {i18n.translate('xpack.apm.waterfall.errorCount', { diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall_container.test.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall_container.test.tsx index 4a46d708bb82..e14f185e2f6f 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall_container.test.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall_container.test.tsx @@ -6,9 +6,9 @@ */ import { composeStories } from '@storybook/testing-react'; -import { render, waitFor } from '@testing-library/react'; +import { waitFor } from '@testing-library/react'; import React from 'react'; -import { disableConsoleWarning } from '../../../../../utils/test_helpers'; +import { disableConsoleWarning, renderWithTheme } from '../../../../../utils/test_helpers'; import * as stories from './waterfall_container.stories'; const { Example } = composeStories(stories); @@ -25,7 +25,7 @@ describe('WaterfallContainer', () => { }); it('expands and contracts the accordion', async () => { - const { getAllByRole } = render(); + const { getAllByRole } = renderWithTheme(); const buttons = await waitFor(() => getAllByRole('button')); const parentItem = buttons[1]; const childItem = buttons[2]; diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/transaction_link/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/transaction_link/index.tsx index 74ad3ffbe3d1..d05085f0b823 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/transaction_link/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/transaction_link/index.tsx @@ -7,14 +7,15 @@ import { EuiEmptyPrompt } from '@elastic/eui'; import React from 'react'; +import { i18n } from '@kbn/i18n'; import { Redirect } from 'react-router-dom'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { FETCH_STATUS, useFetcher } from '../../../hooks/use_fetcher'; import { getRedirectToTransactionDetailPageUrl } from '../trace_link/get_redirect_to_transaction_detail_page_url'; import { useApmParams } from '../../../hooks/use_apm_params'; import { useTimeRange } from '../../../hooks/use_time_range'; -const CentralizedContainer = euiStyled.div` +const CentralizedContainer = styled.div` height: 100%; display: flex; `; @@ -67,7 +68,16 @@ export function TransactionLink() { return ( - Fetching transaction...} /> + + {i18n.translate('xpack.apm.transactionLink.h2.fetchingTransactionLabel', { + defaultMessage: 'Fetching transaction...', + })} + + } + /> ); } diff --git a/x-pack/plugins/observability_solution/apm/public/components/fleet_integration/apm_agents/agent_instructions_accordion.tsx b/x-pack/plugins/observability_solution/apm/public/components/fleet_integration/apm_agents/agent_instructions_accordion.tsx index bd87c7b61631..4889f33b3f0d 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/fleet_integration/apm_agents/agent_instructions_accordion.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/fleet_integration/apm_agents/agent_instructions_accordion.tsx @@ -16,7 +16,7 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { ComponentType } from 'react'; -import styled from 'styled-components'; +import styled from '@emotion/styled'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { Markdown } from '@kbn/shared-ux-markdown'; import { AgentIcon } from '@kbn/custom-icons'; diff --git a/x-pack/plugins/observability_solution/apm/public/components/fleet_integration/apm_policy_form/settings_form/form_row_setting.tsx b/x-pack/plugins/observability_solution/apm/public/components/fleet_integration/apm_policy_form/settings_form/form_row_setting.tsx index 00e6c0265fdf..20d018e27362 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/fleet_integration/apm_policy_form/settings_form/form_row_setting.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/fleet_integration/apm_policy_form/settings_form/form_row_setting.tsx @@ -15,7 +15,7 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import styled from 'styled-components'; +import styled from '@emotion/styled'; import { CodeEditor } from '@kbn/code-editor'; import { FormRowOnChange } from '.'; import { SettingsRow } from '../typings'; diff --git a/x-pack/plugins/observability_solution/apm/public/components/routing/app_root/apm_header_action_menu/anomaly_detection_setup_link.tsx b/x-pack/plugins/observability_solution/apm/public/components/routing/app_root/apm_header_action_menu/anomaly_detection_setup_link.tsx index 8d7091e17a4a..2441dd7893cd 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/routing/app_root/apm_header_action_menu/anomaly_detection_setup_link.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/routing/app_root/apm_header_action_menu/anomaly_detection_setup_link.tsx @@ -7,7 +7,7 @@ import { EuiLoadingSpinner } from '@elastic/eui'; import { IconType } from '@elastic/eui'; -import { EuiHeaderLink, EuiIcon, EuiToolTip } from '@elastic/eui'; +import { EuiHeaderLink, EuiIcon, EuiToolTip, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; import { AnomalyDetectionSetupState } from '../../../../../common/anomaly_detection/get_anomaly_detection_setup_state'; @@ -18,7 +18,6 @@ import { import { useAnomalyDetectionJobsContext } from '../../../../context/anomaly_detection_jobs/use_anomaly_detection_jobs_context'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; import { useApmParams } from '../../../../hooks/use_apm_params'; -import { useTheme } from '../../../../hooks/use_theme'; import { getLegacyApmHref } from '../../../shared/links/apm/apm_link'; export function AnomalyDetectionSetupLink() { @@ -29,12 +28,12 @@ export function AnomalyDetectionSetupLink() { const { core } = useApmPluginContext(); const { basePath } = core.http; - const theme = useTheme(); + const { euiTheme } = useEuiTheme(); const { anomalyDetectionSetupState } = useAnomalyDetectionJobsContext(); let tooltipText: string = ''; - let color: 'warning' | 'text' | 'success' | 'danger' = 'text'; + let color: 'warning' | 'text' | 'accentSecondary' | 'danger' = 'text'; let icon: IconType | undefined; if (anomalyDetectionSetupState === AnomalyDetectionSetupState.Failure) { @@ -51,7 +50,7 @@ export function AnomalyDetectionSetupLink() { tooltipText = getNoJobsMessage(anomalyDetectionSetupState, environment); icon = 'machineLearningApp'; } else if (anomalyDetectionSetupState === AnomalyDetectionSetupState.UpgradeableJobs) { - color = 'success'; + color = 'accentSecondary'; tooltipText = i18n.translate('xpack.apm.anomalyDetectionSetup.upgradeableJobsText', { defaultMessage: 'Updates available for existing anomaly detection jobs.', }); @@ -74,7 +73,7 @@ export function AnomalyDetectionSetupLink() { data-test-subj="apmAnomalyDetectionHeaderLink" > {pre} - {ANOMALY_DETECTION_LINK_LABEL} + {ANOMALY_DETECTION_LINK_LABEL} ); diff --git a/x-pack/plugins/observability_solution/apm/public/components/routing/app_root/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/routing/app_root/index.tsx index 69ea154538d6..2b709e207747 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/routing/app_root/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/routing/app_root/index.tsx @@ -7,7 +7,7 @@ import { PerformanceContextProvider } from '@kbn/ebt-tools'; import { APP_WRAPPER_CLASS } from '@kbn/core/public'; -import { KibanaContextProvider, useDarkMode } from '@kbn/kibana-react-plugin/public'; +import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app'; import { Storage } from '@kbn/kibana-utils-plugin/public'; import { @@ -16,9 +16,7 @@ import { } from '@kbn/observability-shared-plugin/public'; import { Route } from '@kbn/shared-ux-router'; import { RouteRenderer, RouterProvider } from '@kbn/typed-react-router-config'; -import { euiDarkVars, euiLightVars } from '@kbn/ui-theme'; import React from 'react'; -import { DefaultTheme, ThemeProvider } from 'styled-components'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { KibanaEnvironmentContextProvider } from '../../../context/kibana_environment_context/kibana_environment_context'; import { AnomalyDetectionJobsContextProvider } from '../../../context/anomaly_detection_jobs/anomaly_detection_jobs_context'; @@ -84,11 +82,9 @@ export function ApmAppRoot({ - - - - - + + + @@ -128,19 +124,3 @@ function MountApmHeaderActionMenu() { ); } - -export function ApmThemeProvider({ children }: { children: React.ReactNode }) { - const darkMode = useDarkMode(false); - - return ( - ({ - ...outerTheme, - eui: darkMode ? euiDarkVars : euiLightVars, - darkMode, - })} - > - {children} - - ); -} diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/charts/breakdown_chart/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/charts/breakdown_chart/index.tsx index 8103f729f375..e0ad710a14d9 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/charts/breakdown_chart/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/charts/breakdown_chart/index.tsx @@ -21,7 +21,7 @@ import { Tooltip, LegendValue, } from '@elastic/charts'; -import { EuiIcon } from '@elastic/eui'; +import { EuiIcon, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import moment from 'moment'; import React from 'react'; @@ -36,7 +36,6 @@ import { import { Coordinate, TimeSeries } from '../../../../../typings/timeseries'; import { useChartPointerEventContext } from '../../../../context/chart_pointer_event/use_chart_pointer_event_context'; import { FETCH_STATUS } from '../../../../hooks/use_fetcher'; -import { useTheme } from '../../../../hooks/use_theme'; import { unit } from '../../../../utils/style'; import { ChartContainer } from '../chart_container'; import { isTimeseriesEmpty, onBrushEnd } from '../helper/helper'; @@ -74,7 +73,7 @@ export function BreakdownChart({ const { query: { rangeFrom, rangeTo }, } = useAnyOfApmParams('/services/{serviceName}', '/mobile-services/{serviceName}'); - const theme = useTheme(); + const { euiTheme } = useEuiTheme(); const { start, end } = useTimeRange({ rangeFrom, rangeTo }); const min = moment.utc(start).valueOf(); @@ -82,7 +81,7 @@ export function BreakdownChart({ const xFormatter = niceTimeFormatter([min, max]); - const annotationColor = theme.eui.euiColorSuccess; + const annotationColor = euiTheme.colors.accentSecondary; const isEmpty = isTimeseriesEmpty(timeseries); diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/charts/duration_distribution_chart/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/charts/duration_distribution_chart/index.tsx index 1a88bf8b48c0..65f22d78adf9 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/charts/duration_distribution_chart/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/charts/duration_distribution_chart/index.tsx @@ -25,7 +25,7 @@ import { TickFormatter, } from '@elastic/charts'; -import { euiPaletteColorBlind } from '@elastic/eui'; +import { euiPaletteColorBlind, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; @@ -37,7 +37,6 @@ import type { HistogramItem } from '../../../../../common/correlations/types'; import { DEFAULT_PERCENTILE_THRESHOLD } from '../../../../../common/correlations/constants'; import { FETCH_STATUS } from '../../../../hooks/use_fetcher'; -import { useTheme } from '../../../../hooks/use_theme'; import { ChartContainer } from '../chart_container'; @@ -109,7 +108,7 @@ export function DurationDistributionChart({ eventType, }: DurationDistributionChartProps) { const chartThemes = useChartThemes(); - const euiTheme = useTheme(); + const { euiTheme } = useEuiTheme(); const markerPercentile = DEFAULT_PERCENTILE_THRESHOLD; const annotationsDataValues: LineAnnotationDatum[] = [ @@ -188,7 +187,7 @@ export function DurationDistributionChart({ }, tickLabel: { fontSize: 10, - fill: euiTheme.eui.euiColorMediumShade, + fill: euiTheme.colors.mediumShade, padding: 0, }, }, @@ -207,8 +206,8 @@ export function DurationDistributionChart({ id="rect_annotation_1" style={{ strokeWidth: 1, - stroke: euiTheme.eui.euiColorLightShade, - fill: euiTheme.eui.euiColorLightShade, + stroke: euiTheme.colors.lightShade, + fill: euiTheme.colors.lightShade, opacity: 0.9, }} hideTooltips={true} diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/charts/helper/get_chart_anomaly_timeseries.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/charts/helper/get_chart_anomaly_timeseries.tsx index 56b61cb02d8b..74179489aceb 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/charts/helper/get_chart_anomaly_timeseries.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/charts/helper/get_chart_anomaly_timeseries.tsx @@ -7,11 +7,11 @@ import { i18n } from '@kbn/i18n'; import { rgba } from 'polished'; -import { EuiTheme } from '@kbn/kibana-react-plugin/common'; import { getSeverity } from '@kbn/ml-anomaly-utils/get_severity'; import { ML_ANOMALY_SEVERITY } from '@kbn/ml-anomaly-utils/anomaly_severity'; import { ML_ANOMALY_THRESHOLD } from '@kbn/ml-anomaly-utils/anomaly_threshold'; import type { AreaSeriesStyle, RecursivePartial } from '@elastic/charts'; +import type { EuiThemeComputed } from '@elastic/eui'; import { getSeverityColor } from '../../../../../common/anomaly_detection'; import { ServiceAnomalyTimeseries } from '../../../../../common/anomaly_detection/service_anomaly_timeseries'; import { APMChartSpec } from '../../../../../typings/timeseries'; @@ -21,11 +21,11 @@ export const expectedBoundsTitle = i18n.translate('xpack.apm.comparison.expected }); export function getChartAnomalyTimeseries({ anomalyTimeseries, - theme, + euiTheme, anomalyTimeseriesColor, }: { anomalyTimeseries?: ServiceAnomalyTimeseries; - theme: EuiTheme; + euiTheme: EuiThemeComputed; anomalyTimeseriesColor?: string; }): | { @@ -48,7 +48,7 @@ export function getChartAnomalyTimeseries({ opacity: 0, }, }, - color: anomalyTimeseriesColor ?? rgba(theme.eui.euiColorVis1, 0.5), + color: anomalyTimeseriesColor ?? rgba(euiTheme.colors.vis.euiColorVis1, 0.5), yAccessors: ['y1'], y0Accessors: ['y0'], data: anomalyTimeseries.bounds, diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/charts/instances_latency_distribution_chart/custom_tooltip.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/charts/instances_latency_distribution_chart/custom_tooltip.tsx index f12f367eab8e..8e0c24162f2a 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/charts/instances_latency_distribution_chart/custom_tooltip.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/charts/instances_latency_distribution_chart/custom_tooltip.tsx @@ -6,13 +6,12 @@ */ import { TooltipInfo } from '@elastic/charts'; -import { EuiIcon } from '@elastic/eui'; +import { EuiIcon, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { getServiceNodeName } from '../../../../../common/service_nodes'; import { asTransactionRate, TimeFormatter } from '../../../../../common/utils/formatters'; -import { useTheme } from '../../../../hooks/use_theme'; type ServiceInstanceMainStatistics = APIReturnType<'GET /internal/apm/services/{serviceName}/service_overview_instances/main_statistics'>; @@ -92,7 +91,7 @@ function MultipleInstanceCustomTooltip({ latencyFormatter, values, }: TooltipInfo & { latencyFormatter: TimeFormatter }) { - const theme = useTheme(); + const { euiTheme } = useEuiTheme(); return ( <> @@ -127,10 +126,7 @@ function MultipleInstanceCustomTooltip({ >
    -
    +
    {latencyLabel} {latencyFormatter(latency).formatted}
    @@ -142,10 +138,7 @@ function MultipleInstanceCustomTooltip({ >
    -
    +
    {throughputLabel} {asTransactionRate(throughput)}
    @@ -166,7 +159,7 @@ function MultipleInstanceCustomTooltip({ */ export function CustomTooltip(props: TooltipInfo & { latencyFormatter: TimeFormatter }) { const { values } = props; - const theme = useTheme(); + const { euiTheme } = useEuiTheme(); return (
    @@ -175,7 +168,7 @@ export function CustomTooltip(props: TooltipInfo & { latencyFormatter: TimeForma ) : ( )} -
    +
    {clickToFilterDescription}
    diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/charts/instances_latency_distribution_chart/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/charts/instances_latency_distribution_chart/index.tsx index fec3fc4cfe2d..6e5ce28e8cd2 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/charts/instances_latency_distribution_chart/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/charts/instances_latency_distribution_chart/index.tsx @@ -19,7 +19,7 @@ import { TooltipType, Tooltip, } from '@elastic/charts'; -import { EuiPanel, EuiTitle } from '@elastic/eui'; +import { EuiPanel, EuiTitle, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; import { useHistory } from 'react-router-dom'; @@ -28,7 +28,6 @@ import { usePreviousPeriodLabel } from '../../../../hooks/use_previous_period_te import { SERVICE_NODE_NAME } from '../../../../../common/es_fields/apm'; import { asTransactionRate, getDurationFormatter } from '../../../../../common/utils/formatters'; import { FETCH_STATUS } from '../../../../hooks/use_fetcher'; -import { useTheme } from '../../../../hooks/use_theme'; import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import * as urlHelpers from '../../links/url_helpers'; import { ChartContainer } from '../chart_container'; @@ -54,7 +53,7 @@ export function InstancesLatencyDistributionChart({ const history = useHistory(); const hasData = items.length > 0; - const theme = useTheme(); + const { euiTheme } = useEuiTheme(); const chartThemes = useChartThemes(); const maxLatency = Math.max(...items.map((item) => item.latency ?? 0)); @@ -130,7 +129,7 @@ export function InstancesLatencyDistributionChart({ locale={i18n.getLocale()} /> @@ -156,13 +155,13 @@ export function InstancesLatencyDistributionChart({ xScaleType={ScaleType.Linear} yAccessors={[(item) => item.latency]} yScaleType={ScaleType.Linear} - color={theme.eui.euiColorMediumShade} + color={euiTheme.colors.mediumShade} bubbleSeriesStyle={{ point: { shape: 'square', radius: 4, - fill: theme.eui.euiColorLightestShade, - stroke: theme.eui.euiColorMediumShade, + fill: euiTheme.colors.lightestShade, + stroke: euiTheme.colors.mediumShade, strokeWidth: 2, }, }} diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/charts/spark_plot/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/charts/spark_plot/index.tsx index 84e2e6cb056d..b18fd70d0d2c 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/charts/spark_plot/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/charts/spark_plot/index.tsx @@ -16,12 +16,11 @@ import { Settings, Tooltip, } from '@elastic/charts'; -import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiLoadingChart } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiLoadingChart, useEuiTheme } from '@elastic/eui'; import React from 'react'; import { useChartThemes } from '@kbn/observability-shared-plugin/public'; import { i18n } from '@kbn/i18n'; import { Coordinate } from '../../../../../typings/timeseries'; -import { useTheme } from '../../../../hooks/use_theme'; import { unit } from '../../../../utils/style'; import { getComparisonChartTheme } from '../../time_comparison/get_comparison_chart_theme'; @@ -93,7 +92,7 @@ export function SparkPlotItem({ comparisonSeries?: Coordinate[]; comparisonSeriesColor?: string; }) { - const theme = useTheme(); + const { euiTheme } = useEuiTheme(); const defaultChartThemes = useChartThemes(); const comparisonChartTheme = getComparisonChartTheme(); const hasComparisonSeries = !!comparisonSeries?.length; @@ -110,7 +109,7 @@ export function SparkPlotItem({ }; const chartSize = { - height: theme.eui.euiSizeL, + height: euiTheme.size.l, width: compact ? unit * 4 : unit * 5, }; @@ -201,7 +200,7 @@ export function SparkPlotItem({ justifyContent: 'center', }} > - +
    ); } diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/charts/timeline/__snapshots__/timeline.test.tsx.snap b/x-pack/plugins/observability_solution/apm/public/components/shared/charts/timeline/__snapshots__/timeline.test.tsx.snap index 2630a6c7862c..09b48cc47b30 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/charts/timeline/__snapshots__/timeline.test.tsx.snap +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/charts/timeline/__snapshots__/timeline.test.tsx.snap @@ -1,11 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Timeline TimelineAxisContainer should render with data 1`] = ` -.c0 { - position: absolute; - bottom: 0; -} -
    +
    - .c0 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - font-size: 14px; - color: #69707d; - cursor: pointer; - opacity: 1; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.c1 { - width: 11px; - height: 11px; - margin-right: 0; - background: #98a2b3; - border-radius: 100%; -} - - +
    +
    +
    - .c0 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - font-size: 14px; - color: #69707d; - cursor: pointer; - opacity: 1; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.c1 { - width: 11px; - height: 11px; - margin-right: 0; - background: #98a2b3; - border-radius: 100%; -} - - +
    +
    +
    - .c0 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - font-size: 14px; - color: #69707d; - cursor: pointer; - opacity: 1; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.c1 { - width: 11px; - height: 11px; - margin-right: 0; - background: #98a2b3; - border-radius: 100%; -} - - +
    +
    @@ -287,70 +210,70 @@ exports[`Timeline VerticalLinesContainer should render with data 1`] = ` transform="translate(0 100)" > ` +const Container = styled.div` display: flex; align-items: center; - font-size: ${({ theme }) => theme.eui.euiFontSizeS}; - color: ${({ theme }) => theme.eui.euiColorDarkShade}; + font-size: ${() => useEuiFontSize('s').fontSize}; + color: ${({ theme }) => theme.euiTheme.colors.darkShade}; cursor: ${(props) => (props.clickable ? 'pointer' : 'initial')}; opacity: ${(props) => (props.disabled ? 0.4 : 1)}; user-select: none; @@ -38,7 +38,7 @@ interface IndicatorProps { const radius = 11; -export const Indicator = euiStyled.span` +export const Indicator = styled.span` width: ${radius}px; height: ${radius}px; margin-right: ${(props) => (props.withMargin ? `${radius / 2}px` : 0)}; @@ -68,8 +68,8 @@ export function Legend({ indicator, ...rest }: Props) { - const theme = useTheme(); - const indicatorColor = color || theme.eui.euiColorVis1; + const { euiTheme } = useEuiTheme(); + const indicatorColor = color || euiTheme.colors.vis.euiColorVis1; return ( - + `; exports[`Marker renders error marker 1`] = ` - - + `; diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/charts/timeline/marker/agent_marker.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/charts/timeline/marker/agent_marker.tsx index 37ddfbda58c3..1ee668fb5765 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/charts/timeline/marker/agent_marker.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/charts/timeline/marker/agent_marker.tsx @@ -5,22 +5,21 @@ * 2.0. */ -import { EuiToolTip } from '@elastic/eui'; +import { EuiToolTip, useEuiTheme } from '@elastic/eui'; import React from 'react'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { asDuration } from '../../../../../../common/utils/formatters'; -import { useTheme } from '../../../../../hooks/use_theme'; import { AgentMark } from '../../../../app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_agent_marks'; import { Legend } from '../legend'; -const NameContainer = euiStyled.div` - border-bottom: 1px solid ${({ theme }) => theme.eui.euiColorMediumShade}; - padding-bottom: ${({ theme }) => theme.eui.euiSizeS}; +const NameContainer = styled.div` + border-bottom: 1px solid ${({ theme }) => theme.euiTheme.colors.mediumShade}; + padding-bottom: ${({ theme }) => theme.euiTheme.size.s}; `; -const TimeContainer = euiStyled.div` - color: ${({ theme }) => theme.eui.euiColorMediumShade}; - padding-top: ${({ theme }) => theme.eui.euiSizeS}; +const TimeContainer = styled.div` + color: ${({ theme }) => theme.euiTheme.colors.mediumShade}; + padding-top: ${({ theme }) => theme.euiTheme.size.s}; `; interface Props { @@ -28,7 +27,7 @@ interface Props { } export function AgentMarker({ mark }: Props) { - const theme = useTheme(); + const { euiTheme } = useEuiTheme(); return ( <> @@ -42,7 +41,7 @@ export function AgentMarker({ mark }: Props) {
    } > - + ); diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/charts/timeline/marker/error_marker.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/charts/timeline/marker/error_marker.tsx index faff0a073fe6..14b2a277c393 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/charts/timeline/marker/error_marker.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/charts/timeline/marker/error_marker.tsx @@ -5,13 +5,12 @@ * 2.0. */ -import { EuiPopover, EuiText } from '@elastic/eui'; +import { EuiPopover, EuiText, useEuiTheme } from '@elastic/eui'; import React, { useState } from 'react'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { TRACE_ID, TRANSACTION_ID } from '../../../../../../common/es_fields/apm'; import { asDuration } from '../../../../../../common/utils/formatters'; import { useLegacyUrlParams } from '../../../../../context/url_params_context/use_url_params'; -import { useTheme } from '../../../../../hooks/use_theme'; import { ErrorMark } from '../../../../app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_error_marks'; import { ErrorDetailLink } from '../../../links/apm/error_detail_link'; import { Legend, Shape } from '../legend'; @@ -20,21 +19,21 @@ interface Props { mark: ErrorMark; } -const Popover = euiStyled.div` +const Popover = styled.div` max-width: 280px; `; -const TimeLegend = euiStyled(Legend)` - margin-bottom: ${({ theme }) => theme.eui.euiSize}; +const TimeLegend = styled(Legend)` + margin-bottom: ${({ theme }) => theme.euiTheme.size.base}; `; -const ErrorLink = euiStyled(ErrorDetailLink)` +const ErrorLink = styled(ErrorDetailLink)` display: block; - margin: ${({ theme }) => `${theme.eui.euiSizeS} 0 ${theme.eui.euiSizeS} 0`}; + margin: ${({ theme }) => `${theme.euiTheme.size.s} 0 ${theme.euiTheme.size.s} 0`}; overflow-wrap: break-word; `; -const Button = euiStyled(Legend)` +const Button = styled(Legend)` height: 20px; display: flex; align-items: flex-end; @@ -51,7 +50,7 @@ function truncateMessage(errorMessage?: string) { } export function ErrorMarker({ mark }: Props) { - const theme = useTheme(); + const { euiTheme } = useEuiTheme(); const { urlParams } = useLegacyUrlParams(); const [isPopoverOpen, showPopover] = useState(false); @@ -61,7 +60,7 @@ export function ErrorMarker({ mark }: Props) {
    } + indicator={
    @
    } /> {label} @@ -76,7 +76,7 @@ export function TimelineAxis({ plotValues, marks = [], topTraceDuration }: Timel key="topTrace" x={topTraceDurationPosition} y={0} - fill={theme.eui.euiTextColor} + fill={euiTheme.colors.textParagraph} textAnchor="middle" > {tickFormatter(topTraceDuration).formatted} diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/charts/timeline/vertical_lines.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/charts/timeline/vertical_lines.tsx index 96ab6a51e49f..1f2a929084be 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/charts/timeline/vertical_lines.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/charts/timeline/vertical_lines.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { useTheme } from '../../../../hooks/use_theme'; +import { useEuiTheme } from '@elastic/eui'; import { Mark } from '../../../app/transaction_details/waterfall_with_summary/waterfall_container/marks'; import { PlotValues } from './plot_utils'; @@ -21,7 +21,7 @@ export function VerticalLines({ topTraceDuration, plotValues, marks = [] }: Vert const markTimes = marks.filter((mark) => mark.verticalLine).map(({ offset }) => offset); - const theme = useTheme(); + const { euiTheme } = useEuiTheme(); const tickPositions = tickValues.reduce((positions, tick) => { const position = xScale(tick); @@ -53,7 +53,7 @@ export function VerticalLines({ topTraceDuration, plotValues, marks = [] }: Vert x2={position} y1={0} y2="100%" - stroke={theme.eui.euiColorLightestShade} + stroke={euiTheme.colors.lightestShade} /> ))} {markPositions.map((position) => ( @@ -63,7 +63,7 @@ export function VerticalLines({ topTraceDuration, plotValues, marks = [] }: Vert x2={position} y1={0} y2="100%" - stroke={theme.eui.euiColorMediumShade} + stroke={euiTheme.colors.mediumShade} /> ))} {Number.isFinite(topTraceDurationPosition) && ( @@ -73,7 +73,7 @@ export function VerticalLines({ topTraceDuration, plotValues, marks = [] }: Vert x2={topTraceDurationPosition} y1={0} y2="100%" - stroke={theme.eui.euiColorMediumShade} + stroke={euiTheme.colors.mediumShade} /> )} diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/charts/timeseries_chart.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/charts/timeseries_chart.tsx index 7b90aeb3ee03..5f08befb46a3 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/charts/timeseries_chart.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/charts/timeseries_chart.tsx @@ -25,7 +25,7 @@ import { Tooltip, SettingsSpec, } from '@elastic/charts'; -import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiSpacer } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiSpacer, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { ReactElement } from 'react'; import { useHistory } from 'react-router-dom'; @@ -33,7 +33,6 @@ import { useChartThemes } from '@kbn/observability-shared-plugin/public'; import { isExpectedBoundsComparison } from '../time_comparison/get_comparison_options'; import { useChartPointerEventContext } from '../../../context/chart_pointer_event/use_chart_pointer_event_context'; -import { useTheme } from '../../../hooks/use_theme'; import { unit } from '../../../utils/style'; import { ChartContainer } from './chart_container'; import { @@ -75,11 +74,11 @@ export function TimeseriesChart({ }: TimeseriesChartProps) { const history = useHistory(); const { chartRef, updatePointerEvent } = useChartPointerEventContext(); - const theme = useTheme(); + const { euiTheme, colorMode } = useEuiTheme(); const chartThemes = useChartThemes(); const anomalyChartTimeseries = getChartAnomalyTimeseries({ anomalyTimeseries, - theme, + euiTheme, anomalyTimeseriesColor: anomalyTimeseries?.color, }); const isEmpty = isTimeseriesEmpty(timeseries); @@ -115,12 +114,13 @@ export function TimeseriesChart({ } : undefined; - const endZoneColor = theme.darkMode ? theme.eui.euiColorLightShade : theme.eui.euiColorDarkShade; + const isDarkMode = colorMode === 'DARK'; + const endZoneColor = isDarkMode ? euiTheme.colors.lightShade : euiTheme.colors.darkShade; const endZoneRectAnnotationStyle: Partial = { stroke: endZoneColor, fill: endZoneColor, strokeWidth: 0, - opacity: theme.darkMode ? 0.6 : 0.2, + opacity: isDarkMode ? 0.6 : 0.2, }; function getChartType(type: string) { diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/charts/timeseries_chart_with_context.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/charts/timeseries_chart_with_context.tsx index e9ec46610fe2..5f08e7375788 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/charts/timeseries_chart_with_context.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/charts/timeseries_chart_with_context.tsx @@ -13,7 +13,7 @@ import { YDomainRange, } from '@elastic/charts'; import React from 'react'; -import { EuiIcon } from '@elastic/eui'; +import { EuiIcon, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { asAbsoluteDateTime } from '../../../../common/utils/formatters'; import { useAnnotationsContext } from '../../../context/annotations/use_annotations_context'; @@ -25,7 +25,6 @@ import { FETCH_STATUS } from '../../../hooks/use_fetcher'; import { unit } from '../../../utils/style'; import { getTimeZone } from './helper/timezone'; import { TimeseriesChart } from './timeseries_chart'; -import { useTheme } from '../../../hooks/use_theme'; interface AnomalyTimeseries extends ServiceAnomalyTimeseries { color?: string; @@ -69,8 +68,8 @@ export function TimeseriesChartWithContext({ } = useAnyOfApmParams('/services', '/dependencies/*', '/services/{serviceName}'); const { core } = useApmPluginContext(); const timeZone = getTimeZone(core.uiSettings); - const theme = useTheme(); - const annotationColor = theme.eui.euiColorSuccess; + const { euiTheme } = useEuiTheme(); + const annotationColor = euiTheme.colors.accentSecondary; const { annotations } = useAnnotationsContext(); const timeseriesAnnotations = [ diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/charts/transaction_charts/ml_header.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/charts/transaction_charts/ml_header.tsx index 814dfd3d7798..e25803c98622 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/charts/transaction_charts/ml_header.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/charts/transaction_charts/ml_header.tsx @@ -9,7 +9,7 @@ import { EuiFlexItem, EuiIconTip, EuiText } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { isEmpty } from 'lodash'; import React from 'react'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { useApmServiceContext } from '../../../../context/apm_service/use_apm_service_context'; import { useAnyOfApmParams } from '../../../../hooks/use_apm_params'; import { MLSingleMetricLink } from '../../links/machine_learning_links/mlsingle_metric_link'; @@ -19,14 +19,14 @@ interface Props { mlJobId?: string; } -const ShiftedIconWrapper = euiStyled.span` +const ShiftedIconWrapper = styled.span` padding-right: 5px; position: relative; top: -1px; display: inline-block; `; -const ShiftedEuiText = euiStyled(EuiText)` +const ShiftedEuiText = styled(EuiText)` position: relative; top: 5px; `; @@ -45,7 +45,9 @@ export function MLHeader({ hasValidMlLicense, mlJobId }: Props) { const hasKuery = !isEmpty(kuery); const icon = hasKuery ? ( `${theme.eui.euiSizeS} ${theme.eui.euiSizeS} 0 ${theme.eui.euiSizeS}`}; + margin: ${({ theme }) => + `${theme.euiTheme.size.s} ${theme.euiTheme.size.s} 0 ${theme.euiTheme.size.s}`}; .descriptionList__title, .descriptionList__description { margin-top: 0; diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/key_value_table/formatted_value.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/key_value_table/formatted_value.tsx index 1b1c5c3c59a7..a3baef9a802b 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/key_value_table/formatted_value.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/key_value_table/formatted_value.tsx @@ -7,11 +7,11 @@ import { isBoolean, isNumber, isObject } from 'lodash'; import React from 'react'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { NOT_AVAILABLE_LABEL } from '../../../../common/i18n'; -const EmptyValue = euiStyled.span` - color: ${({ theme }) => theme.eui.euiColorMediumShade}; +const EmptyValue = styled.span` + color: ${({ theme }) => theme.euiTheme.colors.mediumShade}; text-align: left; `; diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/kuery_bar/typeahead/suggestion.js b/x-pack/plugins/observability_solution/apm/public/components/shared/kuery_bar/typeahead/suggestion.js index 841b74a37a40..625b19f92342 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/kuery_bar/typeahead/suggestion.js +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/kuery_bar/typeahead/suggestion.js @@ -7,72 +7,73 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; -import { EuiIcon } from '@elastic/eui'; +import styled from '@emotion/styled'; +import { EuiIcon, useEuiFontSize } from '@elastic/eui'; import { unit } from '../../../../utils/style'; import { tint } from 'polished'; function getIconColor(type, theme) { switch (type) { case 'field': - return theme.eui.euiColorVis7; + return theme.euiTheme.colors.vis.euiColorVis7; case 'value': - return theme.eui.euiColorVis0; + return theme.euiTheme.colors.vis.euiColorVis0; case 'operator': - return theme.eui.euiColorVis1; + return theme.euiTheme.colors.vis.euiColorVis1; case 'conjunction': - return theme.eui.euiColorVis3; + return theme.euiTheme.colors.vis.euiColorVis3; case 'recentSearch': - return theme.eui.euiColorMediumShade; + return theme.euiTheme.colors.mediumShade; } } -const Description = euiStyled.div` - color: ${({ theme }) => theme.eui.euiColorDarkShade}; +const Description = styled.div` + color: ${({ theme }) => theme.euiTheme.colors.darkShade}; p { display: inline; span { - font-family: ${({ theme }) => theme.eui.euiCodeFontFamily}; - color: ${({ theme }) => theme.eui.euiColorFullShade}; - padding: 0 ${({ theme }) => theme.eui.euiSizeXS}; + font-family: ${({ theme }) => theme.euiTheme.font.familyCode}; + color: ${({ theme }) => theme.euiTheme.colors.fullShade}; + padding: 0 ${({ theme }) => theme.euiTheme.size.xs}; display: inline-block; } } `; -const ListItem = euiStyled.li` - font-size: ${({ theme }) => theme.eui.euiFontSizeXS}; - height: ${({ theme }) => theme.eui.euiSizeXL}; +const ListItem = styled.li` + font-size: ${() => useEuiFontSize('xs').fontSize}; + height: ${({ theme }) => theme.euiTheme.size.xl}; align-items: center; display: flex; - background: ${({ selected, theme }) => (selected ? theme.eui.euiColorLightestShade : 'initial')}; + background: ${({ selected, theme }) => + selected ? theme.euiTheme.colors.lightestShade : 'initial'}; cursor: pointer; - border-radius: ${({ theme }) => theme.eui.euiBorderRadiusSmall}; + border-radius: ${({ theme }) => theme.euiTheme.border.radius.small}; ${Description} { p span { background: ${({ selected, theme }) => - selected ? theme.eui.euiColorEmptyShade : theme.eui.euiColorLightestShade}; + selected ? theme.euiTheme.colors.emptyShade : theme.euiTheme.colors.lightestShade}; } } `; -const Icon = euiStyled.div` - flex: 0 0 ${({ theme }) => theme.eui.euiSizeXL}; +const Icon = styled.div` + flex: 0 0 ${({ theme }) => theme.euiTheme.size.xl}; background: ${({ type, theme }) => tint(0.9, getIconColor(type, theme))}; color: ${({ type, theme }) => getIconColor(type, theme)}; width: 100%; height: 100%; text-align: center; - line-height: ${({ theme }) => theme.eui.euiSizeXL}; + line-height: ${({ theme }) => theme.euiTheme.size.xl}; `; -const TextValue = euiStyled.div` +const TextValue = styled.div` flex: 0 0 ${unit * 16}px; - color: ${({ theme }) => theme.eui.euiColorDarkestShade}; - padding: 0 ${({ theme }) => theme.eui.euiSizeS}; + color: ${({ theme }) => theme.euiTheme.colors.darkestShade}; + padding: 0 ${({ theme }) => theme.euiTheme.size.s}; `; function getEuiIconType(type) { diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/kuery_bar/typeahead/suggestions.js b/x-pack/plugins/observability_solution/apm/public/components/shared/kuery_bar/typeahead/suggestions.js index 1cedd94a86be..3c07b8f608ba 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/kuery_bar/typeahead/suggestions.js +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/kuery_bar/typeahead/suggestions.js @@ -9,18 +9,22 @@ import { isEmpty } from 'lodash'; import { tint } from 'polished'; import PropTypes from 'prop-types'; import React, { Component } from 'react'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { unit } from '../../../../utils/style'; import Suggestion from './suggestion'; -const List = euiStyled.ul` +const List = styled.ul` width: 100%; - border: 1px solid ${({ theme }) => theme.eui.euiColorLightShade}; - border-radius: ${({ theme }) => theme.eui.euiBorderRadiusSmall}; - box-shadow: 0 ${({ theme }) => - `${theme.eui.euiSizeXS} ${theme.eui.euiSizeXL} ${tint(0.9, theme.eui.euiColorFullShade)}`}; + border: 1px solid ${({ theme }) => theme.euiTheme.colors.lightShade}; + border-radius: ${({ theme }) => theme.euiTheme.border.radius.small}; + box-shadow: 0 + ${({ theme }) => + `${theme.euiTheme.size.xs} ${theme.euiTheme.size.xl} ${tint( + 0.9, + theme.euiTheme.colors.fullShade + )}`}; position: absolute; - background: ${({ theme }) => theme.eui.euiColorEmptyShade}; + background: ${({ theme }) => theme.euiTheme.colors.emptyShade}; z-index: 10; left: 0; max-height: ${unit * 20}px; diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/links/apm/service_link/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/links/apm/service_link/index.tsx index 4baf94c6f055..b6d7d1789fac 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/links/apm/service_link/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/links/apm/service_link/index.tsx @@ -8,7 +8,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiLink, EuiText } from '@elastic/eui'; import { AgentIcon } from '@kbn/custom-icons'; import { i18n } from '@kbn/i18n'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { TypeOf } from '@kbn/typed-react-router-config'; import React from 'react'; import { isMobileAgentName } from '../../../../../../common/agent_name'; @@ -21,7 +21,9 @@ import { PopoverTooltip } from '../../../popover_tooltip'; import { TruncateWithTooltip } from '../../../truncate_with_tooltip'; import { MaxGroupsMessage, OTHER_SERVICE_NAME } from '../max_groups_message'; -const StyledLink = euiStyled(EuiLink)`${truncate('100%')};`; +const StyledLink = styled(EuiLink)` + ${truncate('100%')}; +`; function formatString(value?: string | null) { return value || NOT_AVAILABLE_LABEL; diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/links/dependency_link.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/links/dependency_link.tsx index 696f987ea2b6..d202c1cb770b 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/links/dependency_link.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/links/dependency_link.tsx @@ -8,19 +8,21 @@ import { EuiFlexGroup, EuiFlexItem, EuiLink } from '@elastic/eui'; import { TypeOf } from '@kbn/typed-react-router-config'; import React from 'react'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { useApmRouter } from '../../../hooks/use_apm_router'; import { truncate } from '../../../utils/style'; import { ApmRoutes } from '../../routing/apm_route_config'; import { SpanIcon } from '../span_icon'; -const StyledLink = euiStyled(EuiLink)`${truncate('100%')};`; +const StyledLink = styled(EuiLink)` + ${truncate('100%')}; +`; interface Props { query: TypeOf['query']; subtype?: string; type?: string; - onClick?: React.ComponentProps['onClick']; + onClick?: React.MouseEventHandler; } export function DependencyLink({ query, subtype, type, onClick }: Props) { diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/overview_table_container/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/overview_table_container/index.tsx index c77c3e7cc7a9..8c2f62f7998b 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/overview_table_container/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/overview_table_container/index.tsx @@ -6,7 +6,7 @@ */ import React, { ReactNode } from 'react'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { useBreakpoints } from '../../../hooks/use_breakpoints'; /** @@ -24,7 +24,7 @@ const tableHeight = 282; * * Hide the empty message when we don't yet have any items and are still not initiated. */ -const OverviewTableContainerDiv = euiStyled.div<{ +const OverviewTableContainerDiv = styled.div<{ fixedHeight?: boolean; isEmptyAndNotInitiated: boolean; shouldUseMobileLayout: boolean; diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/service_icons/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/service_icons/index.tsx index e6780927e755..a7c4b2311508 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/service_icons/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/service_icons/index.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { CloudProvider, @@ -14,7 +14,6 @@ import { getServerlessIcon, } from '@kbn/custom-icons'; import React, { ReactChild, useState } from 'react'; -import { useTheme } from '../../../hooks/use_theme'; import { ContainerType } from '../../../../common/service_metadata'; import { FETCH_STATUS, useFetcher } from '../../../hooks/use_fetcher'; import { CloudDetails } from './cloud_details'; @@ -81,7 +80,8 @@ export interface PopoverItem { export function ServiceIcons({ start, end, serviceName, environment }: Props) { const [selectedIconPopover, setSelectedIconPopover] = useState(); - const theme = useTheme(); + const { colorMode } = useEuiTheme(); + const isDarkMode = colorMode === 'DARK'; const { data: icons, status: iconsFetchStatus } = useFetcher( (callApmApi) => { @@ -122,7 +122,7 @@ export function ServiceIcons({ start, end, serviceName, environment }: Props) { { key: 'service', icon: { - type: getAgentIcon(icons?.agentName, theme.darkMode) || 'node', + type: getAgentIcon(icons?.agentName, isDarkMode) || 'node', }, isVisible: !!icons?.agentName, title: i18n.translate('xpack.apm.serviceIcons.service', { @@ -133,7 +133,7 @@ export function ServiceIcons({ start, end, serviceName, environment }: Props) { { key: 'opentelemetry', icon: { - type: getAgentIcon('opentelemetry', theme.darkMode), + type: getAgentIcon('opentelemetry', isDarkMode), }, isVisible: !!icons?.agentName && isOpenTelemetryAgentName(icons.agentName), title: i18n.translate('xpack.apm.serviceIcons.opentelemetry', { diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/stacktrace/cause_stacktrace.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/stacktrace/cause_stacktrace.tsx index 549509dc96f5..d36a5bf42216 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/stacktrace/cause_stacktrace.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/stacktrace/cause_stacktrace.tsx @@ -8,29 +8,29 @@ import { EuiAccordion, EuiTitle } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { Stacktrace } from '.'; import { Stackframe } from '../../../../typings/es_schemas/raw/fields/stackframe'; -const Accordion = euiStyled(EuiAccordion)` - border-top: ${({ theme }) => theme.eui.euiBorderThin}; - margin-top: ${({ theme }) => theme.eui.euiSizeS}; +const Accordion = styled(EuiAccordion)` + border-top: ${({ theme }) => theme.euiTheme.border.thin}; + margin-top: ${({ theme }) => theme.euiTheme.size.s}; `; -const CausedByContainer = euiStyled('h5')` - padding: ${({ theme }) => theme.eui.euiSizeS} 0; +const CausedByContainer = styled('h5')` + padding: ${({ theme }) => theme.euiTheme.size.s} 0; `; -const CausedByHeading = euiStyled('span')` - color: ${({ theme }) => theme.eui.euiTextSubduedColor}; +const CausedByHeading = styled('span')` + color: ${({ theme }) => theme.euiTheme.colors.textSubdued}; display: block; - font-size: ${({ theme }) => theme.eui.euiFontSizeXS}; - font-weight: ${({ theme }) => theme.eui.euiFontWeightBold}; + font-size: ${({ theme }) => theme.euiTheme.size.xs}; + font-weight: ${({ theme }) => theme.euiTheme.font.weight.bold}; text-transform: uppercase; `; -const FramesContainer = euiStyled('div')` - padding-left: ${({ theme }) => theme.eui.euiSizeM}; +const FramesContainer = styled('div')` + padding-left: ${({ theme }) => theme.euiTheme.size.m}; `; function CausedBy({ message }: { message: string }) { diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/stacktrace/context.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/stacktrace/context.tsx index 3abd57773365..a79b5529d2cd 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/stacktrace/context.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/stacktrace/context.tsx @@ -13,66 +13,66 @@ import javascript from 'react-syntax-highlighter/dist/cjs/languages/hljs/javascr import python from 'react-syntax-highlighter/dist/cjs/languages/hljs/python'; import ruby from 'react-syntax-highlighter/dist/cjs/languages/hljs/ruby'; import xcode from 'react-syntax-highlighter/dist/cjs/styles/hljs/xcode'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { StackframeWithLineContext } from '../../../../typings/es_schemas/raw/fields/stackframe'; SyntaxHighlighter.registerLanguage('javascript', javascript); SyntaxHighlighter.registerLanguage('python', python); SyntaxHighlighter.registerLanguage('ruby', ruby); -const ContextContainer = euiStyled.div` +const ContextContainer = styled.div` position: relative; - border-radius: ${({ theme }) => theme.eui.euiBorderRadiusSmall}; + border-radius: ${({ theme }) => theme.euiTheme.border.radius.small}; `; const LINE_HEIGHT = 18; -const LineHighlight = euiStyled.div<{ lineNumber: number }>` +const LineHighlight = styled.div<{ lineNumber: number }>` position: absolute; width: 100%; height: ${LINE_HEIGHT}px; top: ${(props) => props.lineNumber * LINE_HEIGHT}px; pointer-events: none; - background-color: ${({ theme }) => tint(0.9, theme.eui.euiColorWarning)}; + background-color: ${({ theme }) => tint(0.9, theme.euiTheme.colors.warning)}; `; -const LineNumberContainer = euiStyled.div<{ isLibraryFrame: boolean }>` +const LineNumberContainer = styled.div<{ isLibraryFrame: boolean }>` position: absolute; top: 0; left: 0; - border-radius: ${({ theme }) => theme.eui.euiBorderRadiusSmall}; + border-radius: ${({ theme }) => theme.euiTheme.border.radius.small}; background: ${({ isLibraryFrame, theme }) => - isLibraryFrame ? theme.eui.euiColorEmptyShade : theme.eui.euiColorLightestShade}; + isLibraryFrame ? theme.euiTheme.colors.emptyShade : theme.euiTheme.colors.lightestShade}; `; -const LineNumber = euiStyled.div<{ highlight: boolean }>` +const LineNumber = styled.div<{ highlight: boolean }>` position: relative; min-width: 42px; - padding-left: ${({ theme }) => theme.eui.euiSizeS}; - padding-right: ${({ theme }) => theme.eui.euiSizeXS}; - color: ${({ theme }) => theme.eui.euiColorMediumShade}; + padding-left: ${({ theme }) => theme.euiTheme.size.s}; + padding-right: ${({ theme }) => theme.euiTheme.size.xs}; + color: ${({ theme }) => theme.euiTheme.colors.mediumShade}; line-height: ${LINE_HEIGHT}px; text-align: right; - border-right: 1px solid ${({ theme }) => theme.eui.euiColorLightShade}; + border-right: ${({ theme }) => theme.euiTheme.border.thin}; background-color: ${({ highlight, theme }) => - highlight ? tint(0.9, theme.eui.euiColorWarning) : null}; + highlight ? tint(0.9, theme.euiTheme.colors.warning) : null}; &:last-of-type { - border-radius: 0 0 0 ${({ theme }) => theme.eui.euiBorderRadiusSmall}; + border-radius: 0 0 0 ${({ theme }) => theme.euiTheme.border.radius.small}; } `; -const LineContainer = euiStyled.div` +const LineContainer = styled.div` overflow: auto; margin: 0 0 0 42px; padding: 0; - background-color: ${({ theme }) => theme.eui.euiColorEmptyShade}; + background-color: ${({ theme }) => theme.euiTheme.colors.emptyShade}; &:last-of-type { - border-radius: 0 0 ${({ theme }) => theme.eui.euiBorderRadiusSmall} 0; + border-radius: 0 0 ${({ theme }) => theme.euiTheme.border.radius.small} 0; } `; -const Line = euiStyled.pre` +const Line = styled.pre` // Override all styles margin: 0; color: inherit; @@ -84,7 +84,7 @@ const Line = euiStyled.pre` line-height: ${LINE_HEIGHT}px; `; -const Code = euiStyled.code` +const Code = styled.code` position: relative; padding: 0; margin: 0; diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/stacktrace/frame_heading.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/stacktrace/frame_heading.tsx index 00aac84b8373..734ac85cf40e 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/stacktrace/frame_heading.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/stacktrace/frame_heading.tsx @@ -6,7 +6,8 @@ */ import React, { ComponentType } from 'react'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; +import { useEuiFontSize } from '@elastic/eui'; import { Stackframe } from '../../../../typings/es_schemas/raw/fields/stackframe'; import { CSharpFrameHeadingRenderer, @@ -18,21 +19,21 @@ import { PhpFrameHeadingRenderer, } from './frame_heading_renderers'; -const FileDetails = euiStyled.div` - color: ${({ theme }) => theme.eui.euiColorDarkShade}; +const FileDetails = styled.div` + color: ${({ theme }) => theme.euiTheme.colors.darkShade}; line-height: 1.5; /* matches the line-hight of the accordion container button */ padding: 2px 0; - font-family: ${({ theme }) => theme.eui.euiCodeFontFamily}; - font-size: ${({ theme }) => theme.eui.euiFontSizeS}; + font-family: ${({ theme }) => theme.euiTheme.font.familyCode}; + font-size: ${({ theme }) => useEuiFontSize('s').fontSize}; `; -const LibraryFrameFileDetail = euiStyled.span` - color: ${({ theme }) => theme.eui.euiColorDarkShade}; +const LibraryFrameFileDetail = styled.span` + color: ${({ theme }) => theme.euiTheme.colors.darkShade}; word-break: break-word; `; -const AppFrameFileDetail = euiStyled.span` - color: ${({ theme }) => theme.eui.euiColorFullShade}; +const AppFrameFileDetail = styled.span` + color: ${({ theme }) => theme.euiTheme.colors.fullShade}; word-break: break-word; `; diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/stacktrace/library_stacktrace.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/stacktrace/library_stacktrace.tsx index 8c9bc4e5cdd4..b5fe38b6eb66 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/stacktrace/library_stacktrace.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/stacktrace/library_stacktrace.tsx @@ -8,12 +8,12 @@ import { EuiAccordion } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { Stackframe } from '../../../../typings/es_schemas/raw/fields/stackframe'; import { Stackframe as StackframeComponent } from './stackframe'; -const LibraryStacktraceAccordion = euiStyled(EuiAccordion)` - margin: ${({ theme }) => theme.eui.euiSizeXS} 0; +const LibraryStacktraceAccordion = styled(EuiAccordion)` + margin: ${({ theme }) => theme.euiTheme.size.xs} 0; `; interface Props { diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/stacktrace/stackframe.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/stacktrace/stackframe.tsx index 61692b3dbf96..1180b1c9ed05 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/stacktrace/stackframe.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/stacktrace/stackframe.tsx @@ -7,7 +7,7 @@ import { EuiAccordion } from '@elastic/eui'; import React from 'react'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { Stackframe as StackframeType, StackframeWithLineContext, @@ -16,18 +16,18 @@ import { Context } from './context'; import { FrameHeading } from './frame_heading'; import { Variables } from './variables'; -const ContextContainer = euiStyled.div<{ isLibraryFrame: boolean }>` +const ContextContainer = styled.div<{ isLibraryFrame: boolean }>` position: relative; - font-family: ${({ theme }) => theme.eui.euiCodeFontFamily}; - font-size: ${({ theme }) => theme.eui.euiFontSizeS}; - border: 1px solid ${({ theme }) => theme.eui.euiColorLightShade}; - border-radius: ${({ theme }) => theme.eui.euiBorderRadiusSmall}; + font-family: ${({ theme }) => theme.euiTheme.font.familyCode}; + font-size: ${({ theme }) => theme.euiTheme.size.s}; + border: 1px solid ${({ theme }) => theme.euiTheme.colors.lightShade}; + border-radius: ${({ theme }) => theme.euiTheme.border.radius.small}; background: ${({ isLibraryFrame, theme }) => - isLibraryFrame ? theme.eui.euiColorEmptyShade : theme.eui.euiColorLightestShade}; + isLibraryFrame ? theme.euiTheme.colors.emptyShade : theme.euiTheme.colors.lightestShade}; `; // Indent the non-context frames the same amount as the accordion control -const NoContextFrameHeadingWrapper = euiStyled.div` +const NoContextFrameHeadingWrapper = styled.div` margin-left: 28px; `; diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/stacktrace/variables.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/stacktrace/variables.tsx index 5dc9a8a5073b..e59d6e9bc5c1 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/stacktrace/variables.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/stacktrace/variables.tsx @@ -8,16 +8,16 @@ import { EuiAccordion } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { Stackframe } from '../../../../typings/es_schemas/raw/fields/stackframe'; import { KeyValueTable } from '../key_value_table'; import { flattenObject } from '../../../../common/utils/flatten_object'; -const VariablesContainer = euiStyled.div` - background: ${({ theme }) => theme.eui.euiColorEmptyShade}; - border-radius: 0 0 ${({ theme }) => - `${theme.eui.euiBorderRadiusSmall} ${theme.eui.euiBorderRadiusSmall}`}; - padding: ${({ theme }) => `${theme.eui.euiSizeS} ${theme.eui.euiSizeM}`}; +const VariablesContainer = styled.div` + background: ${({ theme }) => theme.euiTheme.colors.emptyShade}; + border-radius: 0 0 + ${({ theme }) => `${theme.euiTheme.border.radius.small} ${theme.euiTheme.border.radius.small}`}; + padding: ${({ theme }) => `${theme.euiTheme.size.s} ${theme.euiTheme.size.m}`}; `; interface Props { diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/sticky_properties/__snapshots__/sticky_properties.test.tsx.snap b/x-pack/plugins/observability_solution/apm/public/components/shared/sticky_properties/__snapshots__/sticky_properties.test.tsx.snap index f8799874408e..61921adf2741 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/sticky_properties/__snapshots__/sticky_properties.test.tsx.snap +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/sticky_properties/__snapshots__/sticky_properties.test.tsx.snap @@ -24,9 +24,9 @@ exports[`StickyProperties should render entire component 1`] = ` + url.full - + } delay="regular" display="inlineBlock" @@ -43,9 +43,9 @@ exports[`StickyProperties should render entire component 1`] = ` display="inlineBlock" position="top" > - + https://www.elastic.co/test - + + http.request.method - + } delay="regular" display="inlineBlock" @@ -91,9 +91,9 @@ exports[`StickyProperties should render entire component 1`] = ` + error.exception.handled - + } delay="regular" display="inlineBlock" @@ -121,9 +121,9 @@ exports[`StickyProperties should render entire component 1`] = ` + user.id - + } delay="regular" display="inlineBlock" diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/sticky_properties/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/sticky_properties/index.tsx index f620c97984ca..024f05e493a2 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/sticky_properties/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/sticky_properties/index.tsx @@ -5,10 +5,10 @@ * 2.0. */ -import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, useEuiFontSize } from '@elastic/eui'; import { EuiToolTip } from '@elastic/eui'; import React from 'react'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { truncate } from '../../../utils/style'; export interface IStickyProperty { @@ -19,14 +19,14 @@ export interface IStickyProperty { truncated?: boolean; } -const TooltipFieldName = euiStyled.span` - font-family: ${({ theme }) => theme.eui.euiCodeFontFamily}; +const TooltipFieldName = styled.span` + font-family: ${({ theme }) => theme.euiTheme.font.familyCode}; `; -const PropertyLabel = euiStyled.div` - margin-bottom: ${({ theme }) => theme.eui.euiSizeS}; - font-size: ${({ theme }) => theme.eui.euiFontSizeXS}; - color: ${({ theme }) => theme.eui.euiColorMediumShade}; +const PropertyLabel = styled.div` + margin-bottom: ${({ theme }) => theme.euiTheme.size.s}; + font-size: ${() => useEuiFontSize('xs').fontSize}; + color: ${({ theme }) => theme.euiTheme.colors.mediumShade}; span { cursor: help; @@ -35,13 +35,13 @@ const PropertyLabel = euiStyled.div` PropertyLabel.displayName = 'PropertyLabel'; const propertyValueLineHeight = 1.2; -const PropertyValue = euiStyled.div` +const PropertyValue = styled.div` display: inline-block; line-height: ${propertyValueLineHeight}; `; PropertyValue.displayName = 'PropertyValue'; -const PropertyValueTruncated = euiStyled.span` +const PropertyValueTruncated = styled.span` display: inline-block; line-height: ${propertyValueLineHeight}; ${truncate('100%')}; diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/sticky_properties/sticky_properties.test.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/sticky_properties/sticky_properties.test.tsx index 02289485e12d..09effede911f 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/sticky_properties/sticky_properties.test.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/sticky_properties/sticky_properties.test.tsx @@ -56,7 +56,7 @@ describe('StickyProperties', () => { const wrapper = shallow() .find('PropertyValue') - .dive() + .render() .text(); expect(wrapper).toEqual('1337'); diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/summary/error_count_summary_item_badge.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/summary/error_count_summary_item_badge.tsx index 9de373d2189e..2eb502feb99e 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/summary/error_count_summary_item_badge.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/summary/error_count_summary_item_badge.tsx @@ -7,18 +7,17 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; -import { EuiBadge } from '@elastic/eui'; -import { useTheme } from '../../../hooks/use_theme'; +import { EuiBadge, useEuiTheme } from '@elastic/eui'; interface Props { count: number; } export function ErrorCountSummaryItemBadge({ count }: Props) { - const theme = useTheme(); + const { euiTheme } = useEuiTheme(); return ( - + {i18n.translate('xpack.apm.transactionDetails.errorCount', { defaultMessage: '{errorCount, number} {errorCount, plural, one {Error} other {Errors}}', values: { errorCount: count }, diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/summary/http_info_summary_item/http_info_summary_item.test.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/summary/http_info_summary_item/http_info_summary_item.test.tsx index 6091a6ff8c73..2d5e1cfeb41e 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/summary/http_info_summary_item/http_info_summary_item.test.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/summary/http_info_summary_item/http_info_summary_item.test.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { shallow, mount } from 'enzyme'; import { HttpInfoSummaryItem } from '.'; import * as exampleTransactions from '../__fixtures__/transactions'; -import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; +import { EuiThemeProvider } from '@elastic/eui'; describe('HttpInfoSummaryItem', () => { describe('render', () => { diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/summary/http_info_summary_item/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/summary/http_info_summary_item/index.tsx index 7eee907d0526..5732c426e261 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/summary/http_info_summary_item/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/summary/http_info_summary_item/index.tsx @@ -8,15 +8,15 @@ import { EuiBadge, EuiToolTip } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { truncate, unit } from '../../../../utils/style'; import { HttpStatusBadge } from '../http_status_badge'; -const HttpInfoBadge = euiStyled(EuiBadge)` - margin-right: ${({ theme }) => theme.eui.euiSizeXS}; +const HttpInfoBadge = styled(EuiBadge)` + margin-right: ${({ theme }) => theme.euiTheme.size.xs}; `; -const Url = euiStyled('span')` +const Url = styled('span')` display: inline-block; vertical-align: bottom; ${truncate(unit * 24)}; @@ -27,7 +27,7 @@ interface HttpInfoProps { url: string; } -const Span = euiStyled('span')` +const Span = styled('span')` white-space: nowrap; `; diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/summary/user_agent_summary_item.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/summary/user_agent_summary_item.tsx index dcfaae3f9b25..9a2f3e041bf1 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/summary/user_agent_summary_item.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/summary/user_agent_summary_item.tsx @@ -6,15 +6,15 @@ */ import React from 'react'; -import { EuiToolTip } from '@elastic/eui'; +import { EuiToolTip, useEuiFontSize } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { UserAgent } from '../../../../typings/es_schemas/raw/fields/user_agent'; type UserAgentSummaryItemProps = UserAgent; -const Version = euiStyled('span')` - font-size: ${({ theme }) => theme.eui.euiFontSizeS}; +const Version = styled('span')` + font-size: ${() => useEuiFontSize('s').fontSize}; `; export function UserAgentSummaryItem({ name, version }: UserAgentSummaryItemProps) { diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/time_comparison/index.test.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/time_comparison/index.test.tsx index a8caf4685020..9fffd11600c8 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/time_comparison/index.test.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/time_comparison/index.test.tsx @@ -8,7 +8,6 @@ import { render } from '@testing-library/react'; import React, { ReactNode } from 'react'; import { MemoryRouter } from 'react-router-dom'; -import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; import { expectTextsInDocument, expectTextsNotInDocument } from '../../../utils/test_helpers'; import { TimeComparison } from '.'; import * as urlHelpers from '../links/url_helpers'; @@ -24,6 +23,7 @@ import type { ApmPluginContextValue } from '../../../context/apm_plugin/apm_plug import { merge } from 'lodash'; import type { ApmMlJob } from '../../../../common/anomaly_detection/apm_ml_job'; import { FETCH_STATUS } from '../../../hooks/use_fetcher'; +import { EuiThemeProvider } from '@elastic/eui'; const ML_AD_JOBS = { jobs: [ diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/time_comparison/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/time_comparison/index.tsx index 54894b3f536c..57e3fa94b5ba 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/time_comparison/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/time_comparison/index.tsx @@ -9,7 +9,7 @@ import { EuiCheckbox, EuiSelect } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useMemo } from 'react'; import { useHistory, useLocation } from 'react-router-dom'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { useUiTracker } from '@kbn/observability-shared-plugin/public'; import { useApmRouter } from '../../../hooks/use_apm_router'; import { useEnvironmentsContext } from '../../../context/environments_context/use_environments_context'; @@ -21,12 +21,12 @@ import { useTimeRange } from '../../../hooks/use_time_range'; import * as urlHelpers from '../links/url_helpers'; import { getComparisonOptions, TimeRangeComparisonEnum } from './get_comparison_options'; -const PrependContainer = euiStyled.div` +const PrependContainer = styled.div` display: flex; justify-content: center; align-items: center; - background-color: ${({ theme }) => theme.eui.euiFormInputGroupLabelBackground}; - padding: 0 ${({ theme }) => theme.eui.euiSizeM}; + background-color: ${({ theme }) => theme.euiTheme.colors.backgroundBaseFormsPrepend}; + padding: 0 ${({ theme }) => theme.euiTheme.size.m}; `; export function TimeComparison() { diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/transaction_type_select.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/transaction_type_select.tsx index 292aaaed816a..f6e2a1a52b53 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/transaction_type_select.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/transaction_type_select.tsx @@ -8,7 +8,7 @@ import { EuiSelect } from '@elastic/eui'; import React, { FormEvent, useCallback } from 'react'; import { useHistory } from 'react-router-dom'; -import styled from 'styled-components'; +import styled from '@emotion/styled'; import { useApmServiceContext } from '../../context/apm_service/use_apm_service_context'; import { useBreakpoints } from '../../hooks/use_breakpoints'; import * as urlHelpers from './links/url_helpers'; diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/truncate_with_tooltip/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/truncate_with_tooltip/index.tsx index 5e1c450e336d..02e04ed09803 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/truncate_with_tooltip/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/truncate_with_tooltip/index.tsx @@ -7,12 +7,12 @@ import { EuiToolTip } from '@elastic/eui'; import React from 'react'; -import { euiStyled } from '@kbn/kibana-react-plugin/common'; +import styled from '@emotion/styled'; import { truncate } from '../../../utils/style'; const tooltipAnchorClassname = '_apm_truncate_tooltip_anchor_'; -const TooltipWrapper = euiStyled.div` +const TooltipWrapper = styled.div` width: 100%; .${tooltipAnchorClassname} { width: 100% !important; @@ -20,7 +20,7 @@ const TooltipWrapper = euiStyled.div` } `; -const ContentWrapper = euiStyled.div` +const ContentWrapper = styled.div` ${truncate('100%')} `; diff --git a/x-pack/plugins/observability_solution/apm/public/embeddable/embeddable_context.tsx b/x-pack/plugins/observability_solution/apm/public/embeddable/embeddable_context.tsx index 43ccf990257b..8458a4c9d446 100644 --- a/x-pack/plugins/observability_solution/apm/public/embeddable/embeddable_context.tsx +++ b/x-pack/plugins/observability_solution/apm/public/embeddable/embeddable_context.tsx @@ -9,7 +9,6 @@ import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme'; import { ApmPluginContext, ApmPluginContextValue } from '../context/apm_plugin/apm_plugin_context'; import { createCallApmApi } from '../services/rest/create_call_apm_api'; -import { ApmThemeProvider } from '../components/routing/app_root'; import { ChartPointerEventContextProvider } from '../context/chart_pointer_event/chart_pointer_event_context'; import { EmbeddableDeps } from './types'; import { TimeRangeMetadataContextProvider } from '../context/time_range_metadata/time_range_metadata_context'; @@ -54,19 +53,17 @@ export function ApmEmbeddableContext({ - - - - {children} - - - + + + {children} + + diff --git a/x-pack/plugins/observability_solution/apm/public/hooks/use_theme.tsx b/x-pack/plugins/observability_solution/apm/public/hooks/use_theme.tsx deleted file mode 100644 index 8c18ac38efc3..000000000000 --- a/x-pack/plugins/observability_solution/apm/public/hooks/use_theme.tsx +++ /dev/null @@ -1,15 +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 { useContext } from 'react'; -import { ThemeContext } from 'styled-components'; -import { EuiTheme } from '@kbn/kibana-react-plugin/common'; - -export function useTheme(): EuiTheme { - const theme = useContext(ThemeContext); - return theme; -} diff --git a/x-pack/plugins/observability_solution/apm/public/tutorial/config_agent/index.tsx b/x-pack/plugins/observability_solution/apm/public/tutorial/config_agent/index.tsx index cd10f07f2475..129f15a3355c 100644 --- a/x-pack/plugins/observability_solution/apm/public/tutorial/config_agent/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/tutorial/config_agent/index.tsx @@ -8,7 +8,7 @@ import { EuiLoadingSpinner } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { HttpStart } from '@kbn/core/public'; import React, { useEffect, useMemo, useState } from 'react'; -import styled from 'styled-components'; +import styled from '@emotion/styled'; import { APIReturnType } from '../../services/rest/create_call_apm_api'; import { AgentConfigInstructions } from './agent_config_instructions'; import { getPolicyOptions, PolicyOption } from './get_policy_options'; diff --git a/x-pack/plugins/observability_solution/apm/public/tutorial/tutorial_fleet_instructions/index.tsx b/x-pack/plugins/observability_solution/apm/public/tutorial/tutorial_fleet_instructions/index.tsx index 8924999f4821..6796c6576ab0 100644 --- a/x-pack/plugins/observability_solution/apm/public/tutorial/tutorial_fleet_instructions/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/tutorial/tutorial_fleet_instructions/index.tsx @@ -18,7 +18,7 @@ import { import { i18n } from '@kbn/i18n'; import { HttpStart } from '@kbn/core/public'; import React, { useEffect, useState } from 'react'; -import styled from 'styled-components'; +import styled from '@emotion/styled'; import { APIReturnType } from '../../services/rest/create_call_apm_api'; interface Props { diff --git a/x-pack/plugins/observability_solution/apm/public/utils/test_helpers.tsx b/x-pack/plugins/observability_solution/apm/public/utils/test_helpers.tsx index 76a6b868300c..a5d6f6782908 100644 --- a/x-pack/plugins/observability_solution/apm/public/utils/test_helpers.tsx +++ b/x-pack/plugins/observability_solution/apm/public/utils/test_helpers.tsx @@ -18,8 +18,8 @@ import moment from 'moment'; import { Moment } from 'moment-timezone'; import React from 'react'; import { MemoryRouter } from 'react-router-dom'; -import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; +import { EuiThemeProvider } from '@elastic/eui'; import { MockApmPluginContextWrapper } from '../context/apm_plugin/mock_apm_plugin_context'; import { UrlParamsProvider } from '../context/url_params_context/url_params_context'; @@ -112,17 +112,13 @@ export function expectTextsInDocument(output: any, texts: string[]) { }); } -export function renderWithTheme( - component: React.ReactNode, - params?: any, - { darkMode = false } = {} -) { - return render({component}, params); +export function renderWithTheme(component: React.ReactNode, params?: any) { + return render({component}, params); } -export function mountWithTheme(tree: React.ReactElement, { darkMode = false } = {}) { +export function mountWithTheme(tree: React.ReactElement) { function WrappingThemeProvider(props: any) { - return {props.children}; + return {props.children}; } return mount(tree, { diff --git a/x-pack/plugins/observability_solution/infra/emotion.d.ts b/x-pack/plugins/observability_solution/infra/emotion.d.ts deleted file mode 100644 index 213178080e53..000000000000 --- a/x-pack/plugins/observability_solution/infra/emotion.d.ts +++ /dev/null @@ -1,14 +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 '@emotion/react'; -import type { UseEuiTheme } from '@elastic/eui'; - -declare module '@emotion/react' { - // eslint-disable-next-line @typescript-eslint/no-empty-interface - export interface Theme extends UseEuiTheme {} -} diff --git a/x-pack/plugins/observability_solution/infra/public/components/logging/log_minimap/density_chart.tsx b/x-pack/plugins/observability_solution/infra/public/components/logging/log_minimap/density_chart.tsx index 5f42d19d035d..d45fe0c3c42c 100644 --- a/x-pack/plugins/observability_solution/infra/public/components/logging/log_minimap/density_chart.tsx +++ b/x-pack/plugins/observability_solution/infra/public/components/logging/log_minimap/density_chart.tsx @@ -11,6 +11,7 @@ import { max } from 'lodash'; import * as React from 'react'; import styled from '@emotion/styled'; import { LogEntriesSummaryBucket } from '@kbn/logs-shared-plugin/common'; +import { COLOR_MODES_STANDARD } from '@elastic/eui'; interface DensityChartProps { buckets: LogEntriesSummaryBucket[]; @@ -66,14 +67,14 @@ export const DensityChart: React.FC = ({ const DensityChartPositiveBackground = styled.rect` fill: ${(props) => - props.theme.colorMode === 'DARK' + props.theme.colorMode === COLOR_MODES_STANDARD.dark ? props.theme.euiTheme.colors.lightShade : props.theme.euiTheme.colors.lightestShade}; `; const PositiveAreaPath = styled.path` fill: ${(props) => - props.theme.colorMode === 'DARK' + props.theme.colorMode === COLOR_MODES_STANDARD.dark ? props.theme.euiTheme.colors.mediumShade : props.theme.euiTheme.colors.lightShade}; `; diff --git a/x-pack/plugins/observability_solution/infra/public/components/logging/log_minimap/log_minimap.tsx b/x-pack/plugins/observability_solution/infra/public/components/logging/log_minimap/log_minimap.tsx index fcd57e98b07d..a2c1121ff2ba 100644 --- a/x-pack/plugins/observability_solution/infra/public/components/logging/log_minimap/log_minimap.tsx +++ b/x-pack/plugins/observability_solution/infra/public/components/logging/log_minimap/log_minimap.tsx @@ -14,6 +14,7 @@ import { import { scaleLinear } from 'd3-scale'; import moment from 'moment'; import * as React from 'react'; +import { COLOR_MODES_STANDARD } from '@elastic/eui'; import { DensityChart } from './density_chart'; import { HighlightedInterval } from './highlighted_interval'; import { SearchMarkers } from './search_markers'; @@ -166,7 +167,7 @@ const TimeCursor = styled.line` pointer-events: none; stroke-width: 1px; stroke: ${(props) => - props.theme.colorMode === 'DARK' + props.theme.colorMode === COLOR_MODES_STANDARD.dark ? props.theme.euiTheme.colors.darkestShade : props.theme.euiTheme.colors.darkShade}; `; diff --git a/x-pack/plugins/observability_solution/infra/public/components/logging/log_minimap/time_ruler.tsx b/x-pack/plugins/observability_solution/infra/public/components/logging/log_minimap/time_ruler.tsx index 1223e014fe9e..59e94333e94e 100644 --- a/x-pack/plugins/observability_solution/infra/public/components/logging/log_minimap/time_ruler.tsx +++ b/x-pack/plugins/observability_solution/infra/public/components/logging/log_minimap/time_ruler.tsx @@ -8,7 +8,7 @@ import { scaleTime } from 'd3-scale'; import * as React from 'react'; import styled from '@emotion/styled'; -import { useEuiFontSize } from '@elastic/eui'; +import { COLOR_MODES_STANDARD, useEuiFontSize } from '@elastic/eui'; import { useKibanaTimeZoneSetting } from '../../../hooks/use_kibana_time_zone_setting'; import { getTimeLabelFormat } from './time_label_formatter'; @@ -69,7 +69,7 @@ const TimeRulerTickLabel = styled.text` const TimeRulerGridLine = styled.line` stroke: ${(props) => - props.theme.colorMode === 'DARK' + props.theme.colorMode === COLOR_MODES_STANDARD.dark ? props.theme.euiTheme.colors.darkestShade : props.theme.euiTheme.colors.darkShade}; stroke-opacity: 0.5; diff --git a/x-pack/plugins/observability_solution/infra/tsconfig.json b/x-pack/plugins/observability_solution/infra/tsconfig.json index dd3e56903ea5..639780d61ae8 100644 --- a/x-pack/plugins/observability_solution/infra/tsconfig.json +++ b/x-pack/plugins/observability_solution/infra/tsconfig.json @@ -9,7 +9,6 @@ "public/**/*", "server/**/*", "types/**/*", - "./emotion.d.ts" ], "kbn_references": [ "@kbn/core", diff --git a/x-pack/plugins/observability_solution/observability_shared/public/hooks/use_chart_theme.tsx b/x-pack/plugins/observability_solution/observability_shared/public/hooks/use_chart_theme.tsx index 1a914e4abcd7..3c06cfa9c712 100644 --- a/x-pack/plugins/observability_solution/observability_shared/public/hooks/use_chart_theme.tsx +++ b/x-pack/plugins/observability_solution/observability_shared/public/hooks/use_chart_theme.tsx @@ -5,13 +5,13 @@ * 2.0. */ -import { LIGHT_THEME, DARK_THEME, PartialTheme, Theme } from '@elastic/charts'; +import { LIGHT_THEME, DARK_THEME, PartialTheme } from '@elastic/charts'; +import { useEuiTheme, COLOR_MODES_STANDARD } from '@elastic/eui'; import { useMemo } from 'react'; -import { useTheme } from './use_theme'; -export function useChartThemes(): { baseTheme: Theme; theme: PartialTheme[] } { - const theme = useTheme(); - const baseTheme = theme.darkMode ? DARK_THEME : LIGHT_THEME; +export function useChartThemes() { + const theme = useEuiTheme(); + const baseTheme = theme.colorMode === COLOR_MODES_STANDARD.dark ? DARK_THEME : LIGHT_THEME; return useMemo(() => { const themeOverrides: PartialTheme = { From b8327585bc03224a50e6508c552cf3f22d2c80b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Wed, 18 Dec 2024 18:18:35 +0100 Subject: [PATCH 56/60] Core owns all plugins' `kibana.jsonc` (#204782) ## Summary After moving them, we are losing ownership. --- .github/CODEOWNERS | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1b608400f6e3..4943b4279c39 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -2638,7 +2638,14 @@ oas_docs/kibana.info.yaml @elastic/platform-docs # Plugin manifests /src/plugins/**/kibana.jsonc @elastic/kibana-core +/src/platform/plugins/shared/**/kibana.jsonc @elastic/kibana-core +/src/platform/plugins/private/**/kibana.jsonc @elastic/kibana-core /x-pack/plugins/**/kibana.jsonc @elastic/kibana-core +/x-pack/platform/plugins/shared/**/kibana.jsonc @elastic/kibana-core +/x-pack/platform/plugins/private/**/kibana.jsonc @elastic/kibana-core +/x-pack//solutions/observability/plugins/**/kibana.jsonc @elastic/kibana-core +/x-pack//solutions/search/plugins/**/kibana.jsonc @elastic/kibana-core +/x-pack//solutions/security/plugins/**/kibana.jsonc @elastic/kibana-core # Temporary Encrypted Saved Objects (ESO) guarding # This additional code-ownership is meant to be a temporary precaution to notify the Kibana platform security team From 9f0c5fbe21016cebec49bcba134ba613ef856098 Mon Sep 17 00:00:00 2001 From: Nathan Reese Date: Wed, 18 Dec 2024 10:38:15 -0700 Subject: [PATCH 57/60] [dashboard] replace embeddable.ViewMode with presentation-publishing.ViewMode (#204464) Co-authored-by: Elastic Machine --- .../common/dashboard_container/types.ts | 4 ++-- .../public/dashboard_app/dashboard_app.tsx | 4 ++-- .../public/dashboard_app/dashboard_router.tsx | 3 +-- .../listing_page/dashboard_listing_page.tsx | 3 +-- .../top_nav/share/show_share_modal.tsx | 3 +-- .../top_nav/use_dashboard_menu_items.tsx | 17 ++++++++--------- .../url/search_sessions_integration.ts | 3 +-- .../dashboard/public/dashboard_constants.ts | 3 +-- .../empty_screen/dashboard_empty_screen.tsx | 3 +-- .../component/grid/dashboard_grid.tsx | 10 ++++------ .../grid/use_dashboard_grid_settings.tsx | 5 ++--- .../component/viewport/dashboard_viewport.tsx | 4 ++-- .../_dashboard_listing_strings.ts | 4 ++-- .../dashboard_listing/confirm_overlays.tsx | 6 +++--- .../dashboard_unsaved_listing.test.tsx | 5 ++--- .../dashboard_unsaved_listing.tsx | 5 ++--- .../hooks/use_dashboard_listing_table.tsx | 4 ++-- .../dashboard/public/dashboard_listing/types.ts | 2 +- src/plugins/dashboard/public/mocks.tsx | 2 -- .../lib/load_dashboard_state.ts | 3 +-- 20 files changed, 39 insertions(+), 54 deletions(-) diff --git a/src/plugins/dashboard/common/dashboard_container/types.ts b/src/plugins/dashboard/common/dashboard_container/types.ts index dd3f7302038c..528eff1f96cb 100644 --- a/src/plugins/dashboard/common/dashboard_container/types.ts +++ b/src/plugins/dashboard/common/dashboard_container/types.ts @@ -8,7 +8,6 @@ */ import { - ViewMode, PanelState, EmbeddableInput, SavedObjectEmbeddableInput, @@ -17,6 +16,7 @@ import { Filter, Query, TimeRange } from '@kbn/es-query'; import type { Reference } from '@kbn/content-management-utils'; import { RefreshInterval } from '@kbn/data-plugin/common'; import { KibanaExecutionContext } from '@kbn/core-execution-context-common'; +import type { ViewMode } from '@kbn/presentation-publishing'; import type { DashboardOptions, GridData } from '../../server/content_management'; @@ -44,7 +44,7 @@ export interface DashboardPanelState< export type DashboardContainerByReferenceInput = SavedObjectEmbeddableInput; -export interface DashboardContainerInput extends EmbeddableInput { +export interface DashboardContainerInput extends Omit { // filter context to be passed to children query: Query; filters: Filter[]; diff --git a/src/plugins/dashboard/public/dashboard_app/dashboard_app.tsx b/src/plugins/dashboard/public/dashboard_app/dashboard_app.tsx index 06f56669630e..39616653eea2 100644 --- a/src/plugins/dashboard/public/dashboard_app/dashboard_app.tsx +++ b/src/plugins/dashboard/public/dashboard_app/dashboard_app.tsx @@ -14,10 +14,10 @@ import { debounceTime } from 'rxjs'; import { v4 as uuidv4 } from 'uuid'; import { DASHBOARD_APP_LOCATOR } from '@kbn/deeplinks-analytics'; -import { ViewMode } from '@kbn/embeddable-plugin/public'; import { useExecutionContext } from '@kbn/kibana-react-plugin/public'; import { createKbnUrlStateStorage, withNotifyOnErrors } from '@kbn/kibana-utils-plugin/public'; +import { ViewMode } from '@kbn/presentation-publishing'; import { DashboardApi, DashboardCreationOptions, DashboardRenderer } from '..'; import { SharedDashboardState } from '../../common'; import { @@ -154,7 +154,7 @@ export function DashboardApp({ // if print mode is active, force viewMode.PRINT ...(screenshotModeService.isScreenshotMode() && screenshotModeService.getScreenshotContext('layout') === 'print' - ? { viewMode: ViewMode.PRINT } + ? { viewMode: 'print' as ViewMode } : {}), }; }; diff --git a/src/plugins/dashboard/public/dashboard_app/dashboard_router.tsx b/src/plugins/dashboard/public/dashboard_app/dashboard_router.tsx index f994d9aa20c8..6b59bf03a4bc 100644 --- a/src/plugins/dashboard/public/dashboard_app/dashboard_router.tsx +++ b/src/plugins/dashboard/public/dashboard_app/dashboard_router.tsx @@ -10,7 +10,6 @@ import './_dashboard_app.scss'; import { AppMountParameters, CoreStart } from '@kbn/core/public'; -import { ViewMode } from '@kbn/embeddable-plugin/public'; import { createKbnUrlStateStorage, withNotifyOnErrors } from '@kbn/kibana-utils-plugin/public'; import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { Route, Routes } from '@kbn/shared-ux-router'; @@ -72,7 +71,7 @@ export async function mountApp({ if (redirectTo.destination === 'dashboard') { path = redirectTo.id ? createDashboardEditUrl(redirectTo.id) : CREATE_NEW_DASHBOARD_URL; if (redirectTo.editMode) { - state = { viewMode: ViewMode.EDIT }; + state = { viewMode: 'edit' }; } } else { path = createDashboardListingFilterUrl(redirectTo.filter); diff --git a/src/plugins/dashboard/public/dashboard_app/listing_page/dashboard_listing_page.tsx b/src/plugins/dashboard/public/dashboard_app/listing_page/dashboard_listing_page.tsx index 59b3b3926060..55f8bcabdfea 100644 --- a/src/plugins/dashboard/public/dashboard_app/listing_page/dashboard_listing_page.tsx +++ b/src/plugins/dashboard/public/dashboard_app/listing_page/dashboard_listing_page.tsx @@ -10,7 +10,6 @@ import React, { useEffect, useState } from 'react'; import { syncGlobalQueryStateWithUrl } from '@kbn/data-plugin/public'; -import { ViewMode } from '@kbn/embeddable-plugin/public'; import type { IKbnUrlStateStorage } from '@kbn/kibana-utils-plugin/public'; import { DashboardRedirect } from '../../dashboard_container/types'; @@ -108,7 +107,7 @@ export const DashboardListingPage = ({ useSessionStorageIntegration={true} initialFilter={initialFilter ?? titleFilter} goToDashboard={(id, viewMode) => { - redirectTo({ destination: 'dashboard', id, editMode: viewMode === ViewMode.EDIT }); + redirectTo({ destination: 'dashboard', id, editMode: viewMode === 'edit' }); }} getDashboardUrl={(id, timeRestore) => { return getDashboardListItemLink(kbnUrlStateStorage, id, timeRestore); diff --git a/src/plugins/dashboard/public/dashboard_app/top_nav/share/show_share_modal.tsx b/src/plugins/dashboard/public/dashboard_app/top_nav/share/show_share_modal.tsx index 41a290844328..d8b4c341cf67 100644 --- a/src/plugins/dashboard/public/dashboard_app/top_nav/share/show_share_modal.tsx +++ b/src/plugins/dashboard/public/dashboard_app/top_nav/share/show_share_modal.tsx @@ -15,7 +15,6 @@ import { EuiCallOut, EuiCheckboxGroup } from '@elastic/eui'; import type { Capabilities } from '@kbn/core/public'; import { QueryState } from '@kbn/data-plugin/common'; import { DASHBOARD_APP_LOCATOR } from '@kbn/deeplinks-analytics'; -import { ViewMode } from '@kbn/embeddable-plugin/public'; import { i18n } from '@kbn/i18n'; import { getStateFromKbnUrl, setStateToKbnUrl, unhashUrl } from '@kbn/kibana-utils-plugin/public'; @@ -177,7 +176,7 @@ export function ShowShareModal({ dashboardId: savedObjectId, preserveSavedFilters: true, refreshInterval: undefined, // We don't share refresh interval externally - viewMode: ViewMode.VIEW, // For share locators we always load the dashboard in view mode + viewMode: 'view', // For share locators we always load the dashboard in view mode useHash: false, timeRange: dataService.query.timefilter.timefilter.getTime(), ...unsavedStateForLocator, diff --git a/src/plugins/dashboard/public/dashboard_app/top_nav/use_dashboard_menu_items.tsx b/src/plugins/dashboard/public/dashboard_app/top_nav/use_dashboard_menu_items.tsx index 07e29db545e7..6f3d9c1cf565 100644 --- a/src/plugins/dashboard/public/dashboard_app/top_nav/use_dashboard_menu_items.tsx +++ b/src/plugins/dashboard/public/dashboard_app/top_nav/use_dashboard_menu_items.tsx @@ -9,7 +9,6 @@ import { Dispatch, SetStateAction, useCallback, useMemo, useState } from 'react'; -import { ViewMode } from '@kbn/embeddable-plugin/public'; import type { TopNavMenuData } from '@kbn/navigation-plugin/public'; import useMountedState from 'react-use/lib/useMountedState'; @@ -97,8 +96,8 @@ export const useDashboardMenuItems = ({ dashboardApi.clearOverlays(); const switchModes = switchToViewMode ? () => { - dashboardApi.setViewMode(ViewMode.VIEW); - getDashboardBackupService().storeViewMode(ViewMode.VIEW); + dashboardApi.setViewMode('view'); + getDashboardBackupService().storeViewMode('view'); } : undefined; if (!hasUnsavedChanges) { @@ -112,7 +111,7 @@ export const useDashboardMenuItems = ({ setIsResetting(false); switchModes?.(); } - }, viewMode as ViewMode); + }, viewMode); }, [dashboardApi, hasUnsavedChanges, viewMode, isMounted] ); @@ -146,8 +145,8 @@ export const useDashboardMenuItems = ({ testId: 'dashboardEditMode', className: 'eui-hideFor--s eui-hideFor--xs', // hide for small screens - editing doesn't work in mobile mode. run: () => { - getDashboardBackupService().storeViewMode(ViewMode.EDIT); - dashboardApi.setViewMode(ViewMode.EDIT); + getDashboardBackupService().storeViewMode('edit'); + dashboardApi.setViewMode('edit'); dashboardApi.clearOverlays(); }, disableButton: disableTopNav, @@ -171,13 +170,13 @@ export const useDashboardMenuItems = ({ testId: 'dashboardInteractiveSaveMenuItem', run: dashboardInteractiveSave, label: - viewMode === ViewMode.VIEW + viewMode === 'view' ? topNavStrings.viewModeInteractiveSave.label : Boolean(lastSavedId) ? topNavStrings.editModeInteractiveSave.label : topNavStrings.quickSave.label, description: - viewMode === ViewMode.VIEW + viewMode === 'view' ? topNavStrings.viewModeInteractiveSave.description : topNavStrings.editModeInteractiveSave.description, } as TopNavMenuData, @@ -232,7 +231,7 @@ export const useDashboardMenuItems = ({ isResetting || !hasUnsavedChanges || hasOverlays || - (viewMode === ViewMode.EDIT && (isSaveInProgress || !lastSavedId)), + (viewMode === 'edit' && (isSaveInProgress || !lastSavedId)), isLoading: isResetting, run: () => resetChanges(), }; diff --git a/src/plugins/dashboard/public/dashboard_app/url/search_sessions_integration.ts b/src/plugins/dashboard/public/dashboard_app/url/search_sessions_integration.ts index 37c9af6944f7..9992ac661614 100644 --- a/src/plugins/dashboard/public/dashboard_app/url/search_sessions_integration.ts +++ b/src/plugins/dashboard/public/dashboard_app/url/search_sessions_integration.ts @@ -18,7 +18,6 @@ import { import { replaceUrlHashQuery } from '@kbn/kibana-utils-plugin/common'; import type { Query } from '@kbn/es-query'; import { SearchSessionInfoProvider } from '@kbn/data-plugin/public'; -import type { ViewMode } from '@kbn/embeddable-plugin/common'; import { DASHBOARD_APP_LOCATOR } from '@kbn/deeplinks-analytics'; import { SEARCH_SESSION_ID } from '../../dashboard_constants'; import { DashboardLocatorParams } from '../../dashboard_container'; @@ -73,7 +72,7 @@ function getLocatorParams({ }): DashboardLocatorParams { const savedObjectId = dashboardApi.savedObjectId.value; return { - viewMode: (dashboardApi.viewMode.value as ViewMode) ?? 'view', + viewMode: dashboardApi.viewMode.value ?? 'view', useHash: false, preserveSavedFilters: false, filters: dataService.query.filterManager.getFilters(), diff --git a/src/plugins/dashboard/public/dashboard_constants.ts b/src/plugins/dashboard/public/dashboard_constants.ts index da8c56bd70ee..190b6653341a 100644 --- a/src/plugins/dashboard/public/dashboard_constants.ts +++ b/src/plugins/dashboard/public/dashboard_constants.ts @@ -7,7 +7,6 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -import { ViewMode } from '@kbn/embeddable-plugin/common'; import type { DashboardContainerInput } from '../common'; // ------------------------------------------------------------------ @@ -85,7 +84,7 @@ export const DASHBOARD_CACHE_TTL = 1000 * 60 * 5; // time to live = 5 minutes // Default State // ------------------------------------------------------------------ export const DEFAULT_DASHBOARD_INPUT: Omit = { - viewMode: ViewMode.VIEW, + viewMode: 'view', timeRestore: false, query: { query: '', language: 'kuery' }, description: '', diff --git a/src/plugins/dashboard/public/dashboard_container/component/empty_screen/dashboard_empty_screen.tsx b/src/plugins/dashboard/public/dashboard_container/component/empty_screen/dashboard_empty_screen.tsx index b7a4facde1c1..73d225dca3b4 100644 --- a/src/plugins/dashboard/public/dashboard_container/component/empty_screen/dashboard_empty_screen.tsx +++ b/src/plugins/dashboard/public/dashboard_container/component/empty_screen/dashboard_empty_screen.tsx @@ -20,7 +20,6 @@ import { EuiText, } from '@elastic/eui'; import { METRIC_TYPE } from '@kbn/analytics'; -import { ViewMode } from '@kbn/embeddable-plugin/public'; import { useStateFromPublishingSubject } from '@kbn/presentation-publishing'; import { useDashboardApi } from '../../../dashboard_api/use_dashboard_api'; @@ -131,7 +130,7 @@ export function DashboardEmptyScreen() { } if (showWriteControls) { return ( - dashboardApi.setViewMode(ViewMode.EDIT)}> + dashboardApi.setViewMode('edit')}> {emptyScreenStrings.getEditLinkTitle()} ); diff --git a/src/plugins/dashboard/public/dashboard_container/component/grid/dashboard_grid.tsx b/src/plugins/dashboard/public/dashboard_container/component/grid/dashboard_grid.tsx index 1f5e48dd7a5d..e521a1bbd276 100644 --- a/src/plugins/dashboard/public/dashboard_container/component/grid/dashboard_grid.tsx +++ b/src/plugins/dashboard/public/dashboard_container/component/grid/dashboard_grid.tsx @@ -15,8 +15,6 @@ import classNames from 'classnames'; import React, { useState, useMemo, useCallback, useEffect } from 'react'; import { Layout, Responsive as ResponsiveReactGridLayout } from 'react-grid-layout'; -import { ViewMode } from '@kbn/embeddable-plugin/public'; - import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing'; import { useAppFixedViewport } from '@kbn/core-rendering-browser'; import { DashboardPanelState } from '../../../../common'; @@ -106,7 +104,7 @@ export const DashboardGrid = ({ const onLayoutChange = useCallback( (newLayout: Array) => { - if (viewMode !== ViewMode.EDIT) return; + if (viewMode !== 'edit') return; const updatedPanels: { [key: string]: DashboardPanelState } = newLayout.reduce( (updatedPanelsAcc, panelLayout) => { @@ -127,8 +125,8 @@ export const DashboardGrid = ({ const classes = classNames({ 'dshLayout-withoutMargins': !useMargins, - 'dshLayout--viewing': viewMode === ViewMode.VIEW, - 'dshLayout--editing': viewMode !== ViewMode.VIEW, + 'dshLayout--viewing': viewMode === 'view', + 'dshLayout--editing': viewMode !== 'view', 'dshLayout--noAnimation': !animatePanelTransforms || delayedIsPanelExpanded, 'dshLayout-isMaximizedPanel': expandedPanelId !== undefined, }); @@ -136,7 +134,7 @@ export const DashboardGrid = ({ const { layouts, breakpoints, columns } = useDashboardGridSettings(panelsInOrder, panels); // in print mode, dashboard layout is not controlled by React Grid Layout - if (viewMode === ViewMode.PRINT) { + if (viewMode === 'print') { return <>{panelComponents}; } diff --git a/src/plugins/dashboard/public/dashboard_container/component/grid/use_dashboard_grid_settings.tsx b/src/plugins/dashboard/public/dashboard_container/component/grid/use_dashboard_grid_settings.tsx index 155d7022141d..50481d1a82f7 100644 --- a/src/plugins/dashboard/public/dashboard_container/component/grid/use_dashboard_grid_settings.tsx +++ b/src/plugins/dashboard/public/dashboard_container/component/grid/use_dashboard_grid_settings.tsx @@ -10,7 +10,6 @@ import { useMemo } from 'react'; import { useEuiTheme } from '@elastic/eui'; -import { ViewMode } from '@kbn/embeddable-plugin/public'; import { useStateFromPublishingSubject } from '@kbn/presentation-publishing'; import { DashboardPanelMap } from '../../../../common'; @@ -30,14 +29,14 @@ export const useDashboardGridSettings = (panelsInOrder: string[], panels: Dashbo }, [panels, panelsInOrder]); const breakpoints = useMemo( - () => ({ lg: euiTheme.breakpoint.m, ...(viewMode === ViewMode.VIEW ? { sm: 0 } : {}) }), + () => ({ lg: euiTheme.breakpoint.m, ...(viewMode === 'view' ? { sm: 0 } : {}) }), [viewMode, euiTheme.breakpoint.m] ); const columns = useMemo( () => ({ lg: DASHBOARD_GRID_COLUMN_COUNT, - ...(viewMode === ViewMode.VIEW ? { sm: 1 } : {}), + ...(viewMode === 'view' ? { sm: 1 } : {}), }), [viewMode] ); diff --git a/src/plugins/dashboard/public/dashboard_container/component/viewport/dashboard_viewport.tsx b/src/plugins/dashboard/public/dashboard_container/component/viewport/dashboard_viewport.tsx index 32f1f830ba93..0252341b5f4b 100644 --- a/src/plugins/dashboard/public/dashboard_container/component/viewport/dashboard_viewport.tsx +++ b/src/plugins/dashboard/public/dashboard_container/component/viewport/dashboard_viewport.tsx @@ -13,7 +13,7 @@ import useResizeObserver from 'use-resize-observer/polyfilled'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { EuiPortal } from '@elastic/eui'; -import { ReactEmbeddableRenderer, ViewMode } from '@kbn/embeddable-plugin/public'; +import { ReactEmbeddableRenderer } from '@kbn/embeddable-plugin/public'; import { ExitFullScreenButton } from '@kbn/shared-ux-button-exit-full-screen'; import { @@ -119,7 +119,7 @@ export const DashboardViewport = ({ dashboardContainer }: { dashboardContainer?: 'dshDashboardViewportWrapper--isFullscreen': fullScreenMode, })} > - {viewMode !== ViewMode.PRINT ? ( + {viewMode !== 'print' ? (
    @@ -116,7 +116,7 @@ export const resetConfirmStrings = { defaultMessage: 'Reset dashboard?', }), getResetSubtitle: (viewMode: ViewMode) => - viewMode === ViewMode.EDIT + viewMode === 'edit' ? i18n.translate('dashboard.discardChangesConfirmModal.discardChangesDescription', { defaultMessage: `All unsaved changes will be lost.`, }) diff --git a/src/plugins/dashboard/public/dashboard_listing/confirm_overlays.tsx b/src/plugins/dashboard/public/dashboard_listing/confirm_overlays.tsx index a2adea2470ab..d6e3728df023 100644 --- a/src/plugins/dashboard/public/dashboard_listing/confirm_overlays.tsx +++ b/src/plugins/dashboard/public/dashboard_listing/confirm_overlays.tsx @@ -21,9 +21,9 @@ import { EuiOutsideClickDetector, EuiText, } from '@elastic/eui'; -import { ViewMode } from '@kbn/embeddable-plugin/public'; import { toMountPoint } from '@kbn/react-kibana-mount'; +import { ViewMode } from '@kbn/presentation-publishing'; import { coreServices } from '../services/kibana_services'; import { createConfirmStrings, resetConfirmStrings } from './_dashboard_listing_strings'; @@ -31,12 +31,12 @@ export type DiscardOrKeepSelection = 'cancel' | 'discard' | 'keep'; export const confirmDiscardUnsavedChanges = ( discardCallback: () => void, - viewMode: ViewMode = ViewMode.EDIT // we want to show the danger modal on the listing page + viewMode: ViewMode = 'edit' // we want to show the danger modal on the listing page ) => { coreServices.overlays .openConfirm(resetConfirmStrings.getResetSubtitle(viewMode), { confirmButtonText: resetConfirmStrings.getResetConfirmButtonText(), - buttonColor: viewMode === ViewMode.EDIT ? 'danger' : 'primary', + buttonColor: viewMode === 'edit' ? 'danger' : 'primary', maxWidth: 500, defaultFocusedButton: EUI_MODAL_CANCEL_BUTTON, title: resetConfirmStrings.getResetTitle(), diff --git a/src/plugins/dashboard/public/dashboard_listing/dashboard_unsaved_listing.test.tsx b/src/plugins/dashboard/public/dashboard_listing/dashboard_unsaved_listing.test.tsx index 74b538d87c20..5cadd610ea2a 100644 --- a/src/plugins/dashboard/public/dashboard_listing/dashboard_unsaved_listing.test.tsx +++ b/src/plugins/dashboard/public/dashboard_listing/dashboard_unsaved_listing.test.tsx @@ -11,7 +11,6 @@ import { ComponentType, mount } from 'enzyme'; import React from 'react'; import { findTestSubject } from '@elastic/eui/lib/test'; -import { ViewMode } from '@kbn/embeddable-plugin/public'; import { I18nProvider } from '@kbn/i18n-react'; import { waitFor } from '@testing-library/react'; @@ -72,7 +71,7 @@ describe('Unsaved listing', () => { expect(getEditButton().length).toEqual(1); }); getEditButton().simulate('click'); - expect(props.goToDashboard).toHaveBeenCalledWith('dashboardUnsavedOne', ViewMode.EDIT); + expect(props.goToDashboard).toHaveBeenCalledWith('dashboardUnsavedOne', 'edit'); }); it('Redirects to new dashboard when continue editing clicked', async () => { @@ -85,7 +84,7 @@ describe('Unsaved listing', () => { expect(getEditButton().length).toBe(1); }); getEditButton().simulate('click'); - expect(props.goToDashboard).toHaveBeenCalledWith(undefined, ViewMode.EDIT); + expect(props.goToDashboard).toHaveBeenCalledWith(undefined, 'edit'); }); it('Shows a warning then clears changes when delete unsaved changes is pressed', async () => { diff --git a/src/plugins/dashboard/public/dashboard_listing/dashboard_unsaved_listing.tsx b/src/plugins/dashboard/public/dashboard_listing/dashboard_unsaved_listing.tsx index 04f40a199e83..1ab1aecfce91 100644 --- a/src/plugins/dashboard/public/dashboard_listing/dashboard_unsaved_listing.tsx +++ b/src/plugins/dashboard/public/dashboard_listing/dashboard_unsaved_listing.tsx @@ -18,8 +18,7 @@ import { } from '@elastic/eui'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; -import { ViewMode } from '@kbn/embeddable-plugin/public'; - +import { ViewMode } from '@kbn/presentation-publishing'; import type { DashboardAttributes } from '../../server/content_management'; import { DASHBOARD_PANELS_UNSAVED_ID, @@ -124,7 +123,7 @@ export const DashboardUnsavedListing = ({ const onOpen = useCallback( (id?: string) => { - goToDashboard(id, ViewMode.EDIT); + goToDashboard(id, 'edit'); }, [goToDashboard] ); diff --git a/src/plugins/dashboard/public/dashboard_listing/hooks/use_dashboard_listing_table.tsx b/src/plugins/dashboard/public/dashboard_listing/hooks/use_dashboard_listing_table.tsx index e29f93f97c17..23d29898e49c 100644 --- a/src/plugins/dashboard/public/dashboard_listing/hooks/use_dashboard_listing_table.tsx +++ b/src/plugins/dashboard/public/dashboard_listing/hooks/use_dashboard_listing_table.tsx @@ -14,7 +14,7 @@ import { ContentInsightsClient } from '@kbn/content-management-content-insights- import { TableListViewTableProps } from '@kbn/content-management-table-list-view-table'; import type { SavedObjectsFindOptionsReference } from '@kbn/core/public'; import { reportPerformanceMetricEvent } from '@kbn/ebt-tools'; -import { ViewMode } from '@kbn/embeddable-plugin/public'; +import { ViewMode } from '@kbn/presentation-publishing'; import type { DashboardSearchOut } from '../../../server/content_management'; import { @@ -270,7 +270,7 @@ export const useDashboardListingTable = ({ ); const editItem = useCallback( - ({ id }: { id: string | undefined }) => goToDashboard(id, ViewMode.EDIT), + ({ id }: { id: string | undefined }) => goToDashboard(id, 'edit'), [goToDashboard] ); diff --git a/src/plugins/dashboard/public/dashboard_listing/types.ts b/src/plugins/dashboard/public/dashboard_listing/types.ts index 0f5e24536624..84a47012b04c 100644 --- a/src/plugins/dashboard/public/dashboard_listing/types.ts +++ b/src/plugins/dashboard/public/dashboard_listing/types.ts @@ -9,7 +9,7 @@ import type { PropsWithChildren } from 'react'; import type { UserContentCommonSchema } from '@kbn/content-management-table-list-view-common'; -import type { ViewMode } from '@kbn/embeddable-plugin/public'; +import { ViewMode } from '@kbn/presentation-publishing'; export type DashboardListingProps = PropsWithChildren<{ disableCreateDashboardButton?: boolean; diff --git a/src/plugins/dashboard/public/mocks.tsx b/src/plugins/dashboard/public/mocks.tsx index 1a275d805e5e..334bf9ee0520 100644 --- a/src/plugins/dashboard/public/mocks.tsx +++ b/src/plugins/dashboard/public/mocks.tsx @@ -9,7 +9,6 @@ import { ControlGroupApi } from '@kbn/controls-plugin/public'; import { BehaviorSubject } from 'rxjs'; -import { ViewMode } from '@kbn/embeddable-plugin/public'; import { DashboardStart } from './plugin'; import { DashboardState } from './dashboard_api/types'; import { getDashboardApi } from './dashboard_api/get_dashboard_api'; @@ -97,7 +96,6 @@ export function buildMockDashboardApi({ dashboardInput: { ...initialState, executionContext: { type: 'dashboard' }, - viewMode: initialState.viewMode as ViewMode, id: savedObjectId ?? '123', } as SavedDashboardInput, references: [], diff --git a/src/plugins/dashboard/public/services/dashboard_content_management_service/lib/load_dashboard_state.ts b/src/plugins/dashboard/public/services/dashboard_content_management_service/lib/load_dashboard_state.ts index 9773291b2ca5..f0fe47b54ba9 100644 --- a/src/plugins/dashboard/public/services/dashboard_content_management_service/lib/load_dashboard_state.ts +++ b/src/plugins/dashboard/public/services/dashboard_content_management_service/lib/load_dashboard_state.ts @@ -11,7 +11,6 @@ import { has } from 'lodash'; import { v4 as uuidv4 } from 'uuid'; import { injectSearchSourceReferences } from '@kbn/data-plugin/public'; -import { ViewMode } from '@kbn/embeddable-plugin/public'; import { Filter, Query } from '@kbn/es-query'; import { SavedObjectNotFound } from '@kbn/kibana-utils-plugin/public'; @@ -188,7 +187,7 @@ export const loadDashboardState = async ({ query, title, - viewMode: ViewMode.VIEW, // dashboards loaded from saved object default to view mode. If it was edited recently, the view mode from session storage will override this. + viewMode: 'view', // dashboards loaded from saved object default to view mode. If it was edited recently, the view mode from session storage will override this. tags: savedObjectsTaggingService?.getTaggingApi()?.ui.getTagIdsFromReferences(references) ?? [], From e1b17d0707ca81e72d5a1f33f8d7693a7d25cacd Mon Sep 17 00:00:00 2001 From: Nathan Reese Date: Wed, 18 Dec 2024 10:43:21 -0700 Subject: [PATCH 58/60] [embeddable] remove legacy embeddable compatibility layer (#204642) Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine --- src/plugins/embeddable/public/index.ts | 5 - .../embeddable_compatibility_utils.ts | 100 ------ .../compatibility/legacy_embeddable_to_api.ts | 302 ------------------ .../public/lib/embeddables/embeddable.tsx | 86 +---- .../lib/embeddables/error_embeddable.tsx | 10 +- .../public/lib/embeddables/i_embeddable.ts | 44 +-- src/plugins/embeddable/tsconfig.json | 1 - .../translations/translations/fr-FR.json | 1 - .../translations/translations/ja-JP.json | 1 - .../translations/translations/zh-CN.json | 1 - 10 files changed, 11 insertions(+), 540 deletions(-) delete mode 100644 src/plugins/embeddable/public/lib/embeddables/compatibility/embeddable_compatibility_utils.ts delete mode 100644 src/plugins/embeddable/public/lib/embeddables/compatibility/legacy_embeddable_to_api.ts diff --git a/src/plugins/embeddable/public/index.ts b/src/plugins/embeddable/public/index.ts index c3bb2a796b28..c5de8a9d7631 100644 --- a/src/plugins/embeddable/public/index.ts +++ b/src/plugins/embeddable/public/index.ts @@ -93,9 +93,4 @@ export function plugin(initializerContext: PluginInitializerContext) { return new EmbeddablePublicPlugin(initializerContext); } -export { - embeddableInputToSubject, - embeddableOutputToSubject, -} from './lib/embeddables/compatibility/embeddable_compatibility_utils'; - export { COMMON_EMBEDDABLE_GROUPING } from './lib/embeddables/common/constants'; diff --git a/src/plugins/embeddable/public/lib/embeddables/compatibility/embeddable_compatibility_utils.ts b/src/plugins/embeddable/public/lib/embeddables/compatibility/embeddable_compatibility_utils.ts deleted file mode 100644 index 6512d28d6bcf..000000000000 --- a/src/plugins/embeddable/public/lib/embeddables/compatibility/embeddable_compatibility_utils.ts +++ /dev/null @@ -1,100 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { ViewMode } from '@kbn/presentation-publishing'; -import deepEqual from 'fast-deep-equal'; -import { BehaviorSubject, distinctUntilKeyChanged, map, Subscription } from 'rxjs'; -import { EmbeddableInput, EmbeddableOutput, IEmbeddable } from '../..'; -import { ViewMode as LegacyViewMode } from '../../types'; -import { CommonLegacyEmbeddable } from './legacy_embeddable_to_api'; - -export const embeddableInputToSubject = < - ValueType extends unknown = unknown, - LegacyInput extends EmbeddableInput = EmbeddableInput ->( - subscription: Subscription, - embeddable: IEmbeddable, - key: keyof LegacyInput, - useExplicitInput = false -) => { - const subject = new BehaviorSubject( - embeddable.getExplicitInput()?.[key] as ValueType - ); - subscription.add( - embeddable - .getInput$() - .pipe( - distinctUntilKeyChanged(key, (prev, current) => { - return deepEqual(prev, current); - }) - ) - .subscribe(() => subject.next(embeddable.getInput()?.[key] as ValueType)) - ); - return subject; -}; - -export const embeddableOutputToSubject = < - ValueType extends unknown = unknown, - LegacyOutput extends EmbeddableOutput = EmbeddableOutput ->( - subscription: Subscription, - embeddable: IEmbeddable, - key: keyof LegacyOutput -) => { - const subject = new BehaviorSubject( - embeddable.getOutput()[key] as ValueType - ); - subscription.add( - embeddable - .getOutput$() - .pipe(distinctUntilKeyChanged(key)) - .subscribe(() => subject.next(embeddable.getOutput()[key] as ValueType)) - ); - return subject; -}; - -export const mapLegacyViewModeToViewMode = (legacyViewMode?: LegacyViewMode): ViewMode => { - if (!legacyViewMode) return 'view'; - switch (legacyViewMode) { - case LegacyViewMode.VIEW: { - return 'view'; - } - case LegacyViewMode.EDIT: { - return 'edit'; - } - case LegacyViewMode.PREVIEW: { - return 'preview'; - } - case LegacyViewMode.PRINT: { - return 'print'; - } - default: { - return 'view'; - } - } -}; - -export const viewModeToSubject = ( - subscription: Subscription, - embeddable: CommonLegacyEmbeddable -) => { - const subject = new BehaviorSubject( - mapLegacyViewModeToViewMode(embeddable.getInput().viewMode) - ); - subscription.add( - embeddable - .getInput$() - .pipe( - distinctUntilKeyChanged('viewMode'), - map(({ viewMode }) => mapLegacyViewModeToViewMode(viewMode)) - ) - .subscribe((viewMode: ViewMode) => subject.next(viewMode)) - ); - return subject; -}; diff --git a/src/plugins/embeddable/public/lib/embeddables/compatibility/legacy_embeddable_to_api.ts b/src/plugins/embeddable/public/lib/embeddables/compatibility/legacy_embeddable_to_api.ts deleted file mode 100644 index 56fe9b82d1b2..000000000000 --- a/src/plugins/embeddable/public/lib/embeddables/compatibility/legacy_embeddable_to_api.ts +++ /dev/null @@ -1,302 +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", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { DataView } from '@kbn/data-views-plugin/common'; -import { - AggregateQuery, - compareFilters, - COMPARE_ALL_OPTIONS, - Filter, - Query, - TimeRange, -} from '@kbn/es-query'; -import type { ErrorLike } from '@kbn/expressions-plugin/common'; -import { i18n } from '@kbn/i18n'; -import { PhaseEvent, PhaseEventType } from '@kbn/presentation-publishing'; -import deepEqual from 'fast-deep-equal'; -import { isNil } from 'lodash'; -import { - BehaviorSubject, - map, - Subscription, - distinct, - combineLatest, - distinctUntilChanged, -} from 'rxjs'; -import { embeddableStart } from '../../../kibana_services'; -import { isFilterableEmbeddable } from '../../filterable_embeddable'; -import { - EmbeddableInput, - EmbeddableOutput, - IEmbeddable, - LegacyEmbeddableAPI, -} from '../i_embeddable'; -import { - embeddableInputToSubject, - embeddableOutputToSubject, - viewModeToSubject, -} from './embeddable_compatibility_utils'; - -export type CommonLegacyInput = EmbeddableInput & { savedObjectId?: string; timeRange: TimeRange }; -export type CommonLegacyOutput = EmbeddableOutput & { indexPatterns: DataView[] }; -export type CommonLegacyEmbeddable = IEmbeddable; - -type VisualizeEmbeddable = IEmbeddable<{ id: string }, EmbeddableOutput & { visTypeName: string }>; -function isVisualizeEmbeddable( - embeddable: IEmbeddable | VisualizeEmbeddable -): embeddable is VisualizeEmbeddable { - return embeddable.type === 'visualization'; -} - -const getEventStatus = (output: EmbeddableOutput): PhaseEventType => { - if (!isNil(output.error)) { - return 'error'; - } else if (output.rendered === true) { - return 'rendered'; - } else if (output.loading === false) { - return 'loaded'; - } else { - return 'loading'; - } -}; - -export const legacyEmbeddableToApi = ( - embeddable: CommonLegacyEmbeddable -): { api: Omit; destroyAPI: () => void } => { - const subscriptions = new Subscription(); - - /** - * Shortcuts for creating publishing subjects from the input and output subjects - */ - const inputKeyToSubject = ( - key: keyof CommonLegacyInput, - useExplicitInput?: boolean - ) => - embeddableInputToSubject( - subscriptions, - embeddable, - key, - useExplicitInput - ); - const outputKeyToSubject = (key: keyof CommonLegacyOutput) => - embeddableOutputToSubject(subscriptions, embeddable, key); - - /** - * Support editing of legacy embeddables - */ - const onEdit = () => { - throw new Error('Edit legacy embeddable not supported'); - }; - const getTypeDisplayName = () => - embeddableStart.getEmbeddableFactory(embeddable.type)?.getDisplayName() ?? - i18n.translate('embeddableApi.compatibility.defaultTypeDisplayName', { - defaultMessage: 'chart', - }); - const isEditingEnabled = () => false; - - /** - * Performance tracking - */ - const phase$ = new BehaviorSubject(undefined); - - let loadingStartTime = 0; - subscriptions.add( - embeddable - .getOutput$() - .pipe( - // Map loaded event properties - map((output) => { - if (output.loading === true) { - loadingStartTime = performance.now(); - } - return { - id: embeddable.id, - status: getEventStatus(output), - error: output.error, - }; - }), - // Dedupe - distinct((output) => loadingStartTime + output.id + output.status + !!output.error), - // Map loaded event properties - map((output): PhaseEvent => { - return { - ...output, - timeToEvent: performance.now() - loadingStartTime, - }; - }) - ) - .subscribe((statusOutput) => { - phase$.next(statusOutput); - }) - ); - - /** - * Publish state for Presentation panel - */ - const viewMode = viewModeToSubject(subscriptions, embeddable); - const dataLoading = outputKeyToSubject('loading'); - - const setHidePanelTitle = (hidePanelTitle?: boolean) => - embeddable.updateInput({ hidePanelTitles: hidePanelTitle }); - const hidePanelTitle = inputKeyToSubject('hidePanelTitles'); - - const setPanelTitle = (title?: string) => embeddable.updateInput({ title }); - const panelTitle = inputKeyToSubject('title'); - - const setPanelDescription = (description?: string) => embeddable.updateInput({ description }); - const panelDescription = inputKeyToSubject('description'); - - const defaultPanelTitle = outputKeyToSubject('defaultTitle'); - const defaultPanelDescription = outputKeyToSubject('defaultDescription'); - const disabledActionIds = inputKeyToSubject('disabledActions'); - - function getSavedObjectId(input: { savedObjectId?: string }, output: { savedObjectId?: string }) { - return output.savedObjectId ?? input.savedObjectId; - } - const savedObjectId = new BehaviorSubject( - getSavedObjectId(embeddable.getInput(), embeddable.getOutput()) - ); - subscriptions.add( - combineLatest([embeddable.getInput$(), embeddable.getOutput$()]) - .pipe( - map(([input, output]) => { - return getSavedObjectId(input, output); - }), - distinctUntilChanged() - ) - .subscribe((nextSavedObjectId) => { - savedObjectId.next(nextSavedObjectId); - }) - ); - - const blockingError = new BehaviorSubject(undefined); - subscriptions.add( - embeddable.getOutput$().subscribe({ - next: (output) => blockingError.next(output.error), - error: (error) => blockingError.next(error), - }) - ); - - const uuid = embeddable.id; - const disableTriggers = embeddable.getInput().disableTriggers; - - /** - * We treat all legacy embeddable types as if they can support local unified search state, because there is no programmatic way - * to tell when given a legacy embeddable what it's input could contain. All existing actions treat these as optional - * so if the Embeddable is incapable of publishing unified search state (i.e. markdown) then it will just be ignored. - */ - const timeRange$ = inputKeyToSubject('timeRange', true); - const setTimeRange = (nextTimeRange?: TimeRange) => - embeddable.updateInput({ timeRange: nextTimeRange }); - - const filters$: BehaviorSubject = new BehaviorSubject( - undefined - ); - - const query$: BehaviorSubject = new BehaviorSubject< - Query | AggregateQuery | undefined - >(undefined); - // if this embeddable is a legacy filterable embeddable, publish changes to those filters to the panelFilters subject. - if (isFilterableEmbeddable(embeddable)) { - embeddable.untilInitializationFinished().then(() => { - filters$.next(embeddable.getFilters()); - query$.next(embeddable.getQuery()); - - subscriptions.add( - embeddable.getInput$().subscribe(() => { - if ( - !compareFilters( - embeddable.filters$.getValue() ?? [], - embeddable.getFilters(), - COMPARE_ALL_OPTIONS - ) - ) { - filters$.next(embeddable.getFilters()); - } - if (!deepEqual(embeddable.query$.getValue() ?? [], embeddable.getQuery())) { - query$.next(embeddable.getQuery()); - } - }) - ); - }); - } - - const dataViews = outputKeyToSubject('indexPatterns'); - const isCompatibleWithUnifiedSearch = () => { - const isInputControl = - isVisualizeEmbeddable(embeddable) && - (embeddable as unknown as VisualizeEmbeddable).getOutput().visTypeName === - 'input_control_vis'; - - const isMarkdown = - isVisualizeEmbeddable(embeddable) && - (embeddable as VisualizeEmbeddable).getOutput().visTypeName === 'markdown'; - - const isImage = embeddable.type === 'image'; - const isLinks = embeddable.type === 'links'; - return !isInputControl && !isMarkdown && !isImage && !isLinks; - }; - - const hasLockedHoverActions$ = new BehaviorSubject(false); - - return { - api: { - uuid, - disableTriggers: disableTriggers ?? false, - viewMode, - dataLoading, - blockingError, - - phase$, - - onEdit, - isEditingEnabled, - getTypeDisplayName, - - timeRange$, - setTimeRange, - filters$, - query$, - isCompatibleWithUnifiedSearch, - - dataViews, - disabledActionIds, - setDisabledActionIds: (ids) => disabledActionIds.next(ids), - - hasLockedHoverActions$, - lockHoverActions: (lock: boolean) => hasLockedHoverActions$.next(lock), - - panelTitle, - setPanelTitle, - defaultPanelTitle, - - hidePanelTitle, - setHidePanelTitle, - - setPanelDescription, - panelDescription, - defaultPanelDescription, - - canLinkToLibrary: async () => false, - linkToLibrary: () => { - throw new Error('Link to library not supported for legacy embeddable'); - }, - - canUnlinkFromLibrary: async () => false, - unlinkFromLibrary: () => { - throw new Error('Unlink from library not supported for legacy embeddable'); - }, - - savedObjectId, - }, - destroyAPI: () => { - subscriptions.unsubscribe(); - }, - }; -}; diff --git a/src/plugins/embeddable/public/lib/embeddables/embeddable.tsx b/src/plugins/embeddable/public/lib/embeddables/embeddable.tsx index 40fb391400a1..f20d65de3d60 100644 --- a/src/plugins/embeddable/public/lib/embeddables/embeddable.tsx +++ b/src/plugins/embeddable/public/lib/embeddables/embeddable.tsx @@ -14,18 +14,9 @@ import { merge } from 'rxjs'; import { debounceTime, distinctUntilChanged, map, skip } from 'rxjs'; import { RenderCompleteDispatcher } from '@kbn/kibana-utils-plugin/public'; import { Adapters } from '../types'; -import { - EmbeddableError, - EmbeddableOutput, - IEmbeddable, - LegacyEmbeddableAPI, -} from './i_embeddable'; +import { EmbeddableError, EmbeddableOutput, IEmbeddable } from './i_embeddable'; import { EmbeddableInput, ViewMode } from '../../../common/types'; import { genericEmbeddableInputIsEqual, omitGenericEmbeddableInput } from './diff_embeddable_input'; -import { - CommonLegacyEmbeddable, - legacyEmbeddableToApi, -} from './compatibility/legacy_embeddable_to_api'; function getPanelTitle(input: EmbeddableInput, output: EmbeddableOutput) { if (input.hidePanelTitles) return ''; @@ -96,86 +87,12 @@ export abstract class Embeddable< ) .subscribe((title) => this.renderComplete.setTitle(title)); - const { api, destroyAPI } = legacyEmbeddableToApi(this as unknown as CommonLegacyEmbeddable); - this.destroyAPI = destroyAPI; - ({ - uuid: this.uuid, - disableTriggers: this.disableTriggers, - onEdit: this.onEdit, - viewMode: this.viewMode, - dataViews: this.dataViews, - panelTitle: this.panelTitle, - query$: this.query$, - dataLoading: this.dataLoading, - filters$: this.filters$, - blockingError: this.blockingError, - phase$: this.phase$, - setPanelTitle: this.setPanelTitle, - linkToLibrary: this.linkToLibrary, - hidePanelTitle: this.hidePanelTitle, - timeRange$: this.timeRange$, - isEditingEnabled: this.isEditingEnabled, - panelDescription: this.panelDescription, - defaultPanelDescription: this.defaultPanelDescription, - canLinkToLibrary: this.canLinkToLibrary, - disabledActionIds: this.disabledActionIds, - setDisabledActionIds: this.setDisabledActionIds, - unlinkFromLibrary: this.unlinkFromLibrary, - setHidePanelTitle: this.setHidePanelTitle, - defaultPanelTitle: this.defaultPanelTitle, - setTimeRange: this.setTimeRange, - getTypeDisplayName: this.getTypeDisplayName, - setPanelDescription: this.setPanelDescription, - canUnlinkFromLibrary: this.canUnlinkFromLibrary, - isCompatibleWithUnifiedSearch: this.isCompatibleWithUnifiedSearch, - savedObjectId: this.savedObjectId, - hasLockedHoverActions$: this.hasLockedHoverActions$, - lockHoverActions: this.lockHoverActions, - } = api); - setTimeout(() => { // after the constructor has finished, we initialize this embeddable if it isn't delayed if (!this.deferEmbeddableLoad) this.initializationFinished.complete(); }, 0); } - /** - * Assign compatibility API directly to the Embeddable instance. - */ - private destroyAPI; - public uuid: LegacyEmbeddableAPI['uuid']; - public disableTriggers: LegacyEmbeddableAPI['disableTriggers']; - public onEdit: LegacyEmbeddableAPI['onEdit']; - public viewMode: LegacyEmbeddableAPI['viewMode']; - public dataViews: LegacyEmbeddableAPI['dataViews']; - public query$: LegacyEmbeddableAPI['query$']; - public panelTitle: LegacyEmbeddableAPI['panelTitle']; - public dataLoading: LegacyEmbeddableAPI['dataLoading']; - public filters$: LegacyEmbeddableAPI['filters$']; - public phase$: LegacyEmbeddableAPI['phase$']; - public linkToLibrary: LegacyEmbeddableAPI['linkToLibrary']; - public blockingError: LegacyEmbeddableAPI['blockingError']; - public setPanelTitle: LegacyEmbeddableAPI['setPanelTitle']; - public timeRange$: LegacyEmbeddableAPI['timeRange$']; - public hidePanelTitle: LegacyEmbeddableAPI['hidePanelTitle']; - public isEditingEnabled: LegacyEmbeddableAPI['isEditingEnabled']; - public canLinkToLibrary: LegacyEmbeddableAPI['canLinkToLibrary']; - public panelDescription: LegacyEmbeddableAPI['panelDescription']; - public defaultPanelDescription: LegacyEmbeddableAPI['defaultPanelDescription']; - public disabledActionIds: LegacyEmbeddableAPI['disabledActionIds']; - public setDisabledActionIds: LegacyEmbeddableAPI['setDisabledActionIds']; - public unlinkFromLibrary: LegacyEmbeddableAPI['unlinkFromLibrary']; - public setTimeRange: LegacyEmbeddableAPI['setTimeRange']; - public defaultPanelTitle: LegacyEmbeddableAPI['defaultPanelTitle']; - public setHidePanelTitle: LegacyEmbeddableAPI['setHidePanelTitle']; - public getTypeDisplayName: LegacyEmbeddableAPI['getTypeDisplayName']; - public setPanelDescription: LegacyEmbeddableAPI['setPanelDescription']; - public canUnlinkFromLibrary: LegacyEmbeddableAPI['canUnlinkFromLibrary']; - public isCompatibleWithUnifiedSearch: LegacyEmbeddableAPI['isCompatibleWithUnifiedSearch']; - public savedObjectId: LegacyEmbeddableAPI['savedObjectId']; - public hasLockedHoverActions$: LegacyEmbeddableAPI['hasLockedHoverActions$']; - public lockHoverActions: LegacyEmbeddableAPI['lockHoverActions']; - public async getEditHref(): Promise { return this.getOutput().editUrl ?? undefined; } @@ -290,7 +207,6 @@ export abstract class Embeddable< this.inputSubject.complete(); this.outputSubject.complete(); - this.destroyAPI(); return; } diff --git a/src/plugins/embeddable/public/lib/embeddables/error_embeddable.tsx b/src/plugins/embeddable/public/lib/embeddables/error_embeddable.tsx index ffb5c197a4bc..b508d5aeb214 100644 --- a/src/plugins/embeddable/public/lib/embeddables/error_embeddable.tsx +++ b/src/plugins/embeddable/public/lib/embeddables/error_embeddable.tsx @@ -32,6 +32,14 @@ export class ErrorEmbeddable extends Embeddable; + return ( + + ); } } diff --git a/src/plugins/embeddable/public/lib/embeddables/i_embeddable.ts b/src/plugins/embeddable/public/lib/embeddables/i_embeddable.ts index e1dbc3db2236..8cac11a075d1 100644 --- a/src/plugins/embeddable/public/lib/embeddables/i_embeddable.ts +++ b/src/plugins/embeddable/public/lib/embeddables/i_embeddable.ts @@ -8,55 +8,13 @@ */ import { ErrorLike } from '@kbn/expressions-plugin/common'; -import { - HasEditCapabilities, - HasType, - HasDisableTriggers, - PublishesBlockingError, - PublishesDataLoading, - PublishesDataViews, - PublishesDisabledActionIds, - PublishesUnifiedSearch, - HasUniqueId, - PublishesViewMode, - PublishesWritablePanelDescription, - PublishesWritablePanelTitle, - PublishesPhaseEvents, - PublishesSavedObjectId, - HasLegacyLibraryTransforms, - CanLockHoverActions, -} from '@kbn/presentation-publishing'; import { Observable } from 'rxjs'; import { EmbeddableInput } from '../../../common/types'; -import { EmbeddableHasTimeRange } from '../filterable_embeddable/types'; -import { HasInspectorAdapters } from '../inspector'; import { Adapters } from '../types'; export type EmbeddableError = ErrorLike; export type { EmbeddableInput }; -/** - * Types for compatibility between the legacy Embeddable system and the new system - */ -export type LegacyEmbeddableAPI = HasType & - HasUniqueId & - HasDisableTriggers & - PublishesPhaseEvents & - PublishesViewMode & - PublishesDataViews & - HasEditCapabilities & - PublishesDataLoading & - HasInspectorAdapters & - PublishesBlockingError & - PublishesUnifiedSearch & - PublishesDisabledActionIds & - PublishesWritablePanelTitle & - PublishesWritablePanelDescription & - Partial & - EmbeddableHasTimeRange & - PublishesSavedObjectId & - CanLockHoverActions; - export interface EmbeddableOutput { // Whether the embeddable is actively loading. loading?: boolean; @@ -83,7 +41,7 @@ export interface IEmbeddable< I extends EmbeddableInput = EmbeddableInput, O extends EmbeddableOutput = EmbeddableOutput, N = any -> extends LegacyEmbeddableAPI { +> { /** * The type of embeddable, this is what will be used to take a serialized * embeddable and find the correct factory for which to create an instance of it. diff --git a/src/plugins/embeddable/tsconfig.json b/src/plugins/embeddable/tsconfig.json index bf97096d1484..249612d6d0e4 100644 --- a/src/plugins/embeddable/tsconfig.json +++ b/src/plugins/embeddable/tsconfig.json @@ -19,7 +19,6 @@ "@kbn/saved-objects-finder-plugin", "@kbn/usage-collection-plugin", "@kbn/content-management-plugin", - "@kbn/data-views-plugin", "@kbn/presentation-panel-plugin", "@kbn/presentation-publishing", "@kbn/presentation-containers", diff --git a/x-pack/platform/plugins/private/translations/translations/fr-FR.json b/x-pack/platform/plugins/private/translations/translations/fr-FR.json index 132e0cb4051c..82df2e0b71b5 100644 --- a/x-pack/platform/plugins/private/translations/translations/fr-FR.json +++ b/x-pack/platform/plugins/private/translations/translations/fr-FR.json @@ -2772,7 +2772,6 @@ "embeddableApi.common.constants.grouping.annotations": "Annotations et Navigation", "embeddableApi.common.constants.grouping.legacy": "Hérité", "embeddableApi.common.constants.grouping.other": "Autre", - "embeddableApi.compatibility.defaultTypeDisplayName": "graphique", "embeddableApi.contextMenuTrigger.description": "Une nouvelle action sera ajoutée au menu contextuel du panneau", "embeddableApi.contextMenuTrigger.title": "Menu contextuel", "embeddableApi.errors.embeddableFactoryNotFound": "Impossible de charger {type}. Veuillez effectuer une mise à niveau vers la distribution par défaut d'Elasticsearch et de Kibana avec la licence appropriée.", diff --git a/x-pack/platform/plugins/private/translations/translations/ja-JP.json b/x-pack/platform/plugins/private/translations/translations/ja-JP.json index ceafc1e58d00..225937ebae1b 100644 --- a/x-pack/platform/plugins/private/translations/translations/ja-JP.json +++ b/x-pack/platform/plugins/private/translations/translations/ja-JP.json @@ -2767,7 +2767,6 @@ "embeddableApi.common.constants.grouping.annotations": "注釈とナビゲーション", "embeddableApi.common.constants.grouping.legacy": "レガシー", "embeddableApi.common.constants.grouping.other": "Other", - "embeddableApi.compatibility.defaultTypeDisplayName": "チャート", "embeddableApi.contextMenuTrigger.description": "新しいアクションがパネルのコンテキストメニューに追加されます", "embeddableApi.contextMenuTrigger.title": "コンテキストメニュー", "embeddableApi.errors.embeddableFactoryNotFound": "{type} を読み込めません。Elasticsearch と Kibanaのデフォルトのディストリビューションを適切なライセンスでアップグレードしてください。", diff --git a/x-pack/platform/plugins/private/translations/translations/zh-CN.json b/x-pack/platform/plugins/private/translations/translations/zh-CN.json index 6a3f3c2e483a..1de620535824 100644 --- a/x-pack/platform/plugins/private/translations/translations/zh-CN.json +++ b/x-pack/platform/plugins/private/translations/translations/zh-CN.json @@ -2759,7 +2759,6 @@ "embeddableApi.common.constants.grouping.annotations": "标注和导航", "embeddableApi.common.constants.grouping.legacy": "旧版", "embeddableApi.common.constants.grouping.other": "其他", - "embeddableApi.compatibility.defaultTypeDisplayName": "图表", "embeddableApi.contextMenuTrigger.description": "会将一个新操作添加到该面板的上下文菜单", "embeddableApi.contextMenuTrigger.title": "上下文菜单", "embeddableApi.errors.embeddableFactoryNotFound": "{type} 无法加载。请升级到具有适当许可的默认 Elasticsearch 和 Kibana 分发。", From 9b0933567f1ec8a210fd5c6f4c6c4e0592042c57 Mon Sep 17 00:00:00 2001 From: Nikita Indik Date: Wed, 18 Dec 2024 18:46:28 +0100 Subject: [PATCH 59/60] [Security Solution] Rule Upgrade: Fix ES|QL autosuggest tooltip displaying in the wrong place (#204780) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Resolves: https://github.com/elastic/kibana/issues/203305** **Resolves: https://github.com/elastic/kibana/issues/202206** ## Summary This PR fixes the ES|QL autosuggest tooltip displaying incorrectly in the Rule Upgrade flyout. The issue was caused by `EuiFlyoutBody` having `transform: translateZ(0);`, which created a new CSS stacking context and affected the positioning of fixed elements. This PR removes the transform to resolve the issue. ## Background The `transform: translateZ(0);` was originally [added](https://github.com/elastic/eui/blob/ffd0cbca4d323ad0b1d5a73c252380d93178e5e7/packages/eui/src/global_styling/mixins/_helpers.ts#L122) by EUI as a workaround for a Chrome bug that no longer reproduces. ## Testing The fix has been tested on: - Brave (Chromium v131, latest) - Chromium v118 (version on which the Chrome bug [occurred](https://issues.chromium.org/issues/40778541#comment13)) No issues were observed with the flyout in either version. ## Screenshots **Chromium v131 after fix** Scherm­afbeelding 2024-12-18 om 15 57 20 **Chromium v118 after fix** Scherm­afbeelding 2024-12-18 om 15 57 36 Note: The darker backdrop in older Chromium is unrelated to this change. Work started on 18-Dec-2024. --- .../components/rule_details/rule_details_flyout.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_details_flyout.tsx b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_details_flyout.tsx index 3425779926f7..3909a9af5a60 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_details_flyout.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_details_flyout.tsx @@ -40,6 +40,13 @@ const StyledEuiFlyoutBody = styled(EuiFlyoutBody)` display: flex; flex: 1; overflow: hidden; + /* + Removes "transform: translateZ(0)" from EuiFlyoutBody styles to avoid creating a new stacking context. + Fixed elements inside the flyout body are now correctly positioned relative to the viewport. + See: https://github.com/elastic/eui/blob/ffd0cbca4d323ad0b1d5a73c252380d93178e5e7/packages/eui/src/global_styling/mixins/_helpers.ts#L122 + The Chrome bug mentioned in the link above no longer reproduces, so this change is safe. + */ + transform: none; .euiFlyoutBody__overflowContent { flex: 1; From 4af270661478013a001cb1875fa3087f87e1f914 Mon Sep 17 00:00:00 2001 From: Sandra G Date: Wed, 18 Dec 2024 13:23:32 -0500 Subject: [PATCH 60/60] [Obs AI Assistant] unskip and update summarize.spec.ts for serverless (#204790) Closes https://github.com/elastic/kibana/issues/192497 - Unskips summarize.spec.ts. It was originally skipped because tiny_elser was not available on CI. - Adds `this.tags(['skipMKI']` due to https://github.com/elastic/kibana/issues/192751 Related: https://github.com/elastic/kibana/pull/199134 --- .../complete/functions/summarize.spec.ts | 44 ++++++++++++++++--- 1 file changed, 39 insertions(+), 5 deletions(-) diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/ai_assistant/tests/complete/functions/summarize.spec.ts b/x-pack/test_serverless/api_integration/test_suites/observability/ai_assistant/tests/complete/functions/summarize.spec.ts index f949268aa730..823dd15f46b6 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/ai_assistant/tests/complete/functions/summarize.spec.ts +++ b/x-pack/test_serverless/api_integration/test_suites/observability/ai_assistant/tests/complete/functions/summarize.spec.ts @@ -11,6 +11,13 @@ import { LlmProxy, createLlmProxy, } from '@kbn/test-suites-xpack/observability_ai_assistant_api_integration/common/create_llm_proxy'; +import { + clearKnowledgeBase, + createKnowledgeBaseModel, + deleteInferenceEndpoint, + deleteKnowledgeBaseModel, + TINY_ELSER, +} from '@kbn/test-suites-xpack/observability_ai_assistant_api_integration/tests/knowledge_base/helpers'; import { FtrProviderContext } from '../../../common/ftr_provider_context'; import { invokeChatCompleteWithFunctionRequest } from './helpers'; import { @@ -22,12 +29,15 @@ import type { InternalRequestHeader, RoleCredentials } from '../../../../../../. export default function ApiTest({ getService }: FtrProviderContext) { const supertest = getService('supertest'); const log = getService('log'); + const ml = getService('ml'); + const es = getService('es'); const observabilityAIAssistantAPIClient = getService('observabilityAIAssistantAPIClient'); const svlUserManager = getService('svlUserManager'); const svlCommonApi = getService('svlCommonApi'); - // Skipped until Elser is available in tests - describe.skip('when calling summarize function', () => { + describe('when calling summarize function', function () { + // TODO: https://github.com/elastic/kibana/issues/192751 + this.tags(['skipMKI']); let roleAuthc: RoleCredentials; let internalReqHeader: InternalRequestHeader; let proxy: LlmProxy; @@ -36,6 +46,19 @@ export default function ApiTest({ getService }: FtrProviderContext) { before(async () => { roleAuthc = await svlUserManager.createM2mApiKeyWithRoleScope('editor'); internalReqHeader = svlCommonApi.getInternalRequestHeader(); + + await createKnowledgeBaseModel(ml); + await observabilityAIAssistantAPIClient + .slsAdmin({ + endpoint: 'POST /internal/observability_ai_assistant/kb/setup', + params: { + query: { + model_id: TINY_ELSER.id, + }, + }, + }) + .expect(200); + proxy = await createLlmProxy(log); connectorId = await createProxyActionConnector({ supertest, @@ -57,10 +80,10 @@ export default function ApiTest({ getService }: FtrProviderContext) { name: 'summarize', trigger: MessageRole.User, arguments: JSON.stringify({ - id: 'my-id', + title: 'My Title', text: 'Hello world', is_correction: false, - confidence: 1, + confidence: 'high', public: false, }), }, @@ -72,6 +95,9 @@ export default function ApiTest({ getService }: FtrProviderContext) { after(async () => { proxy.close(); await deleteActionConnector({ supertest, connectorId, log, roleAuthc, internalReqHeader }); + await deleteKnowledgeBaseModel(ml); + await clearKnowledgeBase(es); + await deleteInferenceEndpoint({ es }); }); it('persists entry in knowledge base', async () => { @@ -80,12 +106,20 @@ export default function ApiTest({ getService }: FtrProviderContext) { params: { query: { query: '', - sortBy: 'doc_id', + sortBy: 'title', sortDirection: 'asc', }, }, }); + const { role, public: isPublic, text, type, user, title } = res.body.entries[0]; + + expect(role).to.eql('assistant_summarization'); + expect(isPublic).to.eql(false); + expect(text).to.eql('Hello world'); + expect(type).to.eql('contextual'); + expect(user?.name).to.eql('elastic_editor'); // "editor" in stateful + expect(title).to.eql('My Title'); expect(res.body.entries).to.have.length(1); }); });