diff --git a/api_docs/timelines.devdocs.json b/api_docs/timelines.devdocs.json index c321be514a5b6..e690ce3794b0c 100644 --- a/api_docs/timelines.devdocs.json +++ b/api_docs/timelines.devdocs.json @@ -4164,11 +4164,11 @@ }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/store/sourcerer/model.ts" + "path": "x-pack/plugins/security_solution/public/sourcerer/store/model.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/store/sourcerer/model.ts" + "path": "x-pack/plugins/security_solution/public/sourcerer/store/model.ts" }, { "plugin": "securitySolution", diff --git a/x-pack/plugins/security_solution/public/app/components/top_values_popover/top_values_popover.tsx b/x-pack/plugins/security_solution/public/app/components/top_values_popover/top_values_popover.tsx index 111033bb9b290..9d936fc6c9462 100644 --- a/x-pack/plugins/security_solution/public/app/components/top_values_popover/top_values_popover.tsx +++ b/x-pack/plugins/security_solution/public/app/components/top_values_popover/top_values_popover.tsx @@ -10,7 +10,7 @@ import { EuiWrappingPopover } from '@elastic/eui'; import { useLocation } from 'react-router-dom'; import { useObservable } from 'react-use'; import { StatefulTopN } from '../../../common/components/top_n'; -import { getScopeFromPath, useSourcererDataView } from '../../../common/containers/sourcerer'; +import { getScopeFromPath, useSourcererDataView } from '../../../sourcerer/containers'; import { useKibana } from '../../../common/lib/kibana'; export const TopValuesPopover = React.memo(() => { diff --git a/x-pack/plugins/security_solution/public/app/home/global_header/index.test.tsx b/x-pack/plugins/security_solution/public/app/home/global_header/index.test.tsx index 378fbb6b196eb..e5df17daf498e 100644 --- a/x-pack/plugins/security_solution/public/app/home/global_header/index.test.tsx +++ b/x-pack/plugins/security_solution/public/app/home/global_header/index.test.tsx @@ -22,7 +22,7 @@ import { TestProviders, } from '../../../common/mock'; import { TimelineId } from '../../../../common/types/timeline'; -import { sourcererPaths } from '../../../common/containers/sourcerer'; +import { sourcererPaths } from '../../../sourcerer/containers'; jest.mock('react-router-dom', () => { const actual = jest.requireActual('react-router-dom'); @@ -35,7 +35,7 @@ jest.mock('../../../common/containers/source', () => ({ useFetchIndex: () => [false, { indicesExist: true, indexPatterns: mockIndexPattern }], })); -jest.mock('../../../common/containers/sourcerer/use_signal_helpers', () => ({ +jest.mock('../../../sourcerer/containers/use_signal_helpers', () => ({ useSignalHelpers: () => ({ signalIndexNeedsInit: false }), })); diff --git a/x-pack/plugins/security_solution/public/app/home/global_header/index.tsx b/x-pack/plugins/security_solution/public/app/home/global_header/index.tsx index f82207fcb925e..09fc8682a3443 100644 --- a/x-pack/plugins/security_solution/public/app/home/global_header/index.tsx +++ b/x-pack/plugins/security_solution/public/app/home/global_header/index.tsx @@ -19,12 +19,12 @@ import { toMountPoint } from '@kbn/react-kibana-mount'; import { MlPopover } from '../../../common/components/ml_popover/ml_popover'; import { useKibana } from '../../../common/lib/kibana'; import { isDetectionsPath, isDashboardViewPath } from '../../../helpers'; -import { Sourcerer } from '../../../common/components/sourcerer'; +import { Sourcerer } from '../../../sourcerer/components'; import { TimelineId } from '../../../../common/types/timeline'; import { timelineDefaults } from '../../../timelines/store/defaults'; import { timelineSelectors } from '../../../timelines/store'; import { useShallowEqualSelector } from '../../../common/hooks/use_selector'; -import { getScopeFromPath, showSourcererByPath } from '../../../common/containers/sourcerer'; +import { getScopeFromPath, showSourcererByPath } from '../../../sourcerer/containers'; import { useAddIntegrationsUrl } from '../../../common/hooks/use_add_integrations_url'; import { AssistantHeaderLink } from '../../../assistant/header_link'; diff --git a/x-pack/plugins/security_solution/public/app/home/index.tsx b/x-pack/plugins/security_solution/public/app/home/index.tsx index bded1d58c8d84..7053d2c16aa70 100644 --- a/x-pack/plugins/security_solution/public/app/home/index.tsx +++ b/x-pack/plugins/security_solution/public/app/home/index.tsx @@ -16,7 +16,7 @@ import { useInitSourcerer, getScopeFromPath, useSourcererDataView, -} from '../../common/containers/sourcerer'; +} from '../../sourcerer/containers'; import { GlobalHeader } from './global_header'; import { ConsoleManager } from '../../management/components/console/components/console_manager'; diff --git a/x-pack/plugins/security_solution/public/assistant/send_to_timeline/index.tsx b/x-pack/plugins/security_solution/public/assistant/send_to_timeline/index.tsx index d4610d987c400..203e05674d2eb 100644 --- a/x-pack/plugins/security_solution/public/assistant/send_to_timeline/index.tsx +++ b/x-pack/plugins/security_solution/public/assistant/send_to_timeline/index.tsx @@ -17,7 +17,7 @@ import { sourcererActions } from '../../common/store/actions'; import { inputsActions } from '../../common/store/inputs'; import { InputsModelId } from '../../common/store/inputs/constants'; import type { TimeRange } from '../../common/store/inputs/model'; -import { SourcererScopeName } from '../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../sourcerer/store/model'; import { TimelineTabs, TimelineId } from '../../../common/types/timeline'; import { ACTION_CANNOT_INVESTIGATE_IN_TIMELINE, @@ -35,7 +35,7 @@ import { import { useDiscoverInTimelineContext } from '../../common/components/discover_in_timeline/use_discover_in_timeline_context'; import { useShowTimeline } from '../../common/utils/timeline/use_show_timeline'; import { useIsExperimentalFeatureEnabled } from '../../common/hooks/use_experimental_features'; -import { useSourcererDataView } from '../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../sourcerer/containers'; import { useDiscoverState } from '../../timelines/components/timeline/tabs/esql/use_discover_state'; export interface SendToTimelineButtonProps { diff --git a/x-pack/plugins/security_solution/public/cases/pages/index.tsx b/x-pack/plugins/security_solution/public/cases/pages/index.tsx index 27cccce70c9a2..7f242e5968811 100644 --- a/x-pack/plugins/security_solution/public/cases/pages/index.tsx +++ b/x-pack/plugins/security_solution/public/cases/pages/index.tsx @@ -29,8 +29,8 @@ import { SecurityPageName, } from '../../../common/constants'; import { timelineActions } from '../../timelines/store'; -import { useSourcererDataView } from '../../common/containers/sourcerer'; -import { SourcererScopeName } from '../../common/store/sourcerer/model'; +import { useSourcererDataView } from '../../sourcerer/containers'; +import { SourcererScopeName } from '../../sourcerer/store/model'; import { CaseDetailsRefreshContext } from '../../common/components/endpoint/host_isolation/endpoint_host_isolation_cases_context'; import { SecuritySolutionPageWrapper } from '../../common/components/page_wrapper'; import { getEndpointDetailsPath } from '../../management/common/routing'; diff --git a/x-pack/plugins/security_solution/public/cases/pages/use_fetch_alert_data.ts b/x-pack/plugins/security_solution/public/cases/pages/use_fetch_alert_data.ts index 60f56dedf2496..7084aa1732f62 100644 --- a/x-pack/plugins/security_solution/public/cases/pages/use_fetch_alert_data.ts +++ b/x-pack/plugins/security_solution/public/cases/pages/use_fetch_alert_data.ts @@ -7,8 +7,8 @@ import { useMemo } from 'react'; import type { Ecs } from '@kbn/cases-plugin/common'; -import { useSourcererDataView } from '../../common/containers/sourcerer'; -import { SourcererScopeName } from '../../common/store/sourcerer/model'; +import { useSourcererDataView } from '../../sourcerer/containers'; +import { SourcererScopeName } from '../../sourcerer/store/model'; import { useQueryAlerts } from '../../detections/containers/detection_engine/alerts/use_query'; import { ALERTS_QUERY_NAMES } from '../../detections/containers/detection_engine/alerts/constants'; import type { SignalHit } from '../../common/utils/alerts'; diff --git a/x-pack/plugins/security_solution/public/common/components/cell_actions/index.tsx b/x-pack/plugins/security_solution/public/common/components/cell_actions/index.tsx index 5edc574177520..7b6166928f498 100644 --- a/x-pack/plugins/security_solution/public/common/components/cell_actions/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/cell_actions/index.tsx @@ -15,7 +15,7 @@ import React, { useMemo } from 'react'; import type { CellActionFieldValue, CellActionsData } from '@kbn/cell-actions/src/types'; import type { SecurityCellActionMetadata } from '../../../app/actions/types'; import { SecurityCellActionsTrigger, SecurityCellActionType } from '../../../app/actions/constants'; -import { SourcererScopeName } from '../../store/sourcerer/model'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; import { useGetFieldSpec } from '../../hooks/use_get_field_spec'; import { useDataViewId } from '../../hooks/use_data_view_id'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/table/investigate_in_timeline_button.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/table/investigate_in_timeline_button.tsx index b48f23773bfcc..2b8581aa22d7e 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/table/investigate_in_timeline_button.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/table/investigate_in_timeline_button.tsx @@ -18,7 +18,7 @@ import type { TimeRange } from '../../../store/inputs/model'; import { inputsActions } from '../../../store/inputs'; import { updateProviders, setFilters } from '../../../../timelines/store/actions'; import { sourcererActions } from '../../../store/actions'; -import { SourcererScopeName } from '../../../store/sourcerer/model'; +import { SourcererScopeName } from '../../../../sourcerer/store/model'; import type { DataProvider } from '../../../../../common/types'; import { TimelineId } from '../../../../../common/types/timeline'; import { TimelineType } from '../../../../../common/api/timeline'; diff --git a/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.tsx b/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.tsx index ffb0361561f63..141f04b17e1b2 100644 --- a/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.tsx @@ -28,7 +28,7 @@ import { import { getDefaultControlColumn } from '../../../timelines/components/timeline/body/control_columns'; import { defaultRowRenderers } from '../../../timelines/components/timeline/body/renderers'; import { DefaultCellRenderer } from '../../../timelines/components/timeline/cell_rendering/default_cell_renderer'; -import { SourcererScopeName } from '../../store/sourcerer/model'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; import type { GlobalTimeArgs } from '../../containers/use_global_time'; import type { QueryTabBodyProps as UserQueryTabBodyProps } from '../../../explore/users/pages/navigation/types'; import type { QueryTabBodyProps as HostQueryTabBodyProps } from '../../../explore/hosts/pages/navigation/types'; @@ -65,7 +65,6 @@ const EventsQueryTabBodyComponent: React.FC = deleteQuery, endDate, filterQuery, - indexNames, setQuery, startDate, tableId, diff --git a/x-pack/plugins/security_solution/public/common/components/events_viewer/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/events_viewer/index.test.tsx index aa3873e5e69b8..162bb6bee5ece 100644 --- a/x-pack/plugins/security_solution/public/common/components/events_viewer/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/events_viewer/index.test.tsx @@ -15,7 +15,7 @@ import { mockEventViewerResponse } from './mock'; import { StatefulEventsViewer, type EventsViewerProps } from '.'; import { eventsDefaultModel } from './default_model'; import { EntityType } from '@kbn/timelines-plugin/common'; -import { SourcererScopeName } from '../../store/sourcerer/model'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; import { DefaultCellRenderer } from '../../../timelines/components/timeline/cell_rendering/default_cell_renderer'; import { useTimelineEvents } from './use_timelines_events'; import { getDefaultControlColumn } from '../../../timelines/components/timeline/body/control_columns'; diff --git a/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx b/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx index fb2fc2a10cc5e..e8401d28c67fb 100644 --- a/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx @@ -49,8 +49,8 @@ import { inputsActions } from '../../store/actions'; import { InspectButtonContainer } from '../inspect'; import { useGlobalFullScreen } from '../../containers/use_full_screen'; import { eventsViewerSelector } from './selectors'; -import type { SourcererScopeName } from '../../store/sourcerer/model'; -import { useSourcererDataView } from '../../containers/sourcerer'; +import type { SourcererScopeName } from '../../../sourcerer/store/model'; +import { useSourcererDataView } from '../../../sourcerer/containers'; import type { CellValueElementProps } from '../../../timelines/components/timeline/cell_rendering'; import { useKibana } from '../../lib/kibana'; import { GraphOverlay } from '../../../timelines/components/graph_overlay'; diff --git a/x-pack/plugins/security_solution/public/common/components/events_viewer/use_timelines_events.tsx b/x-pack/plugins/security_solution/public/common/components/events_viewer/use_timelines_events.tsx index 5a37de1a7c61c..3eb6519a041c8 100644 --- a/x-pack/plugins/security_solution/public/common/components/events_viewer/use_timelines_events.tsx +++ b/x-pack/plugins/security_solution/public/common/components/events_viewer/use_timelines_events.tsx @@ -29,7 +29,7 @@ import type { TimelineStrategyResponseType, } from '@kbn/timelines-plugin/common/search_strategy'; import { dataTableActions, Direction, TableId } from '@kbn/securitysolution-data-table'; -import type { RunTimeMappings } from '../../store/sourcerer/model'; +import type { RunTimeMappings } from '../../../sourcerer/store/model'; import { TimelineEventsQueries } from '../../../../common/search_strategy'; import type { KueryFilterQueryKind } from '../../../../common/types'; import type { ESQuery } from '../../../../common/typed_json'; diff --git a/x-pack/plugins/security_solution/public/common/components/inspect/modal.tsx b/x-pack/plugins/security_solution/public/common/components/inspect/modal.tsx index 9cb27d7b6a7ad..d3957390f220d 100644 --- a/x-pack/plugins/security_solution/public/common/components/inspect/modal.tsx +++ b/x-pack/plugins/security_solution/public/common/components/inspect/modal.tsx @@ -27,8 +27,8 @@ import { useLocation } from 'react-router-dom'; import type { InputsModelId } from '../../store/inputs/constants'; import { NO_ALERT_INDEX } from '../../../../common/constants'; import * as i18n from './translations'; -import { getScopeFromPath, useSourcererDataView } from '../../containers/sourcerer'; -import { SourcererScopeName } from '../../store/sourcerer/model'; +import { getScopeFromPath, useSourcererDataView } from '../../../sourcerer/containers'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; export interface ModalInspectProps { adHocDataViews?: string[] | null; diff --git a/x-pack/plugins/security_solution/public/common/components/landing_page/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/landing_page/index.test.tsx index 90d1cce4a52dd..25097cddbd1cc 100644 --- a/x-pack/plugins/security_solution/public/common/components/landing_page/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/landing_page/index.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { render } from '@testing-library/react'; import { LandingPageComponent } from '.'; -jest.mock('../../containers/sourcerer', () => ({ +jest.mock('../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ indicesExist: false }), })); jest.mock('./onboarding'); diff --git a/x-pack/plugins/security_solution/public/common/components/landing_page/index.tsx b/x-pack/plugins/security_solution/public/common/components/landing_page/index.tsx index e05b225226305..669b7497a8403 100644 --- a/x-pack/plugins/security_solution/public/common/components/landing_page/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/landing_page/index.tsx @@ -6,7 +6,7 @@ */ import React, { memo } from 'react'; -import { useSourcererDataView } from '../../containers/sourcerer'; +import { useSourcererDataView } from '../../../sourcerer/containers'; import { Onboarding } from './onboarding'; export const LandingPageComponent = memo(() => { diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/insight/index.tsx b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/insight/index.tsx index d5a9775bdcc6a..6eae6b723d541 100644 --- a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/insight/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/insight/index.tsx @@ -52,13 +52,13 @@ import { } from '../../../../utils/default_date_settings'; import type { TimeRange } from '../../../../store/inputs/model'; import { DEFAULT_TIMEPICKER_QUICK_RANGES } from '../../../../../../common/constants'; -import { useSourcererDataView } from '../../../../containers/sourcerer'; -import { SourcererScopeName } from '../../../../store/sourcerer/model'; +import { useSourcererDataView } from '../../../../../sourcerer/containers'; +import { SourcererScopeName } from '../../../../../sourcerer/store/model'; import { filtersToInsightProviders } from './provider'; import { useLicense } from '../../../../hooks/use_license'; import { isProviderValid } from './helpers'; import * as i18n from './translations'; -import { useGetScopedSourcererDataView } from '../../../sourcerer/use_get_sourcerer_data_view'; +import { useGetScopedSourcererDataView } from '../../../../../sourcerer/components/use_get_sourcerer_data_view'; interface InsightComponentProps { label?: string; diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/insight/use_insight_query.ts b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/insight/use_insight_query.ts index ffb5abd39d4a5..ad0f27aa1568e 100644 --- a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/insight/use_insight_query.ts +++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/insight/use_insight_query.ts @@ -14,8 +14,8 @@ import { TimelineId } from '../../../../../../common/types/timeline'; import { useKibana } from '../../../../lib/kibana'; import { combineQueries } from '../../../../lib/kuery'; import { useTimelineEvents } from '../../../../../timelines/containers'; -import { useSourcererDataView } from '../../../../containers/sourcerer'; -import { SourcererScopeName } from '../../../../store/sourcerer/model'; +import { useSourcererDataView } from '../../../../../sourcerer/containers'; +import { SourcererScopeName } from '../../../../../sourcerer/store/model'; import type { TimeRange } from '../../../../store/inputs/model'; export interface UseInsightQuery { diff --git a/x-pack/plugins/security_solution/public/common/components/matrix_histogram/index.tsx b/x-pack/plugins/security_solution/public/common/components/matrix_histogram/index.tsx index 0009108596847..db738396bc268 100644 --- a/x-pack/plugins/security_solution/public/common/components/matrix_histogram/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/matrix_histogram/index.tsx @@ -27,7 +27,7 @@ import { useQueryToggle } from '../../containers/query_toggle'; import { VISUALIZATION_ACTIONS_BUTTON_CLASS } from '../visualization_actions/utils'; import { VisualizationEmbeddable } from '../visualization_actions/visualization_embeddable'; import { useVisualizationResponse } from '../visualization_actions/use_visualization_response'; -import type { SourcererScopeName } from '../../store/sourcerer/model'; +import type { SourcererScopeName } from '../../../sourcerer/store/model'; export type MatrixHistogramComponentProps = MatrixHistogramQueryProps & MatrixHistogramConfigs & { diff --git a/x-pack/plugins/security_solution/public/common/components/sessions_viewer/index.tsx b/x-pack/plugins/security_solution/public/common/components/sessions_viewer/index.tsx index 5795ff57b772e..32b76a7e39808 100644 --- a/x-pack/plugins/security_solution/public/common/components/sessions_viewer/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/sessions_viewer/index.tsx @@ -19,7 +19,7 @@ import { getSessionsDefaultModel, sessionsHeaders } from './default_headers'; import { defaultRowRenderers } from '../../../timelines/components/timeline/body/renderers'; import { DefaultCellRenderer } from '../../../timelines/components/timeline/cell_rendering/default_cell_renderer'; import * as i18n from './translations'; -import { SourcererScopeName } from '../../store/sourcerer/model'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; import { getDefaultControlColumn } from '../../../timelines/components/timeline/body/control_columns'; import { useLicense } from '../../hooks/use_license'; import { eventsDefaultModel } from '../events_viewer/default_model'; diff --git a/x-pack/plugins/security_solution/public/common/components/top_n/helpers.test.tsx b/x-pack/plugins/security_solution/public/common/components/top_n/helpers.test.tsx index 7ce59f9fd0a70..2d5dde4aaef4e 100644 --- a/x-pack/plugins/security_solution/public/common/components/top_n/helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/top_n/helpers.test.tsx @@ -20,7 +20,7 @@ import { shouldIgnoreAlertFilters, detectionAlertsTables, } from './helpers'; -import { SourcererScopeName } from '../../store/sourcerer/model'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; import { TableId } from '@kbn/securitysolution-data-table'; /** the following scopes are NOT detection alert tables */ diff --git a/x-pack/plugins/security_solution/public/common/components/top_n/helpers.ts b/x-pack/plugins/security_solution/public/common/components/top_n/helpers.ts index 876f04393dcdc..a997879c597b6 100644 --- a/x-pack/plugins/security_solution/public/common/components/top_n/helpers.ts +++ b/x-pack/plugins/security_solution/public/common/components/top_n/helpers.ts @@ -56,7 +56,7 @@ import { TableId } from '@kbn/securitysolution-data-table'; import type { TimelineEventsType } from '../../../../common/types/timeline'; import { TimelineId } from '../../../../common/types/timeline'; -import { SourcererScopeName } from '../../store/sourcerer/model'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/actions.test.tsx b/x-pack/plugins/security_solution/public/common/components/visualization_actions/actions.test.tsx index b3fd18989991c..7557d4bc76820 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/actions.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/actions.test.tsx @@ -15,7 +15,7 @@ import { TestProviders } from '../../mock'; import type { VisualizationActionsProps } from './types'; import * as useLensAttributesModule from './use_lens_attributes'; -import { SourcererScopeName } from '../../store/sourcerer/model'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; jest.mock('./use_actions'); diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/actions.tsx b/x-pack/plugins/security_solution/public/common/components/visualization_actions/actions.tsx index ab7d86a7d6303..b1ec30833b396 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/actions.tsx +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/actions.tsx @@ -21,7 +21,7 @@ import type { VisualizationActionsProps } from './types'; import { MORE_ACTIONS } from './translations'; import { VISUALIZATION_ACTIONS_BUTTON_CLASS } from './utils'; import { DEFAULT_ACTIONS, useActions, VISUALIZATION_CONTEXT_MENU_TRIGGER } from './use_actions'; -import { SourcererScopeName } from '../../store/sourcerer/model'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; const Wrapper = styled.div` &.viz-actions { diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/alerts/alerts_by_status_donut.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/alerts/alerts_by_status_donut.test.ts index 109bf7da68bee..98f64ab00152a 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/alerts/alerts_by_status_donut.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/alerts/alerts_by_status_donut.test.ts @@ -15,7 +15,7 @@ jest.mock('uuid', () => ({ v4: jest.fn().mockReturnValue('b9b43606-7ff7-46ae-a47c-85bed80fab9a'), })); -jest.mock('../../../../../containers/sourcerer', () => ({ +jest.mock('../../../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ dataViewId: 'security-solution-my-test', indicesExist: true, diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/alerts/alerts_histogram.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/alerts/alerts_histogram.test.ts index bf84e4999faa5..dd4b7050632e0 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/alerts/alerts_histogram.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/alerts/alerts_histogram.test.ts @@ -15,7 +15,7 @@ jest.mock('uuid', () => ({ v4: jest.fn().mockReturnValue('0039eb0c-9a1a-4687-ae54-0f4e239bec75'), })); -jest.mock('../../../../../containers/sourcerer', () => ({ +jest.mock('../../../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ dataViewId: 'security-solution-my-test', indicesExist: true, diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/alerts/alerts_table.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/alerts/alerts_table.test.ts index 82303e529db31..399bf374bb707 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/alerts/alerts_table.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/alerts/alerts_table.test.ts @@ -27,7 +27,7 @@ jest.mock('uuid', () => ({ .mockReturnValueOnce('mockTopValuesOfBreakdownFieldColumnId'), })); -jest.mock('../../../../../containers/sourcerer', () => ({ +jest.mock('../../../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ dataViewId: 'security-solution-my-test', indicesExist: true, diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/alerts/rule_preview.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/alerts/rule_preview.test.ts index 0e31ae006ddb5..6c704ae9e532f 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/alerts/rule_preview.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/alerts/rule_preview.test.ts @@ -17,7 +17,7 @@ jest.mock('uuid', () => ({ v4: jest.fn().mockReturnValueOnce('mockLayerId').mockReturnValueOnce('mockInternalReferenceId'), })); -jest.mock('../../../../../containers/sourcerer', () => ({ +jest.mock('../../../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ dataViewId: 'security-solution-my-test', indicesExist: true, diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/authentication.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/authentication.test.ts index 4a5e871bcf07c..1abba440af95c 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/authentication.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/authentication.test.ts @@ -12,7 +12,7 @@ import { useLensAttributes } from '../../use_lens_attributes'; import { authenticationLensAttributes } from './authentication'; -jest.mock('../../../../containers/sourcerer', () => ({ +jest.mock('../../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['auditbeat-mytest-*'], dataViewId: 'security-solution-my-test', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/event.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/event.test.ts index c41f311e97b39..f316f881ba60e 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/event.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/event.test.ts @@ -17,7 +17,7 @@ jest.mock('uuid', () => ({ v4: jest.fn().mockReturnValue('0039eb0c-9a1a-4687-ae54-0f4e239bec75'), })); -jest.mock('../../../../containers/sourcerer', () => ({ +jest.mock('../../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['auditbeat-mytest-*'], dataViewId: 'security-solution-my-test', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/external_alert.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/external_alert.test.ts index e25e139bb29b3..5c4998a03524c 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/external_alert.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/external_alert.test.ts @@ -12,7 +12,7 @@ import { useLensAttributes } from '../../use_lens_attributes'; import { getExternalAlertLensAttributes } from './external_alert'; -jest.mock('../../../../containers/sourcerer', () => ({ +jest.mock('../../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['auditbeat-mytest-*'], dataViewId: 'security-solution-my-test', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_host_area.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_host_area.test.ts index 5f40d582d08f8..9c7ff9e3acf7b 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_host_area.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_host_area.test.ts @@ -12,7 +12,7 @@ import { useLensAttributes } from '../../use_lens_attributes'; import { kpiHostAreaLensAttributes } from './kpi_host_area'; -jest.mock('../../../../containers/sourcerer', () => ({ +jest.mock('../../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['auditbeat-mytest-*'], dataViewId: 'security-solution-my-test', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_host_metric.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_host_metric.test.ts index 04049016befb7..d2714b44c2930 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_host_metric.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_host_metric.test.ts @@ -12,7 +12,7 @@ import { useLensAttributes } from '../../use_lens_attributes'; import { kpiHostMetricLensAttributes } from './kpi_host_metric'; -jest.mock('../../../../containers/sourcerer', () => ({ +jest.mock('../../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['auditbeat-mytest-*'], dataViewId: 'security-solution-my-test', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_area.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_area.test.ts index d7608d90e2a5c..3a591a1eb2b1a 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_area.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_area.test.ts @@ -12,7 +12,7 @@ import { useLensAttributes } from '../../use_lens_attributes'; import { kpiUniqueIpsAreaLensAttributes } from './kpi_unique_ips_area'; -jest.mock('../../../../containers/sourcerer', () => ({ +jest.mock('../../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['auditbeat-mytest-*'], dataViewId: 'security-solution-my-test', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_bar.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_bar.test.ts index fb9d56bfd77aa..fa3f49f7b1054 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_bar.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_bar.test.ts @@ -12,7 +12,7 @@ import { useLensAttributes } from '../../use_lens_attributes'; import { kpiUniqueIpsBarLensAttributes } from './kpi_unique_ips_bar'; -jest.mock('../../../../containers/sourcerer', () => ({ +jest.mock('../../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['auditbeat-mytest-*'], dataViewId: 'security-solution-my-test', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_destination_metric.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_destination_metric.test.ts index af0a079f4592d..a2ae91e0c0422 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_destination_metric.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_destination_metric.test.ts @@ -12,7 +12,7 @@ import { useLensAttributes } from '../../use_lens_attributes'; import { kpiUniqueIpsDestinationMetricLensAttributes } from './kpi_unique_ips_destination_metric'; -jest.mock('../../../../containers/sourcerer', () => ({ +jest.mock('../../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['auditbeat-mytest-*'], dataViewId: 'security-solution-my-test', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_source_metric.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_source_metric.test.ts index 07a9bed7e90f9..e94efb88b58ad 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_source_metric.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_source_metric.test.ts @@ -12,7 +12,7 @@ import { useLensAttributes } from '../../use_lens_attributes'; import { kpiUniqueIpsSourceMetricLensAttributes } from './kpi_unique_ips_source_metric'; -jest.mock('../../../../containers/sourcerer', () => ({ +jest.mock('../../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['auditbeat-mytest-*'], dataViewId: 'security-solution-my-test', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/dns_top_domains.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/dns_top_domains.test.ts index 93f4629adfe68..e398b33f0570b 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/dns_top_domains.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/dns_top_domains.test.ts @@ -14,7 +14,7 @@ import { useLensAttributes } from '../../use_lens_attributes'; import { getDnsTopDomainsLensAttributes } from './dns_top_domains'; -jest.mock('../../../../containers/sourcerer', () => ({ +jest.mock('../../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['auditbeat-mytest-*'], dataViewId: 'security-solution-my-test', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_dns_queries.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_dns_queries.test.ts index 1ff37f5e03cec..9e766f03163d8 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_dns_queries.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_dns_queries.test.ts @@ -12,7 +12,7 @@ import { useLensAttributes } from '../../use_lens_attributes'; import { kpiDnsQueriesLensAttributes } from './kpi_dns_queries'; -jest.mock('../../../../containers/sourcerer', () => ({ +jest.mock('../../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['auditbeat-mytest-*'], dataViewId: 'security-solution-my-test', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_network_events.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_network_events.test.ts index b5aec0055f53b..ef921e3601373 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_network_events.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_network_events.test.ts @@ -12,7 +12,7 @@ import { useLensAttributes } from '../../use_lens_attributes'; import { kpiNetworkEventsLensAttributes } from './kpi_network_events'; -jest.mock('../../../../containers/sourcerer', () => ({ +jest.mock('../../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['auditbeat-mytest-*'], dataViewId: 'security-solution-my-test', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_tls_handshakes.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_tls_handshakes.test.ts index f829078f51016..d6c4eb3fadc25 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_tls_handshakes.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_tls_handshakes.test.ts @@ -12,7 +12,7 @@ import { useLensAttributes } from '../../use_lens_attributes'; import { kpiTlsHandshakesLensAttributes } from './kpi_tls_handshakes'; -jest.mock('../../../../containers/sourcerer', () => ({ +jest.mock('../../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['auditbeat-mytest-*'], dataViewId: 'security-solution-my-test', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_flow_ids.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_flow_ids.test.ts index 5283a87fc3fe4..ba0cd4f60fe99 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_flow_ids.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_flow_ids.test.ts @@ -12,7 +12,7 @@ import { useLensAttributes } from '../../use_lens_attributes'; import { kpiUniqueFlowIdsLensAttributes } from './kpi_unique_flow_ids'; -jest.mock('../../../../containers/sourcerer', () => ({ +jest.mock('../../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['auditbeat-mytest-*'], dataViewId: 'security-solution-my-test', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_area.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_area.test.ts index 763775f0b64d1..7a19fa5e024fc 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_area.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_area.test.ts @@ -12,7 +12,7 @@ import { useLensAttributes } from '../../use_lens_attributes'; import { kpiUniquePrivateIpsAreaLensAttributes } from './kpi_unique_private_ips_area'; -jest.mock('../../../../containers/sourcerer', () => ({ +jest.mock('../../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['auditbeat-mytest-*'], dataViewId: 'security-solution-my-test', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_bar.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_bar.test.ts index fcec3631d8eaf..9b4cd751ee54b 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_bar.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_bar.test.ts @@ -12,7 +12,7 @@ import { useLensAttributes } from '../../use_lens_attributes'; import { kpiUniquePrivateIpsBarLensAttributes } from './kpi_unique_private_ips_bar'; -jest.mock('../../../../containers/sourcerer', () => ({ +jest.mock('../../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['auditbeat-mytest-*'], dataViewId: 'security-solution-my-test', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_destination_metric.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_destination_metric.test.ts index 11ada50de9dab..5c3479c53c410 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_destination_metric.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_destination_metric.test.ts @@ -12,7 +12,7 @@ import { useLensAttributes } from '../../use_lens_attributes'; import { kpiUniquePrivateIpsDestinationMetricLensAttributes } from './kpi_unique_private_ips_destination_metric'; -jest.mock('../../../../containers/sourcerer', () => ({ +jest.mock('../../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['auditbeat-mytest-*'], dataViewId: 'security-solution-my-test', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_source_metric.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_source_metric.test.ts index 08bf1c3e18031..a076dc40a46e4 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_source_metric.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_source_metric.test.ts @@ -12,7 +12,7 @@ import { useLensAttributes } from '../../use_lens_attributes'; import { kpiUniquePrivateIpsSourceMetricLensAttributes } from './kpi_unique_private_ips_source_metric'; -jest.mock('../../../../containers/sourcerer', () => ({ +jest.mock('../../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['auditbeat-mytest-*'], dataViewId: 'security-solution-my-test', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_total_users_area.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_total_users_area.test.ts index f54ef4a7473bd..50b72daa8d532 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_total_users_area.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_total_users_area.test.ts @@ -12,7 +12,7 @@ import { useLensAttributes } from '../../use_lens_attributes'; import { kpiTotalUsersAreaLensAttributes } from './kpi_total_users_area'; -jest.mock('../../../../containers/sourcerer', () => ({ +jest.mock('../../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['auditbeat-mytest-*'], dataViewId: 'security-solution-my-test', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_total_users_metric.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_total_users_metric.test.ts index 8748bb02c8754..fae4b63083906 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_total_users_metric.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_total_users_metric.test.ts @@ -12,7 +12,7 @@ import { useLensAttributes } from '../../use_lens_attributes'; import { kpiTotalUsersMetricLensAttributes } from './kpi_total_users_metric'; -jest.mock('../../../../containers/sourcerer', () => ({ +jest.mock('../../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['auditbeat-mytest-*'], dataViewId: 'security-solution-my-test', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentication_metric_failure.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentication_metric_failure.test.ts index ded0561491ff2..6c9de837708e6 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentication_metric_failure.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentication_metric_failure.test.ts @@ -12,7 +12,7 @@ import { useLensAttributes } from '../../use_lens_attributes'; import { kpiUserAuthenticationsMetricFailureLensAttributes } from './kpi_user_authentication_metric_failure'; -jest.mock('../../../../containers/sourcerer', () => ({ +jest.mock('../../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['auditbeat-mytest-*'], dataViewId: 'security-solution-my-test', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_area.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_area.test.ts index 1646b5943b549..3f00f93c24875 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_area.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_area.test.ts @@ -12,7 +12,7 @@ import { useLensAttributes } from '../../use_lens_attributes'; import { kpiUserAuthenticationsAreaLensAttributes } from './kpi_user_authentications_area'; -jest.mock('../../../../containers/sourcerer', () => ({ +jest.mock('../../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['auditbeat-mytest-*'], dataViewId: 'security-solution-my-test', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_bar.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_bar.test.ts index 64c0a9c6bff00..6a6cd9cc7ad3b 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_bar.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_bar.test.ts @@ -12,7 +12,7 @@ import { useLensAttributes } from '../../use_lens_attributes'; import { kpiUserAuthenticationsBarLensAttributes } from './kpi_user_authentications_bar'; -jest.mock('../../../../containers/sourcerer', () => ({ +jest.mock('../../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['auditbeat-mytest-*'], dataViewId: 'security-solution-my-test', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_metric_success.test.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_metric_success.test.ts index 88ee72e75755e..367a883e93dec 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_metric_success.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_metric_success.test.ts @@ -12,7 +12,7 @@ import { useLensAttributes } from '../../use_lens_attributes'; import { kpiUserAuthenticationsMetricSuccessLensAttributes } from './kpi_user_authentications_metric_success'; -jest.mock('../../../../containers/sourcerer', () => ({ +jest.mock('../../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['auditbeat-mytest-*'], dataViewId: 'security-solution-my-test', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_embeddable.tsx b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_embeddable.tsx index 8ae4b9be9f49e..debeca81783d6 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_embeddable.tsx +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_embeddable.tsx @@ -27,7 +27,7 @@ import { DEFAULT_ACTIONS, useActions } from './use_actions'; import { ModalInspectQuery } from '../inspect/modal'; import { InputsModelId } from '../../store/inputs/constants'; -import { SourcererScopeName } from '../../store/sourcerer/model'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; import { VisualizationActions } from './actions'; import { useEmbeddableInspect } from './use_embeddable_inspect'; import { useVisualizationResponse } from './use_visualization_response'; diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/types.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/types.ts index 2ef37991057bd..6d285e0407292 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/types.ts @@ -17,7 +17,7 @@ import type { Filter, Query } from '@kbn/es-query'; import type { LensProps } from '@kbn/cases-plugin/public/types'; import type { InputsModelId } from '../../store/inputs/constants'; -import type { SourcererScopeName } from '../../store/sourcerer/model'; +import type { SourcererScopeName } from '../../../sourcerer/store/model'; import type { Status } from '../../../../common/api/detection_engine'; export type LensAttributes = TypedLensByValueInput['attributes']; diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_lens_attributes.test.tsx b/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_lens_attributes.test.tsx index 6a64e31d598d8..c7554abafafc6 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_lens_attributes.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_lens_attributes.test.tsx @@ -18,12 +18,12 @@ import { } from './utils'; import { filterFromSearchBar, queryFromSearchBar, wrapper } from './mocks'; -import { useSourcererDataView } from '../../containers/sourcerer'; +import { useSourcererDataView } from '../../../sourcerer/containers'; import { kpiHostMetricLensAttributes } from './lens_attributes/hosts/kpi_host_metric'; import { useRouteSpy } from '../../utils/route/use_route_spy'; import { SecurityPageName } from '../../../app/types'; -jest.mock('../../containers/sourcerer'); +jest.mock('../../../sourcerer/containers'); jest.mock('../../utils/route/use_route_spy', () => ({ useRouteSpy: jest.fn(), })); diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_lens_attributes.tsx b/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_lens_attributes.tsx index 816a784c90aac..1c6b37d4d7dd9 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_lens_attributes.tsx +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_lens_attributes.tsx @@ -8,10 +8,10 @@ import { useMemo } from 'react'; import { SecurityPageName } from '../../../../common/constants'; import { NetworkRouteType } from '../../../explore/network/pages/navigation/types'; -import { useSourcererDataView } from '../../containers/sourcerer'; +import { useSourcererDataView } from '../../../sourcerer/containers'; import { useDeepEqualSelector } from '../../hooks/use_selector'; import { inputsSelectors } from '../../store'; -import { SourcererScopeName } from '../../store/sourcerer/model'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; import { useRouteSpy } from '../../utils/route/use_route_spy'; import type { LensAttributes, UseLensAttributesProps } from './types'; import { diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/visualization_embeddable.tsx b/x-pack/plugins/security_solution/public/common/components/visualization_actions/visualization_embeddable.tsx index 187cff890f1e8..d197501e24d70 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/visualization_embeddable.tsx +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/visualization_embeddable.tsx @@ -16,7 +16,7 @@ import { InputsModelId } from '../../store/inputs/constants'; import { useRefetchByRestartingSession } from '../page/use_refetch_by_session'; import { LensEmbeddable } from './lens_embeddable'; import type { EmbeddableData, VisualizationEmbeddableProps } from './types'; -import { useSourcererDataView } from '../../containers/sourcerer'; +import { useSourcererDataView } from '../../../sourcerer/containers'; import { useVisualizationResponse } from './use_visualization_response'; const VisualizationEmbeddableComponent: React.FC = (props) => { diff --git a/x-pack/plugins/security_solution/public/common/components/with_data_view/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/with_data_view/index.test.tsx index 9d7c88041abe7..9313f20784474 100644 --- a/x-pack/plugins/security_solution/public/common/components/with_data_view/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/with_data_view/index.test.tsx @@ -8,13 +8,13 @@ import React, { useEffect } from 'react'; import type { DataView } from '@kbn/data-views-plugin/common'; import { render, screen } from '@testing-library/react'; import { withDataView } from '.'; -import { useGetScopedSourcererDataView } from '../sourcerer/use_get_sourcerer_data_view'; +import { useGetScopedSourcererDataView } from '../../../sourcerer/components/use_get_sourcerer_data_view'; interface TestComponentProps { dataView: DataView; } -jest.mock('../sourcerer/use_get_sourcerer_data_view'); +jest.mock('../../../sourcerer/components/use_get_sourcerer_data_view'); const TEST_ID = { DATA_VIEW_ERROR_COMPONENT: 'dataViewErrorComponent', diff --git a/x-pack/plugins/security_solution/public/common/components/with_data_view/index.tsx b/x-pack/plugins/security_solution/public/common/components/with_data_view/index.tsx index 3f157332482fc..41d3b451a61e6 100644 --- a/x-pack/plugins/security_solution/public/common/components/with_data_view/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/with_data_view/index.tsx @@ -10,8 +10,8 @@ import type { ComponentType } from 'react'; import type { ReactElement } from 'react-markdown'; import type { DataView } from '@kbn/data-views-plugin/common'; import { DataViewErrorComponent } from './data_view_error'; -import { useGetScopedSourcererDataView } from '../sourcerer/use_get_sourcerer_data_view'; -import { SourcererScopeName } from '../../store/sourcerer/model'; +import { useGetScopedSourcererDataView } from '../../../sourcerer/components/use_get_sourcerer_data_view'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; type OmitDataView = T extends { dataView: DataView } ? Omit : T; diff --git a/x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx b/x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx index c36b5a2b2981e..ed577d1fd2374 100644 --- a/x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx +++ b/x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx @@ -14,9 +14,9 @@ import { getCategory } from '@kbn/triggers-actions-ui-plugin/public'; import type { DataViewSpec } from '@kbn/data-views-plugin/public'; import { useKibana } from '../../lib/kibana'; -import { sourcererActions } from '../../store/sourcerer'; -import { SourcererScopeName } from '../../store/sourcerer/model'; -import { getSourcererDataView } from '../sourcerer/get_sourcerer_data_view'; +import { sourcererActions } from '../../../sourcerer/store'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; +import { getSourcererDataView } from '../../../sourcerer/containers/get_sourcerer_data_view'; import * as i18n from './translations'; import { useAppToasts } from '../../hooks/use_app_toasts'; diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_data_view_id.test.ts b/x-pack/plugins/security_solution/public/common/hooks/use_data_view_id.test.ts index 3f7be7e8e9150..cbfedd2ad0b6d 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/use_data_view_id.test.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/use_data_view_id.test.ts @@ -6,10 +6,10 @@ */ import { renderHook } from '@testing-library/react-hooks'; import { TestProviders } from '../mock'; -import { SourcererScopeName } from '../store/sourcerer/model'; +import { SourcererScopeName } from '../../sourcerer/store/model'; import { DEFAULT_DATA_VIEW_ID } from '../../../common/constants'; import { useDataViewId } from './use_data_view_id'; -import * as sourcererSelectors from '../store/sourcerer/selectors'; +import * as sourcererSelectors from '../../sourcerer/store/selectors'; describe('useDataViewId', () => { it.each(Object.values(SourcererScopeName))( diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_data_view_id.ts b/x-pack/plugins/security_solution/public/common/hooks/use_data_view_id.ts index 1d997c93fe993..d59da6e69e2de 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/use_data_view_id.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/use_data_view_id.ts @@ -6,8 +6,8 @@ */ import { useSelector } from 'react-redux'; -import { sourcererScopeSelectedDataViewId } from '../store/sourcerer/selectors'; -import type { SourcererScopeName } from '../store/sourcerer/model'; +import { sourcererScopeSelectedDataViewId } from '../../sourcerer/store/selectors'; +import type { SourcererScopeName } from '../../sourcerer/store/model'; import type { State } from '../store'; export const useDataViewId = (scopeId: SourcererScopeName): string | undefined => { diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_get_field_spec.ts b/x-pack/plugins/security_solution/public/common/hooks/use_get_field_spec.ts index 7a91bd19103cb..78bb7b985b335 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/use_get_field_spec.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/use_get_field_spec.ts @@ -7,8 +7,8 @@ import { useCallback, useMemo } from 'react'; import { useSelector } from 'react-redux'; -import type { SourcererScopeName } from '../store/sourcerer/model'; -import { sourcererSelectors } from '../store/sourcerer'; +import type { SourcererScopeName } from '../../sourcerer/store/model'; +import { sourcererSelectors } from '../../sourcerer/store'; import type { State } from '../store'; export const useGetFieldSpec = (scopeId: SourcererScopeName) => { diff --git a/x-pack/plugins/security_solution/public/common/lib/triggers_actions_ui/register_alerts_table_configuration.tsx b/x-pack/plugins/security_solution/public/common/lib/triggers_actions_ui/register_alerts_table_configuration.tsx index 6db7a5c814f6f..8cc4d44e95e42 100644 --- a/x-pack/plugins/security_solution/public/common/lib/triggers_actions_ui/register_alerts_table_configuration.tsx +++ b/x-pack/plugins/security_solution/public/common/lib/triggers_actions_ui/register_alerts_table_configuration.tsx @@ -24,7 +24,7 @@ import { getDataTablesInStorageByIds } from '../../../timelines/containers/local import { getColumns } from '../../../detections/configurations/security_solution_detections'; import { getRenderCellValueHook } from '../../../detections/configurations/security_solution_detections/render_cell_value'; import { useFetchPageContext } from '../../../detections/configurations/security_solution_detections/fetch_page_context'; -import { SourcererScopeName } from '../../store/sourcerer/model'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; const registerAlertsTableConfiguration = ( registry: AlertsTableConfigurationRegistryContract, diff --git a/x-pack/plugins/security_solution/public/common/mock/global_state.ts b/x-pack/plugins/security_solution/public/common/mock/global_state.ts index b59b30f629c9a..b99e788246dce 100644 --- a/x-pack/plugins/security_solution/public/common/mock/global_state.ts +++ b/x-pack/plugins/security_solution/public/common/mock/global_state.ts @@ -36,14 +36,14 @@ import { TimelineTabs, TimelineId } from '../../../common/types/timeline'; import { TimelineType, TimelineStatus } from '../../../common/api/timeline'; import { mockManagementState } from '../../management/store/reducer'; import type { ManagementState } from '../../management/types'; -import { initialSourcererState, SourcererScopeName } from '../store/sourcerer/model'; +import { initialSourcererState, SourcererScopeName } from '../../sourcerer/store/model'; import { allowedExperimentalValues } from '../../../common/experimental_features'; -import { getScopePatternListSelection } from '../store/sourcerer/helpers'; +import { getScopePatternListSelection } from '../../sourcerer/store/helpers'; import { mockBrowserFields, mockIndexFields, mockRuntimeMappings } from '../containers/source/mock'; import { usersModel } from '../../explore/users/store'; import { UsersFields } from '../../../common/search_strategy/security_solution/users/common'; import { initialGroupingState } from '../store/grouping/reducer'; -import type { SourcererState } from '../store/sourcerer'; +import type { SourcererState } from '../../sourcerer/store'; import { EMPTY_RESOLVER } from '../../resolver/store/helpers'; import { getMockDiscoverInTimelineState } from './mock_discover_state'; diff --git a/x-pack/plugins/security_solution/public/common/store/actions.ts b/x-pack/plugins/security_solution/public/common/store/actions.ts index 2f8d9e9736da5..ddbc00933bad9 100644 --- a/x-pack/plugins/security_solution/public/common/store/actions.ts +++ b/x-pack/plugins/security_solution/public/common/store/actions.ts @@ -11,7 +11,7 @@ import type { PolicyDetailsAction } from '../../management/pages/policy/store/po export { appActions } from './app'; export { dragAndDropActions } from './drag_and_drop'; export { inputsActions } from './inputs'; -export { sourcererActions } from './sourcerer'; +export { sourcererActions } from '../../sourcerer/store'; import type { RoutingAction } from './routing'; export type AppAction = EndpointAction | RoutingAction | PolicyDetailsAction; diff --git a/x-pack/plugins/security_solution/public/common/store/model.ts b/x-pack/plugins/security_solution/public/common/store/model.ts index 2633d35e5b168..da208bdf94e2b 100644 --- a/x-pack/plugins/security_solution/public/common/store/model.ts +++ b/x-pack/plugins/security_solution/public/common/store/model.ts @@ -8,5 +8,5 @@ export { appModel } from './app'; export { dragAndDropModel } from './drag_and_drop'; export { inputsModel } from './inputs'; -export { sourcererModel } from './sourcerer'; +export { sourcererModel } from '../../sourcerer/store'; export * from './types'; diff --git a/x-pack/plugins/security_solution/public/common/store/reducer.test.tsx b/x-pack/plugins/security_solution/public/common/store/reducer.test.tsx index 087e7dd8a97a5..0710872ae547d 100644 --- a/x-pack/plugins/security_solution/public/common/store/reducer.test.tsx +++ b/x-pack/plugins/security_solution/public/common/store/reducer.test.tsx @@ -9,7 +9,7 @@ import { parseExperimentalConfigValue } from '../../../common/experimental_featu import type { SecuritySubPlugins } from '../../app/types'; import { createInitialState } from './reducer'; import { mockIndexPattern, mockSourcererState, TestProviders, createMockStore } from '../mock'; -import { useSourcererDataView } from '../containers/sourcerer'; +import { useSourcererDataView } from '../../sourcerer/containers'; import { renderHook } from '@testing-library/react-hooks'; import { initialGroupingState } from './grouping/reducer'; import { initialAnalyzerState } from '../../resolver/store/helpers'; diff --git a/x-pack/plugins/security_solution/public/common/store/reducer.ts b/x-pack/plugins/security_solution/public/common/store/reducer.ts index 28a5a2cc0c3cd..5ec7ae66bb2bd 100644 --- a/x-pack/plugins/security_solution/public/common/store/reducer.ts +++ b/x-pack/plugins/security_solution/public/common/store/reducer.ts @@ -14,7 +14,7 @@ import { enableMapSet } from 'immer'; import { appReducer, initialAppState } from './app'; import { dragAndDropReducer, initialDragAndDropState } from './drag_and_drop'; import { createInitialInputsState, inputsReducer } from './inputs'; -import { sourcererReducer, sourcererModel } from './sourcerer'; +import { sourcererReducer, sourcererModel } from '../../sourcerer/store'; import type { HostsPluginReducer } from '../../explore/hosts/store'; import type { NetworkPluginReducer } from '../../explore/network/store'; @@ -25,10 +25,10 @@ import type { SecuritySubPlugins } from '../../app/types'; import type { ManagementPluginReducer } from '../../management'; import type { State } from './types'; import type { AppAction } from './actions'; -import type { SourcererModel } from './sourcerer/model'; -import { initDataView, SourcererScopeName } from './sourcerer/model'; +import type { SourcererModel } from '../../sourcerer/store/model'; +import { initDataView, SourcererScopeName } from '../../sourcerer/store/model'; import type { ExperimentalFeatures } from '../../../common/experimental_features'; -import { getScopePatternListSelection } from './sourcerer/helpers'; +import { getScopePatternListSelection } from '../../sourcerer/store/helpers'; import { globalUrlParamReducer, initialGlobalUrlParam } from './global_url_param'; import { groupsReducer } from './grouping/reducer'; import type { GroupState } from './grouping/types'; diff --git a/x-pack/plugins/security_solution/public/common/store/selectors.ts b/x-pack/plugins/security_solution/public/common/store/selectors.ts index 3bf4ac0070378..6d549ae557701 100644 --- a/x-pack/plugins/security_solution/public/common/store/selectors.ts +++ b/x-pack/plugins/security_solution/public/common/store/selectors.ts @@ -8,4 +8,4 @@ export { appSelectors } from './app'; export { dragAndDropSelectors } from './drag_and_drop'; export { inputsSelectors } from './inputs'; -export { sourcererSelectors } from './sourcerer'; +export { sourcererSelectors } from '../../sourcerer/store'; diff --git a/x-pack/plugins/security_solution/public/common/store/store.ts b/x-pack/plugins/security_solution/public/common/store/store.ts index 9f7f1b035fc02..5b3500a58d9c6 100644 --- a/x-pack/plugins/security_solution/public/common/store/store.ts +++ b/x-pack/plugins/security_solution/public/common/store/store.ts @@ -39,15 +39,19 @@ import type { AppAction } from './actions'; import type { Immutable } from '../../../common/endpoint/types'; import type { State } from './types'; import type { TimelineState } from '../../timelines/store/types'; -import type { KibanaDataView, SourcererModel, SourcererDataView } from './sourcerer/model'; -import { initDataView } from './sourcerer/model'; +import type { + KibanaDataView, + SourcererModel, + SourcererDataView, +} from '../../sourcerer/store/model'; +import { initDataView } from '../../sourcerer/store/model'; import type { StartedSubPlugins, StartPlugins } from '../../types'; import type { ExperimentalFeatures } from '../../../common/experimental_features'; -import { createSourcererDataView } from '../containers/sourcerer/create_sourcerer_data_view'; +import { createSourcererDataView } from '../../sourcerer/containers/create_sourcerer_data_view'; import type { AnalyzerState } from '../../resolver/types'; import { resolverMiddlewareFactory } from '../../resolver/store/middleware'; import { dataAccessLayerFactory } from '../../resolver/data_access_layer/factory'; -import { sourcererActions } from './sourcerer'; +import { sourcererActions } from '../../sourcerer/store'; import { createMiddlewares } from './middlewares'; import { addNewTimeline } from '../../timelines/store/helpers'; diff --git a/x-pack/plugins/security_solution/public/common/store/types.ts b/x-pack/plugins/security_solution/public/common/store/types.ts index 359a65d4fb122..3623ec8837ad4 100644 --- a/x-pack/plugins/security_solution/public/common/store/types.ts +++ b/x-pack/plugins/security_solution/public/common/store/types.ts @@ -14,7 +14,7 @@ import type { AppAction } from './actions'; import type { Immutable } from '../../../common/endpoint/types'; import type { AppState } from './app/reducer'; import type { InputsState } from './inputs/reducer'; -import type { SourcererState } from './sourcerer/reducer'; +import type { SourcererState } from '../../sourcerer/store/reducer'; import type { HostsPluginState } from '../../explore/hosts/store'; import type { DragAndDropState } from './drag_and_drop/reducer'; import type { TimelinePluginState } from '../../timelines/store'; diff --git a/x-pack/plugins/security_solution/public/common/utils/timeline/use_show_timeline.test.tsx b/x-pack/plugins/security_solution/public/common/utils/timeline/use_show_timeline.test.tsx index 0ecca67e79755..dec72d0f938b0 100644 --- a/x-pack/plugins/security_solution/public/common/utils/timeline/use_show_timeline.test.tsx +++ b/x-pack/plugins/security_solution/public/common/utils/timeline/use_show_timeline.test.tsx @@ -28,7 +28,7 @@ const mockUseSourcererDataView = jest.fn( dataViewId: null, }) ); -jest.mock('../../containers/sourcerer', () => ({ +jest.mock('../../../sourcerer/containers', () => ({ useSourcererDataView: () => mockUseSourcererDataView(), })); diff --git a/x-pack/plugins/security_solution/public/common/utils/timeline/use_show_timeline_for_path.ts b/x-pack/plugins/security_solution/public/common/utils/timeline/use_show_timeline_for_path.ts index 233194332754b..0e7b208c2dd1d 100644 --- a/x-pack/plugins/security_solution/public/common/utils/timeline/use_show_timeline_for_path.ts +++ b/x-pack/plugins/security_solution/public/common/utils/timeline/use_show_timeline_for_path.ts @@ -9,8 +9,8 @@ import { useCallback, useMemo } from 'react'; import { matchPath } from 'react-router-dom'; import { getLinksWithHiddenTimeline } from '../../links'; -import { SourcererScopeName } from '../../store/sourcerer/model'; -import { useSourcererDataView } from '../../containers/sourcerer'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; +import { useSourcererDataView } from '../../../sourcerer/containers'; import { useKibana } from '../../lib/kibana'; const isTimelinePathVisible = (currentPath: string): boolean => { diff --git a/x-pack/plugins/security_solution/public/dashboards/pages/details/index.tsx b/x-pack/plugins/security_solution/public/dashboards/pages/details/index.tsx index 99346602d9453..d9e4e56ed919e 100644 --- a/x-pack/plugins/security_solution/public/dashboards/pages/details/index.tsx +++ b/x-pack/plugins/security_solution/public/dashboards/pages/details/index.tsx @@ -23,7 +23,7 @@ import { SiemSearchBar } from '../../../common/components/search_bar'; import { SecuritySolutionPageWrapper } from '../../../common/components/page_wrapper'; import { FiltersGlobal } from '../../../common/components/filters_global'; import { InputsModelId } from '../../../common/store/inputs/constants'; -import { useSourcererDataView } from '../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../sourcerer/containers'; import { HeaderPage } from '../../../common/components/header_page'; import { inputsSelectors } from '../../../common/store'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/preview_histogram.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/preview_histogram.tsx index 77236be454004..2469d519ad197 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/preview_histogram.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/rule_preview/preview_histogram.tsx @@ -22,9 +22,9 @@ import { Panel } from '../../../../common/components/panel'; import { HeaderSection } from '../../../../common/components/header_section'; import { getAlertsPreviewDefaultModel } from '../../../../detections/components/alerts_table/default_config'; -import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../../sourcerer/store/model'; import { DEFAULT_PREVIEW_INDEX } from '../../../../../common/constants'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; import { DetailsPanel } from '../../../../timelines/components/side_panel'; import { PreviewRenderCellValue } from './preview_table_cell_renderer'; import { getPreviewTableControlColumn } from './preview_table_control_columns'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/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 index 51467f206d0d3..6cbf031933a70 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/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 @@ -9,7 +9,7 @@ import React from 'react'; import type { EuiDataGridCellValueElementProps } from '@elastic/eui'; import { TableId } from '@kbn/securitysolution-data-table'; import type { CellValueElementProps } from '../../../../../common/types'; -import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../../sourcerer/store/model'; import { RenderCellValue } from '../../../../detections/configurations/security_solution_detections'; export const PreviewRenderCellValue: React.FC< diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/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 index be1306d706357..f9ef3a1cf4643 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/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 @@ -207,8 +207,8 @@ jest.mock('../../../../common/components/link_to', () => { }), }; }); -jest.mock('../../../../common/containers/sourcerer', () => { - const actual = jest.requireActual('../../../../common/containers/sourcerer'); +jest.mock('../../../../sourcerer/containers', () => { + const actual = jest.requireActual('../../../../sourcerer/containers'); return { ...actual, useSourcererDataView: jest diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_details_ui/pages/rule_details/execution_log_table/execution_log_table.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_details_ui/pages/rule_details/execution_log_table/execution_log_table.test.tsx index cda7e4e200877..584a9a4e49026 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_details_ui/pages/rule_details/execution_log_table/execution_log_table.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_details_ui/pages/rule_details/execution_log_table/execution_log_table.test.tsx @@ -15,11 +15,11 @@ import { useRuleDetailsContextMock } from '../__mocks__/rule_details_context'; import { getRuleExecutionResultsResponseMock } from '../../../../../../common/api/detection_engine/rule_monitoring/mocks'; import { useExecutionResults } from '../../../../rule_monitoring'; -import { useSourcererDataView } from '../../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../../sourcerer/containers'; import { useRuleDetailsContext } from '../rule_details_context'; import { ExecutionLogTable } from './execution_log_table'; -jest.mock('../../../../../common/containers/sourcerer'); +jest.mock('../../../../../sourcerer/containers'); jest.mock('../../../../rule_monitoring/components/execution_results_table/use_execution_results'); jest.mock('../rule_details_context'); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_details_ui/pages/rule_details/execution_log_table/execution_log_table.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_details_ui/pages/rule_details/execution_log_table/execution_log_table.tsx index 7dcec81d2ef6b..1444dc8e0fd40 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_details_ui/pages/rule_details/execution_log_table/execution_log_table.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_details_ui/pages/rule_details/execution_log_table/execution_log_table.tsx @@ -49,7 +49,7 @@ import { UtilityBarSection, UtilityBarText, } from '../../../../../common/components/utility_bar'; -import { useSourcererDataView } from '../../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../../sourcerer/containers'; import { useAppToasts } from '../../../../../common/hooks/use_app_toasts'; import { useDeepEqualSelector } from '../../../../../common/hooks/use_selector'; import { useKibana } from '../../../../../common/lib/kibana'; @@ -64,7 +64,7 @@ import type { RelativeTimeRange, } from '../../../../../common/store/inputs/model'; import { isAbsoluteTimeRange, isRelativeTimeRange } from '../../../../../common/store/inputs/model'; -import { SourcererScopeName } from '../../../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../../../sourcerer/store/model'; import { useExecutionResults } from '../../../../rule_monitoring'; import { useRuleDetailsContext } from '../rule_details_context'; import { useExpandableRows } from '../../../../rule_monitoring/components/basic/tables/use_expandable_rows'; 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 2dacd37f7d245..18cde922f9b9d 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 @@ -96,8 +96,8 @@ import { resetKeyboardFocus, showGlobalFilters, } from '../../../../timelines/components/timeline/helpers'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; -import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; +import { SourcererScopeName } from '../../../../sourcerer/store/model'; import { canEditRuleWithActions, explainLackOfPermission, @@ -126,7 +126,7 @@ import type { BadgeOptions } from '../../../../common/components/header_page/typ import type { AlertsStackByField } from '../../../../detections/components/alerts_kpis/common/types'; import type { RuleResponse, Status } from '../../../../../common/api/detection_engine'; import { AlertsTableFilterGroup } from '../../../../detections/components/alerts_table/alerts_filter_group'; -import { useSignalHelpers } from '../../../../common/containers/sourcerer/use_signal_helpers'; +import { useSignalHelpers } from '../../../../sourcerer/containers/use_signal_helpers'; import { HeaderPage } from '../../../../common/components/header_page'; import { ExceptionsViewer } from '../../../rule_exceptions/components/all_exception_items_table'; import { EditRuleSettingButtonLink } from '../../../../detections/pages/detection_engine/rules/details/components/edit_rule_settings_button_link'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/columns.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/columns.tsx index 5266a51804168..24dc0cc6690aa 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/columns.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_by_type_panel/columns.tsx @@ -21,7 +21,7 @@ import { ALERTS_HEADERS_RULE_NAME } from '../../alerts_table/translations'; import { ALERT_TYPE_COLOR, ALERT_TYPE_LABEL } from './helpers'; import { COUNT_TABLE_TITLE } from '../alerts_count_panel/translations'; import * as i18n from './translations'; -import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../../sourcerer/store/model'; export const getAlertsTypeTableColumns = ( isAlertTypeEnabled: boolean diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/index.tsx index 4b5efb9ae8dd1..2ebbf29692f3d 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/index.tsx @@ -22,7 +22,7 @@ import { useQueryToggle } from '../../../../common/containers/query_toggle'; import { FieldSelection } from '../../../../common/components/field_selection'; import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; import { getAlertsTableLensAttributes as getLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/common/alerts/alerts_table'; -import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../../sourcerer/store/model'; import { VisualizationEmbeddable } from '../../../../common/components/visualization_actions/visualization_embeddable'; export const DETECTIONS_ALERTS_COUNT_ID = 'detections-alerts-count'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/index.tsx index 69066b3d3e595..c61e3b51521d6 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/index.tsx @@ -38,7 +38,7 @@ import { useQueryToggle } from '../../../../common/containers/query_toggle'; import { GROUP_BY_TOP_LABEL } from '../common/translations'; import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; import { getAlertsHistogramLensAttributes as getLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/common/alerts/alerts_histogram'; -import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../../sourcerer/store/model'; import { VisualizationEmbeddable } from '../../../../common/components/visualization_actions/visualization_embeddable'; import { useAlertHistogramCount } from '../../../hooks/alerts_visualization/use_alert_histogram_count'; import { useVisualizationResponse } from '../../../../common/components/visualization_actions/use_visualization_response'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/common/hooks.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/common/hooks.test.tsx index fdbc2108e4d33..8700e0e22de73 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/common/hooks.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/common/hooks.test.tsx @@ -13,13 +13,13 @@ import type { GetAggregatableFields, UseInspectButtonParams } from './hooks'; import { getAggregatableFields, useInspectButton, useStackByFields } from './hooks'; import { mockBrowserFields } from '../../../../common/containers/source/mock'; import { TestProviders } from '../../../../common/mock'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; jest.mock('react-router-dom', () => { const actual = jest.requireActual('react-router-dom'); return { ...actual, useLocation: jest.fn().mockReturnValue({ pathname: '' }) }; }); -jest.mock('../../../../common/containers/sourcerer', () => ({ +jest.mock('../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn(), getScopeFromPath: jest.fn(), })); diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/common/hooks.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/common/hooks.ts index 9dbace9881c25..7cb8723990e7e 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/common/hooks.ts +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/common/hooks.ts @@ -14,7 +14,7 @@ import type { BrowserField } from '@kbn/timelines-plugin/common'; import { i18n } from '@kbn/i18n'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; import type { GlobalTimeArgs } from '../../../../common/containers/use_global_time'; -import { getScopeFromPath, useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { getScopeFromPath, useSourcererDataView } from '../../../../sourcerer/containers'; import { getAllFieldsByName } from '../../../../common/containers/source'; import { isLensSupportedType } from '../../../../common/utils/lens'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_grouping.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_grouping.test.tsx index d7bc936f5a06a..17c7ce8195c0c 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_grouping.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_grouping.test.tsx @@ -14,7 +14,7 @@ import { createMockStore, mockGlobalState, TestProviders } from '../../../common import type { AlertsTableComponentProps } from './alerts_grouping'; import { GroupedAlertsTable } from './alerts_grouping'; import { TableId } from '@kbn/securitysolution-data-table'; -import { useSourcererDataView } from '../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../sourcerer/containers'; import type { UseFieldBrowserOptionsProps } from '../../../timelines/components/fields_browser'; import { useKibana as mockUseKibana } from '../../../common/lib/kibana/__mocks__'; import { createTelemetryServiceMock } from '../../../common/lib/telemetry/telemetry_service.mock'; @@ -22,7 +22,7 @@ import { useQueryAlerts } from '../../containers/detection_engine/alerts/use_que import { getQuery, groupingSearchResponse } from './grouping_settings/mock'; jest.mock('../../containers/detection_engine/alerts/use_query'); -jest.mock('../../../common/containers/sourcerer'); +jest.mock('../../../sourcerer/containers'); jest.mock('../../../common/utils/normalize_time_range'); jest.mock('uuid', () => ({ v4: jest.fn().mockReturnValue('test-uuid'), diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_grouping.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_grouping.tsx index 4bcbc61d14833..13e9d739017c6 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_grouping.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_grouping.tsx @@ -18,9 +18,9 @@ import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; import { updateGroups } from '../../../common/store/grouping/actions'; import type { Status } from '../../../../common/api/detection_engine'; import { defaultUnit } from '../../../common/components/toolbar/unit'; -import { useSourcererDataView } from '../../../common/containers/sourcerer'; -import { SourcererScopeName } from '../../../common/store/sourcerer/model'; -import type { RunTimeMappings } from '../../../common/store/sourcerer/model'; +import { useSourcererDataView } from '../../../sourcerer/containers'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; +import type { RunTimeMappings } from '../../../sourcerer/store/model'; import { renderGroupPanel, getStats } from './grouping_settings'; import { useKibana } from '../../../common/lib/kibana'; import { GroupedSubLevel } from './alerts_sub_grouping'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_sub_grouping.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_sub_grouping.tsx index 6976338dfbe82..94f5c3abda160 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_sub_grouping.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_sub_grouping.tsx @@ -15,13 +15,13 @@ import { getEsQueryConfig } from '@kbn/data-plugin/common'; import type { DynamicGroupingProps } from '@kbn/grouping/src'; import type { TableIdLiteral } from '@kbn/securitysolution-data-table'; import { parseGroupingQuery } from '@kbn/grouping/src'; -import type { RunTimeMappings } from '../../../common/store/sourcerer/model'; +import type { RunTimeMappings } from '../../../sourcerer/store/model'; import { combineQueries } from '../../../common/lib/kuery'; -import { SourcererScopeName } from '../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; import type { AlertsGroupingAggregation } from './grouping_settings/types'; import type { Status } from '../../../../common/api/detection_engine'; import { InspectButton } from '../../../common/components/inspect'; -import { useSourcererDataView } from '../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../sourcerer/containers'; import { useKibana } from '../../../common/lib/kibana'; import { useGlobalTime } from '../../../common/containers/use_global_time'; import { useInvalidFilterQuery } from '../../../common/hooks/use_invalid_filter_query'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/grouping_settings/query_builder.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_table/grouping_settings/query_builder.ts index 839bea01780be..8cfaa94b1a89b 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/grouping_settings/query_builder.ts +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/grouping_settings/query_builder.ts @@ -8,7 +8,7 @@ import type { BoolQuery } from '@kbn/es-query'; import type { NamedAggregation } from '@kbn/grouping'; import { isNoneGroup, getGroupingQuery } from '@kbn/grouping'; -import type { RunTimeMappings } from '../../../../common/store/sourcerer/model'; +import type { RunTimeMappings } from '../../../../sourcerer/store/model'; interface AlertsGroupingQueryParams { additionalFilters: Array<{ diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/index.tsx index 599c32414d966..5fc8364b0d7eb 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/index.tsx @@ -37,8 +37,8 @@ import { inputsSelectors } from '../../../common/store'; import { combineQueries } from '../../../common/lib/kuery'; import { useInvalidFilterQuery } from '../../../common/hooks/use_invalid_filter_query'; import { StatefulEventContext } from '../../../common/components/events_viewer/stateful_event_context'; -import { useSourcererDataView } from '../../../common/containers/sourcerer'; -import { SourcererScopeName } from '../../../common/store/sourcerer/model'; +import { useSourcererDataView } from '../../../sourcerer/containers'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; import { useKibana } from '../../../common/lib/kibana'; import { useDeepEqualSelector, useShallowEqualSelector } from '../../../common/hooks/use_selector'; import { getColumns } from '../../configurations/security_solution_detections'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_add_bulk_to_timeline.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_add_bulk_to_timeline.tsx index 4c894918c593e..dee7d665295b8 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_add_bulk_to_timeline.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_add_bulk_to_timeline.tsx @@ -16,7 +16,7 @@ import type { CustomBulkAction } from '../../../../../common/types'; import { combineQueries } from '../../../../common/lib/kuery'; import { useKibana } from '../../../../common/lib/kibana'; import { BULK_ADD_TO_TIMELINE_LIMIT } from '../../../../../common/constants'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; import type { TimelineArgs } from '../../../../timelines/containers'; import { useTimelineEventsHandler } from '../../../../timelines/containers'; import { eventsViewerSelector } from '../../../../common/components/events_viewer/selectors'; @@ -29,7 +29,7 @@ import { TimelineId } from '../../../../../common/types/timeline'; import { TimelineType } from '../../../../../common/api/timeline'; import { sendBulkEventsToTimelineAction } from '../actions'; import type { CreateTimelineProps } from '../types'; -import type { SourcererScopeName } from '../../../../common/store/sourcerer/model'; +import type { SourcererScopeName } from '../../../../sourcerer/store/model'; import type { Direction } from '../../../../../common/search_strategy'; const { setEventsLoading, setSelected } = dataTableActions; diff --git a/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.test.tsx b/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.test.tsx index 5abe8a3dfbd93..926109d90558d 100644 --- a/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.test.tsx @@ -18,10 +18,10 @@ import type { TimelineNonEcsData } from '../../../../common/search_strategy/time import type { CellValueElementProps } from '../../../timelines/components/timeline/cell_rendering'; import { DefaultCellRenderer } from '../../../timelines/components/timeline/cell_rendering/default_cell_renderer'; import { getRenderCellValueHook } from './render_cell_value'; -import { SourcererScopeName } from '../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; jest.mock('../../../common/lib/kibana'); -jest.mock('../../../common/containers/sourcerer', () => ({ +jest.mock('../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ browserFields: {}, defaultIndex: 'defaultIndex', diff --git a/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.tsx b/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.tsx index 3262e0bee184e..dedc86f50366b 100644 --- a/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.tsx +++ b/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.tsx @@ -15,7 +15,7 @@ import type { TableId } from '@kbn/securitysolution-data-table'; import { useLicense } from '../../../common/hooks/use_license'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; import { defaultRowRenderers } from '../../../timelines/components/timeline/body/renderers'; -import type { SourcererScopeName } from '../../../common/store/sourcerer/model'; +import type { SourcererScopeName } from '../../../sourcerer/store/model'; import { GuidedOnboardingTourStep } from '../../../common/components/guided_onboarding_tour/tour_step'; import { isDetectionsAlertsTable } from '../../../common/components/top_n/helpers'; import { @@ -23,7 +23,7 @@ import { SecurityStepId, } from '../../../common/components/guided_onboarding_tour/tour_config'; import { SIGNAL_RULE_NAME_FIELD_NAME } from '../../../timelines/components/timeline/body/renderers/constants'; -import { useSourcererDataView } from '../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../sourcerer/containers'; import { DefaultCellRenderer } from '../../../timelines/components/timeline/cell_rendering/default_cell_renderer'; import { SUPPRESSED_ALERT_TOOLTIP } from './translations'; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.test.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.test.ts index 669064e76bbc9..7d44864681f0e 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.test.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.test.ts @@ -10,8 +10,8 @@ import { act, renderHook } from '@testing-library/react-hooks'; import { useRuleFromTimeline } from './use_rule_from_timeline'; import { useGetInitialUrlParamValue } from '../../../../common/utils/global_query_string/helpers'; import { resolveTimeline } from '../../../../timelines/containers/api'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; -import { mockSourcererScope } from '../../../../common/containers/sourcerer/mocks'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; +import { mockSourcererScope } from '../../../../sourcerer/containers/mocks'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; import { useAppToastsMock } from '../../../../common/hooks/use_app_toasts.mock'; import { mockTimeline } from '../../../../../server/lib/timeline/__mocks__/create_timelines'; @@ -21,7 +21,7 @@ jest.mock('../../../../common/hooks/use_experimental_features'); jest.mock('../../../../common/utils/global_query_string/helpers'); jest.mock('../../../../timelines/containers/api'); jest.mock('../../../../common/hooks/use_app_toasts'); -jest.mock('../../../../common/containers/sourcerer'); +jest.mock('../../../../sourcerer/containers'); jest.mock('../../../../common/components/discover_in_timeline/use_discover_in_timeline_context'); jest.mock('../../../../common/components/link_to', () => { const originalModule = jest.requireActual('../../../../common/components/link_to'); 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 c5fbc1d35d127..a7461bda55c30 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 @@ -13,15 +13,15 @@ import type { EqlOptionsSelected } from '@kbn/timelines-plugin/common'; import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; import { convertKueryToElasticSearchQuery } from '../../../../common/lib/kuery'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; import type { TimelineModel } from '../../../..'; import type { FieldValueQueryBar } from '../../../../detection_engine/rule_creation_ui/components/query_bar'; -import { sourcererActions } from '../../../../common/store/sourcerer'; +import { sourcererActions } from '../../../../sourcerer/store'; import { useQueryTimelineById } from '../../../../timelines/components/open_timeline/helpers'; import { useGetInitialUrlParamValue } from '../../../../common/utils/global_query_string/helpers'; import { buildGlobalQuery } from '../../../../timelines/components/timeline/helpers'; import { getDataProviderFilter } from '../../../../timelines/components/timeline/query_bar'; -import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../../sourcerer/store/model'; export const RULE_FROM_TIMELINE_URL_PARAM = 'createRuleFromTimeline'; export const RULE_FROM_EQL_URL_PARAM = 'createRuleFromEql'; diff --git a/x-pack/plugins/security_solution/public/detections/hooks/trigger_actions_alert_table/use_alert_actions.tsx b/x-pack/plugins/security_solution/public/detections/hooks/trigger_actions_alert_table/use_alert_actions.tsx index f4d211713b0f7..56b5ec780c93c 100644 --- a/x-pack/plugins/security_solution/public/detections/hooks/trigger_actions_alert_table/use_alert_actions.tsx +++ b/x-pack/plugins/security_solution/public/detections/hooks/trigger_actions_alert_table/use_alert_actions.tsx @@ -10,7 +10,7 @@ import { useCallback, useMemo } from 'react'; import type { Filter } from '@kbn/es-query'; import { buildEsQuery } from '@kbn/es-query'; import type { TableId } from '@kbn/securitysolution-data-table'; -import type { SourcererScopeName } from '../../../common/store/sourcerer/model'; +import type { SourcererScopeName } from '../../../sourcerer/store/model'; import { APM_USER_INTERACTIONS } from '../../../common/lib/apm/constants'; import { updateAlertStatus } from '../../../common/components/toolbar/bulk_actions/update_alerts'; import { useAppToasts } from '../../../common/hooks/use_app_toasts'; diff --git a/x-pack/plugins/security_solution/public/detections/hooks/trigger_actions_alert_table/use_bulk_actions.tsx b/x-pack/plugins/security_solution/public/detections/hooks/trigger_actions_alert_table/use_bulk_actions.tsx index aa798b00dc969..453c268b47e66 100644 --- a/x-pack/plugins/security_solution/public/detections/hooks/trigger_actions_alert_table/use_bulk_actions.tsx +++ b/x-pack/plugins/security_solution/public/detections/hooks/trigger_actions_alert_table/use_bulk_actions.tsx @@ -14,7 +14,7 @@ import { useMemo, useCallback } from 'react'; import type { TableId } from '@kbn/securitysolution-data-table'; import { useBulkAlertAssigneesItems } from '../../../common/components/toolbar/bulk_actions/use_bulk_alert_assignees_items'; import { useBulkAlertTagsItems } from '../../../common/components/toolbar/bulk_actions/use_bulk_alert_tags_items'; -import { SourcererScopeName } from '../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; import { useGlobalTime } from '../../../common/containers/use_global_time'; import { useAddBulkToTimelineAction } from '../../components/alerts_table/timeline_actions/use_add_bulk_to_timeline'; import { useBulkAlertActionItems } from './use_alert_actions'; diff --git a/x-pack/plugins/security_solution/public/detections/hooks/trigger_actions_alert_table/use_cell_actions.tsx b/x-pack/plugins/security_solution/public/detections/hooks/trigger_actions_alert_table/use_cell_actions.tsx index af9a21599ea0d..71c5e62fb841a 100644 --- a/x-pack/plugins/security_solution/public/detections/hooks/trigger_actions_alert_table/use_cell_actions.tsx +++ b/x-pack/plugins/security_solution/public/detections/hooks/trigger_actions_alert_table/use_cell_actions.tsx @@ -13,7 +13,7 @@ import type { UseDataGridColumnsSecurityCellActionsProps } from '../../../common import { useDataGridColumnsSecurityCellActions } from '../../../common/components/cell_actions'; import { SecurityCellActionsTrigger, SecurityCellActionType } from '../../../app/actions/constants'; import { VIEW_SELECTION } from '../../../../common/constants'; -import { SourcererScopeName } from '../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; import { useShallowEqualSelector } from '../../../common/hooks/use_selector'; import { useGetFieldSpec } from '../../../common/hooks/use_get_field_spec'; import { useDataViewId } from '../../../common/hooks/use_data_view_id'; diff --git a/x-pack/plugins/security_solution/public/detections/hooks/trigger_actions_alert_table/use_persistent_controls.test.tsx b/x-pack/plugins/security_solution/public/detections/hooks/trigger_actions_alert_table/use_persistent_controls.test.tsx index 9ae0ef47090fb..7e1826c4652a3 100644 --- a/x-pack/plugins/security_solution/public/detections/hooks/trigger_actions_alert_table/use_persistent_controls.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/hooks/trigger_actions_alert_table/use_persistent_controls.test.tsx @@ -11,7 +11,7 @@ import { TableId } from '@kbn/securitysolution-data-table'; import { renderHook } from '@testing-library/react-hooks'; import { render, fireEvent } from '@testing-library/react'; import { createMockStore, mockGlobalState, TestProviders } from '../../../common/mock'; -import { useSourcererDataView } from '../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../sourcerer/containers'; import { useDeepEqualSelector, useShallowEqualSelector } from '../../../common/hooks/use_selector'; import { useKibana as mockUseKibana } from '../../../common/lib/kibana/__mocks__'; import { createTelemetryServiceMock } from '../../../common/lib/telemetry/telemetry_service.mock'; @@ -26,7 +26,7 @@ jest.mock('react-redux', () => { useDispatch: () => mockDispatch, }; }); -jest.mock('../../../common/containers/sourcerer'); +jest.mock('../../../sourcerer/containers'); jest.mock('../../../common/hooks/use_selector'); jest.mock('../../../common/lib/kibana', () => { const original = jest.requireActual('../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/detections/hooks/trigger_actions_alert_table/use_persistent_controls.tsx b/x-pack/plugins/security_solution/public/detections/hooks/trigger_actions_alert_table/use_persistent_controls.tsx index 8acb8f8d672db..1cce1c8a34594 100644 --- a/x-pack/plugins/security_solution/public/detections/hooks/trigger_actions_alert_table/use_persistent_controls.tsx +++ b/x-pack/plugins/security_solution/public/detections/hooks/trigger_actions_alert_table/use_persistent_controls.tsx @@ -16,8 +16,8 @@ import type { ViewSelection, TableId } from '@kbn/securitysolution-data-table'; import { useGetGroupSelectorStateless } from '@kbn/grouping/src/hooks/use_get_group_selector'; import { getTelemetryEvent } from '@kbn/grouping/src/telemetry/const'; import { groupIdSelector } from '../../../common/store/grouping/selectors'; -import { useSourcererDataView } from '../../../common/containers/sourcerer'; -import { SourcererScopeName } from '../../../common/store/sourcerer/model'; +import { useSourcererDataView } from '../../../sourcerer/containers'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; import { updateGroups } from '../../../common/store/grouping/actions'; import { useKibana } from '../../../common/lib/kibana'; import { METRIC_TYPE, track } from '../../../common/lib/telemetry'; diff --git a/x-pack/plugins/security_solution/public/detections/hooks/trigger_actions_alert_table/use_trigger_actions_browser_fields_options.tsx b/x-pack/plugins/security_solution/public/detections/hooks/trigger_actions_alert_table/use_trigger_actions_browser_fields_options.tsx index c2140c904c464..e2876e962fd20 100644 --- a/x-pack/plugins/security_solution/public/detections/hooks/trigger_actions_alert_table/use_trigger_actions_browser_fields_options.tsx +++ b/x-pack/plugins/security_solution/public/detections/hooks/trigger_actions_alert_table/use_trigger_actions_browser_fields_options.tsx @@ -7,7 +7,7 @@ import { useCallback, useMemo } from 'react'; import type { AlertsTableConfigurationRegistry } from '@kbn/triggers-actions-ui-plugin/public/types'; import { useFieldBrowserOptions } from '../../../timelines/components/fields_browser'; -import type { SourcererScopeName } from '../../../common/store/sourcerer/model'; +import type { SourcererScopeName } from '../../../sourcerer/store/model'; export const getUseTriggersActionsFieldBrowserOptions = (scopeId: SourcererScopeName) => { const useTriggersActionsFieldBrowserOptions: AlertsTableConfigurationRegistry['useFieldBrowserOptions'] = diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/index.test.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/index.test.tsx index 6319f4d98420d..4fde4b870693b 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/index.test.tsx @@ -13,7 +13,7 @@ import type { Status } from '../../../../../common/api/detection_engine'; import { RESET_GROUP_BY_FIELDS } from '../../../../common/components/chart_settings_popover/configurations/default/translations'; import { CHART_SETTINGS_POPOVER_ARIA_LABEL } from '../../../../common/components/chart_settings_popover/translations'; import { mockBrowserFields } from '../../../../common/containers/source/mock'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; import { TestProviders } from '../../../../common/mock'; import { ChartPanels } from '.'; import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; @@ -22,7 +22,7 @@ import { LensEmbeddable } from '../../../../common/components/visualization_acti import { createResetGroupByFieldAction } from '../../../components/alerts_kpis/alerts_histogram_panel/helpers'; jest.mock('./alerts_local_storage'); -jest.mock('../../../../common/containers/sourcerer'); +jest.mock('../../../../sourcerer/containers'); jest.mock('../../../../common/components/visualization_actions/lens_embeddable'); jest.mock('../../../../common/components/page/use_refetch_by_session', () => ({ diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/index.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/index.tsx index 86c402b20288c..aaae411319a58 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/index.tsx @@ -18,7 +18,7 @@ import { ChartSelect } from './chart_select'; import { ChartCollapse } from './chart_collapse'; import * as i18n from './chart_select/translations'; import { AlertsTreemapPanel } from '../../../../common/components/alerts_treemap_panel'; -import type { RunTimeMappings } from '../../../../common/store/sourcerer/model'; +import type { RunTimeMappings } from '../../../../sourcerer/store/model'; import type { UpdateDateRange } from '../../../../common/components/charts/common'; import { useEuiComboBoxReset } from '../../../../common/components/use_combo_box_reset'; import { AlertsHistogramPanel } from '../../../components/alerts_kpis/alerts_histogram_panel'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.test.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.test.tsx index 2f14a455ff12b..f7907eaf1099c 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.test.tsx @@ -10,7 +10,7 @@ import { render, waitFor } from '@testing-library/react'; import { useParams } from 'react-router-dom'; import { mockGlobalState, TestProviders, createMockStore } from '../../../common/mock'; import { useUserData } from '../../components/user_info'; -import { useSourcererDataView } from '../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../sourcerer/containers'; import type { State } from '../../../common/store'; import { mockHistory, Router } from '../../../common/mock/router'; import { mockTimelines } from '../../../common/mock/mock_timelines_plugin'; @@ -58,7 +58,7 @@ jest.mock('../../components/alerts_table/alerts_grouping', () => ({ jest.mock('../../containers/detection_engine/lists/use_lists_config'); jest.mock('../../components/user_info'); -jest.mock('../../../common/containers/sourcerer'); +jest.mock('../../../sourcerer/containers'); jest.mock('../../../common/components/link_to'); jest.mock('../../../common/containers/use_global_time', () => ({ useGlobalTime: jest.fn().mockReturnValue({ diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.tsx index c0dbea59b7bc1..767ac31b025ea 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.tsx @@ -73,10 +73,10 @@ import { buildThreatMatchFilter, } from '../../components/alerts_table/default_config'; import { ChartPanels } from './chart_panels'; -import { useSourcererDataView } from '../../../common/containers/sourcerer'; -import { useSignalHelpers } from '../../../common/containers/sourcerer/use_signal_helpers'; +import { useSourcererDataView } from '../../../sourcerer/containers'; +import { useSignalHelpers } from '../../../sourcerer/containers/use_signal_helpers'; -import { SourcererScopeName } from '../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; import { NeedAdminForUpdateRulesCallOut } from '../../components/callouts/need_admin_for_update_callout'; import { MissingPrivilegesCallOut } from '../../components/callouts/missing_privileges_callout'; import { useKibana } from '../../../common/lib/kibana'; diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/hooks/use_risk_input_actions.ts b/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/hooks/use_risk_input_actions.ts index 926db73720aae..b12f82128c824 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/hooks/use_risk_input_actions.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/hooks/use_risk_input_actions.ts @@ -13,7 +13,7 @@ import type { CaseAttachmentsWithoutOwner } from '@kbn/cases-plugin/public'; import { ALERT_RULE_NAME, ALERT_RULE_UUID } from '@kbn/rule-data-utils'; import { useGlobalTime } from '../../../../common/containers/use_global_time'; -import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../../sourcerer/store/model'; import { useAddBulkToTimelineAction } from '../../../../detections/components/alerts_table/timeline_actions/use_add_bulk_to_timeline'; import { useKibana } from '../../../../common/lib/kibana/kibana_react'; import type { InputAlert } from '../../../hooks/use_risk_contributing_alerts'; diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_preview_section.tsx b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_preview_section.tsx index f85bd860a7a53..91383fcdfd658 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_preview_section.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_preview_section.tsx @@ -34,8 +34,8 @@ import { RiskScorePreviewTable } from './risk_score_preview_table'; import * as i18n from '../translations'; import { useRiskScorePreview } from '../api/hooks/use_preview_risk_scores'; import { useKibana } from '../../common/lib/kibana'; -import { SourcererScopeName } from '../../common/store/sourcerer/model'; -import { useSourcererDataView } from '../../common/containers/sourcerer'; +import { SourcererScopeName } from '../../sourcerer/store/model'; +import { useSourcererDataView } from '../../sourcerer/containers'; import { useAppToasts } from '../../common/hooks/use_app_toasts'; import type { RiskEngineMissingPrivilegesResponse } from '../hooks/use_missing_risk_engine_privileges'; import { userHasRiskEngineReadPermissions } from '../common'; diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/top_risk_score_contributors_alerts/index.tsx b/x-pack/plugins/security_solution/public/entity_analytics/components/top_risk_score_contributors_alerts/index.tsx index eac4de0fecf1c..e7c20fa2f1847 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/top_risk_score_contributors_alerts/index.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/top_risk_score_contributors_alerts/index.tsx @@ -23,8 +23,8 @@ import { useGlobalTime } from '../../../common/containers/use_global_time'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; import { inputsSelectors } from '../../../common/store/inputs'; import { useUserData } from '../../../detections/components/user_info'; -import { useSourcererDataView } from '../../../common/containers/sourcerer'; -import { SourcererScopeName } from '../../../common/store/sourcerer/model'; +import { useSourcererDataView } from '../../../sourcerer/containers'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; import { RiskInformationButtonEmpty } from '../risk_information'; export interface TopRiskScoreContributorsAlertsProps { diff --git a/x-pack/plugins/security_solution/public/entity_analytics/lens_attributes/risk_score_donut.test.ts b/x-pack/plugins/security_solution/public/entity_analytics/lens_attributes/risk_score_donut.test.ts index 00b91ceb44e2b..8564ce6e63d31 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/lens_attributes/risk_score_donut.test.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/lens_attributes/risk_score_donut.test.ts @@ -11,7 +11,7 @@ import { useLensAttributes } from '../../common/components/visualization_actions import { getRiskScoreDonutAttributes } from './risk_score_donut'; -jest.mock('../../common/containers/sourcerer', () => ({ +jest.mock('../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['auditbeat-mytest-*'], dataViewId: 'security-solution-my-test', diff --git a/x-pack/plugins/security_solution/public/entity_analytics/lens_attributes/risk_score_over_time_area.test.ts b/x-pack/plugins/security_solution/public/entity_analytics/lens_attributes/risk_score_over_time_area.test.ts index 5a642e804befd..aa2a2cd77ef4b 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/lens_attributes/risk_score_over_time_area.test.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/lens_attributes/risk_score_over_time_area.test.ts @@ -12,7 +12,7 @@ import { getRiskScoreOverTimeAreaAttributes } from './risk_score_over_time_area' import { useLensAttributes } from '../../common/components/visualization_actions/use_lens_attributes'; import { wrapper } from '../../common/components/visualization_actions/mocks'; -jest.mock('../../common/containers/sourcerer', () => ({ +jest.mock('../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['auditbeat-mytest-*'], dataViewId: 'security-solution-my-test', diff --git a/x-pack/plugins/security_solution/public/entity_analytics/lens_attributes/risk_score_summary.test.ts b/x-pack/plugins/security_solution/public/entity_analytics/lens_attributes/risk_score_summary.test.ts index 47f5ef4c2275a..af5564e576de8 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/lens_attributes/risk_score_summary.test.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/lens_attributes/risk_score_summary.test.ts @@ -13,7 +13,7 @@ import type { MetricVisualizationState } from '@kbn/lens-plugin/public'; import { wrapper } from '../../common/components/visualization_actions/mocks'; import { useLensAttributes } from '../../common/components/visualization_actions/use_lens_attributes'; -jest.mock('../../common/containers/sourcerer', () => ({ +jest.mock('../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['auditbeat-mytest-*'], dataViewId: 'security-solution-my-test', diff --git a/x-pack/plugins/security_solution/public/entity_analytics/pages/entity_analytics_dashboard.tsx b/x-pack/plugins/security_solution/public/entity_analytics/pages/entity_analytics_dashboard.tsx index 041d87b5f0e54..b15ceae25c8b9 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/pages/entity_analytics_dashboard.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/pages/entity_analytics_dashboard.tsx @@ -11,7 +11,7 @@ import { RiskScoreEntity } from '../../../common/search_strategy'; import { ENTITY_ANALYTICS } from '../../app/translations'; import { SpyRoute } from '../../common/utils/route/spy_routes'; import { SecurityPageName } from '../../app/types'; -import { useSourcererDataView } from '../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../sourcerer/containers'; import { SecuritySolutionPageWrapper } from '../../common/components/page_wrapper'; import { HeaderPage } from '../../common/components/header_page'; import { EmptyPrompt } from '../../common/components/empty_prompt'; diff --git a/x-pack/plugins/security_solution/public/explore/hosts/pages/details/index.tsx b/x-pack/plugins/security_solution/public/explore/hosts/pages/details/index.tsx index c5a0e84e67097..2a6e51d5839a8 100644 --- a/x-pack/plugins/security_solution/public/explore/hosts/pages/details/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/pages/details/index.tsx @@ -73,7 +73,7 @@ import { import { ID, useHostDetails } from '../../containers/hosts/details'; import { manageQuery } from '../../../../common/components/page/manage_query'; import { useInvalidFilterQuery } from '../../../../common/hooks/use_invalid_filter_query'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; import { EmptyPrompt } from '../../../../common/components/empty_prompt'; import { AlertCountByRuleByStatus } from '../../../../common/components/alert_count_by_status'; import { useLicense } from '../../../../common/hooks/use_license'; diff --git a/x-pack/plugins/security_solution/public/explore/hosts/pages/hosts.test.tsx b/x-pack/plugins/security_solution/public/explore/hosts/pages/hosts.test.tsx index 2fff742738bb8..6d0b162688b62 100644 --- a/x-pack/plugins/security_solution/public/explore/hosts/pages/hosts.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/pages/hosts.test.tsx @@ -15,11 +15,11 @@ import { TabNavigation } from '../../../common/components/navigation/tab_navigat import { inputsActions } from '../../../common/store/inputs'; import { Hosts } from './hosts'; import { HostsTabs } from './hosts_tabs'; -import { useSourcererDataView } from '../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../sourcerer/containers'; import { mockCasesContract } from '@kbn/cases-plugin/public/mocks'; import { InputsModelId } from '../../../common/store/inputs/constants'; -jest.mock('../../../common/containers/sourcerer'); +jest.mock('../../../sourcerer/containers'); jest.mock('../../../common/components/empty_prompt'); // Test will fail because we will to need to mock some core services to make the test work // For now let's forget about SiemSearchBar and QueryBar diff --git a/x-pack/plugins/security_solution/public/explore/hosts/pages/hosts.tsx b/x-pack/plugins/security_solution/public/explore/hosts/pages/hosts.tsx index 450f2532d3244..17d5bdd3a82f2 100644 --- a/x-pack/plugins/security_solution/public/explore/hosts/pages/hosts.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/pages/hosts.tsx @@ -46,7 +46,7 @@ import { resetKeyboardFocus, showGlobalFilters, } from '../../../timelines/components/timeline/helpers'; -import { useSourcererDataView } from '../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../sourcerer/containers'; import { useDeepEqualSelector, useShallowEqualSelector } from '../../../common/hooks/use_selector'; import { useInvalidFilterQuery } from '../../../common/hooks/use_invalid_filter_query'; import { ID } from '../containers/hosts'; diff --git a/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map.test.tsx index 2e1c7b7d98692..574457d04f530 100644 --- a/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map.test.tsx @@ -16,7 +16,7 @@ import { useIsFieldInIndexPattern } from '../../../containers/fields'; import { setStubKibanaServices } from '@kbn/embeddable-plugin/public/mocks'; jest.mock('./map_config'); -jest.mock('../../../../common/containers/sourcerer'); +jest.mock('../../../../sourcerer/containers'); jest.mock('../../../containers/fields'); jest.mock('./index_patterns_missing_prompt', () => ({ IndexPatternsMissingPrompt: jest.fn(() =>
), diff --git a/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map.tsx b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map.tsx index bec177cc5c261..3f3a5431c2c1d 100644 --- a/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map.tsx @@ -26,10 +26,10 @@ import { MapToolTip } from './map_tool_tip/map_tool_tip'; import * as i18n from './translations'; import { useKibana } from '../../../../common/lib/kibana'; import { getLayerList } from './map_config'; -import { sourcererSelectors } from '../../../../common/store/sourcerer'; +import { sourcererSelectors } from '../../../../sourcerer/store'; import type { State } from '../../../../common/store'; -import type { SourcererDataView } from '../../../../common/store/sourcerer/model'; -import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; +import type { SourcererDataView } from '../../../../sourcerer/store/model'; +import { SourcererScopeName } from '../../../../sourcerer/store/model'; export const NETWORK_MAP_VISIBLE = 'network_map_visbile'; diff --git a/x-pack/plugins/security_solution/public/explore/network/pages/details/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/pages/details/index.test.tsx index 3f3273b0f99ef..57cbbb4bc65e6 100644 --- a/x-pack/plugins/security_solution/public/explore/network/pages/details/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/pages/details/index.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { Router, useParams } from 'react-router-dom'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; import { TestProviders } from '../../../../common/mock'; import { useMountAppended } from '../../../../common/utils/use_mount_appended'; import { NetworkDetails } from '.'; @@ -54,7 +54,7 @@ jest.mock('react-router-dom', () => { jest.mock('../../containers/details', () => ({ useNetworkDetails: jest.fn().mockReturnValue([true, { networkDetails: {} }]), })); -jest.mock('../../../../common/containers/sourcerer'); +jest.mock('../../../../sourcerer/containers'); jest.mock('../../../../common/containers/use_global_time', () => ({ useGlobalTime: jest.fn().mockReturnValue({ from: '2020-07-07T08:20:18.966Z', diff --git a/x-pack/plugins/security_solution/public/explore/network/pages/details/index.tsx b/x-pack/plugins/security_solution/public/explore/network/pages/details/index.tsx index f7e30dd47bf93..c2f0340382714 100644 --- a/x-pack/plugins/security_solution/public/explore/network/pages/details/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/pages/details/index.tsx @@ -40,7 +40,7 @@ import { setNetworkDetailsTablesActivePageToZero } from '../../store/actions'; import { SpyRoute } from '../../../../common/utils/route/spy_routes'; import { networkModel } from '../../store'; import { SecurityPageName } from '../../../../app/types'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; import { useInvalidFilterQuery } from '../../../../common/hooks/use_invalid_filter_query'; import { EmptyPrompt } from '../../../../common/components/empty_prompt'; import { TabNavigation } from '../../../../common/components/navigation/tab_navigation'; diff --git a/x-pack/plugins/security_solution/public/explore/network/pages/network.test.tsx b/x-pack/plugins/security_solution/public/explore/network/pages/network.test.tsx index 724e0b86e5760..e868a38266f80 100644 --- a/x-pack/plugins/security_solution/public/explore/network/pages/network.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/pages/network.test.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { Router } from '@kbn/shared-ux-router'; import { waitFor } from '@testing-library/react'; import type { Filter } from '@kbn/es-query'; -import { useSourcererDataView } from '../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../sourcerer/containers'; import { TestProviders, createMockStore } from '../../../common/mock'; import { inputsActions } from '../../../common/store/inputs'; @@ -21,7 +21,7 @@ import { mockCasesContract } from '@kbn/cases-plugin/public/mocks'; import { InputsModelId } from '../../../common/store/inputs/constants'; jest.mock('../../../common/components/empty_prompt'); -jest.mock('../../../common/containers/sourcerer'); +jest.mock('../../../sourcerer/containers'); // Test will fail because we will to need to mock some core services to make the test work // For now let's forget about SiemSearchBar and QueryBar diff --git a/x-pack/plugins/security_solution/public/explore/network/pages/network.tsx b/x-pack/plugins/security_solution/public/explore/network/pages/network.tsx index 5cb2d55f4d796..00a88da0cfcf5 100644 --- a/x-pack/plugins/security_solution/public/explore/network/pages/network.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/pages/network.tsx @@ -43,7 +43,7 @@ import { resetKeyboardFocus, showGlobalFilters, } from '../../../timelines/components/timeline/helpers'; -import { useSourcererDataView } from '../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../sourcerer/containers'; import { useDeepEqualSelector, useShallowEqualSelector } from '../../../common/hooks/use_selector'; import { useInvalidFilterQuery } from '../../../common/hooks/use_invalid_filter_query'; import { sourceOrDestinationIpExistsFilter } from '../../../common/components/visualization_actions/utils'; diff --git a/x-pack/plugins/security_solution/public/explore/users/pages/details/index.tsx b/x-pack/plugins/security_solution/public/explore/users/pages/details/index.tsx index 87af28648bdd8..0ff2797621615 100644 --- a/x-pack/plugins/security_solution/public/explore/users/pages/details/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/pages/details/index.tsx @@ -54,7 +54,7 @@ import { getUsersDetailsPageFilters } from './helpers'; import { showGlobalFilters } from '../../../../timelines/components/timeline/helpers'; import { useGlobalFullScreen } from '../../../../common/containers/use_full_screen'; import { timelineDefaults } from '../../../../timelines/store/defaults'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; import { useDeepEqualSelector, useShallowEqualSelector, diff --git a/x-pack/plugins/security_solution/public/explore/users/pages/users.tsx b/x-pack/plugins/security_solution/public/explore/users/pages/users.tsx index 7f5167c29d91a..61cd8888bfb4c 100644 --- a/x-pack/plugins/security_solution/public/explore/users/pages/users.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/pages/users.tsx @@ -38,7 +38,7 @@ import { onTimelineTabKeyPressed, resetKeyboardFocus, } from '../../../timelines/components/timeline/helpers'; -import { useSourcererDataView } from '../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../sourcerer/containers'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; import { useInvalidFilterQuery } from '../../../common/hooks/use_invalid_filter_query'; import { UsersKpiComponent } from '../components/kpi_users'; diff --git a/x-pack/plugins/security_solution/public/explore/users/pages/users_tabs.test.tsx b/x-pack/plugins/security_solution/public/explore/users/pages/users_tabs.test.tsx index 2a8f80ed860a4..a2f47b4a4dc77 100644 --- a/x-pack/plugins/security_solution/public/explore/users/pages/users_tabs.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/pages/users_tabs.test.tsx @@ -12,11 +12,11 @@ import { Router } from '@kbn/shared-ux-router'; import { TestProviders } from '../../../common/mock'; import { TabNavigation } from '../../../common/components/navigation/tab_navigation'; import { Users } from './users'; -import { useSourcererDataView } from '../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../sourcerer/containers'; import { mockCasesContext } from '@kbn/cases-plugin/public/mocks/mock_cases_context'; jest.mock('../../../common/components/empty_prompt'); -jest.mock('../../../common/containers/sourcerer'); +jest.mock('../../../sourcerer/containers'); jest.mock('../../../common/components/search_bar', () => ({ SiemSearchBar: () => null, })); diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/entities_details.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/entities_details.test.tsx index b6aacd491a055..7f8d428ece2ea 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/entities_details.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/entities_details.test.tsx @@ -64,7 +64,7 @@ jest.mock('../../../../helper_hooks', () => ({ useHasSecurityCapability: () => mockUseHasSecurityCapability(), })); -jest.mock('../../../../common/containers/sourcerer', () => ({ +jest.mock('../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['index'] }), })); diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/host_details.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/host_details.test.tsx index 4efc33e4a1ecb..e0b6bedea0047 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/host_details.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/host_details.test.tsx @@ -63,7 +63,7 @@ jest.mock('../../../../helper_hooks', () => ({ useHasSecurityCapability: () => mockUseHasSecurityCapability(), })); -jest.mock('../../../../common/containers/sourcerer', () => ({ +jest.mock('../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['index'] }), })); diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/host_details.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/host_details.tsx index 0ab96ccb7d7ac..50523e006dc53 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/host_details.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/host_details.tsx @@ -34,7 +34,7 @@ import { DefaultFieldRenderer } from '../../../../timelines/components/field_ren import { InputsModelId } from '../../../../common/store/inputs/constants'; import { CellActions } from './cell_actions'; import { useGlobalTime } from '../../../../common/containers/use_global_time'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; import { manageQuery } from '../../../../common/components/page/manage_query'; import { scoreIntervalToDateTime } from '../../../../common/components/ml/score/score_interval_to_datetime'; import { setAbsoluteRangeDatePicker } from '../../../../common/store/inputs/actions'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/user_details.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/user_details.test.tsx index b8510c30c3299..35853d8e4d97a 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/user_details.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/user_details.test.tsx @@ -58,7 +58,7 @@ jest.mock('uuid', () => ({ jest.mock('../../../../common/components/ml/hooks/use_ml_capabilities'); const mockUseMlUserPermissions = useMlCapabilities as jest.Mock; -jest.mock('../../../../common/containers/sourcerer', () => ({ +jest.mock('../../../../sourcerer/containers', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ selectedPatterns: ['index'] }), })); diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/user_details.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/user_details.tsx index 557337afccb4a..14b92678f9fe2 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/user_details.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/user_details.tsx @@ -34,7 +34,7 @@ import { DefaultFieldRenderer } from '../../../../timelines/components/field_ren import { CellActions } from './cell_actions'; import { InputsModelId } from '../../../../common/store/inputs/constants'; import { useGlobalTime } from '../../../../common/containers/use_global_time'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; import { scoreIntervalToDateTime } from '../../../../common/components/ml/score/score_interval_to_datetime'; import { setAbsoluteRangeDatePicker } from '../../../../common/store/inputs/actions'; import { hostToCriteria } from '../../../../common/components/ml/criteria/host_to_criteria'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/hooks/use_threat_intelligence_details.test.ts b/x-pack/plugins/security_solution/public/flyout/document_details/left/hooks/use_threat_intelligence_details.test.ts index 33def43adb2dd..f8a34e374a938 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/left/hooks/use_threat_intelligence_details.test.ts +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/hooks/use_threat_intelligence_details.test.ts @@ -9,7 +9,7 @@ import { useThreatIntelligenceDetails } from './use_threat_intelligence_details' import { renderHook } from '@testing-library/react-hooks'; import { useTimelineEventsDetails } from '../../../../timelines/containers/details'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; import { useRouteSpy } from '../../../../common/utils/route/use_route_spy'; import { useLeftPanelContext } from '../context'; import { useInvestigationTimeEnrichment } from '../../../../common/containers/cti/event_enrichment'; @@ -22,7 +22,7 @@ import { import { mockContextValue } from '../mocks/mock_context'; jest.mock('../../../../timelines/containers/details'); -jest.mock('../../../../common/containers/sourcerer'); +jest.mock('../../../../sourcerer/containers'); jest.mock('../../../../common/utils/route/use_route_spy'); jest.mock('../context'); jest.mock('../../../../common/containers/cti/event_enrichment'); diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/hooks/use_threat_intelligence_details.ts b/x-pack/plugins/security_solution/public/flyout/document_details/left/hooks/use_threat_intelligence_details.ts index 2256f3756f920..f8d6ee67edbc9 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/left/hooks/use_threat_intelligence_details.ts +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/hooks/use_threat_intelligence_details.ts @@ -16,11 +16,11 @@ import { timelineDataToEnrichment, } from '../../../../common/components/event_details/cti_details/helpers'; import { SecurityPageName } from '../../../../../common/constants'; -import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../../sourcerer/store/model'; import { useInvestigationTimeEnrichment } from '../../../../common/containers/cti/event_enrichment'; import { useTimelineEventsDetails } from '../../../../timelines/containers/details'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; import { useRouteSpy } from '../../../../common/utils/route/use_route_spy'; import { useLeftPanelContext } from '../context'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/entities_overview.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/entities_overview.test.tsx index 6388d5f8fb85d..e27470debe535 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/entities_overview.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/entities_overview.test.tsx @@ -39,7 +39,7 @@ jest.mock('../../../../common/containers/use_global_time', () => { }); const mockUseSourcererDataView = jest.fn().mockReturnValue({ selectedPatterns }); -jest.mock('../../../../common/containers/sourcerer', () => { +jest.mock('../../../../sourcerer/containers', () => { return { useSourcererDataView: (...props: unknown[]) => mockUseSourcererDataView(...props), }; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/host_entity_overview.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/host_entity_overview.test.tsx index 40008e52b820d..3e74b94b1efa9 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/host_entity_overview.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/host_entity_overview.test.tsx @@ -58,7 +58,7 @@ jest.mock('../../../../common/containers/use_global_time', () => { }); const mockUseSourcererDataView = jest.fn().mockReturnValue({ selectedPatterns }); -jest.mock('../../../../common/containers/sourcerer', () => { +jest.mock('../../../../sourcerer/containers', () => { return { useSourcererDataView: (...props: unknown[]) => mockUseSourcererDataView(...props), }; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/host_entity_overview.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/host_entity_overview.tsx index 117206d0f63fe..b1316cb8fa434 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/host_entity_overview.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/host_entity_overview.tsx @@ -31,7 +31,7 @@ import { getEmptyTagValue } from '../../../../common/components/empty_value'; import { DescriptionListStyled } from '../../../../common/components/page'; import { OverviewDescriptionList } from '../../../../common/components/overview_description_list'; import { RiskScoreLevel } from '../../../../entity_analytics/components/severity/common'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; import { useGlobalTime } from '../../../../common/containers/use_global_time'; import { useHostDetails } from '../../../../explore/hosts/containers/hosts/details'; import { getField } from '../../shared/utils'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/insights_section.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/insights_section.test.tsx index ebba19bd2d648..d98dcb3c9edc7 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/insights_section.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/insights_section.test.tsx @@ -75,7 +75,7 @@ jest.mock('../../../../common/containers/use_global_time', () => { }); const mockUseSourcererDataView = jest.fn().mockReturnValue({ selectedPatterns }); -jest.mock('../../../../common/containers/sourcerer', () => { +jest.mock('../../../../sourcerer/containers', () => { return { useSourcererDataView: (...props: unknown[]) => mockUseSourcererDataView(...props), }; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/user_entity_overview.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/user_entity_overview.test.tsx index a57fad465feb9..23de6a14d7d5a 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/user_entity_overview.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/user_entity_overview.test.tsx @@ -58,7 +58,7 @@ jest.mock('../../../../common/containers/use_global_time', () => { }); const mockUseSourcererDataView = jest.fn().mockReturnValue({ selectedPatterns }); -jest.mock('../../../../common/containers/sourcerer', () => { +jest.mock('../../../../sourcerer/containers', () => { return { useSourcererDataView: (...props: unknown[]) => mockUseSourcererDataView(...props), }; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/user_entity_overview.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/user_entity_overview.tsx index ef9dbb588f2a6..49dfa9df1c0ba 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/user_entity_overview.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/user_entity_overview.tsx @@ -35,7 +35,7 @@ import { getEmptyTagValue } from '../../../../common/components/empty_value'; import { DescriptionListStyled } from '../../../../common/components/page'; import { OverviewDescriptionList } from '../../../../common/components/overview_description_list'; import { RiskScoreLevel } from '../../../../entity_analytics/components/severity/common'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; import { useGlobalTime } from '../../../../common/containers/use_global_time'; import { useRiskScore } from '../../../../entity_analytics/api/hooks/use_risk_score'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/shared/hooks/use_event_details.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/shared/hooks/use_event_details.test.tsx index 159f0ee6a3a0b..7eb2c76573a27 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/shared/hooks/use_event_details.test.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/shared/hooks/use_event_details.test.tsx @@ -11,13 +11,13 @@ import type { UseEventDetailsParams, UseEventDetailsResult } from './use_event_d import { useEventDetails } from './use_event_details'; import { useSpaceId } from '../../../../common/hooks/use_space_id'; import { useRouteSpy } from '../../../../common/utils/route/use_route_spy'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; import { useTimelineEventsDetails } from '../../../../timelines/containers/details'; import { useGetFieldsData } from '../../../../common/hooks/use_get_fields_data'; jest.mock('../../../../common/hooks/use_space_id'); jest.mock('../../../../common/utils/route/use_route_spy'); -jest.mock('../../../../common/containers/sourcerer'); +jest.mock('../../../../sourcerer/containers'); jest.mock('../../../../timelines/containers/details'); jest.mock('../../../../common/hooks/use_get_fields_data'); diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/shared/hooks/use_event_details.ts b/x-pack/plugins/security_solution/public/flyout/document_details/shared/hooks/use_event_details.ts index 8739308d2c3e5..a75453d4d2f4d 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/shared/hooks/use_event_details.ts +++ b/x-pack/plugins/security_solution/public/flyout/document_details/shared/hooks/use_event_details.ts @@ -13,8 +13,8 @@ import type { RunTimeMappings } from '../../../../../common/api/search_strategy' import { useSpaceId } from '../../../../common/hooks/use_space_id'; import { getAlertIndexAlias } from '../../../../timelines/components/side_panel/event_details/helpers'; import { useRouteSpy } from '../../../../common/utils/route/use_route_spy'; -import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { SourcererScopeName } from '../../../../sourcerer/store/model'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; import { useTimelineEventsDetails } from '../../../../timelines/containers/details'; import { useGetFieldsData } from '../../../../common/hooks/use_get_fields_data'; import type { SearchHit } from '../../../../../common/search_strategy'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/shared/hooks/use_fetch_prevalence.ts b/x-pack/plugins/security_solution/public/flyout/document_details/shared/hooks/use_fetch_prevalence.ts index 9f3f1995d936e..afe08d1339827 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/shared/hooks/use_fetch_prevalence.ts +++ b/x-pack/plugins/security_solution/public/flyout/document_details/shared/hooks/use_fetch_prevalence.ts @@ -13,7 +13,7 @@ import { createFetchData } from '../utils/fetch_data'; import { useKibana } from '../../../../common/lib/kibana'; import { useTimelineDataFilters } from '../../../../timelines/containers/use_timeline_data_filters'; import { isActiveTimeline } from '../../../../helpers'; -import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../../sourcerer/store/model'; const QUERY_KEY = 'useFetchFieldValuePairWithAggregation'; diff --git a/x-pack/plugins/security_solution/public/flyout/entity_details/host_right/hooks/use_observed_host.ts b/x-pack/plugins/security_solution/public/flyout/entity_details/host_right/hooks/use_observed_host.ts index 79af9a2897df5..fb6c21b61f4c8 100644 --- a/x-pack/plugins/security_solution/public/flyout/entity_details/host_right/hooks/use_observed_host.ts +++ b/x-pack/plugins/security_solution/public/flyout/entity_details/host_right/hooks/use_observed_host.ts @@ -11,7 +11,7 @@ import { inputsSelectors } from '../../../../common/store'; import { useHostDetails } from '../../../../explore/hosts/containers/hosts/details'; import { useFirstLastSeen } from '../../../../common/containers/use_first_last_seen'; import { useGlobalTime } from '../../../../common/containers/use_global_time'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; import type { HostItem } from '../../../../../common/search_strategy'; import { Direction, NOT_EVENT_KIND_ASSET_FILTER } from '../../../../../common/search_strategy'; import { HOST_PANEL_OBSERVED_HOST_QUERY_ID, HOST_PANEL_RISK_SCORE_QUERY_ID } from '..'; diff --git a/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/hooks/use_observed_user.ts b/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/hooks/use_observed_user.ts index a72d0e236fe08..ec52e82c26e1a 100644 --- a/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/hooks/use_observed_user.ts +++ b/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/hooks/use_observed_user.ts @@ -13,7 +13,7 @@ import type { ObservedEntityData } from '../../shared/components/observed_entity import { useObservedUserDetails } from '../../../../explore/users/containers/users/observed_details'; import type { UserItem } from '../../../../../common/search_strategy'; import { Direction, NOT_EVENT_KIND_ASSET_FILTER } from '../../../../../common/search_strategy'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; import { useGlobalTime } from '../../../../common/containers/use_global_time'; import { useFirstLastSeen } from '../../../../common/containers/use_first_last_seen'; import { getSourcererScopeId, isActiveTimeline } from '../../../../helpers'; diff --git a/x-pack/plugins/security_solution/public/helpers.tsx b/x-pack/plugins/security_solution/public/helpers.tsx index 89b8cf9ed2b84..d8a20904f1b23 100644 --- a/x-pack/plugins/security_solution/public/helpers.tsx +++ b/x-pack/plugins/security_solution/public/helpers.tsx @@ -38,7 +38,7 @@ import type { InspectResponse, StartedSubPlugins, StartServices } from './types' import { CASES_SUB_PLUGIN_KEY } from './types'; import { timelineActions } from './timelines/store'; import { TimelineId } from '../common/types'; -import { SourcererScopeName } from './common/store/sourcerer/model'; +import { SourcererScopeName } from './sourcerer/store/model'; export const parseRoute = (location: Pick) => { if (!isEmpty(location.hash)) { diff --git a/x-pack/plugins/security_solution/public/kubernetes/pages/index.tsx b/x-pack/plugins/security_solution/public/kubernetes/pages/index.tsx index 7017c6821f763..c2d84e543dc0f 100644 --- a/x-pack/plugins/security_solution/public/kubernetes/pages/index.tsx +++ b/x-pack/plugins/security_solution/public/kubernetes/pages/index.tsx @@ -18,7 +18,7 @@ import { SiemSearchBar } from '../../common/components/search_bar'; import { showGlobalFilters } from '../../timelines/components/timeline/helpers'; import { inputsSelectors } from '../../common/store'; import { useGlobalFullScreen } from '../../common/containers/use_full_screen'; -import { useSourcererDataView } from '../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../sourcerer/containers'; import { useGlobalTime } from '../../common/containers/use_global_time'; import { useDeepEqualSelector } from '../../common/hooks/use_selector'; import { convertToBuildEsQuery } from '../../common/lib/kuery'; diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/alerts_by_status.tsx b/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/alerts_by_status.tsx index 66f1bb4971460..3e61627e2cb74 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/alerts_by_status.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/alerts_by_status.tsx @@ -61,7 +61,7 @@ import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_ex import { useGlobalTime } from '../../../../common/containers/use_global_time'; import { useAlertsByStatusVisualizationData } from './use_alerts_by_status_visualization_data'; import { DETECTION_RESPONSE_ALERTS_BY_STATUS_ID } from './types'; -import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../../sourcerer/store/model'; import { VisualizationEmbeddable } from '../../../../common/components/visualization_actions/visualization_embeddable'; import type { Status } from '../../../../../common/api/detection_engine'; import { getAlertsByStatusAttributes } from '../../../../common/components/visualization_actions/lens_attributes/common/alerts/alerts_by_status_donut'; diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/hooks/use_navigate_to_timeline.tsx b/x-pack/plugins/security_solution/public/overview/components/detection_response/hooks/use_navigate_to_timeline.tsx index f681c0a276e37..b5b6503262217 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/hooks/use_navigate_to_timeline.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/hooks/use_navigate_to_timeline.tsx @@ -8,8 +8,8 @@ import { useCallback } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { v4 as uuidv4 } from 'uuid'; -import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; -import { sourcererActions } from '../../../../common/store/sourcerer'; +import { SourcererScopeName } from '../../../../sourcerer/store/model'; +import { sourcererActions } from '../../../../sourcerer/store'; import { getDataProvider, getDataProviderAnd, diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/host_alerts_table/host_alerts_table.tsx b/x-pack/plugins/security_solution/public/overview/components/detection_response/host_alerts_table/host_alerts_table.tsx index ba0af845d2d6c..3d4070d4cd8e3 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/host_alerts_table/host_alerts_table.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/host_alerts_table/host_alerts_table.tsx @@ -39,7 +39,7 @@ import { SecurityCellActionsTrigger, } from '../../../../common/components/cell_actions'; import { useGlobalFilterQuery } from '../../../../common/hooks/use_global_filter_query'; -import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../../sourcerer/store/model'; interface HostAlertsTableProps { signalIndexName: string | null; diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/rule_alerts_table/rule_alerts_table.tsx b/x-pack/plugins/security_solution/public/overview/components/detection_response/rule_alerts_table/rule_alerts_table.tsx index fc92df5eb14b4..6c88a6e903ed7 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/rule_alerts_table/rule_alerts_table.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/rule_alerts_table/rule_alerts_table.tsx @@ -39,7 +39,7 @@ import { LastUpdatedAt } from '../../../../common/components/last_updated_at'; import { FormattedCount } from '../../../../common/components/formatted_number'; import { SecurityCellActions, CellActionsMode } from '../../../../common/components/cell_actions'; import { useGlobalFilterQuery } from '../../../../common/hooks/use_global_filter_query'; -import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../../sourcerer/store/model'; export interface RuleAlertsTableProps { signalIndexName: string | null; diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/user_alerts_table/user_alerts_table.tsx b/x-pack/plugins/security_solution/public/overview/components/detection_response/user_alerts_table/user_alerts_table.tsx index bfa86d3ac2e40..d2ec3efe63aa5 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/user_alerts_table/user_alerts_table.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/user_alerts_table/user_alerts_table.tsx @@ -35,7 +35,7 @@ import type { UserAlertsItem } from './use_user_alerts_items'; import { useUserAlertsItems } from './use_user_alerts_items'; import { SecurityCellActions, CellActionsMode } from '../../../../common/components/cell_actions'; import { useGlobalFilterQuery } from '../../../../common/hooks/use_global_filter_query'; -import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../../sourcerer/store/model'; interface UserAlertsTableProps { signalIndexName: string | null; diff --git a/x-pack/plugins/security_solution/public/overview/components/events_by_dataset/index.tsx b/x-pack/plugins/security_solution/public/overview/components/events_by_dataset/index.tsx index 006ba6e4a476a..4cad19444c5e7 100644 --- a/x-pack/plugins/security_solution/public/overview/components/events_by_dataset/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/events_by_dataset/index.tsx @@ -34,7 +34,7 @@ import * as i18n from '../../pages/translations'; import { SecurityPageName } from '../../../app/types'; import { useFormatUrl } from '../../../common/components/link_to'; import { useInvalidFilterQuery } from '../../../common/hooks/use_invalid_filter_query'; -import type { SourcererScopeName } from '../../../common/store/sourcerer/model'; +import type { SourcererScopeName } from '../../../sourcerer/store/model'; const DEFAULT_STACK_BY = 'event.dataset'; diff --git a/x-pack/plugins/security_solution/public/overview/pages/data_quality.test.tsx b/x-pack/plugins/security_solution/public/overview/pages/data_quality.test.tsx index 23e44e8f651fe..16e610aa3f625 100644 --- a/x-pack/plugins/security_solution/public/overview/pages/data_quality.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/pages/data_quality.test.tsx @@ -42,7 +42,7 @@ const defaultUseSourcererReturn = { selectedPatterns: ['auditbeat-*', 'logs-*', 'packetbeat-*'], }; const mockUseSourcererDataView = jest.fn(() => defaultUseSourcererReturn); -jest.mock('../../common/containers/sourcerer', () => ({ +jest.mock('../../sourcerer/containers', () => ({ useSourcererDataView: () => mockUseSourcererDataView(), })); diff --git a/x-pack/plugins/security_solution/public/overview/pages/data_quality.tsx b/x-pack/plugins/security_solution/public/overview/pages/data_quality.tsx index 587cf9377c5f0..f12846ef3b987 100644 --- a/x-pack/plugins/security_solution/public/overview/pages/data_quality.tsx +++ b/x-pack/plugins/security_solution/public/overview/pages/data_quality.tsx @@ -39,7 +39,7 @@ import { EmptyPrompt } from '../../common/components/empty_prompt'; import { useLocalStorage } from '../../common/components/local_storage'; import { SecuritySolutionPageWrapper } from '../../common/components/page_wrapper'; import { APP_ID, DEFAULT_BYTES_FORMAT, DEFAULT_NUMBER_FORMAT } from '../../../common/constants'; -import { useSourcererDataView } from '../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../sourcerer/containers'; import { KibanaServices, useKibana, useToasts, useUiSetting$ } from '../../common/lib/kibana'; import { SpyRoute } from '../../common/utils/route/spy_routes'; import { useSignalIndex } from '../../detections/containers/detection_engine/alerts/use_signal_index'; diff --git a/x-pack/plugins/security_solution/public/overview/pages/detection_response.test.tsx b/x-pack/plugins/security_solution/public/overview/pages/detection_response.test.tsx index 352a8aa3744d8..62ffc16cb4796 100644 --- a/x-pack/plugins/security_solution/public/overview/pages/detection_response.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/pages/detection_response.test.tsx @@ -53,7 +53,7 @@ const defaultUseSourcererReturn = { indexPattern: '', }; const mockUseSourcererDataView = jest.fn(() => defaultUseSourcererReturn); -jest.mock('../../common/containers/sourcerer', () => ({ +jest.mock('../../sourcerer/containers', () => ({ useSourcererDataView: () => mockUseSourcererDataView(), })); diff --git a/x-pack/plugins/security_solution/public/overview/pages/detection_response.tsx b/x-pack/plugins/security_solution/public/overview/pages/detection_response.tsx index 3da5612254215..e76f6ab00fae8 100644 --- a/x-pack/plugins/security_solution/public/overview/pages/detection_response.tsx +++ b/x-pack/plugins/security_solution/public/overview/pages/detection_response.tsx @@ -15,7 +15,7 @@ import { SiemSearchBar } from '../../common/components/search_bar'; import { SecuritySolutionPageWrapper } from '../../common/components/page_wrapper'; import { SpyRoute } from '../../common/utils/route/spy_routes'; import { SecurityPageName } from '../../app/types'; -import { useSourcererDataView } from '../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../sourcerer/containers'; import { useSignalIndex } from '../../detections/containers/detection_engine/alerts/use_signal_index'; import { useAlertsPrivileges } from '../../detections/containers/detection_engine/alerts/use_alerts_privileges'; import { HeaderPage } from '../../common/components/header_page'; diff --git a/x-pack/plugins/security_solution/public/overview/pages/overview.test.tsx b/x-pack/plugins/security_solution/public/overview/pages/overview.test.tsx index 4f458c43bd6e8..d998aed2de955 100644 --- a/x-pack/plugins/security_solution/public/overview/pages/overview.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/pages/overview.test.tsx @@ -15,7 +15,7 @@ import type { UseMessagesStorage } from '../../common/containers/local_storage/u import { useMessagesStorage } from '../../common/containers/local_storage/use_messages_storage'; import { Overview } from '.'; import { useUserPrivileges } from '../../common/components/user_privileges'; -import { useSourcererDataView } from '../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../sourcerer/containers'; import { useFetchIndex } from '../../common/containers/source'; import { useAllTiDataSources } from '../containers/overview_cti_links/use_all_ti_data_sources'; import { mockCtiLinksResponse, mockTiDataSources } from '../components/overview_cti_links/mock'; @@ -48,7 +48,7 @@ jest.mock('../../common/lib/kibana', () => { }; }); jest.mock('../../common/containers/source'); -jest.mock('../../common/containers/sourcerer'); +jest.mock('../../sourcerer/containers'); jest.mock('../../common/components/visualization_actions/lens_embeddable'); jest.mock('../../common/containers/use_global_time', () => ({ useGlobalTime: jest.fn().mockReturnValue({ diff --git a/x-pack/plugins/security_solution/public/overview/pages/overview.tsx b/x-pack/plugins/security_solution/public/overview/pages/overview.tsx index d4daf475fb660..0450b922acb44 100644 --- a/x-pack/plugins/security_solution/public/overview/pages/overview.tsx +++ b/x-pack/plugins/security_solution/public/overview/pages/overview.tsx @@ -32,7 +32,7 @@ import { SecurityPageName } from '../../app/types'; import { EndpointNotice } from '../components/endpoint_notice'; import { useMessagesStorage } from '../../common/containers/local_storage/use_messages_storage'; import { ENDPOINT_METADATA_INDEX } from '../../../common/constants'; -import { useSourcererDataView } from '../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../sourcerer/containers'; import { useDeepEqualSelector } from '../../common/hooks/use_selector'; import { ThreatIntelLinkPanel } from '../components/overview_cti_links'; import { useAllTiDataSources } from '../containers/overview_cti_links/use_all_ti_data_sources'; diff --git a/x-pack/plugins/security_solution/public/resolver/view/controls/sourcerer_selection.tsx b/x-pack/plugins/security_solution/public/resolver/view/controls/sourcerer_selection.tsx index ae6a7eb4cb62d..b490da02247d7 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/controls/sourcerer_selection.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/controls/sourcerer_selection.tsx @@ -9,8 +9,8 @@ import { i18n } from '@kbn/i18n'; import { EuiPopover } from '@elastic/eui'; import { StyledEuiButtonIcon } from './styles'; import { useColors } from '../use_colors'; -import { Sourcerer } from '../../../common/components/sourcerer'; -import { SourcererScopeName } from '../../../common/store/sourcerer/model'; +import { Sourcerer } from '../../../sourcerer/components'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; const nodeLegendButtonTitle = i18n.translate( 'xpack.securitySolution.resolver.graphControls.sourcererButtonTitle', diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/alerts_sourcerer.test.tsx b/x-pack/plugins/security_solution/public/sourcerer/components/alerts_sourcerer.test.tsx similarity index 87% rename from x-pack/plugins/security_solution/public/common/components/sourcerer/alerts_sourcerer.test.tsx rename to x-pack/plugins/security_solution/public/sourcerer/components/alerts_sourcerer.test.tsx index 223afb3918422..60bbe58824e41 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/alerts_sourcerer.test.tsx +++ b/x-pack/plugins/security_solution/public/sourcerer/components/alerts_sourcerer.test.tsx @@ -8,16 +8,16 @@ import React from 'react'; import { Sourcerer } from '.'; -import { sourcererModel } from '../../store/sourcerer'; -import { TestProviders } from '../../mock'; -import { useSourcererDataView } from '../../containers/sourcerer'; -import { useSignalHelpers } from '../../containers/sourcerer/use_signal_helpers'; +import { sourcererModel } from '../store'; +import { TestProviders } from '../../common/mock'; +import { useSourcererDataView } from '../containers'; +import { useSignalHelpers } from '../containers/use_signal_helpers'; import { fireEvent, render, screen, waitFor } from '@testing-library/react'; const mockDispatch = jest.fn(); -jest.mock('../../containers/sourcerer'); -jest.mock('../../containers/sourcerer/use_signal_helpers'); +jest.mock('../containers'); +jest.mock('../containers/use_signal_helpers'); const mockUseUpdateDataView = jest.fn().mockReturnValue(() => true); jest.mock('./use_update_data_view', () => ({ useUpdateDataView: () => mockUseUpdateDataView, @@ -41,8 +41,8 @@ jest.mock('@kbn/react-kibana-mount', () => { }); const mockUpdateUrlParam = jest.fn(); -jest.mock('../../utils/global_query_string', () => { - const original = jest.requireActual('../../utils/global_query_string'); +jest.mock('../../common/utils/global_query_string', () => { + const original = jest.requireActual('../../common/utils/global_query_string'); return { ...original, diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/helpers.tsx b/x-pack/plugins/security_solution/public/sourcerer/components/helpers.tsx similarity index 98% rename from x-pack/plugins/security_solution/public/common/components/sourcerer/helpers.tsx rename to x-pack/plugins/security_solution/public/sourcerer/components/helpers.tsx index 3556e32196573..2492b20ae7ade 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/helpers.tsx +++ b/x-pack/plugins/security_solution/public/sourcerer/components/helpers.tsx @@ -11,7 +11,7 @@ import { EuiIcon, EuiBadge, EuiButtonEmpty, EuiFormRow } from '@elastic/eui'; import styled, { css } from 'styled-components'; import { euiThemeVars } from '@kbn/ui-theme'; -import type { sourcererModel } from '../../store/sourcerer'; +import type { sourcererModel } from '../store'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/index.test.tsx b/x-pack/plugins/security_solution/public/sourcerer/components/index.test.tsx similarity index 96% rename from x-pack/plugins/security_solution/public/common/components/sourcerer/index.test.tsx rename to x-pack/plugins/security_solution/public/sourcerer/components/index.test.tsx index 3ed7c87590354..4b1977eaf689e 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/index.test.tsx +++ b/x-pack/plugins/security_solution/public/sourcerer/components/index.test.tsx @@ -9,21 +9,21 @@ import React from 'react'; import type { ReactWrapper } from 'enzyme'; import { mount } from 'enzyme'; -import { SourcererScopeName } from '../../store/sourcerer/model'; +import { SourcererScopeName } from '../store/model'; import { Sourcerer } from '.'; -import { sourcererActions, sourcererModel } from '../../store/sourcerer'; -import { createMockStore, mockGlobalState, TestProviders } from '../../mock'; +import { sourcererActions, sourcererModel } from '../store'; +import { createMockStore, mockGlobalState, TestProviders } from '../../common/mock'; import type { EuiSuperSelectOption } from '@elastic/eui/src/components/form/super_select/super_select_control'; import { fireEvent, waitFor, render } from '@testing-library/react'; -import { useSourcererDataView } from '../../containers/sourcerer'; -import { useSignalHelpers } from '../../containers/sourcerer/use_signal_helpers'; -import { DEFAULT_INDEX_PATTERN } from '../../../../common/constants'; -import { sortWithExcludesAtEnd } from '../../../../common/utils/sourcerer'; +import { useSourcererDataView } from '../containers'; +import { useSignalHelpers } from '../containers/use_signal_helpers'; +import { DEFAULT_INDEX_PATTERN } from '../../../common/constants'; +import { sortWithExcludesAtEnd } from '../../../common/utils/sourcerer'; const mockDispatch = jest.fn(); -jest.mock('../../containers/sourcerer'); -jest.mock('../../containers/sourcerer/use_signal_helpers'); +jest.mock('../containers'); +jest.mock('../containers/use_signal_helpers'); const mockUseUpdateDataView = jest.fn().mockReturnValue(() => true); jest.mock('./use_update_data_view', () => ({ useUpdateDataView: () => mockUseUpdateDataView, @@ -47,8 +47,8 @@ jest.mock('@kbn/react-kibana-mount', () => { }); const mockUpdateUrlParam = jest.fn(); -jest.mock('../../utils/global_query_string', () => { - const original = jest.requireActual('../../utils/global_query_string'); +jest.mock('../../common/utils/global_query_string', () => { + const original = jest.requireActual('../../common/utils/global_query_string'); return { ...original, diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/index.tsx b/x-pack/plugins/security_solution/public/sourcerer/components/index.tsx similarity index 96% rename from x-pack/plugins/security_solution/public/common/components/sourcerer/index.tsx rename to x-pack/plugins/security_solution/public/sourcerer/components/index.tsx index d42d8d9213ef7..3dcdf49391d3f 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/index.tsx +++ b/x-pack/plugins/security_solution/public/sourcerer/components/index.tsx @@ -18,22 +18,22 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import * as i18n from './translations'; -import type { sourcererModel } from '../../store/sourcerer'; -import { sourcererActions, sourcererSelectors } from '../../store/sourcerer'; -import type { SourcererUrlState } from '../../store/sourcerer/model'; -import type { State } from '../../store'; +import type { sourcererModel } from '../store'; +import { sourcererActions, sourcererSelectors } from '../store'; +import type { SourcererUrlState } from '../store/model'; +import type { State } from '../../common/store'; import type { ModifiedTypes } from './use_pick_index_patterns'; -import { SourcererScopeName } from '../../store/sourcerer/model'; +import { SourcererScopeName } from '../store/model'; import { usePickIndexPatterns } from './use_pick_index_patterns'; import { FormRow, PopoverContent, StyledButtonEmpty, StyledFormRow } from './helpers'; import { TemporarySourcerer } from './temporary'; -import { useSourcererDataView } from '../../containers/sourcerer'; +import { useSourcererDataView } from '../containers'; import { useUpdateDataView } from './use_update_data_view'; import { Trigger } from './trigger'; import { AlertsCheckbox, SaveButtons, SourcererCallout } from './sub_components'; -import { useSignalHelpers } from '../../containers/sourcerer/use_signal_helpers'; -import { useUpdateUrlParam } from '../../utils/global_query_string'; -import { URL_PARAM_KEY } from '../../hooks/use_url_state'; +import { useSignalHelpers } from '../containers/use_signal_helpers'; +import { useUpdateUrlParam } from '../../common/utils/global_query_string'; +import { URL_PARAM_KEY } from '../../common/hooks/use_url_state'; export interface SourcererComponentProps { scope: sourcererModel.SourcererScopeName; diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/misc.test.tsx b/x-pack/plugins/security_solution/public/sourcerer/components/misc.test.tsx similarity index 95% rename from x-pack/plugins/security_solution/public/common/components/sourcerer/misc.test.tsx rename to x-pack/plugins/security_solution/public/sourcerer/components/misc.test.tsx index b90627d1e8d68..4ad87e78f227b 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/misc.test.tsx +++ b/x-pack/plugins/security_solution/public/sourcerer/components/misc.test.tsx @@ -10,21 +10,21 @@ import type { ReactWrapper } from 'enzyme'; import { mount } from 'enzyme'; import { cloneDeep } from 'lodash'; -import { initialSourcererState, SourcererScopeName } from '../../store/sourcerer/model'; +import { initialSourcererState, SourcererScopeName } from '../store/model'; import { Sourcerer } from '.'; -import { sourcererActions, sourcererModel } from '../../store/sourcerer'; -import { createMockStore, mockGlobalState, TestProviders } from '../../mock'; -import { useSourcererDataView } from '../../containers/sourcerer'; -import { useSignalHelpers } from '../../containers/sourcerer/use_signal_helpers'; -import { TimelineId } from '../../../../common/types/timeline'; -import { TimelineType } from '../../../../common/api/timeline'; -import { sortWithExcludesAtEnd } from '../../../../common/utils/sourcerer'; +import { sourcererActions, sourcererModel } from '../store'; +import { createMockStore, mockGlobalState, TestProviders } from '../../common/mock'; +import { useSourcererDataView } from '../containers'; +import { useSignalHelpers } from '../containers/use_signal_helpers'; +import { TimelineId } from '../../../common/types/timeline'; +import { TimelineType } from '../../../common/api/timeline'; +import { sortWithExcludesAtEnd } from '../../../common/utils/sourcerer'; import { render, fireEvent, screen, waitFor } from '@testing-library/react'; const mockDispatch = jest.fn(); -jest.mock('../../containers/sourcerer'); -jest.mock('../../containers/sourcerer/use_signal_helpers'); +jest.mock('../containers'); +jest.mock('../containers/use_signal_helpers'); const mockUseUpdateDataView = jest.fn().mockReturnValue(() => true); jest.mock('./use_update_data_view', () => ({ useUpdateDataView: () => mockUseUpdateDataView, @@ -48,8 +48,8 @@ jest.mock('@kbn/react-kibana-mount', () => { }); const mockUpdateUrlParam = jest.fn(); -jest.mock('../../utils/global_query_string', () => { - const original = jest.requireActual('../../utils/global_query_string'); +jest.mock('../../common/utils/global_query_string', () => { + const original = jest.requireActual('../../common/utils/global_query_string'); return { ...original, diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/readme.md b/x-pack/plugins/security_solution/public/sourcerer/components/readme.md similarity index 96% rename from x-pack/plugins/security_solution/public/common/components/sourcerer/readme.md rename to x-pack/plugins/security_solution/public/sourcerer/components/readme.md index be91c3144c115..2844cbba2a048 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/readme.md +++ b/x-pack/plugins/security_solution/public/sourcerer/components/readme.md @@ -2,8 +2,8 @@ ### Adding sourcerer to a new page -- In order for the sourcerer to show up on a page, it needs to be added to the array `sourcererPaths` in `containers/sourcerer/index.tsx` -- The scope of a sourcerer component will be default unless the path is added to the `detectionsPaths` array, in which case the scope can be detections in `containers/sourcerer/index.tsx` +- In order for the sourcerer to show up on a page, it needs to be added to the array `sourcererPaths` in `../sourcerer/containers/index.tsx` +- The scope of a sourcerer component will be default unless the path is added to the `detectionsPaths` array, in which case the scope can be detections in `../sourcerer/containers/index.tsx` ## Default Sourcerer ![](../../images/default.png) diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/refresh_button.tsx b/x-pack/plugins/security_solution/public/sourcerer/components/refresh_button.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/sourcerer/refresh_button.tsx rename to x-pack/plugins/security_solution/public/sourcerer/components/refresh_button.tsx diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/sourcerer_integration.test.tsx b/x-pack/plugins/security_solution/public/sourcerer/components/sourcerer_integration.test.tsx similarity index 86% rename from x-pack/plugins/security_solution/public/common/components/sourcerer/sourcerer_integration.test.tsx rename to x-pack/plugins/security_solution/public/sourcerer/components/sourcerer_integration.test.tsx index 753b9324d38f0..de4bd8b639479 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/sourcerer_integration.test.tsx +++ b/x-pack/plugins/security_solution/public/sourcerer/components/sourcerer_integration.test.tsx @@ -9,18 +9,18 @@ import React from 'react'; import type { ReactWrapper } from 'enzyme'; import { mount } from 'enzyme'; -import { SourcererScopeName } from '../../store/sourcerer/model'; +import { SourcererScopeName } from '../store/model'; import { Sourcerer } from '.'; -import { useSignalHelpers } from '../../containers/sourcerer/use_signal_helpers'; -import { sourcererActions, sourcererModel } from '../../store/sourcerer'; -import { createMockStore, mockGlobalState, TestProviders } from '../../mock'; -import { sortWithExcludesAtEnd } from '../../../../common/utils/sourcerer'; -import { useSourcererDataView } from '../../containers/sourcerer'; +import { useSignalHelpers } from '../containers/use_signal_helpers'; +import { sourcererActions, sourcererModel } from '../store'; +import { createMockStore, mockGlobalState, TestProviders } from '../../common/mock'; +import { sortWithExcludesAtEnd } from '../../../common/utils/sourcerer'; +import { useSourcererDataView } from '../containers'; const mockDispatch = jest.fn(); -jest.mock('../../containers/sourcerer'); -jest.mock('../../containers/sourcerer/use_signal_helpers'); +jest.mock('../containers'); +jest.mock('../containers/use_signal_helpers'); const mockUseUpdateDataView = jest.fn().mockReturnValue(() => true); jest.mock('./use_update_data_view', () => ({ useUpdateDataView: () => mockUseUpdateDataView, @@ -44,8 +44,8 @@ jest.mock('@kbn/react-kibana-mount', () => { }); const mockUpdateUrlParam = jest.fn(); -jest.mock('../../utils/global_query_string', () => { - const original = jest.requireActual('../../utils/global_query_string'); +jest.mock('../../common/utils/global_query_string', () => { + const original = jest.requireActual('../../common/utils/global_query_string'); return { ...original, diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/sub_components.tsx b/x-pack/plugins/security_solution/public/sourcerer/components/sub_components.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/sourcerer/sub_components.tsx rename to x-pack/plugins/security_solution/public/sourcerer/components/sub_components.tsx diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/temporary.tsx b/x-pack/plugins/security_solution/public/sourcerer/components/temporary.tsx similarity index 95% rename from x-pack/plugins/security_solution/public/common/components/sourcerer/temporary.tsx rename to x-pack/plugins/security_solution/public/sourcerer/components/temporary.tsx index 63bdd45073200..4d8849f9b1b6c 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/temporary.tsx +++ b/x-pack/plugins/security_solution/public/sourcerer/components/temporary.tsx @@ -20,11 +20,11 @@ import React, { useMemo } from 'react'; import * as i18n from './translations'; import { Blockquote, ResetButton } from './helpers'; import { UpdateDefaultDataViewModal } from './update_default_data_view_modal'; -import { TimelineId } from '../../../../common/types'; -import { TimelineType } from '../../../../common/api/timeline'; -import { timelineSelectors } from '../../../timelines/store'; -import { useDeepEqualSelector } from '../../hooks/use_selector'; -import { timelineDefaults } from '../../../timelines/store/defaults'; +import { TimelineId } from '../../../common/types'; +import { TimelineType } from '../../../common/api/timeline'; +import { timelineSelectors } from '../../timelines/store'; +import { useDeepEqualSelector } from '../../common/hooks/use_selector'; +import { timelineDefaults } from '../../timelines/store/defaults'; import { BadCurrentPatternsMessage, CurrentPatternsMessage, diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/timeline_sourcerer.test.tsx b/x-pack/plugins/security_solution/public/sourcerer/components/timeline_sourcerer.test.tsx similarity index 89% rename from x-pack/plugins/security_solution/public/common/components/sourcerer/timeline_sourcerer.test.tsx rename to x-pack/plugins/security_solution/public/sourcerer/components/timeline_sourcerer.test.tsx index b89eae2be49eb..5da9a145af479 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/timeline_sourcerer.test.tsx +++ b/x-pack/plugins/security_solution/public/sourcerer/components/timeline_sourcerer.test.tsx @@ -8,17 +8,17 @@ import React from 'react'; import { render, cleanup, fireEvent, screen, waitFor } from '@testing-library/react'; -import { SourcererScopeName } from '../../store/sourcerer/model'; +import { SourcererScopeName } from '../store/model'; import { Sourcerer } from '.'; -import { sourcererModel } from '../../store/sourcerer'; -import { createMockStore, mockGlobalState, TestProviders } from '../../mock'; -import { useSourcererDataView } from '../../containers/sourcerer'; -import { useSignalHelpers } from '../../containers/sourcerer/use_signal_helpers'; +import { sourcererModel } from '../store'; +import { createMockStore, mockGlobalState, TestProviders } from '../../common/mock'; +import { useSourcererDataView } from '../containers'; +import { useSignalHelpers } from '../containers/use_signal_helpers'; const mockDispatch = jest.fn(); -jest.mock('../../containers/sourcerer'); -jest.mock('../../containers/sourcerer/use_signal_helpers'); +jest.mock('../containers'); +jest.mock('../containers/use_signal_helpers'); const mockUseUpdateDataView = jest.fn().mockReturnValue(() => true); jest.mock('./use_update_data_view', () => ({ useUpdateDataView: () => mockUseUpdateDataView, @@ -42,8 +42,8 @@ jest.mock('@kbn/react-kibana-mount', () => { }); const mockUpdateUrlParam = jest.fn(); -jest.mock('../../utils/global_query_string', () => { - const original = jest.requireActual('../../utils/global_query_string'); +jest.mock('../../common/utils/global_query_string', () => { + const original = jest.requireActual('../../common/utils/global_query_string'); return { ...original, diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/translations.ts b/x-pack/plugins/security_solution/public/sourcerer/components/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/sourcerer/translations.ts rename to x-pack/plugins/security_solution/public/sourcerer/components/translations.ts diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/trigger.tsx b/x-pack/plugins/security_solution/public/sourcerer/components/trigger.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/sourcerer/trigger.tsx rename to x-pack/plugins/security_solution/public/sourcerer/components/trigger.tsx diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/update_default_data_view_modal.tsx b/x-pack/plugins/security_solution/public/sourcerer/components/update_default_data_view_modal.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/sourcerer/update_default_data_view_modal.tsx rename to x-pack/plugins/security_solution/public/sourcerer/components/update_default_data_view_modal.tsx diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/use_get_sourcerer_data_view.test.ts b/x-pack/plugins/security_solution/public/sourcerer/components/use_get_sourcerer_data_view.test.ts similarity index 89% rename from x-pack/plugins/security_solution/public/common/components/sourcerer/use_get_sourcerer_data_view.test.ts rename to x-pack/plugins/security_solution/public/sourcerer/components/use_get_sourcerer_data_view.test.ts index eb7a6c34ce80d..18e34ba2067a1 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/use_get_sourcerer_data_view.test.ts +++ b/x-pack/plugins/security_solution/public/sourcerer/components/use_get_sourcerer_data_view.test.ts @@ -7,9 +7,9 @@ import { DataView } from '@kbn/data-views-plugin/common'; import { renderHook } from '@testing-library/react-hooks'; -import { useSourcererDataView } from '../../containers/sourcerer'; -import { mockSourcererScope } from '../../containers/sourcerer/mocks'; -import { SourcererScopeName } from '../../store/sourcerer/model'; +import { useSourcererDataView } from '../containers'; +import { mockSourcererScope } from '../containers/mocks'; +import { SourcererScopeName } from '../store/model'; import type { UseGetScopedSourcererDataViewArgs } from './use_get_sourcerer_data_view'; import { useGetScopedSourcererDataView } from './use_get_sourcerer_data_view'; @@ -24,7 +24,7 @@ const renderHookCustom = (args: UseGetScopedSourcererDataViewArgs) => { ); }; -jest.mock('../../containers/sourcerer'); +jest.mock('../containers'); const mockGetSourcererDataView = jest.fn(() => mockSourcererScope); diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/use_get_sourcerer_data_view.tsx b/x-pack/plugins/security_solution/public/sourcerer/components/use_get_sourcerer_data_view.tsx similarity index 85% rename from x-pack/plugins/security_solution/public/common/components/sourcerer/use_get_sourcerer_data_view.tsx rename to x-pack/plugins/security_solution/public/sourcerer/components/use_get_sourcerer_data_view.tsx index af49a784164cf..869b9d68e27ac 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/use_get_sourcerer_data_view.tsx +++ b/x-pack/plugins/security_solution/public/sourcerer/components/use_get_sourcerer_data_view.tsx @@ -7,9 +7,9 @@ import { useMemo } from 'react'; import { DataView } from '@kbn/data-views-plugin/public'; -import { useSourcererDataView } from '../../containers/sourcerer'; -import { useKibana } from '../../lib/kibana'; -import type { SourcererScopeName } from '../../store/sourcerer/model'; +import { useSourcererDataView } from '../containers'; +import { useKibana } from '../../common/lib/kibana'; +import type { SourcererScopeName } from '../store/model'; export interface UseGetScopedSourcererDataViewArgs { sourcererScope: SourcererScopeName; diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/use_pick_index_patterns.tsx b/x-pack/plugins/security_solution/public/sourcerer/components/use_pick_index_patterns.tsx similarity index 95% rename from x-pack/plugins/security_solution/public/common/components/sourcerer/use_pick_index_patterns.tsx rename to x-pack/plugins/security_solution/public/sourcerer/components/use_pick_index_patterns.tsx index 429b8919aa70a..e7126722e244e 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/use_pick_index_patterns.tsx +++ b/x-pack/plugins/security_solution/public/sourcerer/components/use_pick_index_patterns.tsx @@ -9,13 +9,13 @@ import React, { useCallback, useEffect, useMemo, useState, useRef } from 'react' import type { EuiComboBoxOptionOption, EuiSuperSelectOption } from '@elastic/eui'; import { useDispatch } from 'react-redux'; -import { getScopePatternListSelection } from '../../store/sourcerer/helpers'; -import { sourcererActions, sourcererModel } from '../../store/sourcerer'; +import { getScopePatternListSelection } from '../store/helpers'; +import { sourcererActions, sourcererModel } from '../store'; import { getDataViewSelectOptions, getPatternListWithoutSignals } from './helpers'; -import { SourcererScopeName } from '../../store/sourcerer/model'; -import { sortWithExcludesAtEnd } from '../../../../common/utils/sourcerer'; -import { useKibana } from '../../lib/kibana'; -import { getSourcererDataView } from '../../containers/sourcerer/get_sourcerer_data_view'; +import { SourcererScopeName } from '../store/model'; +import { sortWithExcludesAtEnd } from '../../../common/utils/sourcerer'; +import { useKibana } from '../../common/lib/kibana'; +import { getSourcererDataView } from '../containers/get_sourcerer_data_view'; interface UsePickIndexPatternsProps { dataViewId: string | null; diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/use_update_data_view.test.tsx b/x-pack/plugins/security_solution/public/sourcerer/components/use_update_data_view.test.tsx similarity index 92% rename from x-pack/plugins/security_solution/public/common/components/sourcerer/use_update_data_view.test.tsx rename to x-pack/plugins/security_solution/public/sourcerer/components/use_update_data_view.test.tsx index b6be02ccdad53..b37565f3eb912 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/use_update_data_view.test.tsx +++ b/x-pack/plugins/security_solution/public/sourcerer/components/use_update_data_view.test.tsx @@ -7,14 +7,14 @@ import { renderHook } from '@testing-library/react-hooks'; import { useUpdateDataView } from './use_update_data_view'; -import { useKibana as mockUseKibana } from '../../lib/kibana/__mocks__'; +import { useKibana as mockUseKibana } from '../../common/lib/kibana/__mocks__'; import * as i18n from './translations'; const mockAddSuccess = jest.fn(); const mockAddError = jest.fn(); const mockPatterns = ['packetbeat-*', 'winlogbeat-*']; const mockedUseKibana = mockUseKibana(); -jest.mock('../../hooks/use_app_toasts', () => { - const original = jest.requireActual('../../hooks/use_app_toasts'); +jest.mock('../../common/hooks/use_app_toasts', () => { + const original = jest.requireActual('../../common/hooks/use_app_toasts'); return { ...original, @@ -24,7 +24,7 @@ jest.mock('../../hooks/use_app_toasts', () => { }), }; }); -jest.mock('../../lib/kibana', () => { +jest.mock('../../common/lib/kibana', () => { return { useKibana: () => mockedUseKibana, }; diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/use_update_data_view.tsx b/x-pack/plugins/security_solution/public/sourcerer/components/use_update_data_view.tsx similarity index 91% rename from x-pack/plugins/security_solution/public/common/components/sourcerer/use_update_data_view.tsx rename to x-pack/plugins/security_solution/public/sourcerer/components/use_update_data_view.tsx index 49c0468d51cbf..a18d37d7c10f5 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/use_update_data_view.tsx +++ b/x-pack/plugins/security_solution/public/sourcerer/components/use_update_data_view.tsx @@ -9,12 +9,12 @@ import React, { useCallback } from 'react'; import { EuiLink } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { toMountPoint } from '@kbn/react-kibana-mount'; -import { useKibana } from '../../lib/kibana'; -import { DEFAULT_INDEX_KEY } from '../../../../common/constants'; +import { useKibana } from '../../common/lib/kibana'; +import { DEFAULT_INDEX_KEY } from '../../../common/constants'; import * as i18n from './translations'; import { RefreshButton } from './refresh_button'; -import { useAppToasts } from '../../hooks/use_app_toasts'; -import { ensurePatternFormat } from '../../../../common/utils/sourcerer'; +import { useAppToasts } from '../../common/hooks/use_app_toasts'; +import { ensurePatternFormat } from '../../../common/utils/sourcerer'; export const useUpdateDataView = ( onOpenAndReset: () => void diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/utils.tsx b/x-pack/plugins/security_solution/public/sourcerer/components/utils.tsx similarity index 99% rename from x-pack/plugins/security_solution/public/common/components/sourcerer/utils.tsx rename to x-pack/plugins/security_solution/public/sourcerer/components/utils.tsx index 2e6653a185952..a77655bffcf94 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/utils.tsx +++ b/x-pack/plugins/security_solution/public/sourcerer/components/utils.tsx @@ -8,7 +8,7 @@ import { EuiIcon, EuiLink, EuiToolTip } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import React, { useMemo } from 'react'; -import { TimelineType } from '../../../../common/api/timeline'; +import { TimelineType } from '../../../common/api/timeline'; import { Blockquote } from './helpers'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/common/containers/sourcerer/create_sourcerer_data_view.ts b/x-pack/plugins/security_solution/public/sourcerer/containers/create_sourcerer_data_view.ts similarity index 94% rename from x-pack/plugins/security_solution/public/common/containers/sourcerer/create_sourcerer_data_view.ts rename to x-pack/plugins/security_solution/public/sourcerer/containers/create_sourcerer_data_view.ts index 652c71e2ad9d4..628ee753aacf4 100644 --- a/x-pack/plugins/security_solution/public/common/containers/sourcerer/create_sourcerer_data_view.ts +++ b/x-pack/plugins/security_solution/public/sourcerer/containers/create_sourcerer_data_view.ts @@ -8,9 +8,9 @@ import type { DataViewListItem, DataView as DataViewType } from '@kbn/data-views-plugin/common'; import type { DataViewsServicePublic } from '@kbn/data-views-plugin/public/types'; import { transformError } from '@kbn/securitysolution-es-utils'; -import { ensurePatternFormat } from '../../../../common/utils/sourcerer'; -import type { KibanaDataView } from '../../store/sourcerer/model'; -import { DEFAULT_TIME_FIELD } from '../../../../common/constants'; +import { ensurePatternFormat } from '../../../common/utils/sourcerer'; +import type { KibanaDataView } from '../store/model'; +import { DEFAULT_TIME_FIELD } from '../../../common/constants'; export interface GetSourcererDataView { signal?: AbortSignal; diff --git a/x-pack/plugins/security_solution/public/common/containers/sourcerer/get_sourcerer_data_view.test.ts b/x-pack/plugins/security_solution/public/sourcerer/containers/get_sourcerer_data_view.test.ts similarity index 100% rename from x-pack/plugins/security_solution/public/common/containers/sourcerer/get_sourcerer_data_view.test.ts rename to x-pack/plugins/security_solution/public/sourcerer/containers/get_sourcerer_data_view.test.ts diff --git a/x-pack/plugins/security_solution/public/common/containers/sourcerer/get_sourcerer_data_view.ts b/x-pack/plugins/security_solution/public/sourcerer/containers/get_sourcerer_data_view.ts similarity index 83% rename from x-pack/plugins/security_solution/public/common/containers/sourcerer/get_sourcerer_data_view.ts rename to x-pack/plugins/security_solution/public/sourcerer/containers/get_sourcerer_data_view.ts index 388ac93f310ce..31b8484610952 100644 --- a/x-pack/plugins/security_solution/public/common/containers/sourcerer/get_sourcerer_data_view.ts +++ b/x-pack/plugins/security_solution/public/sourcerer/containers/get_sourcerer_data_view.ts @@ -6,9 +6,9 @@ */ import type { DataViewsServicePublic } from '@kbn/data-views-plugin/public/types'; -import { ensurePatternFormat } from '../../../../common/utils/sourcerer'; -import type { SourcererDataView, RunTimeMappings } from '../../store/sourcerer/model'; -import { getDataViewStateFromIndexFields } from '../source/use_data_view'; +import { ensurePatternFormat } from '../../../common/utils/sourcerer'; +import type { SourcererDataView, RunTimeMappings } from '../store/model'; +import { getDataViewStateFromIndexFields } from '../../common/containers/source/use_data_view'; export const getSourcererDataView = async ( dataViewId: string, diff --git a/x-pack/plugins/security_solution/public/common/containers/sourcerer/index.test.tsx b/x-pack/plugins/security_solution/public/sourcerer/containers/index.test.tsx similarity index 96% rename from x-pack/plugins/security_solution/public/common/containers/sourcerer/index.test.tsx rename to x-pack/plugins/security_solution/public/sourcerer/containers/index.test.tsx index 88b58e46adbf8..c9b180a7fc41e 100644 --- a/x-pack/plugins/security_solution/public/common/containers/sourcerer/index.test.tsx +++ b/x-pack/plugins/security_solution/public/sourcerer/containers/index.test.tsx @@ -12,22 +12,24 @@ import { Provider } from 'react-redux'; import { getScopeFromPath, useInitSourcerer, useSourcererDataView } from '.'; import { mockPatterns } from './mocks'; -import type { RouteSpyState } from '../../utils/route/types'; +import type { RouteSpyState } from '../../common/utils/route/types'; import { DEFAULT_DATA_VIEW_ID, DEFAULT_INDEX_PATTERN, SecurityPageName, -} from '../../../../common/constants'; +} from '../../../common/constants'; +import { useUserInfo, initialState as userInfoState } from '../../detections/components/user_info'; import { - useUserInfo, - initialState as userInfoState, -} from '../../../detections/components/user_info'; -import { mockGlobalState, mockSourcererState, TestProviders, createMockStore } from '../../mock'; -import type { SelectedDataView } from '../../store/sourcerer/model'; -import { SourcererScopeName } from '../../store/sourcerer/model'; -import * as source from '../source/use_data_view'; -import { sourcererActions } from '../../store/sourcerer'; -import { useInitializeUrlParam, useUpdateUrlParam } from '../../utils/global_query_string'; + mockGlobalState, + mockSourcererState, + TestProviders, + createMockStore, +} from '../../common/mock'; +import type { SelectedDataView } from '../store/model'; +import { SourcererScopeName } from '../store/model'; +import * as source from '../../common/containers/source/use_data_view'; +import { sourcererActions } from '../store'; +import { useInitializeUrlParam, useUpdateUrlParam } from '../../common/utils/global_query_string'; import { createSourcererDataView } from './create_sourcerer_data_view'; const mockRouteSpy: RouteSpyState = { @@ -39,10 +41,10 @@ const mockRouteSpy: RouteSpyState = { }; const mockDispatch = jest.fn(); const mockUseUserInfo = useUserInfo as jest.Mock; -jest.mock('../../lib/apm/use_track_http_request'); -jest.mock('../../../detections/components/user_info'); +jest.mock('../../common/lib/apm/use_track_http_request'); +jest.mock('../../detections/components/user_info'); jest.mock('./create_sourcerer_data_view'); -jest.mock('../../utils/global_query_string'); +jest.mock('../../common/utils/global_query_string'); jest.mock('react-redux', () => { const original = jest.requireActual('react-redux'); @@ -51,7 +53,7 @@ jest.mock('react-redux', () => { useDispatch: () => mockDispatch, }; }); -jest.mock('../../utils/route/use_route_spy', () => ({ +jest.mock('../../common/utils/route/use_route_spy', () => ({ useRouteSpy: () => [mockRouteSpy], })); @@ -67,7 +69,7 @@ const mockCreateSourcererDataView = jest.fn(() => { throw errToReturn; }); -jest.mock('../../lib/kibana', () => ({ +jest.mock('../../common/lib/kibana', () => ({ useToasts: () => ({ addError: mockAddError, addSuccess: jest.fn(), diff --git a/x-pack/plugins/security_solution/public/common/containers/sourcerer/index.tsx b/x-pack/plugins/security_solution/public/sourcerer/containers/index.tsx similarity index 95% rename from x-pack/plugins/security_solution/public/common/containers/sourcerer/index.tsx rename to x-pack/plugins/security_solution/public/sourcerer/containers/index.tsx index 6ae176890291d..7eed9e569a700 100644 --- a/x-pack/plugins/security_solution/public/common/containers/sourcerer/index.tsx +++ b/x-pack/plugins/security_solution/public/sourcerer/containers/index.tsx @@ -9,16 +9,16 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { i18n } from '@kbn/i18n'; import { matchPath } from 'react-router-dom'; -import { sourcererActions, sourcererSelectors } from '../../store/sourcerer'; +import { sourcererActions, sourcererSelectors } from '../store'; import type { SelectedDataView, SourcererDataView, SourcererUrlState, RunTimeMappings, -} from '../../store/sourcerer/model'; -import { SourcererScopeName } from '../../store/sourcerer/model'; -import { useUserInfo } from '../../../detections/components/user_info'; -import { timelineSelectors } from '../../../timelines/store'; +} from '../store/model'; +import { SourcererScopeName } from '../store/model'; +import { useUserInfo } from '../../detections/components/user_info'; +import { timelineSelectors } from '../../timelines/store'; import { ALERTS_PATH, HOSTS_PATH, @@ -28,19 +28,22 @@ import { RULES_PATH, CASES_PATH, DATA_QUALITY_PATH, -} from '../../../../common/constants'; -import { TimelineId } from '../../../../common/types'; -import { useDeepEqualSelector } from '../../hooks/use_selector'; -import { checkIfIndicesExist, getScopePatternListSelection } from '../../store/sourcerer/helpers'; -import { useAppToasts } from '../../hooks/use_app_toasts'; +} from '../../../common/constants'; +import { TimelineId } from '../../../common/types'; +import { useDeepEqualSelector } from '../../common/hooks/use_selector'; +import { checkIfIndicesExist, getScopePatternListSelection } from '../store/helpers'; +import { useAppToasts } from '../../common/hooks/use_app_toasts'; import { createSourcererDataView } from './create_sourcerer_data_view'; -import { getDataViewStateFromIndexFields, useDataView } from '../source/use_data_view'; -import { useFetchIndex } from '../source'; -import type { State } from '../../store'; -import { useInitializeUrlParam, useUpdateUrlParam } from '../../utils/global_query_string'; -import { URL_PARAM_KEY } from '../../hooks/use_url_state'; -import { sortWithExcludesAtEnd } from '../../../../common/utils/sourcerer'; -import { useKibana } from '../../lib/kibana'; +import { + getDataViewStateFromIndexFields, + useDataView, +} from '../../common/containers/source/use_data_view'; +import { useFetchIndex } from '../../common/containers/source'; +import type { State } from '../../common/store/types'; +import { useInitializeUrlParam, useUpdateUrlParam } from '../../common/utils/global_query_string'; +import { URL_PARAM_KEY } from '../../common/hooks/use_url_state'; +import { sortWithExcludesAtEnd } from '../../../common/utils/sourcerer'; +import { useKibana } from '../../common/lib/kibana'; export const useInitSourcerer = ( scopeId: SourcererScopeName.default | SourcererScopeName.detections = SourcererScopeName.default diff --git a/x-pack/plugins/security_solution/public/common/containers/sourcerer/mocks.ts b/x-pack/plugins/security_solution/public/sourcerer/containers/mocks.ts similarity index 85% rename from x-pack/plugins/security_solution/public/common/containers/sourcerer/mocks.ts rename to x-pack/plugins/security_solution/public/sourcerer/containers/mocks.ts index 98949d47047de..08e992c76aac6 100644 --- a/x-pack/plugins/security_solution/public/common/containers/sourcerer/mocks.ts +++ b/x-pack/plugins/security_solution/public/sourcerer/containers/mocks.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { mockGlobalState } from '../../mock'; -import type { SelectedDataView } from '../../store/sourcerer/model'; -import { initSourcererScope } from '../../store/sourcerer/model'; -import { mockBrowserFields, mockRuntimeMappings } from '../source/mock'; +import { mockGlobalState } from '../../common/mock'; +import type { SelectedDataView } from '../store/model'; +import { initSourcererScope } from '../store/model'; +import { mockBrowserFields, mockRuntimeMappings } from '../../common/containers/source/mock'; export const mockPatterns = [ 'auditbeat-*', diff --git a/x-pack/plugins/security_solution/public/common/containers/sourcerer/readme.md b/x-pack/plugins/security_solution/public/sourcerer/containers/readme.md similarity index 100% rename from x-pack/plugins/security_solution/public/common/containers/sourcerer/readme.md rename to x-pack/plugins/security_solution/public/sourcerer/containers/readme.md diff --git a/x-pack/plugins/security_solution/public/common/containers/sourcerer/use_signal_helpers.test.tsx b/x-pack/plugins/security_solution/public/sourcerer/containers/use_signal_helpers.test.tsx similarity index 97% rename from x-pack/plugins/security_solution/public/common/containers/sourcerer/use_signal_helpers.test.tsx rename to x-pack/plugins/security_solution/public/sourcerer/containers/use_signal_helpers.test.tsx index 771599132326d..8897d20f28e9a 100644 --- a/x-pack/plugins/security_solution/public/common/containers/sourcerer/use_signal_helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/sourcerer/containers/use_signal_helpers.test.tsx @@ -6,10 +6,10 @@ */ import React from 'react'; -import { createMockStore, mockGlobalState, TestProviders } from '../../mock'; +import { createMockStore, mockGlobalState, TestProviders } from '../../common/mock'; import { act, renderHook } from '@testing-library/react-hooks'; import { useSignalHelpers } from './use_signal_helpers'; -import type { State } from '../../store'; +import type { State } from '../../common/store'; import { createSourcererDataView } from './create_sourcerer_data_view'; const mockCreateSourcererDataView = jest.fn(() => { @@ -22,8 +22,8 @@ jest.mock('./create_sourcerer_data_view'); const mockAddError = jest.fn(); -jest.mock('../../lib/kibana', () => { - const orig = jest.requireActual('../../lib/kibana'); +jest.mock('../../common/lib/kibana', () => { + const orig = jest.requireActual('../../common/lib/kibana'); return { ...orig, useToasts: () => ({ diff --git a/x-pack/plugins/security_solution/public/common/containers/sourcerer/use_signal_helpers.tsx b/x-pack/plugins/security_solution/public/sourcerer/containers/use_signal_helpers.tsx similarity index 90% rename from x-pack/plugins/security_solution/public/common/containers/sourcerer/use_signal_helpers.tsx rename to x-pack/plugins/security_solution/public/sourcerer/containers/use_signal_helpers.tsx index 8bf9f59fa91c6..af8c05d22b460 100644 --- a/x-pack/plugins/security_solution/public/common/containers/sourcerer/use_signal_helpers.tsx +++ b/x-pack/plugins/security_solution/public/sourcerer/containers/use_signal_helpers.tsx @@ -8,14 +8,13 @@ import { useCallback, useMemo, useRef } from 'react'; import { i18n } from '@kbn/i18n'; import { useDispatch, useSelector } from 'react-redux'; -import { sourcererSelectors } from '../../store'; +import { sourcererSelectors, sourcererActions } from '../store'; import { useSourcererDataView } from '.'; -import { SourcererScopeName } from '../../store/sourcerer/model'; -import { useDataView } from '../source/use_data_view'; -import { useAppToasts } from '../../hooks/use_app_toasts'; -import { useKibana } from '../../lib/kibana'; +import { SourcererScopeName } from '../store/model'; +import { useDataView } from '../../common/containers/source/use_data_view'; +import { useAppToasts } from '../../common/hooks/use_app_toasts'; +import { useKibana } from '../../common/lib/kibana'; import { createSourcererDataView } from './create_sourcerer_data_view'; -import { sourcererActions } from '../../store/sourcerer'; export const useSignalHelpers = (): { /* when defined, signal index has been initiated but does not exist */ diff --git a/x-pack/plugins/security_solution/public/sourcerer/jest.config.js b/x-pack/plugins/security_solution/public/sourcerer/jest.config.js new file mode 100644 index 0000000000000..2967d36235b29 --- /dev/null +++ b/x-pack/plugins/security_solution/public/sourcerer/jest.config.js @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../../..', + roots: ['/x-pack/plugins/security_solution/public/sourcerer'], + coverageDirectory: + '/target/kibana-coverage/jest/x-pack/plugins/security_solution/public/sourcerer', + coverageReporters: ['text', 'html'], + collectCoverageFrom: [ + '/x-pack/plugins/security_solution/public/sourcerer/**/*.{ts,tsx}', + ], + moduleNameMapper: require('../../server/__mocks__/module_name_map'), +}; diff --git a/x-pack/plugins/security_solution/public/common/store/sourcerer/actions.ts b/x-pack/plugins/security_solution/public/sourcerer/store/actions.ts similarity index 93% rename from x-pack/plugins/security_solution/public/common/store/sourcerer/actions.ts rename to x-pack/plugins/security_solution/public/sourcerer/store/actions.ts index 0a6ca2dcdfdb2..54aa7dfa2fef8 100644 --- a/x-pack/plugins/security_solution/public/common/store/sourcerer/actions.ts +++ b/x-pack/plugins/security_solution/public/sourcerer/store/actions.ts @@ -8,7 +8,7 @@ import actionCreatorFactory from 'typescript-fsa'; import type { SelectedDataView, SourcererDataView, SourcererScopeName } from './model'; -import type { SecurityDataView } from '../../containers/sourcerer/create_sourcerer_data_view'; +import type { SecurityDataView } from '../containers/create_sourcerer_data_view'; const actionCreator = actionCreatorFactory('x-pack/security_solution/local/sourcerer'); diff --git a/x-pack/plugins/security_solution/public/common/store/sourcerer/helpers.test.ts b/x-pack/plugins/security_solution/public/sourcerer/store/helpers.test.ts similarity index 98% rename from x-pack/plugins/security_solution/public/common/store/sourcerer/helpers.test.ts rename to x-pack/plugins/security_solution/public/sourcerer/store/helpers.test.ts index 76c70530c6451..ae196f4395a1a 100644 --- a/x-pack/plugins/security_solution/public/common/store/sourcerer/helpers.test.ts +++ b/x-pack/plugins/security_solution/public/sourcerer/store/helpers.test.ts @@ -5,14 +5,14 @@ * 2.0. */ -import { mockGlobalState, mockSourcererState } from '../../mock'; +import { mockGlobalState, mockSourcererState } from '../../common/mock'; import { SourcererScopeName } from './model'; import { checkIfIndicesExist, getScopePatternListSelection, validateSelectedPatterns, } from './helpers'; -import { sortWithExcludesAtEnd } from '../../../../common/utils/sourcerer'; +import { sortWithExcludesAtEnd } from '../../../common/utils/sourcerer'; const signalIndexName = mockGlobalState.sourcerer.signalIndexName; diff --git a/x-pack/plugins/security_solution/public/common/store/sourcerer/helpers.ts b/x-pack/plugins/security_solution/public/sourcerer/store/helpers.ts similarity index 98% rename from x-pack/plugins/security_solution/public/common/store/sourcerer/helpers.ts rename to x-pack/plugins/security_solution/public/sourcerer/store/helpers.ts index 3b7a73d0ee160..2fccdbdd23025 100644 --- a/x-pack/plugins/security_solution/public/common/store/sourcerer/helpers.ts +++ b/x-pack/plugins/security_solution/public/sourcerer/store/helpers.ts @@ -7,10 +7,10 @@ import { isEmpty } from 'lodash'; import type { SourcererDataView, SourcererModel, SourcererScopeById } from './model'; +import type { sourcererModel } from '.'; import { SourcererScopeName } from './model'; import type { SelectedDataViewPayload } from './actions'; -import type { sourcererModel } from '../model'; -import { ensurePatternFormat, sortWithExcludesAtEnd } from '../../../../common/utils/sourcerer'; +import { ensurePatternFormat, sortWithExcludesAtEnd } from '../../../common/utils/sourcerer'; const getPatternListFromScope = ( scope: SourcererScopeName, diff --git a/x-pack/plugins/security_solution/public/common/store/sourcerer/index.ts b/x-pack/plugins/security_solution/public/sourcerer/store/index.ts similarity index 100% rename from x-pack/plugins/security_solution/public/common/store/sourcerer/index.ts rename to x-pack/plugins/security_solution/public/sourcerer/store/index.ts diff --git a/x-pack/plugins/security_solution/public/common/store/sourcerer/model.ts b/x-pack/plugins/security_solution/public/sourcerer/store/model.ts similarity index 98% rename from x-pack/plugins/security_solution/public/common/store/sourcerer/model.ts rename to x-pack/plugins/security_solution/public/sourcerer/store/model.ts index 8fedc14f12e55..15c1d2f6a27a1 100644 --- a/x-pack/plugins/security_solution/public/common/store/sourcerer/model.ts +++ b/x-pack/plugins/security_solution/public/sourcerer/store/model.ts @@ -9,7 +9,7 @@ import type { BrowserFields } from '@kbn/timelines-plugin/common'; import { EMPTY_BROWSER_FIELDS, EMPTY_INDEX_FIELDS } from '@kbn/timelines-plugin/common'; import type { DataViewSpec } from '@kbn/data-views-plugin/public'; import type { RuntimeFieldSpec, RuntimePrimitiveTypes } from '@kbn/data-views-plugin/common'; -import type { SecuritySolutionDataViewBase } from '../../types'; +import type { SecuritySolutionDataViewBase } from '../../common/types'; /** Uniquely identifies a Sourcerer Scope */ export enum SourcererScopeName { diff --git a/x-pack/plugins/security_solution/public/common/store/sourcerer/readme.md b/x-pack/plugins/security_solution/public/sourcerer/store/readme.md similarity index 100% rename from x-pack/plugins/security_solution/public/common/store/sourcerer/readme.md rename to x-pack/plugins/security_solution/public/sourcerer/store/readme.md diff --git a/x-pack/plugins/security_solution/public/common/store/sourcerer/reducer.ts b/x-pack/plugins/security_solution/public/sourcerer/store/reducer.ts similarity index 100% rename from x-pack/plugins/security_solution/public/common/store/sourcerer/reducer.ts rename to x-pack/plugins/security_solution/public/sourcerer/store/reducer.ts diff --git a/x-pack/plugins/security_solution/public/common/store/sourcerer/selectors.ts b/x-pack/plugins/security_solution/public/sourcerer/store/selectors.ts similarity index 97% rename from x-pack/plugins/security_solution/public/common/store/sourcerer/selectors.ts rename to x-pack/plugins/security_solution/public/sourcerer/store/selectors.ts index 71cbef670cb6e..28e59276b5777 100644 --- a/x-pack/plugins/security_solution/public/common/store/sourcerer/selectors.ts +++ b/x-pack/plugins/security_solution/public/sourcerer/store/selectors.ts @@ -5,7 +5,7 @@ * 2.0. */ import { createSelector } from 'reselect'; -import type { State } from '../types'; +import type { State } from '../../common/store/types'; import type { SourcererModel } from './model'; import { SourcererScopeName } from './model'; diff --git a/x-pack/plugins/security_solution/public/threat_intelligence/routes.tsx b/x-pack/plugins/security_solution/public/threat_intelligence/routes.tsx index 0cc2891077b68..edb57a635222a 100644 --- a/x-pack/plugins/security_solution/public/threat_intelligence/routes.tsx +++ b/x-pack/plugins/security_solution/public/threat_intelligence/routes.tsx @@ -23,7 +23,7 @@ import { SpyRoute } from '../common/utils/route/spy_routes'; import { licenseService } from '../common/hooks/use_license'; import { SecurityPageName } from '../app/types'; import type { SecuritySubPluginRoutes } from '../app/types'; -import { useSourcererDataView } from '../common/containers/sourcerer'; +import { useSourcererDataView } from '../sourcerer/containers'; import { SecuritySolutionPageWrapper } from '../common/components/page_wrapper'; import { SiemSearchBar } from '../common/components/search_bar'; import { useGlobalTime } from '../common/containers/use_global_time'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.tsx b/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.tsx index 4d67684324423..4c3936deebc9c 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.tsx @@ -31,7 +31,7 @@ import { FormattedRelativePreferenceDate } from '../../../common/components/form import { HostDetailsLink, ReputationLink, WhoIsLink } from '../../../common/components/links'; import { Spacer } from '../../../common/components/page'; import * as i18n from '../../../explore/network/components/details/translations'; -import { SourcererScopeName } from '../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; import { TimelineContext } from '../timeline'; const DraggableContainerFlexGroup = styled(EuiFlexGroup)` diff --git a/x-pack/plugins/security_solution/public/timelines/components/fields_browser/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/index.test.tsx index a08e947d8b87d..4e0eefa7703fb 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/fields_browser/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/index.test.tsx @@ -18,7 +18,7 @@ import { useKibana } from '../../../common/lib/kibana'; import type { DataView, DataViewField } from '@kbn/data-plugin/common'; import type { RenderHookResult } from '@testing-library/react-hooks'; import { renderHook } from '@testing-library/react-hooks'; -import { SourcererScopeName } from '../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; import { defaultColumnHeaderType } from '../timeline/body/column_headers/default_headers'; import { DEFAULT_COLUMN_MIN_WIDTH } from '../timeline/body/constants'; import { EuiInMemoryTable } from '@elastic/eui'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/fields_browser/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/index.tsx index bc1ca7bb87264..6757cd88bd7e7 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/fields_browser/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/index.tsx @@ -18,7 +18,7 @@ import { useDataView } from '../../../common/containers/source/use_data_view'; import { useKibana } from '../../../common/lib/kibana'; import { sourcererSelectors } from '../../../common/store'; import type { State } from '../../../common/store'; -import type { SourcererScopeName } from '../../../common/store/sourcerer/model'; +import type { SourcererScopeName } from '../../../sourcerer/store/model'; import { defaultColumnHeaderType } from '../timeline/body/column_headers/default_headers'; import { DEFAULT_COLUMN_MIN_WIDTH } from '../timeline/body/constants'; import { useCreateFieldButton } from './create_field_button'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/modal/actions/open_timeline_button.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/modal/actions/open_timeline_button.test.tsx index 438eade7299f0..9ca5f236f23fe 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/modal/actions/open_timeline_button.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/modal/actions/open_timeline_button.test.tsx @@ -12,11 +12,11 @@ import { TestProviders } from '../../../../common/mock/test_providers'; import { useParams } from 'react-router-dom'; import { TimelineType } from '../../../../../common/api/timeline'; import { useStartTransaction } from '../../../../common/lib/apm/use_start_transaction'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; import { useTimelineStatus } from '../../open_timeline/use_timeline_status'; jest.mock('../../../../common/lib/apm/use_start_transaction'); -jest.mock('../../../../common/containers/sourcerer'); +jest.mock('../../../../sourcerer/containers'); jest.mock('../../open_timeline/use_timeline_status'); jest.mock('react-redux', () => { const origin = jest.requireActual('react-redux'); diff --git a/x-pack/plugins/security_solution/public/timelines/components/modal/header/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/modal/header/index.test.tsx index 2f06c359f2ec2..228c6bc70584c 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/modal/header/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/modal/header/index.test.tsx @@ -9,13 +9,13 @@ import React from 'react'; import { TestProviders } from '../../../../common/mock'; import { TimelineModalHeader } from '.'; import { render } from '@testing-library/react'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; import { useCreateTimeline } from '../../../hooks/use_create_timeline'; import { useInspect } from '../../../../common/components/inspect/use_inspect'; import { useKibana } from '../../../../common/lib/kibana'; import { timelineActions } from '../../../store'; -jest.mock('../../../../common/containers/sourcerer'); +jest.mock('../../../../sourcerer/containers'); jest.mock('../../../hooks/use_create_timeline'); jest.mock('../../../../common/components/inspect/use_inspect'); jest.mock('../../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/timelines/components/modal/header/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/modal/header/index.tsx index 3d3936521c3a6..148f2e75e2db3 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/modal/header/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/modal/header/index.tsx @@ -32,9 +32,9 @@ import { createHistoryEntry } from '../../../../common/utils/global_query_string import { timelineActions } from '../../../store'; import type { State } from '../../../../common/store'; import { useKibana } from '../../../../common/lib/kibana'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; import { combineQueries } from '../../../../common/lib/kuery'; -import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../../sourcerer/store/model'; import * as i18n from '../translations'; import { AddToFavoritesButton } from '../../add_to_favorites'; import { TimelineSaveStatus } from '../../save_status'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/index.tsx index 4ccefedf07822..aa80df5a33ba7 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/index.tsx @@ -52,8 +52,8 @@ import { useTimelineTypes } from './use_timeline_types'; import { useTimelineStatus } from './use_timeline_status'; import { deleteTimelinesByIds } from '../../containers/api'; import type { Direction } from '../../../../common/search_strategy'; -import { SourcererScopeName } from '../../../common/store/sourcerer/model'; -import { useSourcererDataView } from '../../../common/containers/sourcerer'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; +import { useSourcererDataView } from '../../../sourcerer/containers'; import { useStartTransaction } from '../../../common/lib/apm/use_start_transaction'; import { TIMELINE_ACTIONS } from '../../../common/lib/apm/user_actions'; import { defaultUdtHeaders } from '../timeline/unified_components/default_headers'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/note_previews/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/note_previews/index.tsx index 1c80297f70182..305bf3daa1f76 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/note_previews/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/note_previews/index.tsx @@ -32,8 +32,8 @@ import { NOTE_CONTENT_CLASS_NAME } from '../../timeline/body/helpers'; import * as i18n from './translations'; import { TimelineTabs, TimelineId } from '../../../../../common/types/timeline'; import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; -import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { SourcererScopeName } from '../../../../sourcerer/store/model'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; import { useDeleteNote } from './hooks/use_delete_note'; import { getTimelineNoteSelector } from '../../timeline/tabs/notes/selectors'; import { ENABLE_EXPANDABLE_FLYOUT_SETTING } from '../../../../../common/constants'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/use_update_timeline.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/use_update_timeline.tsx index 361d7217fd9ee..1be17b4c599d4 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/use_update_timeline.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/use_update_timeline.tsx @@ -13,8 +13,8 @@ import { TimelineStatus, TimelineType } from '../../../../common/api/timeline'; import { createNote } from '../notes/helpers'; import { InputsModelId } from '../../../common/store/inputs/constants'; -import { sourcererActions } from '../../../common/store/sourcerer'; -import { SourcererScopeName } from '../../../common/store/sourcerer/model'; +import { sourcererActions } from '../../../sourcerer/store'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; import { addNotes as dispatchAddNotes, updateNote as dispatchUpdateNote, diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.tsx index 33faddd5bea48..49945e07796fa 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.tsx @@ -20,7 +20,7 @@ import type { BrowserFields } from '../../../../common/containers/source'; import { ExpandableEvent, ExpandableEventTitle } from './expandable_event'; import { useTimelineEventsDetails } from '../../../containers/details'; import type { TimelineTabs } from '../../../../../common/types/timeline'; -import type { RunTimeMappings } from '../../../../common/store/sourcerer/model'; +import type { RunTimeMappings } from '../../../../sourcerer/store/model'; import { useHostIsolationTools } from './use_host_isolation_tools'; import { FlyoutBody, FlyoutHeader, FlyoutFooter } from './flyout'; import { useBasicDataFromDetailsData, getAlertIndexAlias } from './helpers'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/hooks/use_detail_panel.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/hooks/use_detail_panel.test.tsx index 2f2f21b9b9a00..4defbdc683254 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/hooks/use_detail_panel.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/hooks/use_detail_panel.test.tsx @@ -10,7 +10,7 @@ import type { UseDetailPanelConfig } from './use_detail_panel'; import { useDetailPanel } from './use_detail_panel'; import { timelineActions } from '../../../store'; import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; -import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../../sourcerer/store/model'; import { TimelineId, TimelineTabs } from '../../../../../common/types/timeline'; import { ExpandableFlyoutProvider } from '@kbn/expandable-flyout'; import { TestProviders } from '../../../../common/mock'; @@ -26,7 +26,7 @@ jest.mock('react-redux', () => { useDispatch: () => mockDispatch, }; }); -jest.mock('../../../../common/containers/sourcerer', () => { +jest.mock('../../../../sourcerer/containers', () => { const mockSourcererReturn = { browserFields: {}, loading: true, diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/hooks/use_detail_panel.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/hooks/use_detail_panel.tsx index a419c1cdca0be..f09462eb8e096 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/hooks/use_detail_panel.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/hooks/use_detail_panel.tsx @@ -15,8 +15,8 @@ import { useKibana } from '../../../../common/lib/kibana'; import type { ExpandedDetailType } from '../../../../../common/types'; import { getScopedActions, isInTableScope, isTimelineScope } from '../../../../helpers'; import { timelineSelectors } from '../../../store'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; -import type { SourcererScopeName } from '../../../../common/store/sourcerer/model'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; +import type { SourcererScopeName } from '../../../../sourcerer/store/model'; import { TimelineTabs } from '../../../../../common/types/timeline'; import { timelineDefaults } from '../../../store/defaults'; import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/host_details/expandable_host.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/host_details/expandable_host.tsx index 3c0ae21ac81cb..c12dbea2a81fc 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/host_details/expandable_host.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/host_details/expandable_host.tsx @@ -13,7 +13,7 @@ import { useDispatch } from 'react-redux'; import { InputsModelId } from '../../../../common/store/inputs/constants'; import { HostDetailsLink } from '../../../../common/components/links'; import { useGlobalTime } from '../../../../common/containers/use_global_time'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; import { HostOverview } from '../../../../overview/components/host_overview'; import { setAbsoluteRangeDatePicker } from '../../../../common/store/inputs/actions'; import type { HostItem } from '../../../../../common/search_strategy'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/index.tsx index bc865e3c12cee..72aee1055d4ca 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/index.tsx @@ -16,7 +16,7 @@ import { getScopedActions, isInTableScope, isTimelineScope } from '../../../help import { timelineSelectors } from '../../store'; import { timelineDefaults } from '../../store/defaults'; import type { BrowserFields } from '../../../common/containers/source'; -import type { RunTimeMappings } from '../../../common/store/sourcerer/model'; +import type { RunTimeMappings } from '../../../sourcerer/store/model'; import { TimelineId, TimelineTabs } from '../../../../common/types/timeline'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; import { EventDetailsPanel } from './event_details'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/network_details/expandable_network.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/network_details/expandable_network.tsx index d63064b490485..04c8a5404d907 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/network_details/expandable_network.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/network_details/expandable_network.tsx @@ -24,7 +24,7 @@ import { useKibana } from '../../../../common/lib/kibana'; import { convertToBuildEsQuery } from '../../../../common/lib/kuery'; import { inputsSelectors } from '../../../../common/store'; import { setAbsoluteRangeDatePicker } from '../../../../common/store/inputs/actions'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; import { useNetworkDetails } from '../../../../explore/network/containers/details'; import { networkModel } from '../../../../explore/network/store'; import { useAnomaliesTableData } from '../../../../common/components/ml/anomaly/use_anomalies_table_data'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/user_details/expandable_user.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/user_details/expandable_user.tsx index db75d224682fd..61080c2c9f396 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/user_details/expandable_user.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/user_details/expandable_user.tsx @@ -15,7 +15,7 @@ import { UserDetailsLink } from '../../../../common/components/links'; import { UserOverview } from '../../../../overview/components/user_overview'; import { useObservedUserDetails } from '../../../../explore/users/containers/users/observed_details'; import { useGlobalTime } from '../../../../common/containers/use_global_time'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; import { setAbsoluteRangeDatePicker } from '../../../../common/store/inputs/actions'; import { getCriteriaFromUsersType } from '../../../../common/components/ml/criteria/get_criteria_from_users_type'; import { scoreIntervalToDateTime } from '../../../../common/components/ml/score/score_interval_to_datetime'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/index.tsx index dbf5cf8e94ff6..d2b9a0aa7c667 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/index.tsx @@ -31,7 +31,7 @@ import { import type { Sort } from '../sort'; import { ColumnHeader } from './column_header'; -import { SourcererScopeName } from '../../../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../../../sourcerer/store/model'; import type { FieldEditorActions } from '../../../fields_browser'; import { useFieldBrowserOptions } from '../../../fields_browser'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/index.tsx index 175283e418246..bcdf750d114f0 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/index.tsx @@ -13,8 +13,8 @@ import { v4 as uuidv4 } from 'uuid'; import { IS_DRAGGING_CLASS_NAME } from '@kbn/securitysolution-t-grid'; import { EuiToolTip, EuiSuperSelect, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { SourcererScopeName } from '../../../../sourcerer/store/model'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; import { DroppableWrapper } from '../../../../common/components/drag_and_drop/droppable_wrapper'; import { droppableTimelineProvidersPrefix } from '../../../../common/components/drag_and_drop/helpers'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/index.test.tsx index a8f2ba2121dd8..ad1d9d3c89ac8 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/index.test.tsx @@ -26,8 +26,8 @@ import { useTimelineEvents } from '../../containers'; import { DefaultCellRenderer } from './cell_rendering/default_cell_renderer'; import { SELECTOR_TIMELINE_GLOBAL_CONTAINER } from './styles'; import { defaultRowRenderers } from './body/renderers'; -import { useSourcererDataView } from '../../../common/containers/sourcerer'; -import { SourcererScopeName } from '../../../common/store/sourcerer/model'; +import { useSourcererDataView } from '../../../sourcerer/containers'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; jest.mock('../../containers', () => ({ useTimelineEvents: jest.fn(), @@ -82,7 +82,7 @@ jest.mock('react-redux', () => { }); const mockUseSourcererDataView: jest.Mock = useSourcererDataView as jest.Mock; -jest.mock('../../../common/containers/sourcerer'); +jest.mock('../../../sourcerer/containers'); const mockDataView = { dataViewId: mockGlobalState.timeline.timelineById[TimelineId.test]?.dataViewId, browserFields: mockBrowserFields, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/index.tsx index a72a6f87932bb..f749fea36c4f6 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/index.tsx @@ -18,7 +18,7 @@ import { timelineActions, timelineSelectors } from '../../store'; import { timelineDefaults } from '../../store/defaults'; import { defaultHeaders } from './body/column_headers/default_headers'; import type { CellValueElementProps } from './cell_rendering'; -import { SourcererScopeName } from '../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../sourcerer/store/model'; import { TimelineModalHeader } from '../modal/header'; import type { TimelineId, RowRenderer, TimelineTabs } from '../../../../common/types/timeline'; import { TimelineType } from '../../../../common/api/timeline'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/kpi/kpi_container.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/kpi/kpi_container.tsx index c4f49c245e6d3..47d79c1ba71c3 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/kpi/kpi_container.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/kpi/kpi_container.tsx @@ -12,10 +12,10 @@ import { getEsQueryConfig } from '@kbn/data-plugin/common'; import type { TimerangeInput } from '@kbn/timelines-plugin/common'; import { EuiPanel } from '@elastic/eui'; import { TimelineId } from '../../../../../common/types'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; import type { State } from '../../../../common/store'; import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; -import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../../sourcerer/store/model'; import { TimelineKPIs } from './kpis'; import { useTimelineKpis } from '../../../containers/kpis'; import { useKibana } from '../../../../common/lib/kibana'; 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 0758ec73271b0..469c5ae1be458 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,9 +14,9 @@ import type { EqlOptionsSelected, FieldsEqlOptions, } from '../../../../../../common/search_strategy'; -import { useSourcererDataView } from '../../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../../sourcerer/containers'; import { useDeepEqualSelector } from '../../../../../common/hooks/use_selector'; -import { SourcererScopeName } from '../../../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../../../sourcerer/store/model'; import { EqlQueryBar } from '../../../../../detection_engine/rule_creation_ui/components/eql_query_bar'; import { diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.tsx index 749c3512cbd20..659073b3fc832 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.tsx @@ -14,8 +14,8 @@ import { FilterStateStore } from '@kbn/es-query'; import type { FilterManager, SavedQuery, SavedQueryTimeFilter } from '@kbn/data-plugin/public'; import styled from '@emotion/styled'; import { InputsModelId } from '../../../../common/store/inputs/constants'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; -import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; +import { SourcererScopeName } from '../../../../sourcerer/store/model'; import { convertKueryToElasticSearchQuery } from '../../../../common/lib/kuery'; import type { KqlMode } from '../../../store/model'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/index.tsx index da31436193a2e..b2545cbec88ed 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/index.tsx @@ -20,8 +20,8 @@ import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; import { useKibana } from '../../../../common/lib/kibana'; -import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { SourcererScopeName } from '../../../../sourcerer/store/model'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; import type { State, inputsModel } from '../../../../common/store'; import { inputsSelectors } from '../../../../common/store'; import { timelineActions, timelineSelectors } from '../../../store'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/search_or_filter.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/search_or_filter.tsx index e6c8d403d4cce..ed948b450c4e1 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/search_or_filter.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/search_or_filter.tsx @@ -21,8 +21,8 @@ import type { DataProvider } from '../data_providers/data_provider'; import { QueryBarTimeline } from '../query_bar'; import { TimelineDatePickerLock } from '../date_picker_lock'; -import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; -import { Sourcerer } from '../../../../common/components/sourcerer'; +import { SourcererScopeName } from '../../../../sourcerer/store/model'; +import { Sourcerer } from '../../../../sourcerer/components'; import { DATA_PROVIDER_HIDDEN_EMPTY, DATA_PROVIDER_HIDDEN_POPULATED, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/eql/header/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/eql/header/index.tsx index 121fbf8010eb9..a4ecfca93e20b 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/eql/header/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/eql/header/index.tsx @@ -12,11 +12,11 @@ import { InputsModelId } from '../../../../../../common/store/inputs/constants'; import { TimelineTabs } from '../../../../../../../common/types/timeline'; import { ExitFullScreen } from '../../../../../../common/components/exit_full_screen'; import { SuperDatePicker } from '../../../../../../common/components/super_date_picker'; -import { SourcererScopeName } from '../../../../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../../../../sourcerer/store/model'; import { TimelineDatePickerLock } from '../../../date_picker_lock'; import type { TimelineFullScreen } from '../../../../../../common/containers/use_full_screen'; import { EqlQueryBarTimeline } from '../../../query_bar/eql'; -import { Sourcerer } from '../../../../../../common/components/sourcerer'; +import { Sourcerer } from '../../../../../../sourcerer/components'; import { StyledEuiFlyoutHeader, TabHeaderContainer } from '../../shared/layout'; export type EqlTabHeaderProps = { diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/eql/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/eql/index.test.tsx index 29b666470284d..f782b1cb20c9b 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/eql/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/eql/index.test.tsx @@ -20,8 +20,8 @@ import { useMountAppended } from '../../../../../common/utils/use_mount_appended import { TimelineId, TimelineTabs } from '../../../../../../common/types/timeline'; import { useTimelineEvents } from '../../../../containers'; import { useTimelineEventsDetails } from '../../../../containers/details'; -import { useSourcererDataView } from '../../../../../common/containers/sourcerer'; -import { mockSourcererScope } from '../../../../../common/containers/sourcerer/mocks'; +import { useSourcererDataView } from '../../../../../sourcerer/containers'; +import { mockSourcererScope } from '../../../../../sourcerer/containers/mocks'; jest.mock('../../../../containers', () => ({ useTimelineEvents: jest.fn(), @@ -36,8 +36,8 @@ jest.mock('../../body/events', () => ({ Events: () => <>, })); -jest.mock('../../../../../common/containers/sourcerer'); -jest.mock('../../../../../common/containers/sourcerer/use_signal_helpers', () => ({ +jest.mock('../../../../../sourcerer/containers'); +jest.mock('../../../../../sourcerer/containers/use_signal_helpers', () => ({ useSignalHelpers: () => ({ signalIndexNeedsInit: false }), })); diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/eql/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/eql/index.tsx index b868c54a9ff4b..99952f170f13c 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/eql/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/eql/index.tsx @@ -31,9 +31,9 @@ import { TimelineId, TimelineTabs } from '../../../../../../common/types/timelin import { EventDetailsWidthProvider } from '../../../../../common/components/events_viewer/event_details_width_context'; import type { inputsModel, State } from '../../../../../common/store'; import { inputsSelectors } from '../../../../../common/store'; -import { SourcererScopeName } from '../../../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../../../sourcerer/store/model'; import { timelineDefaults } from '../../../../store/defaults'; -import { useSourcererDataView } from '../../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../../sourcerer/containers'; import { useEqlEventsCountPortal } from '../../../../../common/hooks/use_timeline_events_count'; import type { TimelineModel } from '../../../../store/model'; import { useTimelineFullScreen } from '../../../../../common/containers/use_full_screen'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/esql/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/esql/index.tsx index 1567c8b2e2e0a..4f78509c054d1 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/esql/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/esql/index.tsx @@ -20,10 +20,10 @@ import type { TimeRange } from '@kbn/es-query'; import { useDispatch } from 'react-redux'; import { updateSavedSearchId } from '../../../../store/actions'; import { useDiscoverInTimelineContext } from '../../../../../common/components/discover_in_timeline/use_discover_in_timeline_context'; -import { useSourcererDataView } from '../../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../../sourcerer/containers'; import { useKibana } from '../../../../../common/lib/kibana'; import { useDiscoverState } from './use_discover_state'; -import { SourcererScopeName } from '../../../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../../../sourcerer/store/model'; import { useSetDiscoverCustomizationCallbacks } from './customizations/use_set_discover_customizations'; import { EmbeddedDiscoverContainer, TimelineESQLGlobalStyles } from './styles'; import { timelineSelectors } from '../../../../store'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/notes/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/notes/index.tsx index b2f87bd22e66c..2fa90a7cec57b 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/notes/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/notes/index.tsx @@ -22,8 +22,8 @@ import { useDispatch } from 'react-redux'; import styled from 'styled-components'; import type { EuiTheme } from '@kbn/react-kibana-context-styled'; -import { useSourcererDataView } from '../../../../../common/containers/sourcerer'; -import { SourcererScopeName } from '../../../../../common/store/sourcerer/model'; +import { useSourcererDataView } from '../../../../../sourcerer/containers'; +import { SourcererScopeName } from '../../../../../sourcerer/store/model'; import { timelineActions } from '../../../../store'; import { useDeepEqualSelector, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/pinned/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/pinned/index.test.tsx index 4b0f58552cee3..7a7d185362120 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/pinned/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/pinned/index.test.tsx @@ -18,8 +18,8 @@ import { useMountAppended } from '../../../../../common/utils/use_mount_appended import { TimelineId, TimelineTabs } from '../../../../../../common/types/timeline'; import { useTimelineEvents } from '../../../../containers'; import { useTimelineEventsDetails } from '../../../../containers/details'; -import { useSourcererDataView } from '../../../../../common/containers/sourcerer'; -import { mockSourcererScope } from '../../../../../common/containers/sourcerer/mocks'; +import { useSourcererDataView } from '../../../../../sourcerer/containers'; +import { mockSourcererScope } from '../../../../../sourcerer/containers/mocks'; import type { Props as PinnedTabContentComponentProps } from '.'; import { PinnedTabContentComponent } from '.'; import { Direction } from '../../../../../../common/search_strategy'; @@ -38,7 +38,7 @@ jest.mock('../../body/events', () => ({ Events: () => <>, })); -jest.mock('../../../../../common/containers/sourcerer'); +jest.mock('../../../../../sourcerer/containers'); const mockUseResizeObserver: jest.Mock = useResizeObserver as jest.Mock; jest.mock('use-resize-observer/polyfilled'); diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/pinned/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/pinned/index.tsx index 987689e1d033b..7a4242178f027 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/pinned/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/pinned/index.tsx @@ -23,10 +23,10 @@ import { StatefulBody } from '../../body'; import { Footer, footerHeight } from '../../footer'; import { requiredFieldsForActions } from '../../../../../detections/components/alerts_table/default_config'; import { EventDetailsWidthProvider } from '../../../../../common/components/events_viewer/event_details_width_context'; -import { SourcererScopeName } from '../../../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../../../sourcerer/store/model'; import { timelineDefaults } from '../../../../store/defaults'; import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; -import { useSourcererDataView } from '../../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../../sourcerer/containers'; import { useTimelineFullScreen } from '../../../../../common/containers/use_full_screen'; import type { TimelineModel } from '../../../../store/model'; import type { State } from '../../../../../common/store'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/query/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/query/index.test.tsx index 0dcbe36e09769..32c7a525f5258 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/query/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/query/index.test.tsx @@ -23,8 +23,8 @@ import { TimelineId, TimelineTabs } from '../../../../../../common/types/timelin import { TimelineStatus } from '../../../../../../common/api/timeline'; import { useTimelineEvents } from '../../../../containers'; import { useTimelineEventsDetails } from '../../../../containers/details'; -import { useSourcererDataView } from '../../../../../common/containers/sourcerer'; -import { mockSourcererScope } from '../../../../../common/containers/sourcerer/mocks'; +import { useSourcererDataView } from '../../../../../sourcerer/containers'; +import { mockSourcererScope } from '../../../../../sourcerer/containers/mocks'; import { Direction } from '../../../../../../common/search_strategy'; import * as helpers from '../../../../../common/lib/kuery'; import { waitFor } from '@testing-library/react'; @@ -42,8 +42,8 @@ jest.mock('../../body/events', () => ({ Events: () => <>, })); -jest.mock('../../../../../common/containers/sourcerer'); -jest.mock('../../../../../common/containers/sourcerer/use_signal_helpers', () => ({ +jest.mock('../../../../../sourcerer/containers'); +jest.mock('../../../../../sourcerer/containers/use_signal_helpers', () => ({ useSignalHelpers: () => ({ signalIndexNeedsInit: false }), })); diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/query/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/query/index.tsx index ed3cd15314444..8a2c42998e3ec 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/query/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/query/index.tsx @@ -38,9 +38,9 @@ import { TimelineId, TimelineTabs } from '../../../../../../common/types/timelin import { EventDetailsWidthProvider } from '../../../../../common/components/events_viewer/event_details_width_context'; import type { inputsModel, State } from '../../../../../common/store'; import { inputsSelectors } from '../../../../../common/store'; -import { SourcererScopeName } from '../../../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../../../sourcerer/store/model'; import { timelineDefaults } from '../../../../store/defaults'; -import { useSourcererDataView } from '../../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../../sourcerer/containers'; import { isActiveTimeline } from '../../../../../helpers'; import type { TimelineModel } from '../../../../store/model'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/query/query_tab_unified_components.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/query/query_tab_unified_components.test.tsx index aa7861f2619a1..36284be9dad18 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/query/query_tab_unified_components.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/query/query_tab_unified_components.test.tsx @@ -12,8 +12,8 @@ import { defaultRowRenderers } from '../../body/renderers'; import { TimelineId } from '../../../../../../common/types/timeline'; import { useTimelineEvents } from '../../../../containers'; import { useTimelineEventsDetails } from '../../../../containers/details'; -import { useSourcererDataView } from '../../../../../common/containers/sourcerer'; -import { mockSourcererScope } from '../../../../../common/containers/sourcerer/mocks'; +import { useSourcererDataView } from '../../../../../sourcerer/containers'; +import { mockSourcererScope } from '../../../../../sourcerer/containers/mocks'; import { createSecuritySolutionStorageMock, mockTimelineData, @@ -45,8 +45,8 @@ jest.mock('../../body/events', () => ({ Events: () => <>, })); -jest.mock('../../../../../common/containers/sourcerer'); -jest.mock('../../../../../common/containers/sourcerer/use_signal_helpers', () => ({ +jest.mock('../../../../../sourcerer/containers'); +jest.mock('../../../../../sourcerer/containers/use_signal_helpers', () => ({ useSignalHelpers: () => ({ signalIndexNeedsInit: false }), })); diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/session/use_session_view.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/session/use_session_view.tsx index 66069daf5eecd..ffb76d4e4f341 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/session/use_session_view.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/session/use_session_view.tsx @@ -22,7 +22,7 @@ import { useKibana } from '../../../../../common/lib/kibana'; import * as i18n from './translations'; import { TimelineTabs } from '../../../../../../common/types/timeline'; import { useDetailPanel } from '../../../side_panel/hooks/use_detail_panel'; -import { SourcererScopeName } from '../../../../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../../../../sourcerer/store/model'; import { isFullScreen } from '../../body/column_headers'; import { SCROLLING_DISABLED_CLASS_NAME } from '../../../../../../common/constants'; import { FULL_SCREEN } from '../../body/column_headers/translations'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/shared/use_timeline_columns.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/shared/use_timeline_columns.tsx index a54e161bbcbfd..6ae207bb0cabf 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/shared/use_timeline_columns.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/shared/use_timeline_columns.tsx @@ -7,8 +7,8 @@ import { isEmpty } from 'lodash/fp'; import { useMemo } from 'react'; -import { SourcererScopeName } from '../../../../../common/store/sourcerer/model'; -import { useSourcererDataView } from '../../../../../common/containers/sourcerer'; +import { SourcererScopeName } from '../../../../../sourcerer/store/model'; +import { useSourcererDataView } from '../../../../../sourcerer/containers'; import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; import { defaultHeaders } from '../../body/column_headers/default_headers'; import { requiredFieldsForActions } from '../../../../../detections/components/alerts_table/default_config'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/shared/use_timeline_control_columns.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/shared/use_timeline_control_columns.tsx index 3536de8f5bb0d..736afdbbec916 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/shared/use_timeline_control_columns.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/shared/use_timeline_control_columns.tsx @@ -9,8 +9,8 @@ import React, { useMemo } from 'react'; import type { EuiDataGridControlColumn } from '@elastic/eui'; import type { SortColumnTable } from '@kbn/securitysolution-data-table'; import { useLicense } from '../../../../../common/hooks/use_license'; -import { SourcererScopeName } from '../../../../../common/store/sourcerer/model'; -import { useSourcererDataView } from '../../../../../common/containers/sourcerer'; +import { SourcererScopeName } from '../../../../../sourcerer/store/model'; +import { useSourcererDataView } from '../../../../../sourcerer/containers'; import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; import { getDefaultControlColumn } from '../../body/control_columns'; import type { UnifiedActionProps } from '../../unified_components/data_table/control_column_cell_render'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/data_table/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/data_table/index.test.tsx index a22deb8649bc4..a03c95341a07b 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/data_table/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/data_table/index.test.tsx @@ -12,14 +12,14 @@ import { defaultUdtHeaders } from '../default_headers'; import { TimelineId, TimelineTabs } from '../../../../../../common/types'; import { DataLoadingState } from '@kbn/unified-data-table'; import { fireEvent, render, screen, waitFor, within } from '@testing-library/react'; -import { useSourcererDataView } from '../../../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../../sourcerer/containers'; import type { ComponentProps } from 'react'; import { getColumnHeaders } from '../../body/column_headers/helpers'; -import { mockSourcererScope } from '../../../../../common/containers/sourcerer/mocks'; +import { mockSourcererScope } from '../../../../../sourcerer/containers/mocks'; import { timelineActions } from '../../../../store'; import type { ExpandedDetailTimeline } from '../../../../../../common/types'; -jest.mock('../../../../../common/containers/sourcerer'); +jest.mock('../../../../../sourcerer/containers'); const onFieldEditedMock = jest.fn(); const refetchMock = jest.fn(); diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/data_table/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/data_table/index.tsx index 1c9a6a91c0aac..e2433a7f1e127 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/data_table/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/data_table/index.tsx @@ -31,8 +31,8 @@ import type { } from '../../../../../../common/types/timeline'; import { TimelineId } from '../../../../../../common/types/timeline'; import type { State, inputsModel } from '../../../../../common/store'; -import { SourcererScopeName } from '../../../../../common/store/sourcerer/model'; -import { useSourcererDataView } from '../../../../../common/containers/sourcerer'; +import { SourcererScopeName } from '../../../../../sourcerer/store/model'; +import { useSourcererDataView } from '../../../../../sourcerer/containers'; import { activeTimeline } from '../../../../containers/active_timeline_context'; import { DetailsPanel } from '../../../side_panel'; import { SecurityCellActionsTrigger } from '../../../../../app/actions/constants'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/index.test.tsx index 2f874c4714ebf..f425c72880521 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/index.test.tsx @@ -12,8 +12,8 @@ import { UnifiedTimeline } from '.'; import { TimelineId } from '../../../../../common/types/timeline'; import { useTimelineEvents } from '../../../containers'; import { useTimelineEventsDetails } from '../../../containers/details'; -import { useSourcererDataView } from '../../../../common/containers/sourcerer'; -import { mockSourcererScope } from '../../../../common/containers/sourcerer/mocks'; +import { useSourcererDataView } from '../../../../sourcerer/containers'; +import { mockSourcererScope } from '../../../../sourcerer/containers/mocks'; import { createSecuritySolutionStorageMock, mockTimelineData, @@ -49,8 +49,8 @@ jest.mock('../body/events', () => ({ Events: () => <>, })); -jest.mock('../../../../common/containers/sourcerer'); -jest.mock('../../../../common/containers/sourcerer/use_signal_helpers', () => ({ +jest.mock('../../../../sourcerer/containers'); +jest.mock('../../../../sourcerer/containers/use_signal_helpers', () => ({ useSignalHelpers: () => ({ signalIndexNeedsInit: false }), })); diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/utils.test.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/utils.test.ts index 610efe219e6f6..ae336d6bf4b79 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/utils.test.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/utils.test.ts @@ -8,7 +8,7 @@ import { DataView } from '@kbn/data-views-plugin/common'; import { fieldFormatsMock } from '@kbn/field-formats-plugin/common/mocks'; -import { mockSourcererScope } from '../../../../common/containers/sourcerer/mocks'; +import { mockSourcererScope } from '../../../../sourcerer/containers/mocks'; import { mockTimelineData } from '../../../../common/mock'; import { transformTimelineItemToUnifiedRows } from './utils'; diff --git a/x-pack/plugins/security_solution/public/timelines/containers/index.tsx b/x-pack/plugins/security_solution/public/timelines/containers/index.tsx index ba209c7ba0e77..1ba5e363324a8 100644 --- a/x-pack/plugins/security_solution/public/timelines/containers/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/containers/index.tsx @@ -21,7 +21,7 @@ import type { import type { ESQuery } from '../../../common/typed_json'; import type { inputsModel } from '../../common/store'; -import type { RunTimeMappings } from '../../common/store/sourcerer/model'; +import type { RunTimeMappings } from '../../sourcerer/store/model'; import { useKibana } from '../../common/lib/kibana'; import { createFilter } from '../../common/containers/helpers'; import { timelineActions } from '../store'; diff --git a/x-pack/plugins/security_solution/public/timelines/containers/use_timeline_data_filters.test.tsx b/x-pack/plugins/security_solution/public/timelines/containers/use_timeline_data_filters.test.tsx index 82c05eb2008b4..9142aca78424c 100644 --- a/x-pack/plugins/security_solution/public/timelines/containers/use_timeline_data_filters.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/containers/use_timeline_data_filters.test.tsx @@ -9,7 +9,7 @@ import { renderHook } from '@testing-library/react-hooks'; import { mockGlobalState, TestProviders, createMockStore } from '../../common/mock'; import { useTimelineDataFilters } from './use_timeline_data_filters'; import React from 'react'; -import { SourcererScopeName } from '../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../sourcerer/store/model'; jest.mock('react-router-dom', () => { const actual = jest.requireActual('react-router-dom'); diff --git a/x-pack/plugins/security_solution/public/timelines/containers/use_timeline_data_filters.ts b/x-pack/plugins/security_solution/public/timelines/containers/use_timeline_data_filters.ts index 9651fce33ef3e..d9ec4998d5e38 100644 --- a/x-pack/plugins/security_solution/public/timelines/containers/use_timeline_data_filters.ts +++ b/x-pack/plugins/security_solution/public/timelines/containers/use_timeline_data_filters.ts @@ -15,8 +15,8 @@ import { endSelector, } from '../../common/components/super_date_picker/selectors'; import { useIsExperimentalFeatureEnabled } from '../../common/hooks/use_experimental_features'; -import { SourcererScopeName } from '../../common/store/sourcerer/model'; -import { useSourcererDataView, getScopeFromPath } from '../../common/containers/sourcerer'; +import { SourcererScopeName } from '../../sourcerer/store/model'; +import { useSourcererDataView, getScopeFromPath } from '../../sourcerer/containers'; import { sourcererSelectors } from '../../common/store'; export function useTimelineDataFilters(isActiveTimelines: boolean) { diff --git a/x-pack/plugins/security_solution/public/timelines/hooks/use_create_timeline.test.tsx b/x-pack/plugins/security_solution/public/timelines/hooks/use_create_timeline.test.tsx index 7a5f0a0adf154..39cfd3f16bc35 100644 --- a/x-pack/plugins/security_solution/public/timelines/hooks/use_create_timeline.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/hooks/use_create_timeline.test.tsx @@ -13,10 +13,10 @@ import { TimelineId } from '../../../common/types'; import { useDiscoverInTimelineContext } from '../../common/components/discover_in_timeline/use_discover_in_timeline_context'; import { timelineActions } from '../store'; import { inputsActions } from '../../common/store/inputs'; -import { sourcererActions } from '../../common/store/sourcerer'; +import { sourcererActions } from '../../sourcerer/store'; import { appActions } from '../../common/store/app'; import { defaultHeaders } from '../components/timeline/body/column_headers/default_headers'; -import { SourcererScopeName } from '../../common/store/sourcerer/model'; +import { SourcererScopeName } from '../../sourcerer/store/model'; import { InputsModelId } from '../../common/store/inputs/constants'; import { TestProviders, mockGlobalState } from '../../common/mock'; diff --git a/x-pack/plugins/security_solution/public/timelines/hooks/use_create_timeline.tsx b/x-pack/plugins/security_solution/public/timelines/hooks/use_create_timeline.tsx index 199549ef103ea..8c30f2485ae09 100644 --- a/x-pack/plugins/security_solution/public/timelines/hooks/use_create_timeline.tsx +++ b/x-pack/plugins/security_solution/public/timelines/hooks/use_create_timeline.tsx @@ -15,8 +15,8 @@ import { TimelineId } from '../../../common/types/timeline'; import type { TimelineTypeLiteral } from '../../../common/api/timeline'; import { useDeepEqualSelector } from '../../common/hooks/use_selector'; import { inputsActions, inputsSelectors } from '../../common/store/inputs'; -import { sourcererActions, sourcererSelectors } from '../../common/store/sourcerer'; -import { SourcererScopeName } from '../../common/store/sourcerer/model'; +import { sourcererActions, sourcererSelectors } from '../../sourcerer/store'; +import { SourcererScopeName } from '../../sourcerer/store/model'; import { appActions } from '../../common/store/app'; import type { TimeRange } from '../../common/store/inputs/model'; import { useDiscoverInTimelineContext } from '../../common/components/discover_in_timeline/use_discover_in_timeline_context'; diff --git a/x-pack/plugins/security_solution/public/timelines/pages/timelines_page.test.tsx b/x-pack/plugins/security_solution/public/timelines/pages/timelines_page.test.tsx index 92ebb124a45c1..43a0eab5a5d49 100644 --- a/x-pack/plugins/security_solution/public/timelines/pages/timelines_page.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/pages/timelines_page.test.tsx @@ -10,7 +10,7 @@ import { shallow } from 'enzyme'; import React from 'react'; import { useKibana } from '../../common/lib/kibana'; import { TimelinesPage } from './timelines_page'; -import { useSourcererDataView } from '../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../sourcerer/containers'; jest.mock('react-router-dom', () => { const originalModule = jest.requireActual('react-router-dom'); @@ -23,7 +23,7 @@ jest.mock('react-router-dom', () => { }; }); jest.mock('../../overview/components/events_by_dataset'); -jest.mock('../../common/containers/sourcerer'); +jest.mock('../../sourcerer/containers'); jest.mock('../../common/lib/kibana', () => { const originalModule = jest.requireActual('../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/timelines/pages/timelines_page.tsx b/x-pack/plugins/security_solution/public/timelines/pages/timelines_page.tsx index 7fba6b8b6b41c..547bedf1caea3 100644 --- a/x-pack/plugins/security_solution/public/timelines/pages/timelines_page.tsx +++ b/x-pack/plugins/security_solution/public/timelines/pages/timelines_page.tsx @@ -17,7 +17,7 @@ import { SpyRoute } from '../../common/utils/route/spy_routes'; import { StatefulOpenTimeline } from '../components/open_timeline'; import * as i18n from './translations'; import { SecurityPageName } from '../../app/types'; -import { useSourcererDataView } from '../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../sourcerer/containers'; import { EmptyPrompt } from '../../common/components/empty_prompt'; export const DEFAULT_SEARCH_RESULTS_PER_PAGE = 10;