diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/chart_palette/index.test.ts b/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/chart_palette/index.test.ts index 8cc9e45d43b6e..5af6071afd925 100644 --- a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/chart_palette/index.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/chart_palette/index.test.ts @@ -14,7 +14,7 @@ import { RISK_SCORE_MEDIUM, RISK_SCORE_HIGH, RISK_SCORE_CRITICAL, -} from '../../../../../detections/components/rules/step_about_rule/data'; +} from '../../../../constants'; import { getFillColor, getRiskScorePalette, RISK_SCORE_STEPS } from '.'; describe('getFillColor', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/chart_palette/index.ts b/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/chart_palette/index.ts index 56c474522172a..c4f044e04c100 100644 --- a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/chart_palette/index.ts +++ b/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/chart_palette/index.ts @@ -15,7 +15,7 @@ import { RISK_SCORE_MEDIUM, RISK_SCORE_HIGH, RISK_SCORE_CRITICAL, -} from '../../../../../detections/components/rules/step_about_rule/data'; +} from '../../../../constants'; /** * The detection engine creates risk scores in the range 1 - 100. diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/insights/simple_alert_table.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/insights/simple_alert_table.tsx index 903122beba332..c3d2c826021e0 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/insights/simple_alert_table.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/insights/simple_alert_table.tsx @@ -11,7 +11,7 @@ import type { Severity } from '@kbn/securitysolution-io-ts-alerting-types'; import { EuiBasicTable, EuiSkeletonText, EuiSpacer } from '@elastic/eui'; import { PreferenceFormattedDate } from '../../formatted_date'; -import { SeverityBadge } from '../../../../detections/components/rules/severity_badge'; +import { SeverityBadge } from '../../severity_badge'; import { useAlertsByIds } from '../../../containers/alerts/use_alerts_by_ids'; import { SIMPLE_ALERT_TABLE_ERROR, SIMPLE_ALERT_TABLE_LIMITED } from './translations'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/overview/index.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/overview/index.tsx index 762671896b36e..1ce8e1ef03c60 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/overview/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/overview/index.tsx @@ -28,7 +28,7 @@ import { import { FormattedFieldValue } from '../../../../timelines/components/timeline/body/renderers/formatted_field'; import { OverviewCardWithActions, OverviewCard } from './overview_card'; import { StatusPopoverButton } from './status_popover_button'; -import { SeverityBadge } from '../../../../detections/components/rules/severity_badge'; +import { SeverityBadge } from '../../severity_badge'; import { useThrottledResizeObserver } from '../../utils'; import { isNotNull } from '../../../../timelines/store/helpers'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/overview/overview_card.test.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/overview/overview_card.test.tsx index 3d6808847de0f..b0aa72c0a7b9d 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/overview/overview_card.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/overview/overview_card.test.tsx @@ -15,7 +15,7 @@ import { SUB_PLUGINS_REDUCER, TestProviders, } from '../../../mock'; -import { SeverityBadge } from '../../../../detections/components/rules/severity_badge'; +import { SeverityBadge } from '../../severity_badge'; import type { State } from '../../../store'; import { createStore } from '../../../store'; import { TimelineId } from '../../../../../common/types'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_creation/hooks/index.ts b/x-pack/plugins/security_solution/public/common/components/hooks/index.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detection_engine/rule_creation/hooks/index.ts rename to x-pack/plugins/security_solution/public/common/components/hooks/index.ts diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_creation/hooks/use_is_esql_rule_type_enabled.ts b/x-pack/plugins/security_solution/public/common/components/hooks/use_is_esql_rule_type_enabled.ts similarity index 77% rename from x-pack/plugins/security_solution/public/detection_engine/rule_creation/hooks/use_is_esql_rule_type_enabled.ts rename to x-pack/plugins/security_solution/public/common/components/hooks/use_is_esql_rule_type_enabled.ts index 1bd45eb43156f..239c49088e644 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_creation/hooks/use_is_esql_rule_type_enabled.ts +++ b/x-pack/plugins/security_solution/public/common/components/hooks/use_is_esql_rule_type_enabled.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { useIsExperimentalFeatureEnabled } from '../../../common/hooks/use_experimental_features'; -import { useKibana } from '../../../common/lib/kibana'; +import { useIsExperimentalFeatureEnabled } from '../../hooks/use_experimental_features'; +import { useKibana } from '../../lib/kibana'; export const useIsEsqlRuleTypeEnabled = (): boolean => { const isEsqlSettingEnabled = useKibana().services.configSettings.ESQLEnabled; diff --git a/x-pack/plugins/security_solution/public/common/components/matrix_histogram/types.ts b/x-pack/plugins/security_solution/public/common/components/matrix_histogram/types.ts index 6d5df295dbc41..491a3f3b37ca9 100644 --- a/x-pack/plugins/security_solution/public/common/components/matrix_histogram/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/matrix_histogram/types.ts @@ -15,7 +15,7 @@ import type { InputsModelId } from '../../store/inputs/constants'; import type { MatrixHistogramType } from '../../../../common/search_strategy/security_solution'; import type { UpdateDateRange } from '../charts/common'; import type { GlobalTimeArgs } from '../../containers/use_global_time'; -import type { FieldValueThreshold } from '../../../detections/components/rules/threshold_input'; +import type { FieldValueThreshold } from '../../../detection_engine/rule_creation_ui/components/threshold_input'; import type { GetLensAttributes, LensAttributes } from '../visualization_actions/types'; export type MatrixHistogramMappingTypes = Record< diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/severity_badge/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/severity_badge/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/severity_badge/index.test.tsx rename to x-pack/plugins/security_solution/public/common/components/severity_badge/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/severity_badge/index.tsx b/x-pack/plugins/security_solution/public/common/components/severity_badge/index.tsx similarity index 93% rename from x-pack/plugins/security_solution/public/detections/components/rules/severity_badge/index.tsx rename to x-pack/plugins/security_solution/public/common/components/severity_badge/index.tsx index a265a5d4bf16c..4c6312761666f 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/severity_badge/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/severity_badge/index.tsx @@ -10,7 +10,7 @@ import { upperFirst } from 'lodash/fp'; import { euiLightVars } from '@kbn/ui-theme'; import type { Severity } from '@kbn/securitysolution-io-ts-alerting-types'; -import { HealthTruncateText } from '../../../../common/components/health_truncate_text'; +import { HealthTruncateText } from '../health_truncate_text'; const { euiColorVis0, euiColorVis5, euiColorVis7, euiColorVis9 } = euiLightVars; const severityToColorMap: Record = { diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/technical_preview_badge/index.tsx b/x-pack/plugins/security_solution/public/common/components/technical_preview_badge/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/technical_preview_badge/index.tsx rename to x-pack/plugins/security_solution/public/common/components/technical_preview_badge/index.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/technical_preview_badge/translations.ts b/x-pack/plugins/security_solution/public/common/components/technical_preview_badge/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/technical_preview_badge/translations.ts rename to x-pack/plugins/security_solution/public/common/components/technical_preview_badge/translations.ts diff --git a/x-pack/plugins/security_solution/public/common/constants.ts b/x-pack/plugins/security_solution/public/common/constants.ts new file mode 100644 index 0000000000000..62ac21424d604 --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/constants.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 { euiLightVars } from '@kbn/ui-theme'; + +export const RISK_COLOR_LOW = euiLightVars.euiColorVis0; +export const RISK_COLOR_MEDIUM = euiLightVars.euiColorVis5; +export const RISK_COLOR_HIGH = euiLightVars.euiColorVis7; +export const RISK_COLOR_CRITICAL = euiLightVars.euiColorVis9; + +export const RISK_SCORE_LOW = 21; +export const RISK_SCORE_MEDIUM = 47; +export const RISK_SCORE_HIGH = 73; +export const RISK_SCORE_CRITICAL = 99; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_audit_icon/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_audit_icon/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/ml_audit_icon/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_audit_icon/index.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_audit_icon/ml_audit_icon.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_audit_icon/ml_audit_icon.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/ml_audit_icon/ml_audit_icon.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_audit_icon/ml_audit_icon.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_audit_icon/ml_audit_icon.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_audit_icon/ml_audit_icon.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/ml_audit_icon/ml_audit_icon.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_audit_icon/ml_audit_icon.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_job_link/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_job_link/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/ml_job_link/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_job_link/index.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_job_link/ml_job_link.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_job_link/ml_job_link.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/ml_job_link/ml_job_link.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_job_link/ml_job_link.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_job_link/ml_job_link.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_job_link/ml_job_link.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/ml_job_link/ml_job_link.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_job_link/ml_job_link.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_job_select/help_text.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_job_select/help_text.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/ml_job_select/help_text.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_job_select/help_text.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_job_select/help_text.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_job_select/help_text.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/ml_job_select/help_text.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_job_select/help_text.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_job_select/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_job_select/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/ml_job_select/index.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_job_select/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_job_select/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_job_select/index.tsx similarity index 97% rename from x-pack/plugins/security_solution/public/detections/components/rules/ml_job_select/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_job_select/index.tsx index 7e55c3cb43770..e9c22457d7465 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/ml_job_select/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_job_select/index.tsx @@ -23,7 +23,6 @@ import type { FieldHook } from '../../../../shared_imports'; import { getFieldValidityAndErrorMessage } from '../../../../shared_imports'; import { useSecurityJobs } from '../../../../common/components/ml_popover/hooks/use_security_jobs'; import { useKibana } from '../../../../common/lib/kibana'; -import { ML_JOB_SELECT_PLACEHOLDER_TEXT } from '../step_define_rule/translations'; import { HelpText } from './help_text'; import * as i18n from './translations'; @@ -135,7 +134,7 @@ export const MlJobSelect: React.FC = ({ describedByIds = [], f isLoading={loading} onChange={handleJobSelect} options={jobOptions} - placeholder={ML_JOB_SELECT_PLACEHOLDER_TEXT} + placeholder={i18n.ML_JOB_SELECT_PLACEHOLDER_TEXT} renderOption={renderJobOption} rowHeight={50} selectedOptions={selectedJobOptions} diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_job_select/translations.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_job_select/translations.tsx similarity index 70% rename from x-pack/plugins/security_solution/public/detections/components/rules/ml_job_select/translations.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_job_select/translations.tsx index 470f0a9b66394..e0beadc019b4f 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/ml_job_select/translations.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_job_select/translations.tsx @@ -13,3 +13,10 @@ export const CREATE_CUSTOM_JOB_BUTTON_TITLE = i18n.translate( defaultMessage: 'Create custom job', } ); + +export const ML_JOB_SELECT_PLACEHOLDER_TEXT = i18n.translate( + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.mlJobSelectPlaceholderText', + { + defaultMessage: 'Select a job', + } +); diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_job_status_badge/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_job_status_badge/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/ml_job_status_badge/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_job_status_badge/index.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_job_status_badge/ml_job_status_badge.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_job_status_badge/ml_job_status_badge.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/ml_job_status_badge/ml_job_status_badge.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_job_status_badge/ml_job_status_badge.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_job_status_badge/ml_job_status_badge.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_job_status_badge/ml_job_status_badge.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/ml_job_status_badge/ml_job_status_badge.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_job_status_badge/ml_job_status_badge.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_job_status_badge/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_job_status_badge/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/ml_job_status_badge/translations.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_job_status_badge/translations.ts diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_jobs_description/admin/ml_admin_job_description.integration.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_jobs_description/admin/ml_admin_job_description.integration.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/ml_jobs_description/admin/ml_admin_job_description.integration.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_jobs_description/admin/ml_admin_job_description.integration.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_jobs_description/admin/ml_admin_job_description.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_jobs_description/admin/ml_admin_job_description.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/ml_jobs_description/admin/ml_admin_job_description.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_jobs_description/admin/ml_admin_job_description.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_jobs_description/admin/ml_admin_jobs_description.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_jobs_description/admin/ml_admin_jobs_description.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/ml_jobs_description/admin/ml_admin_jobs_description.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_jobs_description/admin/ml_admin_jobs_description.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_jobs_description/admin/ml_admin_jobs_description.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_jobs_description/admin/ml_admin_jobs_description.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/ml_jobs_description/admin/ml_admin_jobs_description.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_jobs_description/admin/ml_admin_jobs_description.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_jobs_description/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_jobs_description/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/ml_jobs_description/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_jobs_description/index.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_jobs_description/ml_job_item.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_jobs_description/ml_job_item.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/ml_jobs_description/ml_job_item.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_jobs_description/ml_job_item.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_jobs_description/ml_jobs_description.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_jobs_description/ml_jobs_description.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/ml_jobs_description/ml_jobs_description.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_jobs_description/ml_jobs_description.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_jobs_description/ml_jobs_description.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_jobs_description/ml_jobs_description.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/ml_jobs_description/ml_jobs_description.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_jobs_description/ml_jobs_description.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_jobs_description/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_jobs_description/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/ml_jobs_description/translations.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_jobs_description/translations.ts diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_jobs_description/user/ml_user_job_description.integration.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_jobs_description/user/ml_user_job_description.integration.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/ml_jobs_description/user/ml_user_job_description.integration.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_jobs_description/user/ml_user_job_description.integration.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_jobs_description/user/ml_user_job_description.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_jobs_description/user/ml_user_job_description.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/ml_jobs_description/user/ml_user_job_description.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_jobs_description/user/ml_user_job_description.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_jobs_description/user/ml_user_jobs_description.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_jobs_description/user/ml_user_jobs_description.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/ml_jobs_description/user/ml_user_jobs_description.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_jobs_description/user/ml_user_jobs_description.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_jobs_description/user/ml_user_jobs_description.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_jobs_description/user/ml_user_jobs_description.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/ml_jobs_description/user/ml_user_jobs_description.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/ml_jobs_description/user/ml_user_jobs_description.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/pick_timeline/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/pick_timeline/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/pick_timeline/index.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/pick_timeline/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/pick_timeline/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/pick_timeline/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/pick_timeline/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/pick_timeline/index.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_field/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/rule_actions_field/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_field/index.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/rule_actions_field/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_field/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/rule_actions_field/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_field/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/rule_actions_field/index.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_field/translations.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/rule_actions_field/translations.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_field/translations.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/rule_actions_field/translations.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/schedule_item_form/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/schedule_item_form/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/schedule_item_form/index.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/schedule_item_form/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/schedule_item_form/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/schedule_item_form/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/schedule_item_form/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/schedule_item_form/index.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/duration_input/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/schedule_item_form/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/duration_input/translations.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/schedule_item_form/translations.ts diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_about_rule_details/index.test.tsx similarity index 97% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_about_rule_details/index.test.tsx index e1a6440edd0d0..953e75ab5ceda 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_about_rule_details/index.test.tsx @@ -14,10 +14,10 @@ import { StepAboutRuleToggleDetails } from '.'; import { mockRule, mockAboutStepRule, -} from '../../../../detection_engine/rule_management_ui/components/rules_table/__mocks__/mock'; +} from '../../../rule_management_ui/components/rules_table/__mocks__/mock'; import { HeaderSection } from '../../../../common/components/header_section'; -import { StepAboutRule } from '../step_about_rule'; -import type { AboutStepRule } from '../../../pages/detection_engine/rules/types'; +import { StepAboutRule } from '../../../rule_creation_ui/components/step_about_rule'; +import type { AboutStepRule } from '../../../../detections/pages/detection_engine/rules/types'; import { getMockTheme } from '../../../../common/lib/kibana/kibana_react.mock'; jest.mock('../../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_about_rule_details/index.tsx similarity index 97% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_about_rule_details/index.tsx index bd5287e04c24b..65c2a253b86b5 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_about_rule_details/index.tsx @@ -21,13 +21,13 @@ import type { PropsWithChildren } from 'react'; import React, { memo, useCallback, useMemo, useState } from 'react'; import { css } from '@emotion/css'; -import { RuleAboutSection } from '../../../../detection_engine/rule_management/components/rule_details/rule_about_section'; +import { RuleAboutSection } from '../../../rule_management/components/rule_details/rule_about_section'; import { HeaderSection } from '../../../../common/components/header_section'; import { MarkdownRenderer } from '../../../../common/components/markdown_editor'; import type { AboutStepRule, AboutStepRuleDetails, -} from '../../../pages/detection_engine/rules/types'; +} from '../../../../detections/pages/detection_engine/rules/types'; import * as i18n from './translations'; import { fullHeight } from './styles'; import type { RuleResponse } from '../../../../../common/api/detection_engine'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/styles.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_about_rule_details/styles.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/styles.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_about_rule_details/styles.ts diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_about_rule_details/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/translations.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_about_rule_details/translations.ts diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_content_wrapper/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_content_wrapper/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_content_wrapper/index.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_content_wrapper/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_content_wrapper/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_content_wrapper/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_content_wrapper/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_content_wrapper/index.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_panel/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_panel/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_panel/index.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_panel/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_panel/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_panel/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_panel/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_panel/index.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/get_schema.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_rule_actions/get_schema.ts similarity index 79% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/get_schema.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_rule_actions/get_schema.ts index f16cac0eb923a..67753c810422b 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/get_schema.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_rule_actions/get_schema.ts @@ -6,10 +6,10 @@ */ import type { ActionTypeRegistryContract } from '@kbn/triggers-actions-ui-plugin/public'; -import { debouncedValidateRuleActionsField } from '../../../containers/detection_engine/rules/validate_rule_actions_field'; +import { debouncedValidateRuleActionsField } from '../../../../detections/containers/detection_engine/rules/validate_rule_actions_field'; import type { FormSchema } from '../../../../shared_imports'; -import type { ActionsStepRule } from '../../../pages/detection_engine/rules/types'; +import type { ActionsStepRule } from '../../../../detections/pages/detection_engine/rules/types'; export const getSchema = ({ actionTypeRegistry, diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_rule_actions/index.test.tsx similarity index 96% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/index.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_rule_actions/index.test.tsx index afa4327fe6b27..1785da88cc16a 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_rule_actions/index.test.tsx @@ -16,10 +16,10 @@ import { defaultSchedule, stepAboutDefaultValue, stepDefineDefaultValue, -} from '../../../pages/detection_engine/rules/utils'; -import { useRuleForms } from '../../../../detection_engine/rule_creation_ui/pages/form'; +} from '../../../../detections/pages/detection_engine/rules/utils'; +import { useRuleForms } from '../../../rule_creation_ui/pages/form'; import type { FormHook } from '../../../../shared_imports'; -import type { ActionsStepRule } from '../../../pages/detection_engine/rules/types'; +import type { ActionsStepRule } from '../../../../detections/pages/detection_engine/rules/types'; import { FrequencyDescription } from './notification_action'; jest.mock('../../../../common/lib/kibana', () => ({ diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_rule_actions/index.tsx similarity index 93% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_rule_actions/index.tsx index 31b0529fee4c3..ebf6b1bf0930c 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_rule_actions/index.tsx @@ -19,15 +19,18 @@ import type { Type } from '@kbn/securitysolution-io-ts-alerting-types'; import type { RuleObjectId } from '../../../../../common/api/detection_engine/model/rule_schema'; import { isQueryRule } from '../../../../../common/detection_engine/utils'; import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; -import { ResponseActionsForm } from '../../../../detection_engine/rule_response_actions/response_actions_form'; -import type { RuleStepProps, ActionsStepRule } from '../../../pages/detection_engine/rules/types'; +import { ResponseActionsForm } from '../../../rule_response_actions/response_actions_form'; +import type { + RuleStepProps, + ActionsStepRule, +} from '../../../../detections/pages/detection_engine/rules/types'; import { Form, UseField } from '../../../../shared_imports'; import type { FormHook } from '../../../../shared_imports'; import { StepContentWrapper } from '../step_content_wrapper'; import { RuleActionsField } from '../rule_actions_field'; import { useKibana } from '../../../../common/lib/kibana'; -import { useFetchConnectorsQuery } from '../../../../detection_engine/rule_management/api/hooks/use_fetch_connectors_query'; -import { useFetchConnectorTypesQuery } from '../../../../detection_engine/rule_management/api/hooks/use_fetch_connector_types_query'; +import { useFetchConnectorsQuery } from '../../../rule_management/api/hooks/use_fetch_connectors_query'; +import { useFetchConnectorTypesQuery } from '../../../rule_management/api/hooks/use_fetch_connector_types_query'; import * as i18n from './translations'; import { RuleSnoozeSection } from './rule_snooze_section'; import { NotificationAction } from './notification_action'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/notification_action.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_rule_actions/notification_action.tsx similarity index 97% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/notification_action.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_rule_actions/notification_action.tsx index 6a02a6da88291..c5325e449287c 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/notification_action.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_rule_actions/notification_action.tsx @@ -12,7 +12,7 @@ import type { ActionResult } from '@kbn/actions-plugin/server'; import type { RuleActionFrequency, RuleAction } from '@kbn/alerting-plugin/common'; import type { ActionTypeRegistryContract } from '@kbn/triggers-actions-ui-plugin/public'; import { FormattedMessage } from '@kbn/i18n-react'; -import { getTimeTypeValue } from '../../../../detection_engine/rule_creation_ui/pages/rule_creation/helpers'; +import { getTimeTypeValue } from '../../../rule_creation_ui/pages/rule_creation/helpers'; import * as i18n from './translations'; const DescriptionLine = ({ children }: { children: React.ReactNode }) => ( diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/response_action.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_rule_actions/response_action.tsx similarity index 91% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/response_action.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_rule_actions/response_action.tsx index 6607ce29e9bc9..5ae1dab1687e8 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/response_action.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_rule_actions/response_action.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { EuiToolTip, EuiText, EuiFlexGroup, EuiFlexItem, EuiIcon } from '@elastic/eui'; import type { RuleAction } from '@kbn/alerting-plugin/common'; -import { getActionDetails } from '../../../../detection_engine/rule_response_actions/constants'; +import { getActionDetails } from '../../../rule_response_actions/constants'; interface ResponseActionProps { action: Omit; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/rule_snooze_section.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_rule_actions/rule_snooze_section.tsx similarity index 89% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/rule_snooze_section.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_rule_actions/rule_snooze_section.tsx index 965537e1442ca..deb453cc535e1 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/rule_snooze_section.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_rule_actions/rule_snooze_section.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui'; import type { RuleObjectId } from '../../../../../common/api/detection_engine/model/rule_schema'; -import { RuleSnoozeBadge } from '../../../../detection_engine/rule_management/components/rule_snooze_badge'; +import { RuleSnoozeBadge } from '../../../rule_management/components/rule_snooze_badge'; import * as i18n from './translations'; interface RuleSnoozeSectionProps { diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/translations.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_rule_actions/translations.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/translations.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/step_rule_actions/translations.tsx diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_creation/logic/esql_validator.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/logic/esql_validator.ts index bbc598ec9e458..9cadae108ac22 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_creation/logic/esql_validator.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/logic/esql_validator.ts @@ -15,7 +15,7 @@ import { securitySolutionQueryClient } from '../../../common/containers/query_cl import type { ValidationError, ValidationFunc } from '../../../shared_imports'; import { isEsqlRule } from '../../../../common/detection_engine/utils'; import type { DefineStepRule } from '../../../detections/pages/detection_engine/rules/types'; -import type { FieldValueQueryBar } from '../../../detections/components/rules/query_bar'; +import type { FieldValueQueryBar } from '../../rule_creation_ui/components/query_bar'; import * as i18n from './translations'; import { getEsqlQueryConfig } from './get_esql_query_config'; export type FieldType = 'string'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/accordion_title/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/accordion_title/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/accordion_title/index.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/accordion_title/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/accordion_title/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/accordion_title/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/accordion_title/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/accordion_title/index.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/add_item_form/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/add_item_form/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/add_item_form/index.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/add_item_form/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/add_item_form/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/add_item_form/index.tsx similarity index 98% rename from x-pack/plugins/security_solution/public/detections/components/rules/add_item_form/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/add_item_form/index.tsx index acfc1ca61f548..7fa427952166d 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/add_item_form/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/add_item_form/index.tsx @@ -19,7 +19,7 @@ import type { ChangeEvent } from 'react'; import React, { useCallback, useEffect, useState, useRef } from 'react'; import styled from 'styled-components'; -import * as RuleI18n from '../../../pages/detection_engine/rules/translations'; +import * as RuleI18n from '../../../../detections/pages/detection_engine/rules/translations'; import type { FieldHook } from '../../../../shared_imports'; import { getFieldValidityAndErrorMessage } from '../../../../shared_imports'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/anomaly_threshold_slider/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/anomaly_threshold_slider/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/anomaly_threshold_slider/index.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/anomaly_threshold_slider/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/anomaly_threshold_slider/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/anomaly_threshold_slider/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/anomaly_threshold_slider/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/anomaly_threshold_slider/index.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/autocomplete_field/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/autocomplete_field/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/autocomplete_field/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/autocomplete_field/index.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/data_view_selector/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/data_view_selector/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/data_view_selector/index.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/data_view_selector/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/data_view_selector/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/data_view_selector/index.tsx similarity index 98% rename from x-pack/plugins/security_solution/public/detections/components/rules/data_view_selector/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/data_view_selector/index.tsx index c57fffa1725b8..45efbfcadec8c 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/data_view_selector/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/data_view_selector/index.tsx @@ -14,7 +14,7 @@ import type { DataViewListItem } from '@kbn/data-views-plugin/common'; import type { FieldHook } from '../../../../shared_imports'; import { getFieldValidityAndErrorMessage } from '../../../../shared_imports'; import * as i18n from './translations'; -import type { DefineStepRule } from '../../../pages/detection_engine/rules/types'; +import type { DefineStepRule } from '../../../../detections/pages/detection_engine/rules/types'; export interface DataViewSelectorProps { kibanaDataViews: Record; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/data_view_selector/translations.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/data_view_selector/translations.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/data_view_selector/translations.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/data_view_selector/translations.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/actions_description.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/actions_description.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/description_step/actions_description.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/actions_description.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/alert_suppression_technical_preview_badge.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/alert_suppression_technical_preview_badge.tsx similarity index 91% rename from x-pack/plugins/security_solution/public/detections/components/rules/description_step/alert_suppression_technical_preview_badge.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/alert_suppression_technical_preview_badge.tsx index 739fdfa6f5d1c..8843c01a188d6 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/alert_suppression_technical_preview_badge.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/alert_suppression_technical_preview_badge.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { EuiIcon, EuiToolTip } from '@elastic/eui'; -import { TechnicalPreviewBadge } from '../technical_preview_badge'; +import { TechnicalPreviewBadge } from '../../../../common/components/technical_preview_badge'; import { useUpsellingMessage } from '../../../../common/hooks/use_upselling'; interface TechnicalPreviewBadgeProps { diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/assets/list_tree_icon.svg b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/assets/list_tree_icon.svg similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/description_step/assets/list_tree_icon.svg rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/assets/list_tree_icon.svg diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/build_ml_jobs_description.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/build_ml_jobs_description.tsx similarity index 84% rename from x-pack/plugins/security_solution/public/detections/components/rules/description_step/build_ml_jobs_description.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/build_ml_jobs_description.tsx index 7012c4276ee45..d49f00ff59042 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/build_ml_jobs_description.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/build_ml_jobs_description.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; import type { ListItems } from './types'; -import { MlJobsDescription } from '../ml_jobs_description'; +import { MlJobsDescription } from '../../../rule_creation/components/ml_jobs_description'; export const buildMlJobsDescription = (jobIds: string[], label: string): ListItems => ({ title: label, diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/helpers.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/helpers.test.tsx similarity index 99% rename from x-pack/plugins/security_solution/public/detections/components/rules/description_step/helpers.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/helpers.test.tsx index ecfcb5c981235..9cc1b5654ad3d 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/helpers.test.tsx @@ -14,7 +14,7 @@ import { FilterManager, UI_SETTINGS } from '@kbn/data-plugin/public'; import { FilterBadgeGroup } from '@kbn/unified-search-plugin/public'; import type { DataViewBase } from '@kbn/es-query'; import { FilterStateStore } from '@kbn/es-query'; -import { SeverityBadge } from '../severity_badge'; +import { SeverityBadge } from '../../../../common/components/severity_badge'; import * as i18n from './translations'; import { diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/helpers.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/helpers.tsx similarity index 98% rename from x-pack/plugins/security_solution/public/detections/components/rules/description_step/helpers.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/helpers.tsx index 24fa1173e06e3..5a9dd4f7eb6d3 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/helpers.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/helpers.tsx @@ -41,17 +41,17 @@ import * as i18nRiskScore from '../risk_score_mapping/translations'; import * as i18n from './translations'; import type { BuildQueryBarDescription, ListItems } from './types'; -import { SeverityBadge } from '../severity_badge'; +import { SeverityBadge } from '../../../../common/components/severity_badge'; import type { AboutStepRiskScore, AboutStepSeverity, Duration, -} from '../../../pages/detection_engine/rules/types'; -import { GroupByOptions } from '../../../pages/detection_engine/rules/types'; +} from '../../../../detections/pages/detection_engine/rules/types'; +import { GroupByOptions } from '../../../../detections/pages/detection_engine/rules/types'; import { defaultToEmptyTag } from '../../../../common/components/empty_value'; import { ThreatEuiFlexGroup } from './threat_description'; import { AlertSuppressionTechnicalPreviewBadge } from './alert_suppression_technical_preview_badge'; -import { TechnicalPreviewBadge } from '../technical_preview_badge'; +import { TechnicalPreviewBadge } from '../../../../common/components/technical_preview_badge'; const NoteDescriptionContainer = styled(EuiFlexItem)` height: 105px; overflow-y: hidden; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/index.test.tsx similarity index 99% rename from x-pack/plugins/security_solution/public/detections/components/rules/description_step/index.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/index.test.tsx index 113f81631a06a..b2cd0d522a5ec 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/index.test.tsx @@ -22,14 +22,14 @@ import { FilterStateStore } from '@kbn/es-query'; import { mockAboutStepRule, mockDefineStepRule, -} from '../../../../detection_engine/rule_management_ui/components/rules_table/__mocks__/mock'; +} from '../../../rule_management_ui/components/rules_table/__mocks__/mock'; import { coreMock } from '@kbn/core/public/mocks'; import { DEFAULT_TIMELINE_TITLE } from '../../../../timelines/components/timeline/translations'; import * as i18n from './translations'; import { schema } from '../step_about_rule/schema'; import type { ListItems } from './types'; -import type { AboutStepRule } from '../../../pages/detection_engine/rules/types'; +import type { AboutStepRule } from '../../../../detections/pages/detection_engine/rules/types'; import { createLicenseServiceMock } from '../../../../../common/license/mocks'; jest.mock('../../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/index.tsx similarity index 96% rename from x-pack/plugins/security_solution/public/detections/components/rules/description_step/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/index.tsx index 883c01430e644..a53c1dfc29a71 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/index.tsx @@ -17,7 +17,7 @@ import type { RelatedIntegrationArray, RequiredFieldArray, } from '../../../../../common/api/detection_engine/model/rule_schema'; -import { buildRelatedIntegrationsDescription } from '../related_integrations/integrations_description'; +import { buildRelatedIntegrationsDescription } from '../../../../detections/components/rules/related_integrations/integrations_description'; import { DEFAULT_TIMELINE_TITLE } from '../../../../timelines/components/timeline/translations'; import type { EqlOptionsSelected } from '../../../../../common/search_strategy'; import { useKibana } from '../../../../common/lib/kibana'; @@ -25,8 +25,8 @@ import type { AboutStepRiskScore, AboutStepSeverity, Duration, -} from '../../../pages/detection_engine/rules/types'; -import type { FieldValueTimeline } from '../pick_timeline'; +} from '../../../../detections/pages/detection_engine/rules/types'; +import type { FieldValueTimeline } from '../../../rule_creation/components/pick_timeline'; import type { FormSchema } from '../../../../shared_imports'; import type { ListItems } from './types'; import { @@ -53,7 +53,7 @@ import { buildMlJobsDescription } from './build_ml_jobs_description'; import { buildActionsDescription } from './actions_description'; import { buildThrottleDescription } from './throttle_description'; import { THREAT_QUERY_LABEL } from './translations'; -import { filterEmptyThreats } from '../../../../detection_engine/rule_creation_ui/pages/rule_creation/helpers'; +import { filterEmptyThreats } from '../../pages/rule_creation/helpers'; import { useLicense } from '../../../../common/hooks/use_license'; import type { LicenseService } from '../../../../../common/license'; import { isThresholdRule, isQueryRule } from '../../../../../common/detection_engine/utils'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/threat_description.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/threat_description.tsx similarity index 96% rename from x-pack/plugins/security_solution/public/detections/components/rules/description_step/threat_description.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/threat_description.tsx index 2a8383ccc7381..2096d64d8d4c8 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/threat_description.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/threat_description.tsx @@ -8,7 +8,11 @@ import { EuiFlexItem, EuiLink, EuiFlexGroup, EuiButtonEmpty } from '@elastic/eui import React, { useEffect, useState } from 'react'; import styled from 'styled-components'; import type { BuildThreatDescription } from './types'; -import type { MitreSubTechnique, MitreTactic, MitreTechnique } from '../../../mitre/types'; +import type { + MitreSubTechnique, + MitreTactic, + MitreTechnique, +} from '../../../../detections/mitre/types'; import ListTreeIcon from './assets/list_tree_icon.svg'; const lazyMitreConfiguration = () => { @@ -18,7 +22,7 @@ const lazyMitreConfiguration = () => { */ return import( /* webpackChunkName: "lazy_mitre_configuration" */ - '../../../mitre/mitre_tactics_techniques' + '../../../../detections/mitre/mitre_tactics_techniques' ); }; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/throttle_description.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/throttle_description.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/description_step/throttle_description.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/throttle_description.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/description_step/translations.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/translations.ts diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/types.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/types.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/description_step/types.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/types.ts diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/duration_input/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/duration_input/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/duration_input/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/duration_input/index.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/schedule_item_form/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/duration_input/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/schedule_item_form/translations.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/duration_input/translations.ts diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/eql_overview_link.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/eql_overview_link.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/eql_overview_link.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/eql_overview_link.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/eql_query_bar.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/eql_query_bar.test.tsx similarity index 96% rename from x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/eql_query_bar.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/eql_query_bar.test.tsx index e07eacc363c92..aec082224e044 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/eql_query_bar.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/eql_query_bar.test.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { shallow, mount } from 'enzyme'; import { mockIndexPattern, TestProviders, useFormFieldMock } from '../../../../common/mock'; -import { mockQueryBar } from '../../../../detection_engine/rule_management_ui/components/rules_table/__mocks__/mock'; +import { mockQueryBar } from '../../../rule_management_ui/components/rules_table/__mocks__/mock'; import type { EqlQueryBarProps } from './eql_query_bar'; import { EqlQueryBar } from './eql_query_bar'; import { getEqlValidationError } from './validators.mock'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/eql_query_bar.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/eql_query_bar.tsx similarity index 98% rename from x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/eql_query_bar.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/eql_query_bar.tsx index 611480ddd8f29..fe1962a71f6c6 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/eql_query_bar.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/eql_query_bar.tsx @@ -17,7 +17,7 @@ import { FilterManager } from '@kbn/data-plugin/public'; import type { FieldHook } from '../../../../shared_imports'; import { FilterBar } from '../../../../common/components/filter_bar'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import type { DefineStepRule } from '../../../pages/detection_engine/rules/types'; +import type { DefineStepRule } from '../../../../detections/pages/detection_engine/rules/types'; import * as i18n from './translations'; import { EqlQueryBarFooter } from './footer'; import { getValidationResults } from './validators'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/errors_popover.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/errors_popover.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/errors_popover.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/errors_popover.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/errors_popover.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/errors_popover.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/errors_popover.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/errors_popover.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/footer.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/footer.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/footer.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/footer.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/footer.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/footer.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/footer.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/footer.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/index.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/index.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/index.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/index.ts diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/translations.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/translations.ts diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.mock.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/validators.mock.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.mock.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/validators.mock.ts diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.test.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/validators.test.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.test.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/validators.test.ts diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/validators.ts similarity index 95% rename from x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/validators.ts index ae6e84f187109..83b610eaaff7f 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/validators.ts @@ -10,8 +10,8 @@ import { isEmpty } from 'lodash'; import type { FieldHook, ValidationError, ValidationFunc } from '../../../../shared_imports'; import { isEqlRule } from '../../../../../common/detection_engine/utils'; import { KibanaServices } from '../../../../common/lib/kibana'; -import type { DefineStepRule } from '../../../pages/detection_engine/rules/types'; -import { DataSourceType } from '../../../pages/detection_engine/rules/types'; +import type { DefineStepRule } from '../../../../detections/pages/detection_engine/rules/types'; +import { DataSourceType } from '../../../../detections/pages/detection_engine/rules/types'; import { validateEql } from '../../../../common/hooks/eql/api'; import type { FieldValueQueryBar } from '../query_bar'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/mitre/helpers.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/mitre/helpers.test.tsx similarity index 92% rename from x-pack/plugins/security_solution/public/detections/components/rules/mitre/helpers.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/mitre/helpers.test.tsx index 341c00749bc81..8653b98ea8273 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/mitre/helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/mitre/helpers.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { getValidThreat } from '../../../mitre/valid_threat_mock'; +import { getValidThreat } from '../../../../detections/mitre/valid_threat_mock'; import { hasSubtechniqueOptions } from './helpers'; const mockTechniques = getValidThreat()[0].technique ?? []; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/mitre/helpers.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/mitre/helpers.ts similarity index 94% rename from x-pack/plugins/security_solution/public/detections/components/rules/mitre/helpers.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/mitre/helpers.ts index b8f979007b767..bb92b147efbbd 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/mitre/helpers.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/mitre/helpers.ts @@ -14,7 +14,7 @@ const lazyMitreConfiguration = () => { */ return import( /* webpackChunkName: "lazy_mitre_configuration" */ - '../../../mitre/mitre_tactics_techniques' + '../../../../detections/mitre/mitre_tactics_techniques' ); }; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/mitre/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/mitre/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/mitre/index.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/mitre/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/mitre/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/mitre/index.tsx similarity index 96% rename from x-pack/plugins/security_solution/public/detections/components/rules/mitre/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/mitre/index.tsx index 9f4d8d811eaa6..54df23125d500 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/mitre/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/mitre/index.tsx @@ -12,13 +12,13 @@ import styled from 'styled-components'; import { isEqual } from 'lodash'; import type { Threat, Threats } from '@kbn/securitysolution-io-ts-alerting-types'; -import * as Rulei18n from '../../../pages/detection_engine/rules/translations'; +import * as Rulei18n from '../../../../detections/pages/detection_engine/rules/translations'; import type { FieldHook } from '../../../../shared_imports'; import { threatDefault } from '../step_about_rule/default_value'; import { MyAddItemButton } from '../add_item_form'; import * as i18n from './translations'; import { MitreAttackTechniqueFields } from './technique_fields'; -import type { MitreTactic } from '../../../mitre/types'; +import type { MitreTactic } from '../../../../detections/mitre/types'; const lazyMitreConfiguration = () => { /** @@ -27,7 +27,7 @@ const lazyMitreConfiguration = () => { */ return import( /* webpackChunkName: "lazy_mitre_configuration" */ - '../../../mitre/mitre_tactics_techniques' + '../../../../detections/mitre/mitre_tactics_techniques' ); }; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/mitre/subtechnique_fields.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/mitre/subtechnique_fields.tsx similarity index 96% rename from x-pack/plugins/security_solution/public/detections/components/rules/mitre/subtechnique_fields.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/mitre/subtechnique_fields.tsx index 7645bc2c2c579..5c8067e9981fa 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/mitre/subtechnique_fields.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/mitre/subtechnique_fields.tsx @@ -17,11 +17,11 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'; import styled from 'styled-components'; import type { Threats, ThreatSubtechnique } from '@kbn/securitysolution-io-ts-alerting-types'; -import * as Rulei18n from '../../../pages/detection_engine/rules/translations'; +import * as Rulei18n from '../../../../detections/pages/detection_engine/rules/translations'; import type { FieldHook } from '../../../../shared_imports'; import { MyAddItemButton } from '../add_item_form'; import * as i18n from './translations'; -import type { MitreSubTechnique } from '../../../mitre/types'; +import type { MitreSubTechnique } from '../../../../detections/mitre/types'; const lazyMitreConfiguration = () => { /** @@ -30,7 +30,7 @@ const lazyMitreConfiguration = () => { */ return import( /* webpackChunkName: "lazy_mitre_configuration" */ - '../../../mitre/mitre_tactics_techniques' + '../../../../detections/mitre/mitre_tactics_techniques' ); }; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/mitre/technique_fields.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/mitre/technique_fields.tsx similarity index 97% rename from x-pack/plugins/security_solution/public/detections/components/rules/mitre/technique_fields.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/mitre/technique_fields.tsx index bb677801ecaa9..ca55e8feee3a8 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/mitre/technique_fields.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/mitre/technique_fields.tsx @@ -18,12 +18,12 @@ import React, { useCallback, useEffect, useState } from 'react'; import styled, { css } from 'styled-components'; import type { Threats, ThreatTechnique } from '@kbn/securitysolution-io-ts-alerting-types'; -import * as Rulei18n from '../../../pages/detection_engine/rules/translations'; +import * as Rulei18n from '../../../../detections/pages/detection_engine/rules/translations'; import type { FieldHook } from '../../../../shared_imports'; import { MyAddItemButton } from '../add_item_form'; import * as i18n from './translations'; import { MitreAttackSubtechniqueFields } from './subtechnique_fields'; -import type { MitreTechnique, MitreSubTechnique } from '../../../mitre/types'; +import type { MitreTechnique, MitreSubTechnique } from '../../../../detections/mitre/types'; const lazyMitreConfiguration = () => { /** @@ -32,7 +32,7 @@ const lazyMitreConfiguration = () => { */ return import( /* webpackChunkName: "lazy_mitre_configuration" */ - '../../../mitre/mitre_tactics_techniques' + '../../../../detections/mitre/mitre_tactics_techniques' ); }; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/mitre/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/mitre/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/mitre/translations.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/mitre/translations.ts diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/multi_select_fields/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/multi_select_fields/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/multi_select_fields/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/multi_select_fields/index.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/multi_select_fields/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/multi_select_fields/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/multi_select_fields/translations.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/multi_select_fields/translations.ts diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/new_terms_fields/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/new_terms_fields/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/new_terms_fields/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/new_terms_fields/index.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/new_terms_fields/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/new_terms_fields/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/new_terms_fields/translations.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/new_terms_fields/translations.ts diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/next_step/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/next_step/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/next_step/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/next_step/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/next_step/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/next_step/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/next_step/index.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/next_step/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/next_step/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/next_step/index.tsx similarity index 91% rename from x-pack/plugins/security_solution/public/detections/components/rules/next_step/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/next_step/index.tsx index a4efbc26b5821..9674b9d5f6e6e 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/next_step/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/next_step/index.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { EuiHorizontalRule, EuiFlexGroup, EuiFlexItem, EuiButton } from '@elastic/eui'; -import * as RuleI18n from '../../../pages/detection_engine/rules/translations'; +import * as RuleI18n from '../../../../detections/pages/detection_engine/rules/translations'; interface NextStepProps { onClick: () => void; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/optional_field_label/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/optional_field_label/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/optional_field_label/index.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/optional_field_label/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/optional_field_label/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/optional_field_label/index.tsx similarity index 82% rename from x-pack/plugins/security_solution/public/detections/components/rules/optional_field_label/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/optional_field_label/index.tsx index ec56d5d9d8f2f..74ba57ee2db96 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/optional_field_label/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/optional_field_label/index.tsx @@ -8,7 +8,7 @@ import { EuiText } from '@elastic/eui'; import React from 'react'; -import * as RuleI18n from '../../../pages/detection_engine/rules/translations'; +import * as RuleI18n from '../../../../detections/pages/detection_engine/rules/translations'; export const OptionalFieldLabel = ( diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/query_bar/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/query_bar/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/query_bar/index.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/query_bar/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/query_bar/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/query_bar/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/query_bar/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/query_bar/index.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/query_bar/translations.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/query_bar/translations.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/query_bar/translations.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/query_bar/translations.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/risk_score_mapping/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/risk_score_mapping/index.tsx similarity index 98% rename from x-pack/plugins/security_solution/public/detections/components/rules/risk_score_mapping/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/risk_score_mapping/index.tsx index fc55b8b60df5e..66b7a5ff27d12 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/risk_score_mapping/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/risk_score_mapping/index.tsx @@ -26,7 +26,7 @@ import type { FieldHook } from '@kbn/es-ui-shared-plugin/static/forms/hook_form_ import { FieldComponent } from '@kbn/securitysolution-autocomplete'; import type { RiskScoreMapping } from '@kbn/securitysolution-io-ts-alerting-types'; -import type { AboutStepRiskScore } from '../../../pages/detection_engine/rules/types'; +import type { AboutStepRiskScore } from '../../../../detections/pages/detection_engine/rules/types'; import * as i18n from './translations'; const NestedContent = styled.div` diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/risk_score_mapping/translations.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/risk_score_mapping/translations.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/risk_score_mapping/translations.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/risk_score_mapping/translations.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/helpers.test.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/helpers.test.ts similarity index 99% rename from x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/helpers.test.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/helpers.test.ts index 0ef8cc6b8746f..2a71ed328e5e0 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/helpers.test.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/helpers.test.ts @@ -6,7 +6,7 @@ */ import moment from 'moment'; -import { DataSourceType } from '../../../pages/detection_engine/rules/types'; +import { DataSourceType } from '../../../../detections/pages/detection_engine/rules/types'; import { isNoisy, getTimeframeOptions, getIsRulePreviewDisabled } from './helpers'; describe('query_preview/helpers', () => { diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/helpers.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/helpers.ts similarity index 96% rename from x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/helpers.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/helpers.ts index 4011d0412777b..3b072c2f91e2a 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/helpers.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/helpers.ts @@ -13,8 +13,8 @@ import * as i18n from './translations'; import { histogramDateTimeFormatter } from '../../../../common/components/utils'; import type { ChartSeriesConfigs } from '../../../../common/components/charts/common'; import type { FieldValueQueryBar } from '../query_bar'; -import type { TimeframePreviewOptions } from '../../../pages/detection_engine/rules/types'; -import { DataSourceType } from '../../../pages/detection_engine/rules/types'; +import type { TimeframePreviewOptions } from '../../../../detections/pages/detection_engine/rules/types'; +import { DataSourceType } from '../../../../detections/pages/detection_engine/rules/types'; import { MAX_NUMBER_OF_NEW_TERMS_FIELDS } from '../../../../../common/constants'; /** diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/index.test.tsx similarity index 96% rename from x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/index.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/index.test.tsx index e5726519715f5..9d39b68626907 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/index.test.tsx @@ -16,12 +16,12 @@ import type { RulePreviewProps } from '.'; import { RulePreview, REASONABLE_INVOCATION_COUNT } from '.'; import { usePreviewRoute } from './use_preview_route'; import { usePreviewHistogram } from './use_preview_histogram'; -import { DataSourceType } from '../../../pages/detection_engine/rules/types'; +import { DataSourceType } from '../../../../detections/pages/detection_engine/rules/types'; import { getStepScheduleDefaultValue, stepAboutDefaultValue, stepDefineDefaultValue, -} from '../../../pages/detection_engine/rules/utils'; +} from '../../../../detections/pages/detection_engine/rules/utils'; import { usePreviewInvocationCount } from './use_preview_invocation_count'; jest.mock('../../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/index.tsx similarity index 99% rename from x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/index.tsx index 2ee3cbd169ecf..a74281262760b 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/index.tsx @@ -34,7 +34,7 @@ import type { DefineStepRule, ScheduleStepRule, TimeframePreviewOptions, -} from '../../../pages/detection_engine/rules/types'; +} from '../../../../detections/pages/detection_engine/rules/types'; import { usePreviewInvocationCount } from './use_preview_invocation_count'; export const REASONABLE_INVOCATION_COUNT = 200; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/loading_histogram.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/loading_histogram.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/loading_histogram.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/loading_histogram.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_histogram.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/preview_histogram.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_histogram.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/preview_histogram.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_histogram.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/preview_histogram.tsx similarity index 97% rename from x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_histogram.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/preview_histogram.tsx index 24f6b82383a13..7de2f70aa381a 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_histogram.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/preview_histogram.tsx @@ -27,7 +27,7 @@ import { Panel } from '../../../../common/components/panel'; import { HeaderSection } from '../../../../common/components/header_section'; import { BarChart } from '../../../../common/components/charts/barchart'; import { usePreviewHistogram } from './use_preview_histogram'; -import { getAlertsPreviewDefaultModel } from '../../alerts_table/default_config'; +import { getAlertsPreviewDefaultModel } from '../../../../detections/components/alerts_table/default_config'; import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; import { DEFAULT_PREVIEW_INDEX } from '../../../../../common/constants'; import { useSourcererDataView } from '../../../../common/containers/sourcerer'; @@ -35,7 +35,7 @@ import { DetailsPanel } from '../../../../timelines/components/side_panel'; import { PreviewRenderCellValue } from './preview_table_cell_renderer'; import { getPreviewTableControlColumn } from './preview_table_control_columns'; import { useGlobalFullScreen } from '../../../../common/containers/use_full_screen'; -import type { TimeframePreviewOptions } from '../../../pages/detection_engine/rules/types'; +import type { TimeframePreviewOptions } from '../../../../detections/pages/detection_engine/rules/types'; import { useLicense } from '../../../../common/hooks/use_license'; import { useKibana } from '../../../../common/lib/kibana'; import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_logs.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/preview_logs.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_logs.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/preview_logs.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_table_cell_renderer.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/preview_table_cell_renderer.tsx similarity index 85% rename from x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_table_cell_renderer.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/preview_table_cell_renderer.tsx index 633d0c639b3c6..d8e1d84874eef 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_table_cell_renderer.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/preview_table_cell_renderer.tsx @@ -8,7 +8,7 @@ import type React from 'react'; import type { EuiDataGridCellValueElementProps } from '@elastic/eui'; import type { CellValueElementProps } from '../../../../../common/types'; -import { RenderCellValue } from '../../../configurations/security_solution_detections'; +import { RenderCellValue } from '../../../../detections/configurations/security_solution_detections'; export const PreviewRenderCellValue: React.FC< EuiDataGridCellValueElementProps & CellValueElementProps diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_table_control_columns.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/preview_table_control_columns.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_table_control_columns.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/preview_table_control_columns.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/translations.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/translations.ts diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/use_preview_histogram.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/use_preview_histogram.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/use_preview_histogram.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/use_preview_histogram.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/use_preview_invocation_count.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/use_preview_invocation_count.ts similarity index 85% rename from x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/use_preview_invocation_count.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/use_preview_invocation_count.ts index ef61f7dd37c13..d3571933dc031 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/use_preview_invocation_count.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/use_preview_invocation_count.ts @@ -7,8 +7,8 @@ import moment from 'moment'; -import type { TimeframePreviewOptions } from '../../../pages/detection_engine/rules/types'; -import { getTimeTypeValue } from '../../../../detection_engine/rule_creation_ui/pages/rule_creation/helpers'; +import type { TimeframePreviewOptions } from '../../../../detections/pages/detection_engine/rules/types'; +import { getTimeTypeValue } from '../../pages/rule_creation/helpers'; export const usePreviewInvocationCount = ({ timeframeOptions, diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/use_preview_route.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/use_preview_route.tsx similarity index 94% rename from x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/use_preview_route.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/use_preview_route.tsx index 3f6b838f93bcd..ac5e01567443d 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/use_preview_route.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/use_preview_route.tsx @@ -8,14 +8,14 @@ import { useEffect, useState, useCallback } from 'react'; import type { List } from '@kbn/securitysolution-io-ts-list-types'; import { usePreviewRule } from './use_preview_rule'; -import { formatPreviewRule } from '../../../../detection_engine/rule_creation_ui/pages/rule_creation/helpers'; +import { formatPreviewRule } from '../../pages/rule_creation/helpers'; import type { RulePreviewLogs } from '../../../../../common/api/detection_engine'; import type { AboutStepRule, DefineStepRule, ScheduleStepRule, TimeframePreviewOptions, -} from '../../../pages/detection_engine/rules/types'; +} from '../../../../detections/pages/detection_engine/rules/types'; interface PreviewRouteParams { defineRuleData?: DefineStepRule; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/use_preview_rule.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/use_preview_rule.ts similarity index 90% rename from x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/use_preview_rule.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/use_preview_rule.ts index e47b98c073244..61c7f298bd4fa 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/use_preview_rule.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/use_preview_rule.ts @@ -10,9 +10,9 @@ import { useEffect, useMemo, useState } from 'react'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; import type { PreviewResponse, RuleCreateProps } from '../../../../../common/api/detection_engine'; -import { previewRule } from '../../../../detection_engine/rule_management/api/api'; -import { transformOutput } from '../../../containers/detection_engine/rules/transforms'; -import type { TimeframePreviewOptions } from '../../../pages/detection_engine/rules/types'; +import { previewRule } from '../../../rule_management/api/api'; +import { transformOutput } from '../../../../detections/containers/detection_engine/rules/transforms'; +import type { TimeframePreviewOptions } from '../../../../detections/pages/detection_engine/rules/types'; import { usePreviewInvocationCount } from './use_preview_invocation_count'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/select_rule_type/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/select_rule_type/index.test.tsx similarity index 98% rename from x-pack/plugins/security_solution/public/detections/components/rules/select_rule_type/index.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/select_rule_type/index.test.tsx index 9bf1553dbfd18..73bdf48623e2a 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/select_rule_type/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/select_rule_type/index.test.tsx @@ -10,9 +10,9 @@ import { mount, shallow } from 'enzyme'; import { SelectRuleType } from '.'; import { TestProviders, useFormFieldMock } from '../../../../common/mock'; -import { useIsEsqlRuleTypeEnabled } from '../../../../detection_engine/rule_creation/hooks'; +import { useIsEsqlRuleTypeEnabled } from '../../../../common/components/hooks'; -jest.mock('../../../../detection_engine/rule_creation/hooks', () => ({ +jest.mock('../../../../common/components/hooks', () => ({ useIsEsqlRuleTypeEnabled: jest.fn().mockReturnValue(true), })); const useIsEsqlRuleTypeEnabledMock = useIsEsqlRuleTypeEnabled as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/select_rule_type/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/select_rule_type/index.tsx similarity index 97% rename from x-pack/plugins/security_solution/public/detections/components/rules/select_rule_type/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/select_rule_type/index.tsx index 61ce85d8e43a7..1228feb4bd285 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/select_rule_type/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/select_rule_type/index.tsx @@ -21,8 +21,8 @@ import { import type { FieldHook } from '../../../../shared_imports'; import * as i18n from './translations'; import { MlCardDescription } from './ml_card_description'; -import { TechnicalPreviewBadge } from '../technical_preview_badge'; -import { useIsEsqlRuleTypeEnabled } from '../../../../detection_engine/rule_creation/hooks'; +import { TechnicalPreviewBadge } from '../../../../common/components/technical_preview_badge'; +import { useIsEsqlRuleTypeEnabled } from '../../../../common/components/hooks'; interface SelectRuleTypeProps { describedByIds: string[]; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/select_rule_type/ml_card_description.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/select_rule_type/ml_card_description.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/select_rule_type/ml_card_description.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/select_rule_type/ml_card_description.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/select_rule_type/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/select_rule_type/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/select_rule_type/translations.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/select_rule_type/translations.ts diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/severity_mapping/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/severity_mapping/index.tsx similarity index 99% rename from x-pack/plugins/security_solution/public/detections/components/rules/severity_mapping/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/severity_mapping/index.tsx index cbd351b5b7b42..425564e1ed5f2 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/severity_mapping/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/severity_mapping/index.tsx @@ -33,7 +33,7 @@ import type { } from '@kbn/securitysolution-io-ts-alerting-types'; import type { SeverityOptionItem } from '../step_about_rule/data'; -import type { AboutStepSeverity } from '../../../pages/detection_engine/rules/types'; +import type { AboutStepSeverity } from '../../../../detections/pages/detection_engine/rules/types'; import { useKibana } from '../../../../common/lib/kibana'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/severity_mapping/translations.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/severity_mapping/translations.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/severity_mapping/translations.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/severity_mapping/translations.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/status_icon/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/status_icon/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/status_icon/index.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/status_icon/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/status_icon/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/status_icon/index.tsx similarity index 92% rename from x-pack/plugins/security_solution/public/detections/components/rules/status_icon/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/status_icon/index.tsx index 6afb5c2560403..5a01e08a6d094 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/status_icon/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/status_icon/index.tsx @@ -10,7 +10,7 @@ import React, { memo } from 'react'; import styled from 'styled-components'; import { useEuiTheme } from '../../../../common/lib/theme/use_eui_theme'; -import type { RuleStatusType } from '../../../pages/detection_engine/rules/types'; +import type { RuleStatusType } from '../../../../detections/pages/detection_engine/rules/types'; export interface RuleStatusIconProps { name: string; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/data.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_about_rule/data.tsx similarity index 76% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/data.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_about_rule/data.tsx index bab334b1c7f1f..511f4109f9413 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/data.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_about_rule/data.tsx @@ -8,10 +8,20 @@ import React from 'react'; import styled from 'styled-components'; import { EuiHealth } from '@elastic/eui'; -import { euiLightVars } from '@kbn/ui-theme'; import type { Severity } from '@kbn/securitysolution-io-ts-alerting-types'; import * as I18n from './translations'; +import { + RISK_COLOR_LOW, + RISK_COLOR_MEDIUM, + RISK_COLOR_HIGH, + RISK_COLOR_CRITICAL, + RISK_SCORE_LOW, + RISK_SCORE_MEDIUM, + RISK_SCORE_HIGH, + RISK_SCORE_CRITICAL, +} from '../../../../common/constants'; + export interface SeverityOptionItem { value: Severity; inputDisplay: React.ReactElement; @@ -21,16 +31,6 @@ const StyledEuiHealth = styled(EuiHealth)` line-height: inherit; `; -export const RISK_COLOR_LOW = euiLightVars.euiColorVis0; -export const RISK_COLOR_MEDIUM = euiLightVars.euiColorVis5; -export const RISK_COLOR_HIGH = euiLightVars.euiColorVis7; -export const RISK_COLOR_CRITICAL = euiLightVars.euiColorVis9; - -export const RISK_SCORE_LOW = 21; -export const RISK_SCORE_MEDIUM = 47; -export const RISK_SCORE_HIGH = 73; -export const RISK_SCORE_CRITICAL = 99; - export const severityOptions: SeverityOptionItem[] = [ { value: 'low', diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/default_value.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_about_rule/default_value.ts similarity index 82% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/default_value.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_about_rule/default_value.ts index f8025537f3f17..91057eb3ff5f8 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/default_value.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_about_rule/default_value.ts @@ -5,8 +5,8 @@ * 2.0. */ -import type { AboutStepRule } from '../../../pages/detection_engine/rules/types'; -import { fillEmptySeverityMappings } from '../../../pages/detection_engine/rules/helpers'; +import type { AboutStepRule } from '../../../../detections/pages/detection_engine/rules/types'; +import { fillEmptySeverityMappings } from '../../../../detections/pages/detection_engine/rules/helpers'; export const threatDefault = [ { diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_about_rule/index.test.tsx similarity index 95% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/index.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_about_rule/index.test.tsx index ca8ef7ea56440..6c4dfebc6be58 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_about_rule/index.test.tsx @@ -14,19 +14,25 @@ import { StepAboutRule, StepAboutRuleReadOnly } from '.'; import { useFetchIndex } from '../../../../common/containers/source'; import { useGetInstalledJob } from '../../../../common/components/ml/hooks/use_get_jobs'; import { useSecurityJobs } from '../../../../common/components/ml_popover/hooks/use_security_jobs'; -import { mockAboutStepRule } from '../../../../detection_engine/rule_management_ui/components/rules_table/__mocks__/mock'; +import { mockAboutStepRule } from '../../../rule_management_ui/components/rules_table/__mocks__/mock'; import { StepRuleDescription } from '../description_step'; import { stepAboutDefaultValue } from './default_value'; -import type { AboutStepRule, DefineStepRule } from '../../../pages/detection_engine/rules/types'; -import { DataSourceType, GroupByOptions } from '../../../pages/detection_engine/rules/types'; -import { fillEmptySeverityMappings } from '../../../pages/detection_engine/rules/helpers'; +import type { + AboutStepRule, + DefineStepRule, +} from '../../../../detections/pages/detection_engine/rules/types'; +import { + DataSourceType, + GroupByOptions, +} from '../../../../detections/pages/detection_engine/rules/types'; +import { fillEmptySeverityMappings } from '../../../../detections/pages/detection_engine/rules/helpers'; import { TestProviders } from '../../../../common/mock'; -import { useRuleForms } from '../../../../detection_engine/rule_creation_ui/pages/form'; -import { stepActionsDefaultValue } from '../step_rule_actions'; +import { useRuleForms } from '../../pages/form'; +import { stepActionsDefaultValue } from '../../../rule_creation/components/step_rule_actions'; import { defaultSchedule, stepDefineDefaultValue, -} from '../../../pages/detection_engine/rules/utils'; +} from '../../../../detections/pages/detection_engine/rules/utils'; import type { FormHook } from '../../../../shared_imports'; jest.mock('../../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_about_rule/index.tsx similarity index 97% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_about_rule/index.tsx index f6bad9de7dee1..ef78ac0f408b7 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_about_rule/index.tsx @@ -14,7 +14,10 @@ import type { DataViewBase } from '@kbn/es-query'; import type { Severity, Type } from '@kbn/securitysolution-io-ts-alerting-types'; import { isThreatMatchRule, isEsqlRule } from '../../../../../common/detection_engine/utils'; -import type { RuleStepProps, AboutStepRule } from '../../../pages/detection_engine/rules/types'; +import type { + RuleStepProps, + AboutStepRule, +} from '../../../../detections/pages/detection_engine/rules/types'; import { AddItem } from '../add_item_form'; import { StepRuleDescription } from '../description_step'; import { AddMitreAttackThreat } from '../mitre'; @@ -25,7 +28,7 @@ import { defaultRiskScoreBySeverity, severityOptions } from './data'; import { isUrlInvalid } from '../../../../common/utils/validators'; import { schema as defaultSchema } from './schema'; import * as I18n from './translations'; -import { StepContentWrapper } from '../step_content_wrapper'; +import { StepContentWrapper } from '../../../rule_creation/components/step_content_wrapper'; import { MarkdownEditorForm } from '../../../../common/components/markdown_editor/eui_form'; import { SeverityField } from '../severity_mapping'; import { RiskScoreField } from '../risk_score_mapping'; @@ -33,8 +36,8 @@ import { AutocompleteField } from '../autocomplete_field'; import { useFetchIndex } from '../../../../common/containers/source'; import { DEFAULT_INDICATOR_SOURCE_PATH } from '../../../../../common/constants'; import { useKibana } from '../../../../common/lib/kibana'; -import { useRuleIndices } from '../../../../detection_engine/rule_management/logic/use_rule_indices'; -import { EsqlAutocomplete } from '../../../../detection_engine/rule_creation/components/esql_autocomplete'; +import { useRuleIndices } from '../../../rule_management/logic/use_rule_indices'; +import { EsqlAutocomplete } from '../../../rule_creation/components/esql_autocomplete'; import { MultiSelectFieldsAutocomplete } from '../multi_select_fields'; const CommonUseField = getUseField({ component: Field }); diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/schema.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_about_rule/schema.tsx similarity index 99% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/schema.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_about_rule/schema.tsx index 1d23169dec241..4eb84dbf6dcc3 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/schema.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_about_rule/schema.tsx @@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n'; import type { FormSchema, ValidationFunc, ERROR_CODE } from '../../../../shared_imports'; import { FIELD_TYPES, fieldValidators, VALIDATION_TYPES } from '../../../../shared_imports'; -import type { AboutStepRule } from '../../../pages/detection_engine/rules/types'; +import type { AboutStepRule } from '../../../../detections/pages/detection_engine/rules/types'; import { OptionalFieldLabel } from '../optional_field_label'; import { isUrlInvalid } from '../../../../common/utils/validators'; import * as I18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_about_rule/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/translations.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_about_rule/translations.ts diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/index.test.tsx similarity index 96% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/index.test.tsx index c8707897d18a8..22e43dc31acb8 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/index.test.tsx @@ -12,18 +12,18 @@ import type { Type } from '@kbn/securitysolution-io-ts-alerting-types'; import { StepDefineRule, aggregatableFields } from '.'; import { mockBrowserFields } from '../../../../common/containers/source/mock'; -import { useRuleFromTimeline } from '../../../containers/detection_engine/rules/use_rule_from_timeline'; +import { useRuleFromTimeline } from '../../../../detections/containers/detection_engine/rules/use_rule_from_timeline'; import { fireEvent, render, within } from '@testing-library/react'; import { TestProviders } from '../../../../common/mock'; -import { useRuleForms } from '../../../../detection_engine/rule_creation_ui/pages/form'; -import { stepActionsDefaultValue } from '../step_rule_actions'; +import { useRuleForms } from '../../pages/form'; +import { stepActionsDefaultValue } from '../../../rule_creation/components/step_rule_actions'; import { defaultSchedule, stepAboutDefaultValue, stepDefineDefaultValue, -} from '../../../pages/detection_engine/rules/utils'; +} from '../../../../detections/pages/detection_engine/rules/utils'; import type { FormHook } from '../../../../shared_imports'; -import type { DefineStepRule } from '../../../pages/detection_engine/rules/types'; +import type { DefineStepRule } from '../../../../detections/pages/detection_engine/rules/types'; jest.mock('../../../../common/components/query_bar', () => { return { @@ -228,7 +228,7 @@ jest.mock('react-redux', () => { }; }); -jest.mock('../../../containers/detection_engine/rules/use_rule_from_timeline'); +jest.mock('../../../../detections/containers/detection_engine/rules/use_rule_from_timeline'); test('aggregatableFields', function () { expect( diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/index.tsx similarity index 97% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/index.tsx index 809fb97eb260c..4d0f06ed93e2e 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/index.tsx @@ -33,29 +33,32 @@ import type { SavedQuery } from '@kbn/data-plugin/public'; import type { DataViewBase } from '@kbn/es-query'; import { FormattedMessage } from '@kbn/i18n-react'; import { useSetFieldValueWithCallback } from '../../../../common/utils/use_set_field_value_cb'; -import { useRuleFromTimeline } from '../../../containers/detection_engine/rules/use_rule_from_timeline'; +import { useRuleFromTimeline } from '../../../../detections/containers/detection_engine/rules/use_rule_from_timeline'; import { isMlRule } from '../../../../../common/machine_learning/helpers'; import { hasMlAdminPermissions } from '../../../../../common/machine_learning/has_ml_admin_permissions'; import { hasMlLicense } from '../../../../../common/machine_learning/has_ml_license'; import { useMlCapabilities } from '../../../../common/components/ml/hooks/use_ml_capabilities'; import type { EqlOptionsSelected, FieldsEqlOptions } from '../../../../../common/search_strategy'; +import { filterRuleFieldsForType, getStepDataDataSource } from '../../pages/rule_creation/helpers'; +import type { + DefineStepRule, + RuleStepProps, +} from '../../../../detections/pages/detection_engine/rules/types'; import { - filterRuleFieldsForType, - getStepDataDataSource, -} from '../../../../detection_engine/rule_creation_ui/pages/rule_creation/helpers'; -import type { DefineStepRule, RuleStepProps } from '../../../pages/detection_engine/rules/types'; -import { DataSourceType, GroupByOptions } from '../../../pages/detection_engine/rules/types'; + DataSourceType, + GroupByOptions, +} from '../../../../detections/pages/detection_engine/rules/types'; import { StepRuleDescription } from '../description_step'; import type { QueryBarDefineRuleProps } from '../query_bar'; import { QueryBarDefineRule } from '../query_bar'; import { SelectRuleType } from '../select_rule_type'; import { AnomalyThresholdSlider } from '../anomaly_threshold_slider'; -import { MlJobSelect } from '../ml_job_select'; -import { PickTimeline } from '../pick_timeline'; -import { StepContentWrapper } from '../step_content_wrapper'; +import { MlJobSelect } from '../../../rule_creation/components/ml_job_select'; +import { PickTimeline } from '../../../rule_creation/components/pick_timeline'; +import { StepContentWrapper } from '../../../rule_creation/components/step_content_wrapper'; import { ThresholdInput } from '../threshold_input'; import { SuppressionInfoIcon } from '../suppression_info_icon'; -import { EsqlInfoIcon } from '../../../../detection_engine/rule_creation/components/esql_info_icon'; +import { EsqlInfoIcon } from '../../../rule_creation/components/esql_info_icon'; import { Field, Form, getUseField, UseField, UseMultiFields } from '../../../../shared_imports'; import type { FormHook } from '../../../../shared_imports'; import { schema } from './schema'; @@ -75,9 +78,9 @@ import { ThreatMatchInput } from '../threatmatch_input'; import type { BrowserField } from '../../../../common/containers/source'; import { useFetchIndex } from '../../../../common/containers/source'; import { NewTermsFields } from '../new_terms_fields'; -import { ScheduleItem } from '../schedule_item_form'; +import { ScheduleItem } from '../../../rule_creation/components/schedule_item_form'; import { DocLink } from '../../../../common/components/links_to_docs/doc_link'; -import { defaultCustomQuery } from '../../../pages/detection_engine/rules/utils'; +import { defaultCustomQuery } from '../../../../detections/pages/detection_engine/rules/utils'; import { MultiSelectFieldsAutocomplete } from '../multi_select_fields'; import { useLicense } from '../../../../common/hooks/use_license'; import { AlertSuppressionMissingFieldsStrategyEnum } from '../../../../../common/api/detection_engine/model/rule_schema'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/mock_browser_fields.json b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/mock_browser_fields.json similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/mock_browser_fields.json rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/mock_browser_fields.json diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/schema.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/schema.tsx similarity index 98% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/schema.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/schema.tsx index 0d22c459705a9..235d2c51398a8 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/schema.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/schema.tsx @@ -28,10 +28,10 @@ import { isMlRule } from '../../../../../common/machine_learning/helpers'; import type { FieldValueQueryBar } from '../query_bar'; import type { ERROR_CODE, FormSchema, ValidationFunc } from '../../../../shared_imports'; import { FIELD_TYPES, fieldValidators } from '../../../../shared_imports'; -import type { DefineStepRule } from '../../../pages/detection_engine/rules/types'; -import { DataSourceType } from '../../../pages/detection_engine/rules/types'; +import type { DefineStepRule } from '../../../../detections/pages/detection_engine/rules/types'; +import { DataSourceType } from '../../../../detections/pages/detection_engine/rules/types'; import { debounceAsync, eqlValidator } from '../eql_query_bar/validators'; -import { esqlValidator } from '../../../../detection_engine/rule_creation/logic/esql_validator'; +import { esqlValidator } from '../../../rule_creation/logic/esql_validator'; import { CUSTOM_QUERY_REQUIRED, INVALID_CUSTOM_QUERY, diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/translations.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/translations.tsx similarity index 97% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/translations.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/translations.tsx index 861241f5f0254..13e8dc9fcd273 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/translations.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/translations.tsx @@ -59,13 +59,6 @@ export const IMPORT_TIMELINE_QUERY = i18n.translate( } ); -export const ML_JOB_SELECT_PLACEHOLDER_TEXT = i18n.translate( - 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.mlJobSelectPlaceholderText', - { - defaultMessage: 'Select a job', - } -); - export const QUERY_BAR_LABEL = i18n.translate( 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.fieldQuerBarLabel', { diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/utils.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/utils.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/utils.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/utils.ts diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_schedule_rule/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_schedule_rule/index.test.tsx similarity index 84% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_schedule_rule/index.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_schedule_rule/index.test.tsx index e0e54fe6eb6b8..2dc12fffe8759 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_schedule_rule/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_schedule_rule/index.test.tsx @@ -15,11 +15,11 @@ import { defaultSchedule, stepAboutDefaultValue, stepDefineDefaultValue, -} from '../../../pages/detection_engine/rules/utils'; -import { useRuleForms } from '../../../../detection_engine/rule_creation_ui/pages/form'; -import { stepActionsDefaultValue } from '../step_rule_actions'; +} from '../../../../detections/pages/detection_engine/rules/utils'; +import { useRuleForms } from '../../pages/form'; +import { stepActionsDefaultValue } from '../../../rule_creation/components/step_rule_actions'; import type { FormHook } from '../../../../shared_imports'; -import type { ScheduleStepRule } from '../../../pages/detection_engine/rules/types'; +import type { ScheduleStepRule } from '../../../../detections/pages/detection_engine/rules/types'; describe('StepScheduleRule', () => { const TestComp = ({ diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_schedule_rule/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_schedule_rule/index.tsx similarity index 88% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_schedule_rule/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_schedule_rule/index.tsx index a4971a66972e7..2197b069de404 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_schedule_rule/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_schedule_rule/index.tsx @@ -8,12 +8,15 @@ import type { FC } from 'react'; import styled from 'styled-components'; import React, { memo } from 'react'; -import type { RuleStepProps, ScheduleStepRule } from '../../../pages/detection_engine/rules/types'; +import type { + RuleStepProps, + ScheduleStepRule, +} from '../../../../detections/pages/detection_engine/rules/types'; import { StepRuleDescription } from '../description_step'; -import { ScheduleItem } from '../schedule_item_form'; +import { ScheduleItem } from '../../../rule_creation/components/schedule_item_form'; import { Form, UseField } from '../../../../shared_imports'; import type { FormHook } from '../../../../shared_imports'; -import { StepContentWrapper } from '../step_content_wrapper'; +import { StepContentWrapper } from '../../../rule_creation/components/step_content_wrapper'; import { schema } from './schema'; const StyledForm = styled(Form)` diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_schedule_rule/schema.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_schedule_rule/schema.tsx similarity index 93% rename from x-pack/plugins/security_solution/public/detections/components/rules/step_schedule_rule/schema.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_schedule_rule/schema.tsx index 23bed245e63a8..047981422d014 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_schedule_rule/schema.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_schedule_rule/schema.tsx @@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n'; -import type { ScheduleStepRule } from '../../../pages/detection_engine/rules/types'; +import type { ScheduleStepRule } from '../../../../detections/pages/detection_engine/rules/types'; import type { FormSchema } from '../../../../shared_imports'; export const schema: FormSchema = { diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/suppression_info_icon/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/suppression_info_icon/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/suppression_info_icon/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/suppression_info_icon/index.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/threatmatch_input/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/threatmatch_input/index.tsx similarity index 98% rename from x-pack/plugins/security_solution/public/detections/components/rules/threatmatch_input/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/threatmatch_input/index.tsx index 003268cedd0cc..2d23dbb7578c4 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/threatmatch_input/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/threatmatch_input/index.tsx @@ -18,7 +18,7 @@ import { UseField, getFieldValidityAndErrorMessage, } from '../../../../shared_imports'; -import type { DefineStepRule } from '../../../pages/detection_engine/rules/types'; +import type { DefineStepRule } from '../../../../detections/pages/detection_engine/rules/types'; import { schema } from '../step_define_rule/schema'; import { QueryBarDefineRule } from '../query_bar'; import * as i18n from '../step_define_rule/translations'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/threshold_input/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/threshold_input/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/threshold_input/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/threshold_input/index.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/threshold_input/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/threshold_input/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/threshold_input/translations.ts rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/threshold_input/translations.ts diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/throttle_select_field/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/throttle_select_field/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/throttle_select_field/index.test.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/throttle_select_field/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/throttle_select_field/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/throttle_select_field/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/components/rules/throttle_select_field/index.tsx rename to x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/throttle_select_field/index.tsx diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/pages/form.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/pages/form.tsx index 8c2bf04c0f355..690dedafaf852 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/pages/form.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/pages/form.tsx @@ -17,14 +17,14 @@ import type { import { DataSourceType } from '../../../detections/pages/detection_engine/rules/types'; import { useKibana } from '../../../common/lib/kibana'; import { useForm, useFormData } from '../../../shared_imports'; -import { schema as defineRuleSchema } from '../../../detections/components/rules/step_define_rule/schema'; +import { schema as defineRuleSchema } from '../components/step_define_rule/schema'; import type { EqlOptionsSelected } from '../../../../common/search_strategy'; import { schema as aboutRuleSchema, threatMatchAboutSchema, -} from '../../../detections/components/rules/step_about_rule/schema'; -import { schema as scheduleRuleSchema } from '../../../detections/components/rules/step_schedule_rule/schema'; -import { getSchema as getActionsRuleSchema } from '../../../detections/components/rules/step_rule_actions/get_schema'; +} from '../components/step_about_rule/schema'; +import { schema as scheduleRuleSchema } from '../components/step_schedule_rule/schema'; +import { getSchema as getActionsRuleSchema } from '../../rule_creation/components/step_rule_actions/get_schema'; import { useFetchIndex } from '../../../common/containers/source'; export interface UseRuleFormsProps { diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/pages/rule_creation/helpers.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/pages/rule_creation/helpers.ts index 983aba55c8165..dd805c1319dfb 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/pages/rule_creation/helpers.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/pages/rule_creation/helpers.ts @@ -46,7 +46,7 @@ import { GroupByOptions, } from '../../../../detections/pages/detection_engine/rules/types'; import type { RuleCreateProps } from '../../../../../common/api/detection_engine/model/rule_schema'; -import { stepActionsDefaultValue } from '../../../../detections/components/rules/step_rule_actions'; +import { stepActionsDefaultValue } from '../../../rule_creation/components/step_rule_actions'; import { DEFAULT_SUPPRESSION_MISSING_FIELDS_STRATEGY } from '../../../../../common/detection_engine/constants'; export const getTimeTypeValue = (time: string): { unit: Unit; value: number } => { diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/pages/rule_creation/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/pages/rule_creation/index.tsx index d7f0b135979fe..a711ab11e0b16 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/pages/rule_creation/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/pages/rule_creation/index.tsx @@ -40,24 +40,15 @@ import { import { SecuritySolutionPageWrapper } from '../../../../common/components/page_wrapper'; import { SpyRoute } from '../../../../common/utils/route/spy_routes'; import { useUserData } from '../../../../detections/components/user_info'; -import { AccordionTitle } from '../../../../detections/components/rules/accordion_title'; -import { - StepDefineRule, - StepDefineRuleReadOnly, -} from '../../../../detections/components/rules/step_define_rule'; -import { - StepAboutRule, - StepAboutRuleReadOnly, -} from '../../../../detections/components/rules/step_about_rule'; -import { - StepScheduleRule, - StepScheduleRuleReadOnly, -} from '../../../../detections/components/rules/step_schedule_rule'; +import { AccordionTitle } from '../../components/accordion_title'; +import { StepDefineRule, StepDefineRuleReadOnly } from '../../components/step_define_rule'; +import { StepAboutRule, StepAboutRuleReadOnly } from '../../components/step_about_rule'; +import { StepScheduleRule, StepScheduleRuleReadOnly } from '../../components/step_schedule_rule'; import { stepActionsDefaultValue, StepRuleActions, StepRuleActionsReadOnly, -} from '../../../../detections/components/rules/step_rule_actions'; +} from '../../../rule_creation/components/step_rule_actions'; import * as RuleI18n from '../../../../detections/pages/detection_engine/rules/translations'; import { redirectToDetections, @@ -84,10 +75,10 @@ import { DEFAULT_THREAT_INDEX_KEY, } from '../../../../../common/constants'; import { useKibana, useUiSetting$ } from '../../../../common/lib/kibana'; -import { RulePreview } from '../../../../detections/components/rules/rule_preview'; -import { getIsRulePreviewDisabled } from '../../../../detections/components/rules/rule_preview/helpers'; +import { RulePreview } from '../../components/rule_preview'; +import { getIsRulePreviewDisabled } from '../../components/rule_preview/helpers'; import { useStartMlJobs } from '../../../rule_management/logic/use_start_ml_jobs'; -import { NextStep } from '../../../../detections/components/rules/next_step'; +import { NextStep } from '../../components/next_step'; import { useRuleForms, useRuleIndexPattern } from '../form'; import { CustomHeaderPageMemo } from '..'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/pages/rule_editing/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/pages/rule_editing/index.tsx index 94ce2442b236a..d5933f6e6fdd6 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/pages/rule_editing/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/pages/rule_editing/index.tsx @@ -24,8 +24,8 @@ import { useParams } from 'react-router-dom'; import type { DataViewListItem } from '@kbn/data-views-plugin/common'; import { isEsqlRule } from '../../../../../common/detection_engine/utils'; -import { RulePreview } from '../../../../detections/components/rules/rule_preview'; -import { getIsRulePreviewDisabled } from '../../../../detections/components/rules/rule_preview/helpers'; +import { RulePreview } from '../../components/rule_preview'; +import { getIsRulePreviewDisabled } from '../../components/rule_preview/helpers'; import type { RuleResponse, RuleUpdateProps, @@ -41,11 +41,11 @@ import { import { displaySuccessToast, useStateToaster } from '../../../../common/components/toasters'; import { SpyRoute } from '../../../../common/utils/route/spy_routes'; import { useUserData } from '../../../../detections/components/user_info'; -import { StepPanel } from '../../../../detections/components/rules/step_panel'; -import { StepAboutRule } from '../../../../detections/components/rules/step_about_rule'; -import { StepDefineRule } from '../../../../detections/components/rules/step_define_rule'; -import { StepScheduleRule } from '../../../../detections/components/rules/step_schedule_rule'; -import { StepRuleActions } from '../../../../detections/components/rules/step_rule_actions'; +import { StepPanel } from '../../../rule_creation/components/step_panel'; +import { StepAboutRule } from '../../components/step_about_rule'; +import { StepDefineRule } from '../../components/step_define_rule'; +import { StepScheduleRule } from '../../components/step_schedule_rule'; +import { StepRuleActions } from '../../../rule_creation/components/step_rule_actions'; import { formatRule } from '../rule_creation/helpers'; import { getStepsData, diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_details_ui/pages/rule_details/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_details_ui/pages/rule_details/index.tsx index e8a97e974431a..e6c8e1f5cc439 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_details_ui/pages/rule_details/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_details_ui/pages/rule_details/index.tsx @@ -60,10 +60,10 @@ import { SiemSearchBar } from '../../../../common/components/search_bar'; import { SecuritySolutionPageWrapper } from '../../../../common/components/page_wrapper'; import { useListsConfig } from '../../../../detections/containers/detection_engine/lists/use_lists_config'; import { SpyRoute } from '../../../../common/utils/route/spy_routes'; -import { StepAboutRuleToggleDetails } from '../../../../detections/components/rules/step_about_rule_details'; +import { StepAboutRuleToggleDetails } from '../../../rule_creation/components/step_about_rule_details'; import { AlertsHistogramPanel } from '../../../../detections/components/alerts_kpis/alerts_histogram_panel'; import { useUserData } from '../../../../detections/components/user_info'; -import { StepRuleActionsReadOnly } from '../../../../detections/components/rules/step_rule_actions'; +import { StepRuleActionsReadOnly } from '../../../rule_creation/components/step_rule_actions'; import { buildAlertsFilter, buildAlertStatusFilter, @@ -71,7 +71,7 @@ import { buildThreatMatchFilter, } from '../../../../detections/components/alerts_table/default_config'; import { RuleSwitch } from '../../../../detections/components/rules/rule_switch'; -import { StepPanel } from '../../../../detections/components/rules/step_panel'; +import { StepPanel } from '../../../rule_creation/components/step_panel'; import { getMachineLearningJobId, getStepsData, diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_about_section.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_about_section.tsx index 125a018a1304a..cc54a5bd30a87 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_about_section.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_about_section.tsx @@ -27,10 +27,10 @@ import type { import { ALERT_RISK_SCORE } from '@kbn/rule-data-utils'; import { requiredOptional } from '@kbn/zod-helpers'; import type { RuleResponse } from '../../../../../common/api/detection_engine/model/rule_schema'; -import { SeverityBadge } from '../../../../detections/components/rules/severity_badge'; +import { SeverityBadge } from '../../../../common/components/severity_badge'; import { defaultToEmptyTag } from '../../../../common/components/empty_value'; import { filterEmptyThreats } from '../../../rule_creation_ui/pages/rule_creation/helpers'; -import { ThreatEuiFlexGroup } from '../../../../detections/components/rules/description_step/threat_description'; +import { ThreatEuiFlexGroup } from '../../../rule_creation_ui/components/description_step/threat_description'; import { BadgeList } from './badge_list'; import { DEFAULT_DESCRIPTION_LIST_COLUMN_WIDTHS } from './constants'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_definition_section.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_definition_section.tsx index cb37caa661fda..3d2c299a51a9f 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_definition_section.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_definition_section.tsx @@ -36,9 +36,9 @@ import type { } from '../../../../../common/api/detection_engine/model/rule_schema'; import { AlertSuppressionMissingFieldsStrategyEnum } from '../../../../../common/api/detection_engine/model/rule_schema'; import { assertUnreachable } from '../../../../../common/utility_types'; -import * as descriptionStepI18n from '../../../../detections/components/rules/description_step/translations'; +import * as descriptionStepI18n from '../../../rule_creation_ui/components/description_step/translations'; import { RelatedIntegrationsDescription } from '../../../../detections/components/rules/related_integrations/integrations_description'; -import { AlertSuppressionTechnicalPreviewBadge } from '../../../../detections/components/rules/description_step/alert_suppression_technical_preview_badge'; +import { AlertSuppressionTechnicalPreviewBadge } from '../../../rule_creation_ui/components/description_step/alert_suppression_technical_preview_badge'; 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'; @@ -46,11 +46,11 @@ 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 '../../../../detections/components/rules/ml_jobs_description/ml_jobs_description'; -import { MlJobLink } from '../../../../detections/components/rules/ml_job_link/ml_job_link'; +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'; import { useKibana } from '../../../../common/lib/kibana/kibana_react'; -import { TechnicalPreviewBadge } from '../../../../detections/components/rules/technical_preview_badge'; +import { TechnicalPreviewBadge } from '../../../../common/components/technical_preview_badge'; import { BadgeList } from './badge_list'; import { DEFAULT_DESCRIPTION_LIST_COLUMN_WIDTHS } from './constants'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/__mocks__/mock.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/__mocks__/mock.ts index 5d1d75296b08d..4c23c14871067 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/__mocks__/mock.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/__mocks__/mock.ts @@ -16,7 +16,7 @@ import { DataSourceType, GroupByOptions, } from '../../../../../detections/pages/detection_engine/rules/types'; -import type { FieldValueQueryBar } from '../../../../../detections/components/rules/query_bar'; +import type { FieldValueQueryBar } from '../../../../rule_creation_ui/components/query_bar'; import { fillEmptySeverityMappings } from '../../../../../detections/pages/detection_engine/rules/helpers'; import { getThreatMock } from '../../../../../../common/detection_engine/schemas/types/threat.mock'; import type { RuleResponse, SavedQueryRule } from '../../../../../../common/api/detection_engine'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/use_add_prebuilt_rules_table_columns.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/use_add_prebuilt_rules_table_columns.tsx index 4376014ab110e..c5f04a178935d 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/use_add_prebuilt_rules_table_columns.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/use_add_prebuilt_rules_table_columns.tsx @@ -12,7 +12,7 @@ import { SHOW_RELATED_INTEGRATIONS_SETTING } from '../../../../../../common/cons import { PopoverItems } from '../../../../../common/components/popover_items'; import { useUiSetting$ } from '../../../../../common/lib/kibana'; import { IntegrationsPopover } from '../../../../../detections/components/rules/related_integrations/integrations_popover'; -import { SeverityBadge } from '../../../../../detections/components/rules/severity_badge'; +import { SeverityBadge } from '../../../../../common/components/severity_badge'; import * as i18n from '../../../../../detections/pages/detection_engine/rules/translations'; import type { Rule } from '../../../../rule_management/logic'; import { useUserData } from '../../../../../detections/components/user_info'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/forms/rule_actions_form.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/forms/rule_actions_form.tsx index 22f2f4abd8418..d690326e49901 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/forms/rule_actions_form.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/forms/rule_actions_form.tsx @@ -33,7 +33,7 @@ import { useKibana } from '../../../../../../common/lib/kibana'; import { getAllActionMessageParams } from '../../../../../../detections/pages/detection_engine/rules/helpers'; -import { RuleActionsField } from '../../../../../../detections/components/rules/rule_actions_field'; +import { RuleActionsField } from '../../../../../rule_creation/components/rule_actions_field'; import { debouncedValidateRuleActionsField } from '../../../../../../detections/containers/detection_engine/rules/validate_rule_actions_field'; const CommonUseField = getUseField({ component: Field }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/forms/schedule_form.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/forms/schedule_form.tsx index 7098638b31633..88e1411a5e0bc 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/forms/schedule_form.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/forms/schedule_form.tsx @@ -9,7 +9,7 @@ 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 '../../../../../../detections/components/rules/schedule_item_form'; +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'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/forms/timeline_template_form.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/forms/timeline_template_form.tsx index 88312ffb2a021..62d39b40877f6 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/forms/timeline_template_form.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/forms/timeline_template_form.tsx @@ -10,7 +10,7 @@ import { EuiCallOut } from '@elastic/eui'; import type { FormSchema } from '../../../../../../shared_imports'; import { useForm, UseField } from '../../../../../../shared_imports'; -import { PickTimeline } from '../../../../../../detections/components/rules/pick_timeline'; +import { PickTimeline } from '../../../../../rule_creation/components/pick_timeline'; import type { BulkActionEditPayload } from '../../../../../../../common/api/detection_engine/rule_management'; import { BulkActionEditTypeEnum } from '../../../../../../../common/api/detection_engine/rule_management'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/use_upgrade_prebuilt_rules_table_columns.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/use_upgrade_prebuilt_rules_table_columns.tsx index 3f72208dc51bf..cd56a0cd49074 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/use_upgrade_prebuilt_rules_table_columns.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/use_upgrade_prebuilt_rules_table_columns.tsx @@ -15,7 +15,7 @@ import { PopoverItems } from '../../../../../common/components/popover_items'; import { useUiSetting$ } from '../../../../../common/lib/kibana'; import { hasUserCRUDPermission } from '../../../../../common/utils/privileges'; import { IntegrationsPopover } from '../../../../../detections/components/rules/related_integrations/integrations_popover'; -import { SeverityBadge } from '../../../../../detections/components/rules/severity_badge'; +import { SeverityBadge } from '../../../../../common/components/severity_badge'; import { useUserData } from '../../../../../detections/components/user_info'; import * as i18n from '../../../../../detections/pages/detection_engine/rules/translations'; import type { Rule } from '../../../../rule_management/logic'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_columns.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_columns.tsx index acf43ebf2c36e..3e429d94fee29 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_columns.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_columns.tsx @@ -32,7 +32,7 @@ import { import { IntegrationsPopover } from '../../../../detections/components/rules/related_integrations/integrations_popover'; import { RuleStatusBadge } from '../../../../detections/components/rules/rule_execution_status'; import { RuleSwitch } from '../../../../detections/components/rules/rule_switch'; -import { SeverityBadge } from '../../../../detections/components/rules/severity_badge'; +import { SeverityBadge } from '../../../../common/components/severity_badge'; import * as i18n from '../../../../detections/pages/detection_engine/rules/translations'; import { RuleDetailTabs } from '../../../rule_details_ui/pages/rule_details/use_rule_details_tabs'; import type { Rule } from '../../../rule_management/logic'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_actions_form.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_actions_form.tsx index de7afecf97f74..cefff7db70467 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_actions_form.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_actions_form.tsx @@ -10,7 +10,7 @@ import { EuiCallOut, EuiSpacer } from '@elastic/eui'; import { map, reduce, upperFirst } from 'lodash'; import ReactMarkdown from 'react-markdown'; import { ResponseActionsWrapper } from './response_actions_wrapper'; -import { FORM_ERRORS_TITLE } from '../../detections/components/rules/rule_actions_field/translations'; +import { FORM_ERRORS_TITLE } from '../rule_creation/components/rule_actions_field/translations'; import { ResponseActionsHeader } from './response_actions_header'; import type { ArrayItem, FormHook } from '../../shared_imports'; import { useSupportedResponseActionTypes } from './use_supported_response_action_types'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/integrations_description/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/integrations_description/index.tsx index 4df0e66fca1b1..dc2d36f280279 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/integrations_description/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/integrations_description/index.tsx @@ -9,7 +9,7 @@ import React from 'react'; import styled from 'styled-components'; import type { RelatedIntegrationArray } from '../../../../../../common/api/detection_engine/model/rule_schema'; -import type { ListItems } from '../../description_step/types'; +import type { ListItems } from '../../../../../detection_engine/rule_creation_ui/components/description_step/types'; import type { IntegrationDetails } from '../integration_details'; import { useRelatedIntegrations } from '../use_related_integrations'; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.tsx index c5b2036efd701..ed384929a5fc0 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.tsx @@ -15,7 +15,7 @@ import { updateIsLoading } from '../../../../timelines/store/actions'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; import { useSourcererDataView } from '../../../../common/containers/sourcerer'; import type { TimelineModel } from '../../../..'; -import type { FieldValueQueryBar } from '../../../components/rules/query_bar'; +import type { FieldValueQueryBar } from '../../../../detection_engine/rule_creation_ui/components/query_bar'; import { sourcererActions } from '../../../../common/store/sourcerer'; import { dispatchUpdateTimeline, diff --git a/x-pack/plugins/security_solution/public/detections/mitre/get_mitre_threat_component.ts b/x-pack/plugins/security_solution/public/detections/mitre/get_mitre_threat_component.ts index 74cbc51366799..2e32a8b81f035 100644 --- a/x-pack/plugins/security_solution/public/detections/mitre/get_mitre_threat_component.ts +++ b/x-pack/plugins/security_solution/public/detections/mitre/get_mitre_threat_component.ts @@ -7,7 +7,7 @@ import type { Threats } from '@kbn/securitysolution-io-ts-alerting-types'; import type { SearchHit } from '../../../common/search_strategy'; -import { buildThreatDescription } from '../components/rules/description_step/helpers'; +import { buildThreatDescription } from '../../detection_engine/rule_creation_ui/components/description_step/helpers'; export const getMitreComponentParts = (searchHit?: SearchHit) => { const ruleParameters = searchHit?.fields diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/helpers.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/helpers.tsx index 2feba6edc5ea9..96a3b17a77871 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/helpers.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/helpers.tsx @@ -37,7 +37,7 @@ import type { ActionsStepRule, } from './types'; import { DataSourceType, GroupByOptions } from './types'; -import { severityOptions } from '../../../components/rules/step_about_rule/data'; +import { severityOptions } from '../../../../detection_engine/rule_creation_ui/components/step_about_rule/data'; import { DEFAULT_SUPPRESSION_MISSING_FIELDS_STRATEGY } from '../../../../../common/detection_engine/constants'; import type { RuleAction, RuleResponse } from '../../../../../common/api/detection_engine'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/types.ts b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/types.ts index 6ad03d95ddccf..1077407ea4756 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/types.ts +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/types.ts @@ -20,9 +20,9 @@ import type { DataViewBase, Filter } from '@kbn/es-query'; import type { RuleAction as AlertingRuleAction } from '@kbn/alerting-plugin/common'; import type { DataViewListItem } from '@kbn/data-views-plugin/common'; -import type { FieldValueQueryBar } from '../../../components/rules/query_bar'; -import type { FieldValueTimeline } from '../../../components/rules/pick_timeline'; -import type { FieldValueThreshold } from '../../../components/rules/threshold_input'; +import type { FieldValueQueryBar } from '../../../../detection_engine/rule_creation_ui/components/query_bar'; +import type { FieldValueTimeline } from '../../../../detection_engine/rule_creation/components/pick_timeline'; +import type { FieldValueThreshold } from '../../../../detection_engine/rule_creation_ui/components/threshold_input'; import type { BuildingBlockType, RelatedIntegrationArray, diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/correlations_details_alerts_table.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/correlations_details_alerts_table.tsx index 0740263ca3347..661ae2eab58ab 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/correlations_details_alerts_table.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/correlations_details_alerts_table.tsx @@ -16,7 +16,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { CellTooltipWrapper } from '../../shared/components/cell_tooltip_wrapper'; import type { DataProvider } from '../../../../../common/types'; -import { SeverityBadge } from '../../../../detections/components/rules/severity_badge'; +import { SeverityBadge } from '../../../../common/components/severity_badge'; import { usePaginatedAlerts } from '../hooks/use_paginated_alerts'; import { ExpandablePanel } from '../../../shared/components/expandable_panel'; import { InvestigateInTimelineButton } from '../../../../common/components/event_details/table/investigate_in_timeline_button'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/preview/components/rule_preview.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/preview/components/rule_preview.tsx index 6f679df0c5e9e..5f2ecc8f5e40e 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/preview/components/rule_preview.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/preview/components/rule_preview.tsx @@ -16,7 +16,7 @@ import { RulePreviewTitle } from './rule_preview_title'; import { RuleAboutSection } from '../../../../detection_engine/rule_management/components/rule_details/rule_about_section'; import { RuleScheduleSection } from '../../../../detection_engine/rule_management/components/rule_details/rule_schedule_section'; import { RuleDefinitionSection } from '../../../../detection_engine/rule_management/components/rule_details/rule_definition_section'; -import { StepRuleActionsReadOnly } from '../../../../detections/components/rules/step_rule_actions'; +import { StepRuleActionsReadOnly } from '../../../../detection_engine/rule_creation/components/step_rule_actions'; import { FlyoutLoading } from '../../../shared/components/flyout_loading'; import { FlyoutError } from '../../../shared/components/flyout_error'; import { diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/severity.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/severity.tsx index 1db79a75d1be6..710875f7aa971 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/severity.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/severity.tsx @@ -14,7 +14,7 @@ import { getSourcererScopeId } from '../../../../helpers'; import { SecurityCellActions } from '../../../../common/components/cell_actions'; import { SecurityCellActionsTrigger } from '../../../../actions/constants'; import { useRightPanelContext } from '../context'; -import { SeverityBadge } from '../../../../detections/components/rules/severity_badge'; +import { SeverityBadge } from '../../../../common/components/severity_badge'; const isSeverity = (x: unknown): x is Severity => x === 'low' || x === 'medium' || x === 'high' || x === 'critical'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/eql/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/eql/index.tsx index cbfa6b44590b3..b1e1e0934d1d6 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/eql/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/eql/index.tsx @@ -14,13 +14,13 @@ import type { FieldsEqlOptions } from '../../../../../../common/search_strategy' import { useSourcererDataView } from '../../../../../common/containers/sourcerer'; import { useDeepEqualSelector } from '../../../../../common/hooks/use_selector'; import { SourcererScopeName } from '../../../../../common/store/sourcerer/model'; -import { EqlQueryBar } from '../../../../../detections/components/rules/eql_query_bar'; +import { EqlQueryBar } from '../../../../../detection_engine/rule_creation_ui/components/eql_query_bar'; import { debounceAsync, eqlValidator, -} from '../../../../../detections/components/rules/eql_query_bar/validators'; -import type { FieldValueQueryBar } from '../../../../../detections/components/rules/query_bar'; +} from '../../../../../detection_engine/rule_creation_ui/components/eql_query_bar/validators'; +import type { FieldValueQueryBar } from '../../../../../detection_engine/rule_creation_ui/components/query_bar'; import type { FormSchema } from '../../../../../shared_imports'; import { Form, UseField, useForm, useFormData } from '../../../../../shared_imports';