From 974293fa0118c3f40bc4b39052f0141cb4f379ce Mon Sep 17 00:00:00 2001 From: Andrew Macri Date: Mon, 18 Nov 2024 15:32:43 -0500 Subject: [PATCH] [Security Solution] [Attack discovery] Updates Attack discovery directory structure (#200613) ### [Security Solution] [Attack discovery] Updates Attack discovery directory structure This PR updates the Attack discovery directory structure to align it with the latest implementation. The scope of this update is limited to file paths and imports. --- .../public/attack_discovery/helpers.test.tsx | 2 +- .../public/attack_discovery/pages/index.test.tsx | 8 ++++---- .../public/attack_discovery/pages/index.tsx | 2 +- .../{ => pages}/mock/mock_attack_discovery.ts | 0 .../mock_find_anonymization_fields_response.ts | 0 .../{ => pages}/mock/mock_use_attack_discovery.ts | 0 .../helpers.test.ts | 0 .../attack_discovery_markdown_parser/helpers.ts | 0 .../index.test.tsx | 2 +- .../attack_discovery_markdown_parser/index.tsx | 0 .../get_host_flyout_panel_props.test.ts | 0 .../get_host_flyout_panel_props.ts | 0 .../get_user_flyout_panel_props.test.ts | 0 .../get_user_flyout_panel_props.ts | 0 .../field_markdown_renderer/helpers.test.ts | 0 .../field_markdown_renderer/helpers.ts | 0 .../field_markdown_renderer/index.test.tsx | 4 ++-- .../field_markdown_renderer/index.tsx | 2 +- .../index.test.tsx | 2 +- .../attack_discovery_markdown_formatter/index.tsx | 0 .../attack_discovery_markdown_formatter/types.ts | 2 +- .../actionable_summary/index.test.tsx | 4 ++-- .../actionable_summary/index.tsx | 0 .../actions/actions_placeholder/index.test.tsx | 0 .../actions/actions_placeholder/index.tsx | 0 .../actions/alerts_badge/index.test.tsx | 0 .../actions/alerts_badge/index.tsx | 0 .../attack_discovery_panel/actions/index.test.tsx | 4 ++-- .../attack_discovery_panel/actions/index.tsx | 2 +- .../actions/take_action/helpers.test.ts | 0 .../actions/take_action/helpers.ts | 0 .../actions/take_action/index.test.tsx | 4 ++-- .../actions/take_action/index.tsx | 6 +++--- .../actions/take_action/translations.ts | 0 .../attack_discovery_panel/actions/translations.ts | 0 .../actions/use_add_to_case/index.test.tsx | 4 ++-- .../actions/use_add_to_case/index.tsx | 2 +- .../actions/use_add_to_case/translations.ts | 0 .../use_add_to_existing_case/index.test.tsx | 6 +++--- .../actions/use_add_to_existing_case/index.tsx | 2 +- .../use_add_to_existing_case/translations.ts | 0 .../get_attack_discovery_markdown.test.tsx | 2 +- .../get_attack_discovery_markdown.ts | 2 +- .../results}/attack_discovery_panel/index.test.tsx | 4 ++-- .../results}/attack_discovery_panel/index.tsx | 0 .../tabs/alerts_tab/index.test.tsx | 4 ++-- .../tabs/alerts_tab/index.tsx | 4 ++-- .../attack/attack_chain/axis_tick/index.test.tsx | 0 .../attack/attack_chain/axis_tick/index.tsx | 0 .../attack/attack_chain/index.test.tsx | 4 ++-- .../attack/attack_chain/index.tsx | 2 +- .../attack/attack_chain/tactic/index.test.tsx | 0 .../attack/attack_chain/tactic/index.tsx | 0 .../attack/mini_attack_chain/index.test.tsx | 6 +++--- .../attack/mini_attack_chain/index.tsx | 2 +- .../attack/mini_attack_chain/translations.ts | 0 .../tabs/attack_discovery_tab/index.test.tsx | 4 ++-- .../tabs/attack_discovery_tab/index.tsx | 8 ++++---- .../tabs/attack_discovery_tab/translations.ts | 0 .../attack_discovery_panel/tabs/get_tabs.test.tsx | 4 ++-- .../attack_discovery_panel/tabs/get_tabs.tsx | 0 .../attack_discovery_panel/tabs/index.test.tsx | 4 ++-- .../results}/attack_discovery_panel/tabs/index.tsx | 0 .../attack_discovery_panel/tabs/translations.ts | 0 .../attack_discovery_panel/title/index.test.tsx | 0 .../attack_discovery_panel/title/index.tsx | 0 .../view_in_ai_assistant/index.test.tsx | 4 ++-- .../view_in_ai_assistant/index.tsx | 0 .../view_in_ai_assistant/translations.ts | 0 .../use_view_in_ai_assistant.test.ts | 10 +++++----- .../use_view_in_ai_assistant.ts | 4 ++-- .../empty_prompt/animated_counter/index.test.tsx | 0 .../empty_prompt/animated_counter/index.tsx | 0 .../empty_states}/empty_prompt/index.test.tsx | 6 +++--- .../empty_states}/empty_prompt/index.tsx | 0 .../empty_states}/empty_prompt/translations.ts | 0 .../empty_states}/failure/index.test.tsx | 0 .../{ => results/empty_states}/failure/index.tsx | 0 .../empty_states}/failure/translations.ts | 0 .../empty_states}/generate/index.test.tsx | 0 .../{ => results/empty_states}/generate/index.tsx | 0 .../helpers/show_empty_states/index.test.ts | 4 ++-- .../helpers/show_empty_states/index.ts | 2 +- .../{ => results}/empty_states/index.test.tsx | 2 +- .../pages/{ => results}/empty_states/index.tsx | 10 +++++----- .../empty_states}/no_alerts/index.test.tsx | 0 .../{ => results/empty_states}/no_alerts/index.tsx | 0 .../empty_states}/no_alerts/translations.ts | 0 .../empty_states}/welcome/index.test.tsx | 2 +- .../{ => results/empty_states}/welcome/index.tsx | 0 .../empty_states}/welcome/translations.ts | 0 .../attack_discovery/pages/results/index.test.tsx | 2 +- .../attack_discovery/pages/results/index.tsx | 8 ++++---- .../pages/{ => results}/summary/index.test.tsx | 0 .../pages/{ => results}/summary/index.tsx | 4 ++-- .../summary}/summary_count/index.test.tsx | 0 .../{ => results/summary}/summary_count/index.tsx | 0 .../summary}/summary_count/translations.ts | 0 .../use_attack_discovery/helpers.test.ts | 0 .../{ => pages}/use_attack_discovery/helpers.ts | 0 .../use_attack_discovery/index.test.tsx | 14 +++++++------- .../{ => pages}/use_attack_discovery/index.tsx | 8 ++++---- .../use_poll_api}/use_poll_api.test.tsx | 2 +- .../use_poll_api}/use_poll_api.tsx | 6 +++--- 104 files changed, 98 insertions(+), 98 deletions(-) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages}/mock/mock_attack_discovery.ts (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages}/mock/mock_find_anonymization_fields_response.ts (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages}/mock/mock_use_attack_discovery.ts (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_markdown_formatter/attack_discovery_markdown_parser/helpers.test.ts (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_markdown_formatter/attack_discovery_markdown_parser/helpers.ts (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_markdown_formatter/attack_discovery_markdown_parser/index.test.tsx (99%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_markdown_formatter/attack_discovery_markdown_parser/index.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_markdown_formatter/field_markdown_renderer/get_host_flyout_panel_props.test.ts (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_markdown_formatter/field_markdown_renderer/get_host_flyout_panel_props.ts (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_markdown_formatter/field_markdown_renderer/get_user_flyout_panel_props.test.ts (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_markdown_formatter/field_markdown_renderer/get_user_flyout_panel_props.ts (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_markdown_formatter/field_markdown_renderer/helpers.test.ts (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_markdown_formatter/field_markdown_renderer/helpers.ts (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_markdown_formatter/field_markdown_renderer/index.test.tsx (95%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_markdown_formatter/field_markdown_renderer/index.tsx (96%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_markdown_formatter/index.test.tsx (98%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_markdown_formatter/index.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_markdown_formatter/types.ts (85%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/actionable_summary/index.test.tsx (96%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/actionable_summary/index.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/actions/actions_placeholder/index.test.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/actions/actions_placeholder/index.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/actions/alerts_badge/index.test.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/actions/alerts_badge/index.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/actions/index.test.tsx (90%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/actions/index.tsx (96%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/actions/take_action/helpers.test.ts (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/actions/take_action/helpers.ts (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/actions/take_action/index.test.tsx (89%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/actions/take_action/index.tsx (95%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/actions/take_action/translations.ts (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/actions/translations.ts (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/actions/use_add_to_case/index.test.tsx (94%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/actions/use_add_to_case/index.tsx (97%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/actions/use_add_to_case/translations.ts (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/actions/use_add_to_existing_case/index.test.tsx (95%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/actions/use_add_to_existing_case/index.tsx (97%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/actions/use_add_to_existing_case/translations.ts (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results/attack_discovery_panel}/get_attack_discovery_markdown/get_attack_discovery_markdown.test.tsx (99%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results/attack_discovery_panel}/get_attack_discovery_markdown/get_attack_discovery_markdown.ts (96%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/index.test.tsx (93%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/index.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/tabs/alerts_tab/index.test.tsx (82%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/tabs/alerts_tab/index.tsx (95%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results/attack_discovery_panel/tabs/attack_discovery_tab}/attack/attack_chain/axis_tick/index.test.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results/attack_discovery_panel/tabs/attack_discovery_tab}/attack/attack_chain/axis_tick/index.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results/attack_discovery_panel/tabs/attack_discovery_tab}/attack/attack_chain/index.test.tsx (85%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results/attack_discovery_panel/tabs/attack_discovery_tab}/attack/attack_chain/index.tsx (95%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results/attack_discovery_panel/tabs/attack_discovery_tab}/attack/attack_chain/tactic/index.test.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results/attack_discovery_panel/tabs/attack_discovery_tab}/attack/attack_chain/tactic/index.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results/attack_discovery_panel/tabs/attack_discovery_tab}/attack/mini_attack_chain/index.test.tsx (80%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results/attack_discovery_panel/tabs/attack_discovery_tab}/attack/mini_attack_chain/index.tsx (97%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results/attack_discovery_panel/tabs/attack_discovery_tab}/attack/mini_attack_chain/translations.ts (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/tabs/attack_discovery_tab/index.test.tsx (98%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/tabs/attack_discovery_tab/index.tsx (92%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/tabs/attack_discovery_tab/translations.ts (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/tabs/get_tabs.test.tsx (93%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/tabs/get_tabs.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/tabs/index.test.tsx (88%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/tabs/index.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/tabs/translations.ts (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/title/index.test.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/title/index.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/view_in_ai_assistant/index.test.tsx (93%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/view_in_ai_assistant/index.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/view_in_ai_assistant/translations.ts (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/view_in_ai_assistant/use_view_in_ai_assistant.test.ts (86%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages/results}/attack_discovery_panel/view_in_ai_assistant/use_view_in_ai_assistant.ts (90%) rename x-pack/plugins/security_solution/public/attack_discovery/pages/{ => results/empty_states}/empty_prompt/animated_counter/index.test.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/pages/{ => results/empty_states}/empty_prompt/animated_counter/index.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/pages/{ => results/empty_states}/empty_prompt/index.test.tsx (95%) rename x-pack/plugins/security_solution/public/attack_discovery/pages/{ => results/empty_states}/empty_prompt/index.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/pages/{ => results/empty_states}/empty_prompt/translations.ts (100%) rename x-pack/plugins/security_solution/public/attack_discovery/pages/{ => results/empty_states}/failure/index.test.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/pages/{ => results/empty_states}/failure/index.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/pages/{ => results/empty_states}/failure/translations.ts (100%) rename x-pack/plugins/security_solution/public/attack_discovery/pages/{ => results/empty_states}/generate/index.test.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/pages/{ => results/empty_states}/generate/index.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/pages/{ => results}/empty_states/helpers/show_empty_states/index.test.ts (96%) rename x-pack/plugins/security_solution/public/attack_discovery/pages/{ => results}/empty_states/helpers/show_empty_states/index.ts (97%) rename x-pack/plugins/security_solution/public/attack_discovery/pages/{ => results}/empty_states/index.test.tsx (99%) rename x-pack/plugins/security_solution/public/attack_discovery/pages/{ => results}/empty_states/index.tsx (90%) rename x-pack/plugins/security_solution/public/attack_discovery/pages/{ => results/empty_states}/no_alerts/index.test.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/pages/{ => results/empty_states}/no_alerts/index.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/pages/{ => results/empty_states}/no_alerts/translations.ts (100%) rename x-pack/plugins/security_solution/public/attack_discovery/pages/{ => results/empty_states}/welcome/index.test.tsx (94%) rename x-pack/plugins/security_solution/public/attack_discovery/pages/{ => results/empty_states}/welcome/index.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/pages/{ => results/empty_states}/welcome/translations.ts (100%) rename x-pack/plugins/security_solution/public/attack_discovery/pages/{ => results}/summary/index.test.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/pages/{ => results}/summary/index.tsx (92%) rename x-pack/plugins/security_solution/public/attack_discovery/pages/{ => results/summary}/summary_count/index.test.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/pages/{ => results/summary}/summary_count/index.tsx (100%) rename x-pack/plugins/security_solution/public/attack_discovery/pages/{ => results/summary}/summary_count/translations.ts (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages}/use_attack_discovery/helpers.test.ts (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages}/use_attack_discovery/helpers.ts (100%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages}/use_attack_discovery/index.test.tsx (95%) rename x-pack/plugins/security_solution/public/attack_discovery/{ => pages}/use_attack_discovery/index.tsx (97%) rename x-pack/plugins/security_solution/public/attack_discovery/{hooks => pages/use_attack_discovery/use_poll_api}/use_poll_api.test.tsx (99%) rename x-pack/plugins/security_solution/public/attack_discovery/{hooks => pages/use_attack_discovery/use_poll_api}/use_poll_api.tsx (98%) diff --git a/x-pack/plugins/security_solution/public/attack_discovery/helpers.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/helpers.test.tsx index 4f5e43323333f..05970dcec0233 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/helpers.test.tsx @@ -19,7 +19,7 @@ import { RECONNAISSANCE, replaceNewlineLiterals, } from './helpers'; -import { mockAttackDiscovery } from './mock/mock_attack_discovery'; +import { mockAttackDiscovery } from './pages/mock/mock_attack_discovery'; import * as i18n from './translations'; const expectedTactics = { diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/index.test.tsx index 8a53cd81db96a..fe59d4cda04cd 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/pages/index.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/index.test.tsx @@ -21,13 +21,13 @@ import { mockHistory } from '../../common/utils/route/mocks'; import { AttackDiscoveryPage } from '.'; import { mockTimelines } from '../../common/mock/mock_timelines_plugin'; import { UpsellingProvider } from '../../common/components/upselling_provider'; -import { mockFindAnonymizationFieldsResponse } from '../mock/mock_find_anonymization_fields_response'; +import { mockFindAnonymizationFieldsResponse } from './mock/mock_find_anonymization_fields_response'; import { getMockUseAttackDiscoveriesWithCachedAttackDiscoveries, getMockUseAttackDiscoveriesWithNoAttackDiscoveriesLoading, -} from '../mock/mock_use_attack_discovery'; +} from './mock/mock_use_attack_discovery'; import { ATTACK_DISCOVERY_PAGE_TITLE } from './page_title/translations'; -import { useAttackDiscovery } from '../use_attack_discovery'; +import { useAttackDiscovery } from './use_attack_discovery'; import { useLoadConnectors } from '@kbn/elastic-assistant/impl/connectorland/use_load_connectors'; const mockConnectors: unknown[] = [ @@ -75,7 +75,7 @@ jest.mock('../../common/links', () => ({ }), })); -jest.mock('../use_attack_discovery', () => ({ +jest.mock('./use_attack_discovery', () => ({ useAttackDiscovery: jest.fn().mockReturnValue({ approximateFutureTime: null, attackDiscoveries: [], diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/index.tsx index e55b2fe5083b6..26738eac2dffe 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/pages/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/index.tsx @@ -29,7 +29,7 @@ import { CONNECTOR_ID_LOCAL_STORAGE_KEY, getSize, showLoading } from './helpers' import { LoadingCallout } from './loading_callout'; import { PageTitle } from './page_title'; import { Results } from './results'; -import { useAttackDiscovery } from '../use_attack_discovery'; +import { useAttackDiscovery } from './use_attack_discovery'; const AttackDiscoveryPageComponent: React.FC = () => { const spaceId = useSpaceId() ?? 'default'; diff --git a/x-pack/plugins/security_solution/public/attack_discovery/mock/mock_attack_discovery.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/mock/mock_attack_discovery.ts similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/mock/mock_attack_discovery.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/mock/mock_attack_discovery.ts diff --git a/x-pack/plugins/security_solution/public/attack_discovery/mock/mock_find_anonymization_fields_response.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/mock/mock_find_anonymization_fields_response.ts similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/mock/mock_find_anonymization_fields_response.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/mock/mock_find_anonymization_fields_response.ts diff --git a/x-pack/plugins/security_solution/public/attack_discovery/mock/mock_use_attack_discovery.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/mock/mock_use_attack_discovery.ts similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/mock/mock_use_attack_discovery.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/mock/mock_use_attack_discovery.ts diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/attack_discovery_markdown_parser/helpers.test.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/attack_discovery_markdown_parser/helpers.test.ts similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/attack_discovery_markdown_parser/helpers.test.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/attack_discovery_markdown_parser/helpers.test.ts diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/attack_discovery_markdown_parser/helpers.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/attack_discovery_markdown_parser/helpers.ts similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/attack_discovery_markdown_parser/helpers.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/attack_discovery_markdown_parser/helpers.ts diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/attack_discovery_markdown_parser/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/attack_discovery_markdown_parser/index.test.tsx similarity index 99% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/attack_discovery_markdown_parser/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/attack_discovery_markdown_parser/index.test.tsx index 5772272673b67..ff145d03d6b69 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/attack_discovery_markdown_parser/index.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/attack_discovery_markdown_parser/index.test.tsx @@ -13,7 +13,7 @@ import { import { render, screen } from '@testing-library/react'; import React from 'react'; -import { TestProviders } from '../../../common/mock'; +import { TestProviders } from '../../../../../common/mock'; import { getFieldMarkdownRenderer } from '../field_markdown_renderer'; import { AttackDiscoveryMarkdownParser } from '.'; diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/attack_discovery_markdown_parser/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/attack_discovery_markdown_parser/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/attack_discovery_markdown_parser/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/attack_discovery_markdown_parser/index.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/field_markdown_renderer/get_host_flyout_panel_props.test.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/field_markdown_renderer/get_host_flyout_panel_props.test.ts similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/field_markdown_renderer/get_host_flyout_panel_props.test.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/field_markdown_renderer/get_host_flyout_panel_props.test.ts diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/field_markdown_renderer/get_host_flyout_panel_props.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/field_markdown_renderer/get_host_flyout_panel_props.ts similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/field_markdown_renderer/get_host_flyout_panel_props.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/field_markdown_renderer/get_host_flyout_panel_props.ts diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/field_markdown_renderer/get_user_flyout_panel_props.test.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/field_markdown_renderer/get_user_flyout_panel_props.test.ts similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/field_markdown_renderer/get_user_flyout_panel_props.test.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/field_markdown_renderer/get_user_flyout_panel_props.test.ts diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/field_markdown_renderer/get_user_flyout_panel_props.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/field_markdown_renderer/get_user_flyout_panel_props.ts similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/field_markdown_renderer/get_user_flyout_panel_props.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/field_markdown_renderer/get_user_flyout_panel_props.ts diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/field_markdown_renderer/helpers.test.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/field_markdown_renderer/helpers.test.ts similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/field_markdown_renderer/helpers.test.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/field_markdown_renderer/helpers.test.ts diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/field_markdown_renderer/helpers.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/field_markdown_renderer/helpers.ts similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/field_markdown_renderer/helpers.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/field_markdown_renderer/helpers.ts diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/field_markdown_renderer/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/field_markdown_renderer/index.test.tsx similarity index 95% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/field_markdown_renderer/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/field_markdown_renderer/index.test.tsx index 344370c0f165f..1cdac7e6280f2 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/field_markdown_renderer/index.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/field_markdown_renderer/index.test.tsx @@ -9,9 +9,9 @@ import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; import { fireEvent, render, screen } from '@testing-library/react'; import React from 'react'; -import { TestProviders } from '../../../common/mock'; +import { TestProviders } from '../../../../../common/mock'; import { getFieldMarkdownRenderer } from '.'; -import { createExpandableFlyoutApiMock } from '../../../common/mock/expandable_flyout'; +import { createExpandableFlyoutApiMock } from '../../../../../common/mock/expandable_flyout'; jest.mock('@kbn/expandable-flyout'); diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/field_markdown_renderer/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/field_markdown_renderer/index.tsx similarity index 96% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/field_markdown_renderer/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/field_markdown_renderer/index.tsx index c5eac0f7fcbe7..06e252b7686dc 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/field_markdown_renderer/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/field_markdown_renderer/index.tsx @@ -9,7 +9,7 @@ import { EuiBadge, EuiButtonEmpty, EuiToolTip } from '@elastic/eui'; import React, { useCallback, useMemo } from 'react'; import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; -import { DraggableBadge } from '../../../common/components/draggables'; +import { DraggableBadge } from '../../../../../common/components/draggables'; import { getFlyoutPanelProps } from './helpers'; import type { ParsedField } from '../types'; diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/index.test.tsx similarity index 98% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/index.test.tsx index 5013ce646fe28..a0e4107be6e6e 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/index.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/index.test.tsx @@ -8,7 +8,7 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; -import { TestProviders } from '../../common/mock'; +import { TestProviders } from '../../../../common/mock'; import { AttackDiscoveryMarkdownFormatter } from '.'; describe('AttackDiscoveryMarkdownFormatter', () => { diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/index.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/types.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/types.ts similarity index 85% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/types.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/types.ts index 6eaf19e83f534..7c88355dbbdff 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_markdown_formatter/types.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_markdown_formatter/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { QueryOperator } from '../../../common/types'; +import type { QueryOperator } from '../../../../../common/types'; export interface ParsedField { icon?: string; diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actionable_summary/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actionable_summary/index.test.tsx similarity index 96% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actionable_summary/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actionable_summary/index.test.tsx index 55d636bf35270..44b75ea016c10 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actionable_summary/index.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actionable_summary/index.test.tsx @@ -9,8 +9,8 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; import { ActionableSummary } from '.'; -import { TestProviders } from '../../../common/mock'; -import { mockAttackDiscovery } from '../../mock/mock_attack_discovery'; +import { TestProviders } from '../../../../../common/mock'; +import { mockAttackDiscovery } from '../../../mock/mock_attack_discovery'; describe('ActionableSummary', () => { const mockReplacements = { diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actionable_summary/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actionable_summary/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actionable_summary/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actionable_summary/index.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/actions_placeholder/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/actions_placeholder/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/actions_placeholder/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/actions_placeholder/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/actions_placeholder/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/actions_placeholder/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/actions_placeholder/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/actions_placeholder/index.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/alerts_badge/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/alerts_badge/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/alerts_badge/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/alerts_badge/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/alerts_badge/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/alerts_badge/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/alerts_badge/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/alerts_badge/index.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/index.test.tsx similarity index 90% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/index.test.tsx index 30096f33dde90..4cc3e636e7b4f 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/index.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/index.test.tsx @@ -9,8 +9,8 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; import { Actions } from '.'; -import { TestProviders } from '../../../common/mock'; -import { mockAttackDiscovery } from '../../mock/mock_attack_discovery'; +import { TestProviders } from '../../../../../common/mock'; +import { mockAttackDiscovery } from '../../../mock/mock_attack_discovery'; import { ATTACK_CHAIN, ALERTS } from './translations'; describe('Actions', () => { diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/index.tsx similarity index 96% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/index.tsx index 9dc81821917f7..f274718c8d4b4 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/index.tsx @@ -11,7 +11,7 @@ import type { AttackDiscovery, Replacements } from '@kbn/elastic-assistant-commo import React from 'react'; import { AlertsBadge } from './alerts_badge'; -import { MiniAttackChain } from '../../attack/mini_attack_chain'; +import { MiniAttackChain } from '../tabs/attack_discovery_tab/attack/mini_attack_chain'; import { TakeAction } from './take_action'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/take_action/helpers.test.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/take_action/helpers.test.ts similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/take_action/helpers.test.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/take_action/helpers.test.ts diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/take_action/helpers.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/take_action/helpers.ts similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/take_action/helpers.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/take_action/helpers.ts diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/take_action/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/take_action/index.test.tsx similarity index 89% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/take_action/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/take_action/index.test.tsx index 2772aa6e0c7a2..8cae298fb994e 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/take_action/index.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/take_action/index.test.tsx @@ -8,8 +8,8 @@ import { fireEvent, render, screen } from '@testing-library/react'; import React from 'react'; -import { TestProviders } from '../../../../common/mock'; -import { mockAttackDiscovery } from '../../../mock/mock_attack_discovery'; +import { TestProviders } from '../../../../../../common/mock'; +import { mockAttackDiscovery } from '../../../../mock/mock_attack_discovery'; import { TakeAction } from '.'; describe('TakeAction', () => { diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/take_action/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/take_action/index.tsx similarity index 95% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/take_action/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/take_action/index.tsx index d94a177d52fdc..9701114915507 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/take_action/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/take_action/index.tsx @@ -15,9 +15,9 @@ import { } from '@elastic/eui'; import React, { useCallback, useMemo, useState } from 'react'; -import { useKibana } from '../../../../common/lib/kibana'; -import { APP_ID } from '../../../../../common'; -import { getAttackDiscoveryMarkdown } from '../../../get_attack_discovery_markdown/get_attack_discovery_markdown'; +import { useKibana } from '../../../../../../common/lib/kibana'; +import { APP_ID } from '../../../../../../../common'; +import { getAttackDiscoveryMarkdown } from '../../get_attack_discovery_markdown/get_attack_discovery_markdown'; import * as i18n from './translations'; import { useAddToNewCase } from '../use_add_to_case'; import { useAddToExistingCase } from '../use_add_to_existing_case'; diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/take_action/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/take_action/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/take_action/translations.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/take_action/translations.ts diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/translations.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/translations.ts diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/use_add_to_case/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/use_add_to_case/index.test.tsx similarity index 94% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/use_add_to_case/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/use_add_to_case/index.test.tsx index d1c2e84049e9a..7ecb824739679 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/use_add_to_case/index.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/use_add_to_case/index.test.tsx @@ -8,9 +8,9 @@ import { act, renderHook } from '@testing-library/react-hooks'; import { useAddToNewCase } from '.'; -import { TestProviders } from '../../../../common/mock'; +import { TestProviders } from '../../../../../../common/mock'; -jest.mock('../../../../common/lib/kibana', () => ({ +jest.mock('../../../../../../common/lib/kibana', () => ({ useKibana: jest.fn().mockReturnValue({ services: { cases: { diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/use_add_to_case/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/use_add_to_case/index.tsx similarity index 97% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/use_add_to_case/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/use_add_to_case/index.tsx index d2418c43ef66b..84953c709664f 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/use_add_to_case/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/use_add_to_case/index.tsx @@ -11,7 +11,7 @@ import { useAssistantContext } from '@kbn/elastic-assistant'; import type { Replacements } from '@kbn/elastic-assistant-common'; import React, { useCallback, useMemo } from 'react'; -import { useKibana } from '../../../../common/lib/kibana'; +import { useKibana } from '../../../../../../common/lib/kibana'; import * as i18n from './translations'; interface Props { diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/use_add_to_case/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/use_add_to_case/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/use_add_to_case/translations.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/use_add_to_case/translations.ts diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/use_add_to_existing_case/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/use_add_to_existing_case/index.test.tsx similarity index 95% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/use_add_to_existing_case/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/use_add_to_existing_case/index.test.tsx index 80245d371f412..e84b7973208f7 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/use_add_to_existing_case/index.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/use_add_to_existing_case/index.test.tsx @@ -8,10 +8,10 @@ import { act, renderHook } from '@testing-library/react-hooks'; import { useAddToExistingCase } from '.'; -import { useKibana } from '../../../../common/lib/kibana'; -import { TestProviders } from '../../../../common/mock'; +import { useKibana } from '../../../../../../common/lib/kibana'; +import { TestProviders } from '../../../../../../common/mock'; -jest.mock('../../../../common/lib/kibana', () => ({ +jest.mock('../../../../../../common/lib/kibana', () => ({ useKibana: jest.fn().mockReturnValue({ services: { cases: { diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/use_add_to_existing_case/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/use_add_to_existing_case/index.tsx similarity index 97% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/use_add_to_existing_case/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/use_add_to_existing_case/index.tsx index 4f0ba54eece24..8568bea51b512 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/use_add_to_existing_case/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/use_add_to_existing_case/index.tsx @@ -11,7 +11,7 @@ import { useAssistantContext } from '@kbn/elastic-assistant'; import type { Replacements } from '@kbn/elastic-assistant-common'; import { useCallback } from 'react'; -import { useKibana } from '../../../../common/lib/kibana'; +import { useKibana } from '../../../../../../common/lib/kibana'; import * as i18n from './translations'; interface Props { diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/use_add_to_existing_case/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/use_add_to_existing_case/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/actions/use_add_to_existing_case/translations.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/actions/use_add_to_existing_case/translations.ts diff --git a/x-pack/plugins/security_solution/public/attack_discovery/get_attack_discovery_markdown/get_attack_discovery_markdown.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/get_attack_discovery_markdown/get_attack_discovery_markdown.test.tsx similarity index 99% rename from x-pack/plugins/security_solution/public/attack_discovery/get_attack_discovery_markdown/get_attack_discovery_markdown.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/get_attack_discovery_markdown/get_attack_discovery_markdown.test.tsx index 4af83edba69aa..cf354039dcdd1 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/get_attack_discovery_markdown/get_attack_discovery_markdown.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/get_attack_discovery_markdown/get_attack_discovery_markdown.test.tsx @@ -11,7 +11,7 @@ import { getMarkdownFields, getMarkdownWithOriginalValues, } from './get_attack_discovery_markdown'; -import { mockAttackDiscovery } from '../mock/mock_attack_discovery'; +import { mockAttackDiscovery } from '../../../mock/mock_attack_discovery'; describe('getAttackDiscoveryMarkdown', () => { describe('getMarkdownFields', () => { diff --git a/x-pack/plugins/security_solution/public/attack_discovery/get_attack_discovery_markdown/get_attack_discovery_markdown.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/get_attack_discovery_markdown/get_attack_discovery_markdown.ts similarity index 96% rename from x-pack/plugins/security_solution/public/attack_discovery/get_attack_discovery_markdown/get_attack_discovery_markdown.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/get_attack_discovery_markdown/get_attack_discovery_markdown.ts index 0ae524c25ee95..705a983b59a43 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/get_attack_discovery_markdown/get_attack_discovery_markdown.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/get_attack_discovery_markdown/get_attack_discovery_markdown.ts @@ -7,7 +7,7 @@ import type { AttackDiscovery, Replacements } from '@kbn/elastic-assistant-common'; -import { getTacticLabel, getTacticMetadata } from '../helpers'; +import { getTacticLabel, getTacticMetadata } from '../../../../helpers'; export const getMarkdownFields = (markdown: string): string => { const regex = new RegExp('{{\\s*(\\S+)\\s+(\\S+)\\s*}}', 'gm'); diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/index.test.tsx similarity index 93% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/index.test.tsx index d65dd87117ca3..5d30f0b1557b5 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/index.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/index.test.tsx @@ -9,8 +9,8 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; import { AttackDiscoveryPanel } from '.'; -import { TestProviders } from '../../common/mock'; -import { mockAttackDiscovery } from '../mock/mock_attack_discovery'; +import { TestProviders } from '../../../../common/mock'; +import { mockAttackDiscovery } from '../../mock/mock_attack_discovery'; describe('AttackDiscoveryPanel', () => { it('renders the attack discovery accordion', () => { diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/index.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/alerts_tab/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/alerts_tab/index.test.tsx similarity index 82% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/alerts_tab/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/alerts_tab/index.test.tsx index c505aafa6631b..dd9b3b1189cc4 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/alerts_tab/index.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/alerts_tab/index.test.tsx @@ -8,8 +8,8 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; -import { TestProviders } from '../../../../common/mock'; -import { mockAttackDiscovery } from '../../../mock/mock_attack_discovery'; +import { TestProviders } from '../../../../../../common/mock'; +import { mockAttackDiscovery } from '../../../../mock/mock_attack_discovery'; import { AlertsTab } from '.'; describe('AlertsTab', () => { diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/alerts_tab/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/alerts_tab/index.tsx similarity index 95% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/alerts_tab/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/alerts_tab/index.tsx index fc1838dad055d..97bec48eaaae6 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/alerts_tab/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/alerts_tab/index.tsx @@ -9,8 +9,8 @@ import type { AttackDiscovery, Replacements } from '@kbn/elastic-assistant-commo import { AlertConsumers } from '@kbn/rule-registry-plugin/common/technical_rule_data_field_names'; import React, { useMemo } from 'react'; -import { ALERTS_TABLE_REGISTRY_CONFIG_IDS } from '../../../../../common/constants'; -import { useKibana } from '../../../../common/lib/kibana'; +import { ALERTS_TABLE_REGISTRY_CONFIG_IDS } from '../../../../../../../common/constants'; +import { useKibana } from '../../../../../../common/lib/kibana'; interface Props { attackDiscovery: AttackDiscovery; diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack/attack_chain/axis_tick/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/attack/attack_chain/axis_tick/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack/attack_chain/axis_tick/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/attack/attack_chain/axis_tick/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack/attack_chain/axis_tick/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/attack/attack_chain/axis_tick/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack/attack_chain/axis_tick/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/attack/attack_chain/axis_tick/index.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack/attack_chain/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/attack/attack_chain/index.test.tsx similarity index 85% rename from x-pack/plugins/security_solution/public/attack_discovery/attack/attack_chain/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/attack/attack_chain/index.test.tsx index 195a5fe49dd19..bff2a36d1ae18 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack/attack_chain/index.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/attack/attack_chain/index.test.tsx @@ -8,10 +8,10 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; -import { getTacticMetadata } from '../../helpers'; +import { getTacticMetadata } from '../../../../../../../helpers'; import { AttackChain } from '.'; -import { mockAttackDiscovery } from '../../mock/mock_attack_discovery'; +import { mockAttackDiscovery } from '../../../../../../mock/mock_attack_discovery'; describe('AttackChain', () => { it('renders the expected tactics', () => { diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack/attack_chain/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/attack/attack_chain/index.tsx similarity index 95% rename from x-pack/plugins/security_solution/public/attack_discovery/attack/attack_chain/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/attack/attack_chain/index.tsx index 8f2d2dede419e..498030798d38c 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack/attack_chain/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/attack/attack_chain/index.tsx @@ -11,7 +11,7 @@ import React, { useMemo } from 'react'; import type { AttackDiscovery } from '@kbn/elastic-assistant-common'; import { Tactic } from './tactic'; -import { getTacticMetadata } from '../../helpers'; +import { getTacticMetadata } from '../../../../../../../helpers'; interface Props { attackDiscovery: AttackDiscovery; diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack/attack_chain/tactic/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/attack/attack_chain/tactic/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack/attack_chain/tactic/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/attack/attack_chain/tactic/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack/attack_chain/tactic/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/attack/attack_chain/tactic/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack/attack_chain/tactic/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/attack/attack_chain/tactic/index.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack/mini_attack_chain/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/attack/mini_attack_chain/index.test.tsx similarity index 80% rename from x-pack/plugins/security_solution/public/attack_discovery/attack/mini_attack_chain/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/attack/mini_attack_chain/index.test.tsx index c9923754d25da..37e38891d7ba2 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack/mini_attack_chain/index.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/attack/mini_attack_chain/index.test.tsx @@ -8,9 +8,9 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; -import type { TacticMetadata } from '../../helpers'; -import { getTacticMetadata } from '../../helpers'; -import { mockAttackDiscovery } from '../../mock/mock_attack_discovery'; +import type { TacticMetadata } from '../../../../../../../helpers'; +import { getTacticMetadata } from '../../../../../../../helpers'; +import { mockAttackDiscovery } from '../../../../../../mock/mock_attack_discovery'; import { MiniAttackChain } from '.'; describe('MiniAttackChain', () => { diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack/mini_attack_chain/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/attack/mini_attack_chain/index.tsx similarity index 97% rename from x-pack/plugins/security_solution/public/attack_discovery/attack/mini_attack_chain/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/attack/mini_attack_chain/index.tsx index 3a529627f0902..f05c7bce564f9 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack/mini_attack_chain/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/attack/mini_attack_chain/index.tsx @@ -10,7 +10,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiText, EuiToolTip, useEuiTheme } from '@el import React, { useMemo } from 'react'; import type { AttackDiscovery } from '@kbn/elastic-assistant-common'; -import { getTacticMetadata } from '../../helpers'; +import { getTacticMetadata } from '../../../../../../../helpers'; import { ATTACK_CHAIN_TOOLTIP } from './translations'; interface Props { diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack/mini_attack_chain/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/attack/mini_attack_chain/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack/mini_attack_chain/translations.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/attack/mini_attack_chain/translations.ts diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/attack_discovery_tab/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/index.test.tsx similarity index 98% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/attack_discovery_tab/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/index.test.tsx index 74751d4efaf30..29c5b8f74567f 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/attack_discovery_tab/index.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/index.test.tsx @@ -10,8 +10,8 @@ import React from 'react'; import { AttackDiscoveryTab } from '.'; import type { Replacements } from '@kbn/elastic-assistant-common'; -import { TestProviders } from '../../../../common/mock'; -import { mockAttackDiscovery } from '../../../mock/mock_attack_discovery'; +import { TestProviders } from '../../../../../../common/mock'; +import { mockAttackDiscovery } from '../../../../mock/mock_attack_discovery'; import { ATTACK_CHAIN, DETAILS, SUMMARY } from './translations'; describe('AttackDiscoveryTab', () => { diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/attack_discovery_tab/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/index.tsx similarity index 92% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/attack_discovery_tab/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/index.tsx index 0b1c28d43eed8..584a33e5b0c23 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/attack_discovery_tab/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/index.tsx @@ -11,10 +11,10 @@ import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiSpacer, EuiTitle, useEuiTheme } import { css } from '@emotion/react'; import React, { useMemo } from 'react'; -import { AttackChain } from '../../../attack/attack_chain'; -import { InvestigateInTimelineButton } from '../../../../common/components/event_details/investigate_in_timeline_button'; -import { buildAlertsKqlFilter } from '../../../../detections/components/alerts_table/actions'; -import { getTacticMetadata } from '../../../helpers'; +import { AttackChain } from './attack/attack_chain'; +import { InvestigateInTimelineButton } from '../../../../../../common/components/event_details/investigate_in_timeline_button'; +import { buildAlertsKqlFilter } from '../../../../../../detections/components/alerts_table/actions'; +import { getTacticMetadata } from '../../../../../helpers'; import { AttackDiscoveryMarkdownFormatter } from '../../../attack_discovery_markdown_formatter'; import * as i18n from './translations'; import { ViewInAiAssistant } from '../../view_in_ai_assistant'; diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/attack_discovery_tab/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/attack_discovery_tab/translations.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/attack_discovery_tab/translations.ts diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/get_tabs.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/get_tabs.test.tsx similarity index 93% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/get_tabs.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/get_tabs.test.tsx index d002c0bde5324..1a2a978110dde 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/get_tabs.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/get_tabs.test.tsx @@ -10,8 +10,8 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; import { getTabs } from './get_tabs'; -import { TestProviders } from '../../../common/mock'; -import { mockAttackDiscovery } from '../../mock/mock_attack_discovery'; +import { TestProviders } from '../../../../../common/mock'; +import { mockAttackDiscovery } from '../../../mock/mock_attack_discovery'; import { ALERTS, ATTACK_DISCOVERY } from './translations'; describe('getTabs', () => { diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/get_tabs.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/get_tabs.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/get_tabs.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/get_tabs.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/index.test.tsx similarity index 88% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/index.test.tsx index 3b155d704708c..964cccda7a920 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/index.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/index.test.tsx @@ -9,8 +9,8 @@ import { fireEvent, render, screen } from '@testing-library/react'; import React from 'react'; import { Tabs } from '.'; -import { TestProviders } from '../../../common/mock'; -import { mockAttackDiscovery } from '../../mock/mock_attack_discovery'; +import { TestProviders } from '../../../../../common/mock'; +import { mockAttackDiscovery } from '../../../mock/mock_attack_discovery'; describe('Tabs', () => { beforeEach(() => { diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/index.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/tabs/translations.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/translations.ts diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/title/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/title/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/title/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/title/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/title/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/title/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/title/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/title/index.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/view_in_ai_assistant/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/view_in_ai_assistant/index.test.tsx similarity index 93% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/view_in_ai_assistant/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/view_in_ai_assistant/index.test.tsx index 322e26cb4df48..d8f8098736b72 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/view_in_ai_assistant/index.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/view_in_ai_assistant/index.test.tsx @@ -9,8 +9,8 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; import { ViewInAiAssistant } from '.'; -import { TestProviders } from '../../../common/mock'; -import { mockAttackDiscovery } from '../../mock/mock_attack_discovery'; +import { TestProviders } from '../../../../../common/mock'; +import { mockAttackDiscovery } from '../../../mock/mock_attack_discovery'; import { VIEW_IN_AI_ASSISTANT } from './translations'; describe('ViewInAiAssistant', () => { diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/view_in_ai_assistant/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/view_in_ai_assistant/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/view_in_ai_assistant/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/view_in_ai_assistant/index.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/view_in_ai_assistant/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/view_in_ai_assistant/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/view_in_ai_assistant/translations.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/view_in_ai_assistant/translations.ts diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/view_in_ai_assistant/use_view_in_ai_assistant.test.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/view_in_ai_assistant/use_view_in_ai_assistant.test.ts similarity index 86% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/view_in_ai_assistant/use_view_in_ai_assistant.test.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/view_in_ai_assistant/use_view_in_ai_assistant.test.ts index 372bce5dcbf2c..86f243e9445f4 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/view_in_ai_assistant/use_view_in_ai_assistant.test.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/view_in_ai_assistant/use_view_in_ai_assistant.test.ts @@ -8,14 +8,14 @@ import { renderHook } from '@testing-library/react-hooks'; import { useAssistantOverlay } from '@kbn/elastic-assistant'; -import { useAssistantAvailability } from '../../../assistant/use_assistant_availability'; -import { getAttackDiscoveryMarkdown } from '../../get_attack_discovery_markdown/get_attack_discovery_markdown'; -import { mockAttackDiscovery } from '../../mock/mock_attack_discovery'; +import { useAssistantAvailability } from '../../../../../assistant/use_assistant_availability'; +import { getAttackDiscoveryMarkdown } from '../get_attack_discovery_markdown/get_attack_discovery_markdown'; +import { mockAttackDiscovery } from '../../../mock/mock_attack_discovery'; import { useViewInAiAssistant } from './use_view_in_ai_assistant'; jest.mock('@kbn/elastic-assistant'); -jest.mock('../../../assistant/use_assistant_availability'); -jest.mock('../../get_attack_discovery_markdown/get_attack_discovery_markdown'); +jest.mock('../../../../../assistant/use_assistant_availability'); +jest.mock('../get_attack_discovery_markdown/get_attack_discovery_markdown'); const mockUseAssistantOverlay = useAssistantOverlay as jest.Mock; describe('useViewInAiAssistant', () => { beforeEach(() => { diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/view_in_ai_assistant/use_view_in_ai_assistant.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/view_in_ai_assistant/use_view_in_ai_assistant.ts similarity index 90% rename from x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/view_in_ai_assistant/use_view_in_ai_assistant.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/view_in_ai_assistant/use_view_in_ai_assistant.ts index 33cc2d74423a1..cf07259801c60 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack_discovery_panel/view_in_ai_assistant/use_view_in_ai_assistant.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/view_in_ai_assistant/use_view_in_ai_assistant.ts @@ -8,8 +8,8 @@ import { useMemo, useCallback } from 'react'; import { useAssistantOverlay } from '@kbn/elastic-assistant'; import type { AttackDiscovery, Replacements } from '@kbn/elastic-assistant-common'; -import { useAssistantAvailability } from '../../../assistant/use_assistant_availability'; -import { getAttackDiscoveryMarkdown } from '../../get_attack_discovery_markdown/get_attack_discovery_markdown'; +import { useAssistantAvailability } from '../../../../../assistant/use_assistant_availability'; +import { getAttackDiscoveryMarkdown } from '../get_attack_discovery_markdown/get_attack_discovery_markdown'; /** * This category is provided in the prompt context for the assistant diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/animated_counter/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/empty_prompt/animated_counter/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/animated_counter/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/empty_prompt/animated_counter/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/animated_counter/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/empty_prompt/animated_counter/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/animated_counter/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/empty_prompt/animated_counter/index.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/empty_prompt/index.test.tsx similarity index 95% rename from x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/empty_prompt/index.test.tsx index 0707950383046..210ff796143c0 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/index.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/empty_prompt/index.test.tsx @@ -9,10 +9,10 @@ import { fireEvent, render, screen } from '@testing-library/react'; import React from 'react'; import { EmptyPrompt } from '.'; -import { useAssistantAvailability } from '../../../assistant/use_assistant_availability'; -import { TestProviders } from '../../../common/mock'; +import { useAssistantAvailability } from '../../../../../assistant/use_assistant_availability'; +import { TestProviders } from '../../../../../common/mock'; -jest.mock('../../../assistant/use_assistant_availability'); +jest.mock('../../../../../assistant/use_assistant_availability'); describe('EmptyPrompt', () => { const alertsCount = 20; diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/empty_prompt/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/empty_prompt/index.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/empty_prompt/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/translations.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/empty_prompt/translations.ts diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/failure/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/failure/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/pages/failure/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/failure/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/failure/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/failure/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/pages/failure/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/failure/index.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/failure/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/failure/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/pages/failure/translations.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/failure/translations.ts diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/generate/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/generate/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/pages/generate/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/generate/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/generate/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/generate/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/pages/generate/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/generate/index.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_states/helpers/show_empty_states/index.test.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/helpers/show_empty_states/index.test.ts similarity index 96% rename from x-pack/plugins/security_solution/public/attack_discovery/pages/empty_states/helpers/show_empty_states/index.test.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/helpers/show_empty_states/index.test.ts index 0211dc8d51eba..93964588af277 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_states/helpers/show_empty_states/index.test.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/helpers/show_empty_states/index.test.ts @@ -11,9 +11,9 @@ import { showFailurePrompt, showNoAlertsPrompt, showWelcomePrompt, -} from '../../../helpers'; +} from '../../../../helpers'; -jest.mock('../../../helpers', () => ({ +jest.mock('../../../../helpers', () => ({ showEmptyPrompt: jest.fn().mockReturnValue(false), showFailurePrompt: jest.fn().mockReturnValue(false), showNoAlertsPrompt: jest.fn().mockReturnValue(false), diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_states/helpers/show_empty_states/index.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/helpers/show_empty_states/index.ts similarity index 97% rename from x-pack/plugins/security_solution/public/attack_discovery/pages/empty_states/helpers/show_empty_states/index.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/helpers/show_empty_states/index.ts index e2c7018ef5826..0c7feabc93883 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_states/helpers/show_empty_states/index.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/helpers/show_empty_states/index.ts @@ -10,7 +10,7 @@ import { showFailurePrompt, showNoAlertsPrompt, showWelcomePrompt, -} from '../../../helpers'; +} from '../../../../helpers'; export const showEmptyStates = ({ aiConnectorsCount, diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_states/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/index.test.tsx similarity index 99% rename from x-pack/plugins/security_solution/public/attack_discovery/pages/empty_states/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/index.test.tsx index 9eacd696a2ff1..deef78ed87b7c 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_states/index.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/index.test.tsx @@ -10,7 +10,7 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; import { EmptyStates } from '.'; -import { TestProviders } from '../../../common/mock'; +import { TestProviders } from '../../../../common/mock'; describe('EmptyStates', () => { describe('when the Welcome prompt should be shown', () => { diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_states/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/index.tsx similarity index 90% rename from x-pack/plugins/security_solution/public/attack_discovery/pages/empty_states/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/index.tsx index a083ec7b77fdd..de87d9896a339 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_states/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/index.tsx @@ -7,11 +7,11 @@ import React from 'react'; -import { Failure } from '../failure'; -import { EmptyPrompt } from '../empty_prompt'; -import { showFailurePrompt, showNoAlertsPrompt, showWelcomePrompt } from '../helpers'; -import { NoAlerts } from '../no_alerts'; -import { Welcome } from '../welcome'; +import { Failure } from './failure'; +import { EmptyPrompt } from './empty_prompt'; +import { showFailurePrompt, showNoAlertsPrompt, showWelcomePrompt } from '../../helpers'; +import { NoAlerts } from './no_alerts'; +import { Welcome } from './welcome'; interface Props { aiConnectorsCount: number | null; // null when connectors are not configured diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/no_alerts/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/no_alerts/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/pages/no_alerts/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/no_alerts/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/no_alerts/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/no_alerts/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/pages/no_alerts/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/no_alerts/index.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/no_alerts/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/no_alerts/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/pages/no_alerts/translations.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/no_alerts/translations.ts diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/welcome/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/welcome/index.test.tsx similarity index 94% rename from x-pack/plugins/security_solution/public/attack_discovery/pages/welcome/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/welcome/index.test.tsx index 91c1ec1d9b8c7..40aeb760ba537 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/pages/welcome/index.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/welcome/index.test.tsx @@ -9,7 +9,7 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; import { Welcome } from '.'; -import { TestProviders } from '../../../common/mock'; +import { TestProviders } from '../../../../../common/mock'; import { FIRST_SET_UP, WELCOME_TO_ATTACK_DISCOVERY } from './translations'; describe('Welcome', () => { diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/welcome/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/welcome/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/pages/welcome/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/welcome/index.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/welcome/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/welcome/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/pages/welcome/translations.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/empty_states/welcome/translations.ts diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/results/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/index.test.tsx index a69a204a5a6fc..807582edaeb22 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/pages/results/index.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/index.test.tsx @@ -9,7 +9,7 @@ import { render, screen, fireEvent } from '@testing-library/react'; import React from 'react'; import { TestProviders } from '../../../common/mock'; -import { mockAttackDiscovery } from '../../mock/mock_attack_discovery'; +import { mockAttackDiscovery } from '../mock/mock_attack_discovery'; import { Results } from '.'; describe('Results', () => { diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/results/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/index.tsx index 6e3e43127e711..135af29a710fc 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/pages/results/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/index.tsx @@ -10,11 +10,11 @@ import { DEFAULT_ATTACK_DISCOVERY_MAX_ALERTS } from '@kbn/elastic-assistant'; import type { AttackDiscovery, Replacements } from '@kbn/elastic-assistant-common'; import React from 'react'; -import { AttackDiscoveryPanel } from '../../attack_discovery_panel'; -import { EmptyStates } from '../empty_states'; -import { showEmptyStates } from '../empty_states/helpers/show_empty_states'; +import { AttackDiscoveryPanel } from './attack_discovery_panel'; +import { EmptyStates } from './empty_states'; +import { showEmptyStates } from './empty_states/helpers/show_empty_states'; import { getInitialIsOpen, showSummary } from '../helpers'; -import { Summary } from '../summary'; +import { Summary } from './summary'; interface Props { aiConnectorsCount: number | null; // null when connectors are not configured diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/summary/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/summary/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/pages/summary/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/summary/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/summary/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/summary/index.tsx similarity index 92% rename from x-pack/plugins/security_solution/public/attack_discovery/pages/summary/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/summary/index.tsx index 5794901a85892..482f734e31e4c 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/pages/summary/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/summary/index.tsx @@ -9,8 +9,8 @@ import { EuiButtonIcon, EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiToolTip } from import { css } from '@emotion/react'; import React from 'react'; -import { SummaryCount } from '../summary_count'; -import { SHOW_REAL_VALUES, SHOW_ANONYMIZED_LABEL } from '../translations'; +import { SummaryCount } from './summary_count'; +import { SHOW_REAL_VALUES, SHOW_ANONYMIZED_LABEL } from '../../translations'; interface Props { alertsCount: number; diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/summary_count/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/summary/summary_count/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/pages/summary_count/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/summary/summary_count/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/summary_count/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/summary/summary_count/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/pages/summary_count/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/summary/summary_count/index.tsx diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/summary_count/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/summary/summary_count/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/pages/summary_count/translations.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/results/summary/summary_count/translations.ts diff --git a/x-pack/plugins/security_solution/public/attack_discovery/use_attack_discovery/helpers.test.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/use_attack_discovery/helpers.test.ts similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/use_attack_discovery/helpers.test.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/use_attack_discovery/helpers.test.ts diff --git a/x-pack/plugins/security_solution/public/attack_discovery/use_attack_discovery/helpers.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/use_attack_discovery/helpers.ts similarity index 100% rename from x-pack/plugins/security_solution/public/attack_discovery/use_attack_discovery/helpers.ts rename to x-pack/plugins/security_solution/public/attack_discovery/pages/use_attack_discovery/helpers.ts diff --git a/x-pack/plugins/security_solution/public/attack_discovery/use_attack_discovery/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/use_attack_discovery/index.test.tsx similarity index 95% rename from x-pack/plugins/security_solution/public/attack_discovery/use_attack_discovery/index.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/use_attack_discovery/index.test.tsx index 59659ee6d8649..a476aead19036 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/use_attack_discovery/index.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/use_attack_discovery/index.test.tsx @@ -10,13 +10,13 @@ import { useFetchAnonymizationFields } from '@kbn/elastic-assistant/impl/assista import { renderHook, act } from '@testing-library/react-hooks'; import React from 'react'; -import { useKibana } from '../../common/lib/kibana'; -import { usePollApi } from '../hooks/use_poll_api'; +import { useKibana } from '../../../common/lib/kibana'; +import { usePollApi } from './use_poll_api/use_poll_api'; import { useAttackDiscovery } from '.'; -import { ERROR_GENERATING_ATTACK_DISCOVERIES } from '../pages/translations'; -import { useKibana as mockUseKibana } from '../../common/lib/kibana/__mocks__'; +import { ERROR_GENERATING_ATTACK_DISCOVERIES } from '../translations'; +import { useKibana as mockUseKibana } from '../../../common/lib/kibana/__mocks__'; -jest.mock('../../assistant/use_assistant_availability', () => ({ +jest.mock('../../../assistant/use_assistant_availability', () => ({ useAssistantAvailability: jest.fn(() => ({ hasAssistantPrivilege: true, isAssistantEnabled: true, @@ -26,8 +26,8 @@ jest.mock('../../assistant/use_assistant_availability', () => ({ jest.mock( '@kbn/elastic-assistant/impl/assistant/api/anonymization_fields/use_fetch_anonymization_fields' ); -jest.mock('../hooks/use_poll_api'); -jest.mock('../../common/lib/kibana'); +jest.mock('./use_poll_api/use_poll_api'); +jest.mock('../../../common/lib/kibana'); const mockedUseKibana = mockUseKibana(); const mockAssistantAvailability = jest.fn(() => ({ diff --git a/x-pack/plugins/security_solution/public/attack_discovery/use_attack_discovery/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/use_attack_discovery/index.tsx similarity index 97% rename from x-pack/plugins/security_solution/public/attack_discovery/use_attack_discovery/index.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/use_attack_discovery/index.tsx index 4ad78981d4540..20c29b751dd37 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/use_attack_discovery/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/use_attack_discovery/index.tsx @@ -19,10 +19,10 @@ import { import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { useFetchAnonymizationFields } from '@kbn/elastic-assistant/impl/assistant/api/anonymization_fields/use_fetch_anonymization_fields'; -import { usePollApi } from '../hooks/use_poll_api'; -import { useKibana } from '../../common/lib/kibana'; -import { getErrorToastText } from '../pages/helpers'; -import { CONNECTOR_ERROR, ERROR_GENERATING_ATTACK_DISCOVERIES } from '../pages/translations'; +import { usePollApi } from './use_poll_api/use_poll_api'; +import { useKibana } from '../../../common/lib/kibana'; +import { getErrorToastText } from '../helpers'; +import { CONNECTOR_ERROR, ERROR_GENERATING_ATTACK_DISCOVERIES } from '../translations'; import { getGenAiConfig, getRequestBody } from './helpers'; export interface UseAttackDiscovery { diff --git a/x-pack/plugins/security_solution/public/attack_discovery/hooks/use_poll_api.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/use_attack_discovery/use_poll_api/use_poll_api.test.tsx similarity index 99% rename from x-pack/plugins/security_solution/public/attack_discovery/hooks/use_poll_api.test.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/use_attack_discovery/use_poll_api/use_poll_api.test.tsx index a08dbcfd9a26b..c243138d9ef5c 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/hooks/use_poll_api.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/use_attack_discovery/use_poll_api/use_poll_api.test.tsx @@ -10,7 +10,7 @@ import { coreMock } from '@kbn/core/public/mocks'; import { act, renderHook } from '@testing-library/react-hooks'; import { attackDiscoveryStatus, usePollApi } from './use_poll_api'; import moment from 'moment/moment'; -import { kibanaMock } from '../../common/mock'; +import { kibanaMock } from '../../../../common/mock'; const http: HttpSetupMock = coreMock.createSetup().http; const setApproximateFutureTime = jest.fn(); diff --git a/x-pack/plugins/security_solution/public/attack_discovery/hooks/use_poll_api.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/use_attack_discovery/use_poll_api/use_poll_api.tsx similarity index 98% rename from x-pack/plugins/security_solution/public/attack_discovery/hooks/use_poll_api.tsx rename to x-pack/plugins/security_solution/public/attack_discovery/pages/use_attack_discovery/use_poll_api/use_poll_api.tsx index ab0a5ac4ede96..0b707349eb708 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/hooks/use_poll_api.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/use_attack_discovery/use_poll_api/use_poll_api.tsx @@ -23,9 +23,9 @@ import type { IToasts } from '@kbn/core-notifications-browser'; import { ERROR_CANCELING_ATTACK_DISCOVERIES, ERROR_GENERATING_ATTACK_DISCOVERIES, -} from '../pages/translations'; -import { getErrorToastText } from '../pages/helpers'; -import { replaceNewlineLiterals } from '../helpers'; +} from '../../translations'; +import { getErrorToastText } from '../../helpers'; +import { replaceNewlineLiterals } from '../../../helpers'; export interface Props { http: HttpSetup;