From ec8be1f88cd7d8b7fe144fed79051f7b470b6b32 Mon Sep 17 00:00:00 2001 From: Steph Milovic Date: Tue, 13 Dec 2022 11:21:57 -0700 Subject: [PATCH 1/3] [Security Solution] Explore Sub Plugin Part 1- Consolidate into Explore Directory (#147298) --- .github/CODEOWNERS | 7 +- .../cti_details/risk_summary.tsx | 8 +- .../cti_details/threat_summary_view.tsx | 2 +- .../event_details/cti_details/translations.ts | 4 +- .../table/use_action_cell_data_provider.ts | 2 +- .../event_details/use_risk_score_data.test.ts | 4 +- .../event_details/use_risk_score_data.ts | 4 +- .../events_tab/events_query_tab_body.test.tsx | 2 +- .../events_tab/events_query_tab_body.tsx | 6 +- .../components/link_to/redirect_to_hosts.tsx | 2 +- .../link_to/redirect_to_network.tsx | 2 +- .../components/link_to/redirect_to_users.tsx | 2 +- .../public/common/components/links/index.tsx | 4 +- .../common/components/links/translations.ts | 2 +- .../ml_host_conditional_container.tsx | 2 +- .../get_criteria_from_host_type.test.ts | 2 +- .../criteria/get_criteria_from_host_type.ts | 2 +- .../get_criteria_from_network_type.test.ts | 2 +- .../get_criteria_from_network_type.ts | 2 +- .../get_criteria_from_users_type.test.ts | 2 +- .../criteria/get_criteria_from_users_type.ts | 2 +- .../ml/tables/anomalies_host_table.test.tsx | 2 +- .../ml/tables/anomalies_host_table.tsx | 2 +- .../tables/anomalies_network_table.test.tsx | 2 +- .../ml/tables/anomalies_network_table.tsx | 2 +- .../ml/tables/anomalies_user_table.test.tsx | 2 +- .../ml/tables/anomalies_user_table.tsx | 2 +- .../get_anomalies_host_table_columns.test.tsx | 2 +- .../get_anomalies_host_table_columns.tsx | 4 +- ...t_anomalies_network_table_columns.test.tsx | 2 +- .../get_anomalies_network_table_columns.tsx | 4 +- .../get_anomalies_table_columns.test.tsx | 2 +- .../ml/tables/get_anomalies_table_columns.tsx | 2 +- .../get_anomalies_user_table_columns.test.tsx | 2 +- .../get_anomalies_user_table_columns.tsx | 4 +- .../public/common/components/ml/types.ts | 6 +- .../navigation/breadcrumbs/index.test.ts | 4 +- .../navigation/breadcrumbs/index.ts | 6 +- .../components/navigation/index.test.tsx | 2 +- .../navigation/tab_navigation/index.test.tsx | 4 +- .../common/components/search_bar/index.tsx | 6 +- .../components/sessions_viewer/types.ts | 2 +- .../use_lens_attributes.tsx | 4 +- .../anomalies_query_tab_body/types.ts | 6 +- .../common/lib/cell_actions/helpers.tsx | 4 +- .../public/common/mock/global_state.ts | 4 +- .../public/common/mock/utils.ts | 6 +- .../public/common/store/reducer.ts | 6 +- .../public/common/store/types.ts | 6 +- .../public/common/utils/route/index.test.tsx | 2 +- .../public/common/utils/route/types.ts | 6 +- .../pages/rule_details/index.tsx | 2 +- .../summary/host_panel/host_panel.test.tsx | 4 +- .../tabs/summary/host_panel/index.tsx | 4 +- .../tabs/summary/user_panel/index.tsx | 4 +- .../summary/user_panel/user_panel.test.tsx | 4 +- .../detection_engine/detection_engine.tsx | 2 +- .../authentications_host_table.test.tsx.snap | 0 .../authentications_user_table.test.tsx.snap | 0 .../authentications_host_table.test.tsx | 10 +-- .../authentications_host_table.tsx | 10 +-- .../authentications_user_table.test.tsx | 10 +-- .../authentications_user_table.tsx | 8 +- .../components/authentication/helpers.tsx | 18 +++-- .../components/authentication/translations.ts | 0 .../components/authentication/types.ts | 2 +- .../__snapshots__/index.test.tsx.snap | 0 .../paginated_table/helpers.test.ts | 0 .../components/paginated_table/helpers.ts | 0 .../components/paginated_table/index.mock.tsx | 2 +- .../components/paginated_table/index.test.tsx | 6 +- .../components/paginated_table/index.tsx | 32 ++++---- .../paginated_table/translations.ts | 0 .../components}/risk_score/constants.ts | 0 .../risk_score}/enable_risk_score/index.tsx | 8 +- .../enable_risk_score/translations.ts | 2 +- .../risk_details_tab_body/index.test.tsx | 14 ++-- .../risk_details_tab_body/index.tsx | 24 +++--- .../risk_details_tab_body/translations.ts | 2 +- .../risk_information/index.test.tsx | 4 +- .../risk_score}/risk_information/index.tsx | 8 +- .../risk_information/translations.ts | 2 +- .../risk_score_doc_link.tsx | 6 +- .../risk_score_enable_button.test.tsx | 4 +- .../risk_score_enable_button.tsx | 10 +-- .../risk_score_header_title.tsx | 6 +- .../risk_score_no_data_detected.tsx | 8 +- .../risk_score_restart_button.test.tsx | 4 +- .../risk_score_restart_button.tsx | 10 +-- .../risk_score_upgrade_button.test.tsx | 4 +- .../risk_score_upgrade_button.tsx | 10 +-- .../risk_score_onboarding/translations.ts | 0 .../use_risk_score_toast_content.tsx | 2 +- .../risk_score_onboarding/utils.test.ts | 10 +-- .../risk_score_onboarding/utils.ts | 10 +-- .../risk_score_over_time/index.test.tsx | 2 +- .../risk_score_over_time/index.tsx | 18 ++--- .../risk_score_over_time/translations.ts | 0 .../severity/common/index.test.tsx | 4 +- .../risk_score}/severity/common/index.tsx | 4 +- .../risk_score}/severity/severity_badges.tsx | 2 +- .../risk_score}/severity/severity_bar.tsx | 2 +- .../severity/severity_filter_group.test.tsx | 4 +- .../severity/severity_filter_group.tsx | 4 +- .../components/risk_score}/severity/types.ts | 2 +- .../index.test.tsx | 9 +-- .../top_risk_score_contributors/index.tsx | 8 +- .../translations.ts | 0 .../components/risk_score}/translations.ts | 2 +- .../components/stat_items/index.tsx | 0 .../components/stat_items/metric.test.tsx | 6 +- .../components/stat_items/metric.tsx | 9 ++- .../stat_items/metric_embeddable.test.tsx | 8 +- .../stat_items/metric_embeddable.tsx | 2 +- .../stat_items/stat_item_header.test.tsx | 0 .../stat_items/stat_item_header.tsx | 2 +- .../components/stat_items/stat_items.test.tsx | 24 +++--- .../components/stat_items/stat_items.tsx | 10 +-- .../components/stat_items/types.ts | 8 +- .../stat_items/use_kpi_matrix_status.test.tsx | 4 +- .../stat_items/use_kpi_matrix_status.ts | 2 +- .../stat_items/use_toggle_status.ts | 2 +- .../components/stat_items/utils.test.tsx | 4 +- .../components/stat_items/utils.tsx | 2 +- .../containers/authentications/index.test.tsx | 6 +- .../containers/authentications/index.tsx | 6 +- .../authentications/translations.ts | 0 .../containers/risk_score}/all/index.test.tsx | 16 ++-- .../containers/risk_score}/all/index.tsx | 23 +++--- .../risk_score}/all/translations.ts | 0 .../risk_score}/feature_status/api.ts | 6 +- .../risk_score}/feature_status/index.test.ts | 12 +-- .../risk_score}/feature_status/index.ts | 6 +- .../containers/risk_score}/index.ts | 2 +- .../containers/risk_score}/kpi/index.tsx | 20 ++--- .../risk_score}/kpi/translations.ts | 0 .../risk_score}/onboarding/api/index.ts | 0 .../onboarding/api/ingest_pipelines.test.ts | 3 +- .../onboarding/api/ingest_pipelines.ts | 0 .../risk_score}/onboarding/api/onboarding.ts | 4 +- .../onboarding/api/saved_objects.ts | 9 ++- .../onboarding/api/stored_scripts.test.ts | 3 +- .../onboarding/api/stored_scripts.ts | 2 +- .../onboarding/api/transforms.test.ts | 4 +- .../risk_score}/onboarding/api/transforms.ts | 0 .../onboarding/api/translations.ts | 0 .../risk_score}/onboarding/api/types.ts | 0 .../host_risk_score_table/columns.test.tsx | 2 +- .../host_risk_score_table/columns.tsx | 18 ++--- .../host_risk_score_table/index.tsx | 18 ++--- .../host_risk_score_table/translations.ts | 0 .../__snapshots__/index.test.tsx.snap | 0 .../hosts/components/hosts_table/columns.tsx | 20 ++--- .../components/hosts_table/index.test.tsx | 22 +++--- .../hosts/components/hosts_table/index.tsx | 20 ++--- .../hosts/components/hosts_table/mock.ts | 2 +- .../components/hosts_table/translations.ts | 0 .../components/kpi_hosts/common/index.tsx | 12 +-- .../components/kpi_hosts/hosts/index.test.tsx | 14 ++-- .../components/kpi_hosts/hosts/index.tsx | 14 ++-- .../kpi_hosts/hosts/translations.ts | 0 .../hosts/components/kpi_hosts/index.tsx | 0 .../kpi_hosts/risky_hosts/index.test.tsx | 4 +- .../kpi_hosts/risky_hosts/index.tsx | 16 ++-- .../kpi_hosts/risky_hosts/translations.ts | 0 .../hosts/components/kpi_hosts/types.ts | 4 +- .../kpi_hosts/unique_ips/index.test.tsx | 14 ++-- .../components/kpi_hosts/unique_ips/index.tsx | 18 ++--- .../kpi_hosts/unique_ips/translations.ts | 0 .../__snapshots__/index.test.tsx.snap | 0 .../uncommon_process_table/index.test.tsx | 12 +-- .../uncommon_process_table/index.tsx | 16 ++-- .../components/uncommon_process_table/mock.ts | 2 +- .../uncommon_process_table/translations.ts | 0 .../containers/hosts/details/index.test.tsx | 6 +- .../hosts/containers/hosts/details/index.tsx | 10 +-- .../containers/hosts/details/translations.ts | 0 .../hosts/containers/hosts/index.test.tsx | 6 +- .../hosts/containers/hosts/index.tsx | 18 ++--- .../hosts/containers/hosts/translations.ts | 0 .../containers/kpi_hosts/hosts/index.test.tsx | 2 +- .../containers/kpi_hosts/hosts/index.tsx | 18 ++--- .../kpi_hosts/hosts/translations.ts | 0 .../kpi_hosts/unique_ips/index.test.tsx | 2 +- .../containers/kpi_hosts/unique_ips/index.tsx | 18 ++--- .../kpi_hosts/unique_ips/translations.ts | 0 .../uncommon_processes/index.test.tsx | 6 +- .../containers/uncommon_processes/index.tsx | 18 ++--- .../uncommon_processes/translations.ts | 0 .../public/{ => explore}/hosts/index.ts | 8 +- .../public/{ => explore}/hosts/links.ts | 8 +- .../hosts/pages/details/details_tabs.test.tsx | 28 +++---- .../hosts/pages/details/details_tabs.tsx | 14 ++-- .../hosts/pages/details/helpers.test.ts | 0 .../hosts/pages/details/helpers.ts | 2 +- .../hosts/pages/details/index.tsx | 77 ++++++++++--------- .../hosts/pages/details/nav_tabs.test.tsx | 2 +- .../hosts/pages/details/nav_tabs.tsx | 4 +- .../hosts/pages/details/types.ts | 2 +- .../hosts/pages/details/utils.ts | 8 +- .../{ => explore}/hosts/pages/display.tsx | 0 .../{ => explore}/hosts/pages/hosts.test.tsx | 32 ++++---- .../{ => explore}/hosts/pages/hosts.tsx | 62 +++++++-------- .../{ => explore}/hosts/pages/hosts_tabs.tsx | 12 +-- .../{ => explore}/hosts/pages/index.tsx | 4 +- .../hosts/pages/nav_tabs.test.tsx | 0 .../{ => explore}/hosts/pages/nav_tabs.tsx | 4 +- .../authentications_query_tab_body.tsx | 6 +- .../host_risk_score_tab_body.test.tsx | 12 +-- .../navigation/host_risk_score_tab_body.tsx | 16 ++-- .../navigation/hosts_query_tab_body.test.tsx | 8 +- .../pages/navigation/hosts_query_tab_body.tsx | 4 +- .../hosts/pages/navigation/index.ts | 0 .../pages/navigation/sessions_tab_body.tsx | 8 +- .../hosts/pages/navigation/types.ts | 6 +- .../uncommon_process_query_tab_body.test.tsx | 8 +- .../uncommon_process_query_tab_body.tsx | 4 +- .../{ => explore}/hosts/pages/translations.ts | 0 .../public/{ => explore}/hosts/pages/types.ts | 4 +- .../public/{ => explore}/hosts/routes.tsx | 8 +- .../{ => explore}/hosts/store/actions.ts | 4 +- .../{ => explore}/hosts/store/helpers.test.ts | 4 +- .../{ => explore}/hosts/store/helpers.ts | 6 +- .../public/{ => explore}/hosts/store/index.ts | 0 .../public/{ => explore}/hosts/store/model.ts | 4 +- .../{ => explore}/hosts/store/reducer.ts | 4 +- .../{ => explore}/hosts/store/selectors.ts | 2 +- .../public/{hosts => explore}/jest.config.js | 6 +- .../arrows/__snapshots__/index.test.tsx.snap | 0 .../network/components/arrows/helpers.test.ts | 0 .../network/components/arrows/helpers.ts | 0 .../network/components/arrows/index.test.tsx | 2 +- .../network/components/arrows/index.tsx | 0 .../details/__snapshots__/index.test.tsx.snap | 0 .../network/components/details/index.test.tsx | 14 ++-- .../network/components/details/index.tsx | 30 ++++---- .../network/components/details/mock.ts | 2 +- .../components/details/translations.ts | 0 .../components/direction/direction.test.tsx | 2 +- .../network/components/direction/index.tsx | 4 +- .../components/embeddables/__mocks__/mock.ts | 2 +- .../__snapshots__/embeddable.test.tsx.snap | 0 .../__snapshots__/embedded_map.test.tsx.snap | 0 ...ndex_patterns_missing_prompt.test.tsx.snap | 0 .../embeddables/embeddable.test.tsx | 0 .../components/embeddables/embeddable.tsx | 0 .../embeddables/embedded_map.test.tsx | 14 ++-- .../components/embeddables/embedded_map.tsx | 16 ++-- .../embeddables/embedded_map_helpers.test.tsx | 0 .../embeddables/embedded_map_helpers.tsx | 4 +- .../index_patterns_missing_prompt.test.tsx | 2 +- .../index_patterns_missing_prompt.tsx | 2 +- .../components/embeddables/map_config.test.ts | 0 .../components/embeddables/map_config.ts | 0 .../line_tool_tip_content.test.tsx.snap | 0 .../__snapshots__/map_tool_tip.test.tsx.snap | 0 .../point_tool_tip_content.test.tsx.snap | 0 .../tooltip_footer.test.tsx.snap | 0 .../line_tool_tip_content.test.tsx | 2 +- .../map_tool_tip/line_tool_tip_content.tsx | 0 .../map_tool_tip/map_tool_tip.test.tsx | 2 +- .../embeddables/map_tool_tip/map_tool_tip.tsx | 2 +- .../point_tool_tip_content.test.tsx | 10 +-- .../map_tool_tip/point_tool_tip_content.tsx | 10 +-- .../map_tool_tip/tooltip_footer.test.tsx | 0 .../map_tool_tip/tooltip_footer.tsx | 0 .../components/embeddables/translations.ts | 0 .../network/components/embeddables/types.ts | 0 .../flow_direction_select.test.tsx.snap | 0 .../flow_target_select.test.tsx.snap | 0 .../flow_direction_select.test.tsx | 2 +- .../flow_controls/flow_direction_select.tsx | 2 +- .../flow_controls/flow_target_select.test.tsx | 2 +- .../flow_controls/flow_target_select.tsx | 4 +- .../components/flow_controls/translations.ts | 0 .../index.test.tsx | 6 +- .../flow_target_select_connected/index.tsx | 6 +- .../ip/__snapshots__/index.test.tsx.snap | 0 .../network/components/ip/index.test.tsx | 10 +-- .../network/components/ip/index.tsx | 2 +- .../__snapshots__/index.test.tsx.snap | 0 .../components/kpi_network/dns/index.test.tsx | 14 ++-- .../components/kpi_network/dns/index.tsx | 12 +-- .../kpi_network/dns/translations.ts | 0 .../components/kpi_network/index.test.tsx | 8 +- .../network/components/kpi_network/index.tsx | 0 .../network/components/kpi_network/mock.ts | 12 +-- .../kpi_network/network_events/index.test.tsx | 14 ++-- .../kpi_network/network_events/index.tsx | 12 +-- .../network_events/translations.ts | 0 .../kpi_network/tls_handshakes/index.test.tsx | 14 ++-- .../kpi_network/tls_handshakes/index.tsx | 12 +-- .../tls_handshakes/translations.ts | 0 .../network/components/kpi_network/types.ts | 4 +- .../kpi_network/unique_flows/index.test.tsx | 14 ++-- .../kpi_network/unique_flows/index.tsx | 12 +-- .../kpi_network/unique_flows/translations.ts | 0 .../unique_private_ips/index.test.tsx | 14 ++-- .../kpi_network/unique_private_ips/index.tsx | 18 ++--- .../unique_private_ips/translations.ts | 0 .../__snapshots__/index.test.tsx.snap | 0 .../is_ptr_included.test.tsx.snap | 0 .../components/network_dns_table/columns.tsx | 18 ++--- .../network_dns_table/index.test.tsx | 12 +-- .../components/network_dns_table/index.tsx | 8 +- .../is_ptr_included.test.tsx | 2 +- .../network_dns_table/is_ptr_included.tsx | 0 .../components/network_dns_table/mock.ts | 2 +- .../network_dns_table/translations.ts | 0 .../__snapshots__/index.test.tsx.snap | 0 .../components/network_http_table/columns.tsx | 14 ++-- .../network_http_table/index.test.tsx | 14 ++-- .../components/network_http_table/index.tsx | 10 +-- .../components/network_http_table/mock.ts | 2 +- .../network_http_table/translations.ts | 0 .../__snapshots__/index.test.tsx.snap | 0 .../network_top_countries_table/columns.tsx | 18 ++--- .../index.test.tsx | 14 ++-- .../network_top_countries_table/index.tsx | 10 +-- .../network_top_countries_table/mock.ts | 2 +- .../translations.ts | 0 .../__snapshots__/index.test.tsx.snap | 0 .../network_top_n_flow_table/columns.tsx | 22 +++--- .../network_top_n_flow_table/index.test.tsx | 16 ++-- .../network_top_n_flow_table/index.tsx | 10 +-- .../network_top_n_flow_table/mock.ts | 4 +- .../network_top_n_flow_table/translations.ts | 0 .../port/__snapshots__/index.test.tsx.snap | 0 .../network/components/port/helpers.ts | 0 .../network/components/port/index.test.tsx | 8 +- .../network/components/port/index.tsx | 6 +- .../__snapshots__/index.test.tsx.snap | 0 .../source_destination/country_flag.tsx | 0 .../source_destination/field_names.ts | 0 .../source_destination/geo_fields.tsx | 2 +- .../source_destination/index.test.tsx | 14 ++-- .../components/source_destination/index.tsx | 0 .../source_destination/ip_with_port.tsx | 0 .../components/source_destination/label.tsx | 0 .../components/source_destination/network.tsx | 4 +- .../source_destination_arrows.tsx | 4 +- .../source_destination_ip.test.tsx | 16 ++-- .../source_destination_ip.tsx | 2 +- .../source_destination_with_arrows.tsx | 0 .../source_destination/translations.ts | 0 .../components/source_destination/types.ts | 0 .../__snapshots__/index.test.tsx.snap | 0 .../network/components/tls_table/columns.tsx | 10 +-- .../components/tls_table/index.test.tsx | 12 +-- .../network/components/tls_table/index.tsx | 14 ++-- .../network/components/tls_table/mock.ts | 2 +- .../components/tls_table/translations.ts | 0 .../__snapshots__/index.test.tsx.snap | 0 .../components/users_table/columns.tsx | 8 +- .../components/users_table/index.test.tsx | 14 ++-- .../network/components/users_table/index.tsx | 16 ++-- .../network/components/users_table/mock.ts | 2 +- .../components/users_table/translations.ts | 0 .../network/containers/details/index.test.tsx | 6 +- .../network/containers/details/index.tsx | 14 ++-- .../containers/details/translations.ts | 0 .../containers/kpi_network/dns/index.test.tsx | 2 +- .../containers/kpi_network/dns/index.tsx | 18 ++--- .../kpi_network/dns/translations.ts | 0 .../kpi_network/network_events/index.test.tsx | 2 +- .../kpi_network/network_events/index.tsx | 18 ++--- .../network_events/translations.ts | 0 .../kpi_network/tls_handshakes/index.test.tsx | 2 +- .../kpi_network/tls_handshakes/index.tsx | 18 ++--- .../tls_handshakes/translations.ts | 0 .../kpi_network/unique_flows/index.test.tsx | 2 +- .../kpi_network/unique_flows/index.tsx | 18 ++--- .../kpi_network/unique_flows/translations.ts | 0 .../unique_private_ips/index.test.tsx | 2 +- .../kpi_network/unique_private_ips/index.tsx | 18 ++--- .../unique_private_ips/translations.ts | 0 .../containers/network_dns/index.test.tsx | 6 +- .../network/containers/network_dns/index.tsx | 18 ++--- .../containers/network_dns/translations.ts | 0 .../containers/network_http/index.test.tsx | 6 +- .../network/containers/network_http/index.tsx | 18 ++--- .../containers/network_http/translations.ts | 0 .../network_top_countries/index.test.tsx | 8 +- .../network_top_countries/index.tsx | 18 ++--- .../network_top_countries/translations.ts | 0 .../network_top_n_flow/index.test.tsx | 8 +- .../containers/network_top_n_flow/index.tsx | 18 ++--- .../network_top_n_flow/translations.ts | 0 .../network/containers/tls/index.test.tsx | 8 +- .../network/containers/tls/index.tsx | 21 ++--- .../network/containers/tls/translations.ts | 0 .../network/containers/users/index.test.tsx | 8 +- .../network/containers/users/index.tsx | 24 +++--- .../network/containers/users/translations.ts | 0 .../public/{ => explore}/network/index.ts | 6 +- .../public/{ => explore}/network/links.ts | 8 +- .../{ => explore}/network/pages/constants.ts | 4 +- .../network/pages/details/details_tabs.tsx | 12 +-- .../network/pages/details/index.test.tsx | 28 +++---- .../network/pages/details/index.tsx | 64 +++++++-------- .../network/pages/details/nav_tabs.test.tsx | 2 +- .../network/pages/details/nav_tabs.tsx | 4 +- .../network/pages/details/types.ts | 6 +- .../network/pages/details/utils.ts | 10 +-- .../{ => explore}/network/pages/index.tsx | 10 +-- .../navigation/conditional_flex_group.tsx | 0 .../navigation/countries_query_tab_body.tsx | 4 +- .../pages/navigation/dns_query_tab_body.tsx | 14 ++-- .../pages/navigation/http_query_tab_body.tsx | 4 +- .../network/pages/navigation/index.ts | 0 .../pages/navigation/ips_query_tab_body.tsx | 4 +- .../network/pages/navigation/nav_tabs.tsx | 2 +- .../pages/navigation/network_routes.tsx | 14 ++-- .../navigation/network_routes_loading.tsx | 0 .../pages/navigation/tls_query_tab_body.tsx | 4 +- .../network/pages/navigation/translations.ts | 0 .../network/pages/navigation/types.ts | 8 +- .../pages/navigation/users_query_tab_body.tsx | 4 +- .../network/pages/navigation/utils.ts | 0 .../network/pages/network.test.tsx | 28 +++---- .../{ => explore}/network/pages/network.tsx | 52 ++++++------- .../network/pages/translations.ts | 0 .../{ => explore}/network/pages/types.ts | 0 .../public/{ => explore}/network/routes.tsx | 8 +- .../{ => explore}/network/store/actions.ts | 0 .../network/store/helpers.test.ts | 4 +- .../{ => explore}/network/store/helpers.ts | 2 +- .../{ => explore}/network/store/index.ts | 0 .../{ => explore}/network/store/model.ts | 2 +- .../{ => explore}/network/store/reducer.ts | 4 +- .../{ => explore}/network/store/selectors.ts | 4 +- .../users/components/all_users/index.test.tsx | 10 +-- .../users/components/all_users/index.tsx | 31 ++++---- .../components/all_users/translations.ts | 0 .../kpi_users/authentications/index.test.tsx | 14 ++-- .../kpi_users/authentications/index.tsx | 18 ++--- .../kpi_users/authentications/translations.ts | 0 .../users/components/kpi_users/index.tsx | 0 .../kpi_users/total_users/index.test.tsx | 18 ++--- .../kpi_users/total_users/index.tsx | 18 ++--- .../kpi_users/total_users/translations.ts | 0 .../users/components/kpi_users/types.ts | 4 +- .../user_risk_score_table/columns.test.tsx | 4 +- .../user_risk_score_table/columns.tsx | 18 ++--- .../user_risk_score_table/index.test.tsx | 6 +- .../user_risk_score_table/index.tsx | 20 ++--- .../user_risk_score_table/translations.ts | 0 .../users/authentications/index.test.tsx | 2 +- .../users/authentications/index.tsx | 18 ++--- .../users/authentications/translations.ts | 0 .../containers/users/details/index.test.tsx | 6 +- .../users/containers/users/details/index.tsx | 10 +-- .../containers/users/details/translations.ts | 0 .../public/{ => explore}/users/index.ts | 2 +- .../public/{ => explore}/users/links.ts | 8 +- .../{ => explore}/users/pages/constants.ts | 2 +- .../users/pages/details/details_tabs.tsx | 12 +-- .../users/pages/details/helpers.ts | 0 .../users/pages/details/index.tsx | 71 +++++++++-------- .../users/pages/details/nav_tabs.test.tsx | 0 .../users/pages/details/nav_tabs.tsx | 4 +- .../users/pages/details/types.ts | 2 +- .../users/pages/details/utils.ts | 8 +- .../{ => explore}/users/pages/index.tsx | 2 +- .../users/pages/nav_tabs.test.tsx | 0 .../{ => explore}/users/pages/nav_tabs.tsx | 4 +- .../all_users_query_tab_body.test.tsx | 12 +-- .../navigation/all_users_query_tab_body.tsx | 12 +-- .../authentications_query_tab_body.test.tsx | 12 +-- .../authentications_query_tab_body.tsx | 8 +- .../users/pages/navigation/index.ts | 0 .../users/pages/navigation/translations.ts | 0 .../users/pages/navigation/types.ts | 6 +- .../user_risk_score_tab_body.test.tsx | 12 +-- .../navigation/user_risk_score_tab_body.tsx | 16 ++-- .../{ => explore}/users/pages/translations.ts | 0 .../public/{ => explore}/users/pages/types.ts | 2 +- .../{ => explore}/users/pages/users.tsx | 54 ++++++------- .../users/pages/users_tabs.test.tsx | 22 +++--- .../{ => explore}/users/pages/users_tabs.tsx | 10 +-- .../public/{ => explore}/users/routes.tsx | 8 +- .../{ => explore}/users/store/actions.ts | 4 +- .../{ => explore}/users/store/helpers.ts | 2 +- .../public/{ => explore}/users/store/index.ts | 0 .../public/{ => explore}/users/store/model.ts | 4 +- .../{ => explore}/users/store/reducer.ts | 8 +- .../{ => explore}/users/store/selectors.ts | 2 +- .../public/landing_pages/links.ts | 6 +- .../public/lazy_sub_plugins.tsx | 6 +- .../public/network/jest.config.js | 24 ------ .../entity_analytics/anomalies/columns.tsx | 8 +- .../entity_analytics/anomalies/index.tsx | 4 +- .../common/risk_score_donut_chart.test.tsx | 2 +- .../common/risk_score_donut_chart.tsx | 4 +- .../common/use_risk_donut_chart_data.test.ts | 2 +- .../common/use_risk_donut_chart_data.ts | 4 +- .../entity_analytics/header/index.test.tsx | 12 +-- .../entity_analytics/header/index.tsx | 10 +-- .../entity_analytics/risk_score/columns.tsx | 6 +- .../risk_score/index.test.tsx | 6 +- .../entity_analytics/risk_score/index.tsx | 20 ++--- .../risk_score/translations.ts | 4 +- .../components/events_by_dataset/index.tsx | 2 +- .../components/host_overview/index.test.tsx | 4 +- .../components/host_overview/index.tsx | 6 +- .../components/user_overview/index.test.tsx | 4 +- .../components/user_overview/index.tsx | 6 +- .../public/overview/pages/overview.test.tsx | 4 +- .../public/risk_score/jest.config.js | 26 ------- .../field_renderers/field_renderers.test.tsx | 2 +- .../field_renderers/field_renderers.tsx | 2 +- .../components/netflow/index.test.tsx | 13 ++-- .../netflow/netflow_columns/index.tsx | 2 +- .../side_panel/event_details/index.test.tsx | 2 +- .../host_details/expandable_host.tsx | 2 +- .../network_details/expandable_network.tsx | 6 +- .../user_details/expandable_user.tsx | 4 +- .../body/renderers/formatted_field.tsx | 4 +- .../timeline/body/renderers/netflow.tsx | 10 +-- .../netflow/netflow_row_renderer.tsx | 10 +-- .../plugins/security_solution/public/types.ts | 6 +- .../public/users/jest.config.js | 24 ------ 522 files changed, 1674 insertions(+), 1730 deletions(-) rename x-pack/plugins/security_solution/public/{common => explore}/components/authentication/__snapshots__/authentications_host_table.test.tsx.snap (100%) rename x-pack/plugins/security_solution/public/{common => explore}/components/authentication/__snapshots__/authentications_user_table.test.tsx.snap (100%) rename x-pack/plugins/security_solution/public/{common => explore}/components/authentication/authentications_host_table.test.tsx (92%) rename x-pack/plugins/security_solution/public/{common => explore}/components/authentication/authentications_host_table.tsx (91%) rename x-pack/plugins/security_solution/public/{common => explore}/components/authentication/authentications_user_table.test.tsx (91%) rename x-pack/plugins/security_solution/public/{common => explore}/components/authentication/authentications_user_table.tsx (93%) rename x-pack/plugins/security_solution/public/{common => explore}/components/authentication/helpers.tsx (91%) rename x-pack/plugins/security_solution/public/{common => explore}/components/authentication/translations.ts (100%) rename x-pack/plugins/security_solution/public/{common => explore}/components/authentication/types.ts (86%) rename x-pack/plugins/security_solution/public/{common => explore}/components/paginated_table/__snapshots__/index.test.tsx.snap (100%) rename x-pack/plugins/security_solution/public/{common => explore}/components/paginated_table/helpers.test.ts (100%) rename x-pack/plugins/security_solution/public/{common => explore}/components/paginated_table/helpers.ts (100%) rename x-pack/plugins/security_solution/public/{common => explore}/components/paginated_table/index.mock.tsx (96%) rename x-pack/plugins/security_solution/public/{common => explore}/components/paginated_table/index.test.tsx (98%) rename x-pack/plugins/security_solution/public/{common => explore}/components/paginated_table/index.tsx (89%) rename x-pack/plugins/security_solution/public/{common => explore}/components/paginated_table/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore/components}/risk_score/constants.ts (100%) rename x-pack/plugins/security_solution/public/{risk_score/components => explore/components/risk_score}/enable_risk_score/index.tsx (88%) rename x-pack/plugins/security_solution/public/{risk_score/components => explore/components/risk_score}/enable_risk_score/translations.ts (96%) rename x-pack/plugins/security_solution/public/{risk_score/components => explore/components/risk_score}/risk_details_tab_body/index.test.tsx (88%) rename x-pack/plugins/security_solution/public/{risk_score/components => explore/components/risk_score}/risk_details_tab_body/index.tsx (89%) rename x-pack/plugins/security_solution/public/{risk_score/components => explore/components/risk_score}/risk_details_tab_body/translations.ts (91%) rename x-pack/plugins/security_solution/public/{risk_score/components => explore/components/risk_score}/risk_information/index.test.tsx (92%) rename x-pack/plugins/security_solution/public/{risk_score/components => explore/components/risk_score}/risk_information/index.tsx (95%) rename x-pack/plugins/security_solution/public/{risk_score/components => explore/components/risk_score}/risk_information/translations.ts (97%) rename x-pack/plugins/security_solution/public/{risk_score/components => explore/components/risk_score}/risk_score_onboarding/risk_score_doc_link.tsx (81%) rename x-pack/plugins/security_solution/public/{risk_score/components => explore/components/risk_score}/risk_score_onboarding/risk_score_enable_button.test.tsx (94%) rename x-pack/plugins/security_solution/public/{risk_score/components => explore/components/risk_score}/risk_score_onboarding/risk_score_enable_button.tsx (85%) rename x-pack/plugins/security_solution/public/{risk_score/components => explore/components/risk_score}/risk_score_onboarding/risk_score_header_title.tsx (76%) rename x-pack/plugins/security_solution/public/{risk_score/components => explore/components/risk_score}/risk_score_onboarding/risk_score_no_data_detected.tsx (85%) rename x-pack/plugins/security_solution/public/{risk_score/components => explore/components/risk_score}/risk_score_onboarding/risk_score_restart_button.test.tsx (94%) rename x-pack/plugins/security_solution/public/{risk_score/components => explore/components/risk_score}/risk_score_onboarding/risk_score_restart_button.tsx (83%) rename x-pack/plugins/security_solution/public/{risk_score/components => explore/components/risk_score}/risk_score_onboarding/risk_score_upgrade_button.test.tsx (96%) rename x-pack/plugins/security_solution/public/{risk_score/components => explore/components/risk_score}/risk_score_onboarding/risk_score_upgrade_button.tsx (91%) rename x-pack/plugins/security_solution/public/{risk_score/components => explore/components/risk_score}/risk_score_onboarding/translations.ts (100%) rename x-pack/plugins/security_solution/public/{risk_score/components => explore/components/risk_score}/risk_score_onboarding/use_risk_score_toast_content.tsx (94%) rename x-pack/plugins/security_solution/public/{risk_score/components => explore/components/risk_score}/risk_score_onboarding/utils.test.ts (94%) rename x-pack/plugins/security_solution/public/{risk_score/components => explore/components/risk_score}/risk_score_onboarding/utils.ts (96%) rename x-pack/plugins/security_solution/public/{risk_score/components => explore/components/risk_score}/risk_score_over_time/index.test.tsx (97%) rename x-pack/plugins/security_solution/public/{risk_score/components => explore/components/risk_score}/risk_score_over_time/index.tsx (91%) rename x-pack/plugins/security_solution/public/{risk_score/components => explore/components/risk_score}/risk_score_over_time/translations.ts (100%) rename x-pack/plugins/security_solution/public/{common/components => explore/components/risk_score}/severity/common/index.test.tsx (96%) rename x-pack/plugins/security_solution/public/{common/components => explore/components/risk_score}/severity/common/index.tsx (92%) rename x-pack/plugins/security_solution/public/{common/components => explore/components/risk_score}/severity/severity_badges.tsx (95%) rename x-pack/plugins/security_solution/public/{common/components => explore/components/risk_score}/severity/severity_bar.tsx (95%) rename x-pack/plugins/security_solution/public/{common/components => explore/components/risk_score}/severity/severity_filter_group.test.tsx (90%) rename x-pack/plugins/security_solution/public/{common/components => explore/components/risk_score}/severity/severity_filter_group.tsx (95%) rename x-pack/plugins/security_solution/public/{common/components => explore/components/risk_score}/severity/types.ts (80%) rename x-pack/plugins/security_solution/public/{common/components => explore/components/risk_score}/top_risk_score_contributors/index.test.tsx (91%) rename x-pack/plugins/security_solution/public/{common/components => explore/components/risk_score}/top_risk_score_contributors/index.tsx (89%) rename x-pack/plugins/security_solution/public/{common/components => explore/components/risk_score}/top_risk_score_contributors/translations.ts (100%) rename x-pack/plugins/security_solution/public/{risk_score/components => explore/components/risk_score}/translations.ts (95%) rename x-pack/plugins/security_solution/public/{common => explore}/components/stat_items/index.tsx (100%) rename x-pack/plugins/security_solution/public/{common => explore}/components/stat_items/metric.test.tsx (89%) rename x-pack/plugins/security_solution/public/{common => explore}/components/stat_items/metric.tsx (88%) rename x-pack/plugins/security_solution/public/{common => explore}/components/stat_items/metric_embeddable.test.tsx (85%) rename x-pack/plugins/security_solution/public/{common => explore}/components/stat_items/metric_embeddable.tsx (95%) rename x-pack/plugins/security_solution/public/{common => explore}/components/stat_items/stat_item_header.test.tsx (100%) rename x-pack/plugins/security_solution/public/{common => explore}/components/stat_items/stat_item_header.tsx (95%) rename x-pack/plugins/security_solution/public/{common => explore}/components/stat_items/stat_items.test.tsx (89%) rename x-pack/plugins/security_solution/public/{common => explore}/components/stat_items/stat_items.tsx (93%) rename x-pack/plugins/security_solution/public/{common => explore}/components/stat_items/types.ts (86%) rename x-pack/plugins/security_solution/public/{common => explore}/components/stat_items/use_kpi_matrix_status.test.tsx (93%) rename x-pack/plugins/security_solution/public/{common => explore}/components/stat_items/use_kpi_matrix_status.ts (94%) rename x-pack/plugins/security_solution/public/{common => explore}/components/stat_items/use_toggle_status.ts (92%) rename x-pack/plugins/security_solution/public/{common => explore}/components/stat_items/utils.test.tsx (85%) rename x-pack/plugins/security_solution/public/{common => explore}/components/stat_items/utils.tsx (97%) rename x-pack/plugins/security_solution/public/{common => explore}/containers/authentications/index.test.tsx (90%) rename x-pack/plugins/security_solution/public/{common => explore}/containers/authentications/index.tsx (94%) rename x-pack/plugins/security_solution/public/{common => explore}/containers/authentications/translations.ts (100%) rename x-pack/plugins/security_solution/public/{risk_score/containers => explore/containers/risk_score}/all/index.test.tsx (90%) rename x-pack/plugins/security_solution/public/{risk_score/containers => explore/containers/risk_score}/all/index.tsx (88%) rename x-pack/plugins/security_solution/public/{risk_score/containers => explore/containers/risk_score}/all/translations.ts (100%) rename x-pack/plugins/security_solution/public/{risk_score/containers => explore/containers/risk_score}/feature_status/api.ts (77%) rename x-pack/plugins/security_solution/public/{risk_score/containers => explore/containers/risk_score}/feature_status/index.test.ts (87%) rename x-pack/plugins/security_solution/public/{risk_score/containers => explore/containers/risk_score}/feature_status/index.ts (88%) rename x-pack/plugins/security_solution/public/{risk_score/containers => explore/containers/risk_score}/index.ts (92%) rename x-pack/plugins/security_solution/public/{risk_score/containers => explore/containers/risk_score}/kpi/index.tsx (80%) rename x-pack/plugins/security_solution/public/{risk_score/containers => explore/containers/risk_score}/kpi/translations.ts (100%) rename x-pack/plugins/security_solution/public/{risk_score/containers => explore/containers/risk_score}/onboarding/api/index.ts (100%) rename x-pack/plugins/security_solution/public/{risk_score/containers => explore/containers/risk_score}/onboarding/api/ingest_pipelines.test.ts (94%) rename x-pack/plugins/security_solution/public/{risk_score/containers => explore/containers/risk_score}/onboarding/api/ingest_pipelines.ts (100%) rename x-pack/plugins/security_solution/public/{risk_score/containers => explore/containers/risk_score}/onboarding/api/onboarding.ts (94%) rename x-pack/plugins/security_solution/public/{risk_score/containers => explore/containers/risk_score}/onboarding/api/saved_objects.ts (94%) rename x-pack/plugins/security_solution/public/{risk_score/containers => explore/containers/risk_score}/onboarding/api/stored_scripts.test.ts (94%) rename x-pack/plugins/security_solution/public/{risk_score/containers => explore/containers/risk_score}/onboarding/api/stored_scripts.ts (97%) rename x-pack/plugins/security_solution/public/{risk_score/containers => explore/containers/risk_score}/onboarding/api/transforms.test.ts (97%) rename x-pack/plugins/security_solution/public/{risk_score/containers => explore/containers/risk_score}/onboarding/api/transforms.ts (100%) rename x-pack/plugins/security_solution/public/{risk_score/containers => explore/containers/risk_score}/onboarding/api/translations.ts (100%) rename x-pack/plugins/security_solution/public/{risk_score/containers => explore/containers/risk_score}/onboarding/api/types.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/components/host_risk_score_table/columns.test.tsx (94%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/components/host_risk_score_table/columns.tsx (80%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/components/host_risk_score_table/index.tsx (89%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/components/host_risk_score_table/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/components/hosts_table/__snapshots__/index.test.tsx.snap (100%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/components/hosts_table/columns.tsx (85%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/components/hosts_table/index.test.tsx (89%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/components/hosts_table/index.tsx (87%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/components/hosts_table/mock.ts (87%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/components/hosts_table/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/components/kpi_hosts/common/index.tsx (82%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/components/kpi_hosts/hosts/index.test.tsx (85%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/components/kpi_hosts/hosts/index.tsx (76%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/components/kpi_hosts/hosts/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/components/kpi_hosts/index.tsx (100%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/components/kpi_hosts/risky_hosts/index.test.tsx (96%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/components/kpi_hosts/risky_hosts/index.tsx (89%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/components/kpi_hosts/risky_hosts/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/components/kpi_hosts/types.ts (77%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/components/kpi_hosts/unique_ips/index.test.tsx (85%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/components/kpi_hosts/unique_ips/index.tsx (76%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/components/kpi_hosts/unique_ips/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/components/uncommon_process_table/__snapshots__/index.test.tsx.snap (100%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/components/uncommon_process_table/index.test.tsx (94%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/components/uncommon_process_table/index.tsx (91%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/components/uncommon_process_table/mock.ts (98%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/components/uncommon_process_table/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/containers/hosts/details/index.test.tsx (88%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/containers/hosts/details/index.tsx (82%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/containers/hosts/details/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/containers/hosts/index.test.tsx (90%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/containers/hosts/index.tsx (85%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/containers/hosts/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/containers/kpi_hosts/hosts/index.test.tsx (93%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/containers/kpi_hosts/hosts/index.tsx (88%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/containers/kpi_hosts/hosts/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/containers/kpi_hosts/unique_ips/index.test.tsx (93%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/containers/kpi_hosts/unique_ips/index.tsx (89%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/containers/kpi_hosts/unique_ips/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/containers/uncommon_processes/index.test.tsx (90%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/containers/uncommon_processes/index.tsx (85%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/containers/uncommon_processes/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/index.ts (78%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/links.ts (88%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/pages/details/details_tabs.test.tsx (87%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/pages/details/details_tabs.tsx (80%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/pages/details/helpers.test.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/pages/details/helpers.ts (95%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/pages/details/index.tsx (72%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/pages/details/nav_tabs.test.tsx (96%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/pages/details/nav_tabs.tsx (94%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/pages/details/types.ts (94%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/pages/details/utils.ts (85%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/pages/display.tsx (100%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/pages/hosts.test.tsx (83%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/pages/hosts.tsx (76%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/pages/hosts_tabs.tsx (81%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/pages/index.tsx (94%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/pages/nav_tabs.test.tsx (100%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/pages/nav_tabs.tsx (94%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/pages/navigation/authentications_query_tab_body.tsx (83%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/pages/navigation/host_risk_score_tab_body.test.tsx (86%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/pages/navigation/host_risk_score_tab_body.tsx (86%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/pages/navigation/hosts_query_tab_body.test.tsx (89%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/pages/navigation/hosts_query_tab_body.tsx (91%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/pages/navigation/index.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/pages/navigation/sessions_tab_body.tsx (76%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/pages/navigation/types.ts (84%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/pages/navigation/uncommon_process_query_tab_body.test.tsx (89%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/pages/navigation/uncommon_process_query_tab_body.tsx (92%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/pages/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/pages/types.ts (79%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/routes.tsx (73%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/store/actions.ts (93%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/store/helpers.test.ts (98%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/store/helpers.ts (92%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/store/index.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/store/model.ts (92%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/store/reducer.ts (99%) rename x-pack/plugins/security_solution/public/{ => explore}/hosts/store/selectors.ts (96%) rename x-pack/plugins/security_solution/public/{hosts => explore}/jest.config.js (88%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/arrows/__snapshots__/index.test.tsx.snap (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/arrows/helpers.test.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/arrows/helpers.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/arrows/index.test.tsx (94%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/arrows/index.tsx (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/details/__snapshots__/index.test.tsx.snap (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/details/index.test.tsx (84%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/details/index.tsx (81%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/details/mock.ts (98%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/details/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/direction/direction.test.tsx (96%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/direction/index.tsx (93%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/embeddables/__mocks__/mock.ts (99%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/embeddables/__snapshots__/embeddable.test.tsx.snap (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/embeddables/__snapshots__/embedded_map.test.tsx.snap (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/embeddables/__snapshots__/index_patterns_missing_prompt.test.tsx.snap (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/embeddables/embeddable.test.tsx (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/embeddables/embeddable.tsx (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/embeddables/embedded_map.test.tsx (94%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/embeddables/embedded_map.tsx (93%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/embeddables/embedded_map_helpers.test.tsx (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/embeddables/embedded_map_helpers.tsx (96%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/embeddables/index_patterns_missing_prompt.test.tsx (93%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/embeddables/index_patterns_missing_prompt.tsx (97%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/embeddables/map_config.test.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/embeddables/map_config.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/embeddables/map_tool_tip/__snapshots__/line_tool_tip_content.test.tsx.snap (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/embeddables/map_tool_tip/__snapshots__/map_tool_tip.test.tsx.snap (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/embeddables/map_tool_tip/__snapshots__/point_tool_tip_content.test.tsx.snap (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/embeddables/map_tool_tip/__snapshots__/tooltip_footer.test.tsx.snap (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/embeddables/map_tool_tip/line_tool_tip_content.test.tsx (97%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/embeddables/map_tool_tip/line_tool_tip_content.tsx (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/embeddables/map_tool_tip/map_tool_tip.test.tsx (96%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/embeddables/map_tool_tip/map_tool_tip.tsx (98%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/embeddables/map_tool_tip/point_tool_tip_content.test.tsx (89%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/embeddables/map_tool_tip/point_tool_tip_content.tsx (87%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/embeddables/map_tool_tip/tooltip_footer.test.tsx (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/embeddables/map_tool_tip/tooltip_footer.tsx (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/embeddables/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/embeddables/types.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/flow_controls/__snapshots__/flow_direction_select.test.tsx.snap (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/flow_controls/__snapshots__/flow_target_select.test.tsx.snap (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/flow_controls/flow_direction_select.test.tsx (95%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/flow_controls/flow_direction_select.tsx (94%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/flow_controls/flow_target_select.test.tsx (97%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/flow_controls/flow_target_select.tsx (93%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/flow_controls/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/flow_target_select_connected/index.test.tsx (88%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/flow_target_select_connected/index.tsx (91%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/ip/__snapshots__/index.test.tsx.snap (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/ip/index.test.tsx (83%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/ip/index.tsx (90%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/kpi_network/__snapshots__/index.test.tsx.snap (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/kpi_network/dns/index.test.tsx (85%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/kpi_network/dns/index.tsx (78%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/kpi_network/dns/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/kpi_network/index.test.tsx (87%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/kpi_network/index.tsx (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/kpi_network/mock.ts (85%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/kpi_network/network_events/index.test.tsx (86%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/kpi_network/network_events/index.tsx (80%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/kpi_network/network_events/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/kpi_network/tls_handshakes/index.test.tsx (86%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/kpi_network/tls_handshakes/index.tsx (79%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/kpi_network/tls_handshakes/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/kpi_network/types.ts (73%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/kpi_network/unique_flows/index.test.tsx (86%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/kpi_network/unique_flows/index.tsx (78%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/kpi_network/unique_flows/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/kpi_network/unique_private_ips/index.test.tsx (86%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/kpi_network/unique_private_ips/index.tsx (79%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/kpi_network/unique_private_ips/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/network_dns_table/__snapshots__/index.test.tsx.snap (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/network_dns_table/__snapshots__/is_ptr_included.test.tsx.snap (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/network_dns_table/columns.tsx (81%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/network_dns_table/index.test.tsx (89%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/network_dns_table/index.tsx (93%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/network_dns_table/is_ptr_included.test.tsx (94%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/network_dns_table/is_ptr_included.tsx (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/network_dns_table/mock.ts (97%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/network_dns_table/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/network_http_table/__snapshots__/index.test.tsx.snap (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/network_http_table/columns.tsx (87%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/network_http_table/index.test.tsx (87%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/network_http_table/index.tsx (90%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/network_http_table/mock.ts (96%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/network_http_table/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/network_top_countries_table/__snapshots__/index.test.tsx.snap (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/network_top_countries_table/columns.tsx (86%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/network_top_countries_table/index.test.tsx (89%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/network_top_countries_table/index.tsx (94%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/network_top_countries_table/mock.ts (95%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/network_top_countries_table/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/network_top_n_flow_table/__snapshots__/index.test.tsx.snap (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/network_top_n_flow_table/columns.tsx (89%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/network_top_n_flow_table/index.test.tsx (88%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/network_top_n_flow_table/index.tsx (94%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/network_top_n_flow_table/mock.ts (95%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/network_top_n_flow_table/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/port/__snapshots__/index.test.tsx.snap (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/port/helpers.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/port/index.test.tsx (90%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/port/index.tsx (86%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/source_destination/__snapshots__/index.test.tsx.snap (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/source_destination/country_flag.tsx (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/source_destination/field_names.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/source_destination/geo_fields.tsx (98%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/source_destination/index.test.tsx (96%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/source_destination/index.tsx (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/source_destination/ip_with_port.tsx (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/source_destination/label.tsx (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/source_destination/network.tsx (96%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/source_destination/source_destination_arrows.tsx (98%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/source_destination/source_destination_ip.test.tsx (98%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/source_destination/source_destination_ip.tsx (98%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/source_destination/source_destination_with_arrows.tsx (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/source_destination/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/source_destination/types.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/tls_table/__snapshots__/index.test.tsx.snap (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/tls_table/columns.tsx (87%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/tls_table/index.test.tsx (88%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/tls_table/index.tsx (91%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/tls_table/mock.ts (94%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/tls_table/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/users_table/__snapshots__/index.test.tsx.snap (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/users_table/columns.tsx (91%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/users_table/index.test.tsx (86%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/users_table/index.tsx (90%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/users_table/mock.ts (93%) rename x-pack/plugins/security_solution/public/{ => explore}/network/components/users_table/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/details/index.test.tsx (88%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/details/index.tsx (81%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/details/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/kpi_network/dns/index.test.tsx (93%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/kpi_network/dns/index.tsx (88%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/kpi_network/dns/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/kpi_network/network_events/index.test.tsx (94%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/kpi_network/network_events/index.tsx (89%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/kpi_network/network_events/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/kpi_network/tls_handshakes/index.test.tsx (94%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/kpi_network/tls_handshakes/index.tsx (89%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/kpi_network/tls_handshakes/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/kpi_network/unique_flows/index.test.tsx (94%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/kpi_network/unique_flows/index.tsx (88%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/kpi_network/unique_flows/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/kpi_network/unique_private_ips/index.test.tsx (94%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/kpi_network/unique_private_ips/index.tsx (90%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/kpi_network/unique_private_ips/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/network_dns/index.test.tsx (89%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/network_dns/index.tsx (84%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/network_dns/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/network_http/index.test.tsx (90%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/network_http/index.tsx (85%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/network_http/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/network_top_countries/index.test.tsx (87%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/network_top_countries/index.tsx (86%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/network_top_countries/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/network_top_n_flow/index.test.tsx (87%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/network_top_n_flow/index.tsx (85%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/network_top_n_flow/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/tls/index.test.tsx (87%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/tls/index.tsx (83%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/tls/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/users/index.test.tsx (87%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/users/index.tsx (80%) rename x-pack/plugins/security_solution/public/{ => explore}/network/containers/users/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/index.ts (81%) rename x-pack/plugins/security_solution/public/{ => explore}/network/links.ts (88%) rename x-pack/plugins/security_solution/public/{ => explore}/network/pages/constants.ts (91%) rename x-pack/plugins/security_solution/public/{ => explore}/network/pages/details/details_tabs.tsx (87%) rename x-pack/plugins/security_solution/public/{ => explore}/network/pages/details/index.test.tsx (83%) rename x-pack/plugins/security_solution/public/{ => explore}/network/pages/details/index.tsx (72%) rename x-pack/plugins/security_solution/public/{ => explore}/network/pages/details/nav_tabs.test.tsx (95%) rename x-pack/plugins/security_solution/public/{ => explore}/network/pages/details/nav_tabs.tsx (94%) rename x-pack/plugins/security_solution/public/{ => explore}/network/pages/details/types.ts (79%) rename x-pack/plugins/security_solution/public/{ => explore}/network/pages/details/utils.ts (82%) rename x-pack/plugins/security_solution/public/{ => explore}/network/pages/index.tsx (85%) rename x-pack/plugins/security_solution/public/{ => explore}/network/pages/navigation/conditional_flex_group.tsx (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/pages/navigation/countries_query_tab_body.tsx (92%) rename x-pack/plugins/security_solution/public/{ => explore}/network/pages/navigation/dns_query_tab_body.tsx (85%) rename x-pack/plugins/security_solution/public/{ => explore}/network/pages/navigation/http_query_tab_body.tsx (91%) rename x-pack/plugins/security_solution/public/{ => explore}/network/pages/navigation/index.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/pages/navigation/ips_query_tab_body.tsx (92%) rename x-pack/plugins/security_solution/public/{ => explore}/network/pages/navigation/nav_tabs.tsx (96%) rename x-pack/plugins/security_solution/public/{ => explore}/network/pages/navigation/network_routes.tsx (85%) rename x-pack/plugins/security_solution/public/{ => explore}/network/pages/navigation/network_routes_loading.tsx (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/pages/navigation/tls_query_tab_body.tsx (92%) rename x-pack/plugins/security_solution/public/{ => explore}/network/pages/navigation/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/pages/navigation/types.ts (82%) rename x-pack/plugins/security_solution/public/{ => explore}/network/pages/navigation/users_query_tab_body.tsx (91%) rename x-pack/plugins/security_solution/public/{ => explore}/network/pages/navigation/utils.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/pages/network.test.tsx (88%) rename x-pack/plugins/security_solution/public/{ => explore}/network/pages/network.tsx (80%) rename x-pack/plugins/security_solution/public/{ => explore}/network/pages/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/pages/types.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/routes.tsx (73%) rename x-pack/plugins/security_solution/public/{ => explore}/network/store/actions.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/store/helpers.test.ts (98%) rename x-pack/plugins/security_solution/public/{ => explore}/network/store/helpers.ts (97%) rename x-pack/plugins/security_solution/public/{ => explore}/network/store/index.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/network/store/model.ts (98%) rename x-pack/plugins/security_solution/public/{ => explore}/network/store/reducer.ts (98%) rename x-pack/plugins/security_solution/public/{ => explore}/network/store/selectors.ts (95%) rename x-pack/plugins/security_solution/public/{ => explore}/users/components/all_users/index.test.tsx (92%) rename x-pack/plugins/security_solution/public/{ => explore}/users/components/all_users/index.tsx (85%) rename x-pack/plugins/security_solution/public/{ => explore}/users/components/all_users/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/users/components/kpi_users/authentications/index.test.tsx (86%) rename x-pack/plugins/security_solution/public/{ => explore}/users/components/kpi_users/authentications/index.tsx (78%) rename x-pack/plugins/security_solution/public/{ => explore}/users/components/kpi_users/authentications/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/users/components/kpi_users/index.tsx (100%) rename x-pack/plugins/security_solution/public/{ => explore}/users/components/kpi_users/total_users/index.test.tsx (82%) rename x-pack/plugins/security_solution/public/{ => explore}/users/components/kpi_users/total_users/index.tsx (75%) rename x-pack/plugins/security_solution/public/{ => explore}/users/components/kpi_users/total_users/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/users/components/kpi_users/types.ts (73%) rename x-pack/plugins/security_solution/public/{ => explore}/users/components/user_risk_score_table/columns.test.tsx (93%) rename x-pack/plugins/security_solution/public/{ => explore}/users/components/user_risk_score_table/columns.tsx (80%) rename x-pack/plugins/security_solution/public/{ => explore}/users/components/user_risk_score_table/index.test.tsx (87%) rename x-pack/plugins/security_solution/public/{ => explore}/users/components/user_risk_score_table/index.tsx (87%) rename x-pack/plugins/security_solution/public/{ => explore}/users/components/user_risk_score_table/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/users/containers/users/authentications/index.test.tsx (94%) rename x-pack/plugins/security_solution/public/{ => explore}/users/containers/users/authentications/index.tsx (89%) rename x-pack/plugins/security_solution/public/{ => explore}/users/containers/users/authentications/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/users/containers/users/details/index.test.tsx (88%) rename x-pack/plugins/security_solution/public/{ => explore}/users/containers/users/details/index.tsx (82%) rename x-pack/plugins/security_solution/public/{ => explore}/users/containers/users/details/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/users/index.ts (91%) rename x-pack/plugins/security_solution/public/{ => explore}/users/links.ts (87%) rename x-pack/plugins/security_solution/public/{ => explore}/users/pages/constants.ts (92%) rename x-pack/plugins/security_solution/public/{ => explore}/users/pages/details/details_tabs.tsx (80%) rename x-pack/plugins/security_solution/public/{ => explore}/users/pages/details/helpers.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/users/pages/details/index.tsx (72%) rename x-pack/plugins/security_solution/public/{ => explore}/users/pages/details/nav_tabs.test.tsx (100%) rename x-pack/plugins/security_solution/public/{ => explore}/users/pages/details/nav_tabs.tsx (93%) rename x-pack/plugins/security_solution/public/{ => explore}/users/pages/details/types.ts (95%) rename x-pack/plugins/security_solution/public/{ => explore}/users/pages/details/utils.ts (84%) rename x-pack/plugins/security_solution/public/{ => explore}/users/pages/index.tsx (97%) rename x-pack/plugins/security_solution/public/{ => explore}/users/pages/nav_tabs.test.tsx (100%) rename x-pack/plugins/security_solution/public/{ => explore}/users/pages/nav_tabs.tsx (93%) rename x-pack/plugins/security_solution/public/{ => explore}/users/pages/navigation/all_users_query_tab_body.test.tsx (82%) rename x-pack/plugins/security_solution/public/{ => explore}/users/pages/navigation/all_users_query_tab_body.tsx (84%) rename x-pack/plugins/security_solution/public/{ => explore}/users/pages/navigation/authentications_query_tab_body.test.tsx (84%) rename x-pack/plugins/security_solution/public/{ => explore}/users/pages/navigation/authentications_query_tab_body.tsx (80%) rename x-pack/plugins/security_solution/public/{ => explore}/users/pages/navigation/index.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/users/pages/navigation/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/users/pages/navigation/types.ts (77%) rename x-pack/plugins/security_solution/public/{ => explore}/users/pages/navigation/user_risk_score_tab_body.test.tsx (85%) rename x-pack/plugins/security_solution/public/{ => explore}/users/pages/navigation/user_risk_score_tab_body.tsx (86%) rename x-pack/plugins/security_solution/public/{ => explore}/users/pages/translations.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/users/pages/types.ts (85%) rename x-pack/plugins/security_solution/public/{ => explore}/users/pages/users.tsx (78%) rename x-pack/plugins/security_solution/public/{ => explore}/users/pages/users_tabs.test.tsx (77%) rename x-pack/plugins/security_solution/public/{ => explore}/users/pages/users_tabs.tsx (84%) rename x-pack/plugins/security_solution/public/{ => explore}/users/routes.tsx (73%) rename x-pack/plugins/security_solution/public/{ => explore}/users/store/actions.ts (92%) rename x-pack/plugins/security_solution/public/{ => explore}/users/store/helpers.ts (88%) rename x-pack/plugins/security_solution/public/{ => explore}/users/store/index.ts (100%) rename x-pack/plugins/security_solution/public/{ => explore}/users/store/model.ts (93%) rename x-pack/plugins/security_solution/public/{ => explore}/users/store/reducer.ts (93%) rename x-pack/plugins/security_solution/public/{ => explore}/users/store/selectors.ts (96%) delete mode 100644 x-pack/plugins/security_solution/public/network/jest.config.js delete mode 100644 x-pack/plugins/security_solution/public/risk_score/jest.config.js delete mode 100644 x-pack/plugins/security_solution/public/users/jest.config.js diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 77ad86f2313e7..ffb147c7abb5e 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -497,20 +497,15 @@ /x-pack/plugins/security_solution/public/common/components/navigation @elastic/security-threat-hunting-explore /x-pack/plugins/security_solution/public/common/components/news_feed @elastic/security-threat-hunting-explore /x-pack/plugins/security_solution/public/common/components/overview_description_list @elastic/security-threat-hunting-explore -/x-pack/plugins/security_solution/public/common/components/paginated_table @elastic/security-threat-hunting-explore /x-pack/plugins/security_solution/public/common/components/sidebar_header @elastic/security-threat-hunting-explore -/x-pack/plugins/security_solution/public/common/components/stat_items @elastic/security-threat-hunting-explore /x-pack/plugins/security_solution/public/common/components/tables @elastic/security-threat-hunting-explore /x-pack/plugins/security_solution/public/common/components/top_n @elastic/security-threat-hunting-explore /x-pack/plugins/security_solution/public/common/components/with_hover_actions @elastic/security-threat-hunting-explore -/x-pack/plugins/security_solution/public/common/containers/hosts_risk @elastic/security-threat-hunting-explore /x-pack/plugins/security_solution/public/common/containers/matrix_histogram @elastic/security-threat-hunting-explore /x-pack/plugins/security_solution/public/common/lib/cell_actions @elastic/security-threat-hunting-explore /x-pack/plugins/security_solution/public/cases @elastic/security-threat-hunting-explore -/x-pack/plugins/security_solution/public/hosts @elastic/security-threat-hunting-explore -/x-pack/plugins/security_solution/public/network @elastic/security-threat-hunting-explore +/x-pack/plugins/security_solution/public/explore @elastic/security-threat-hunting-explore /x-pack/plugins/security_solution/public/overview @elastic/security-threat-hunting-explore -/x-pack/plugins/security_solution/public/users @elastic/security-threat-hunting-explore /x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts @elastic/security-threat-hunting-explore /x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram @elastic/security-threat-hunting-explore diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/risk_summary.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/risk_summary.tsx index 657bf12e89f29..1c571a87f0441 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/risk_summary.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/risk_summary.tsx @@ -10,13 +10,13 @@ import { EuiLoadingSpinner, EuiPanel } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import * as i18n from './translations'; import { EnrichedDataRow, ThreatSummaryPanelHeader } from './threat_summary_view'; -import { RiskScore } from '../../severity/common'; +import { RiskScore } from '../../../../explore/components/risk_score/severity/common'; import type { RiskSeverity } from '../../../../../common/search_strategy'; import { RiskScoreEntity } from '../../../../../common/search_strategy'; -import type { HostRisk, UserRisk } from '../../../../risk_score/containers'; +import type { HostRisk, UserRisk } from '../../../../explore/containers/risk_score'; import { getEmptyValue } from '../../empty_value'; -import { RiskScoreDocLink } from '../../../../risk_score/components/risk_score_onboarding/risk_score_doc_link'; -import { RiskScoreHeaderTitle } from '../../../../risk_score/components/risk_score_onboarding/risk_score_header_title'; +import { RiskScoreDocLink } from '../../../../explore/components/risk_score/risk_score_onboarding/risk_score_doc_link'; +import { RiskScoreHeaderTitle } from '../../../../explore/components/risk_score/risk_score_onboarding/risk_score_header_title'; interface HostRiskEntity { originalRisk?: RiskSeverity | undefined; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_view.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_view.tsx index 5a1fbaf6f179d..a9a49f851b530 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_view.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_view.tsx @@ -28,7 +28,7 @@ import type { } from '../../../../../common/search_strategy'; import { RiskSummary } from './risk_summary'; import { EnrichmentSummary } from './enrichment_summary'; -import type { HostRisk, UserRisk } from '../../../../risk_score/containers'; +import type { HostRisk, UserRisk } from '../../../../explore/containers/risk_score'; import { RiskScoreEntity } from '../../../../../common/search_strategy'; const UppercaseEuiTitle = styled(EuiTitle)` diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/translations.ts b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/translations.ts index 36138f3b2a609..b302a50937597 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/translations.ts +++ b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/translations.ts @@ -6,9 +6,9 @@ */ import { i18n } from '@kbn/i18n'; -import { getRiskEntityTranslation } from '../../../../risk_score/components/translations'; +import { getRiskEntityTranslation } from '../../../../explore/components/risk_score/translations'; import type { RiskScoreEntity } from '../../../../../common/search_strategy'; -export * from '../../../../risk_score/components/translations'; +export * from '../../../../explore/components/risk_score/translations'; export const FEED_NAME_PREPOSITION = i18n.translate( 'xpack.securitySolution.eventDetails.ctiSummary.feedNamePreposition', diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/table/use_action_cell_data_provider.ts b/x-pack/plugins/security_solution/public/common/components/event_details/table/use_action_cell_data_provider.ts index 18c1bcc422c07..5f3ca6feb6cf1 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/table/use_action_cell_data_provider.ts +++ b/x-pack/plugins/security_solution/public/common/components/event_details/table/use_action_cell_data_provider.ts @@ -26,7 +26,7 @@ import { import { BYTES_FORMAT } from '../../../../timelines/components/timeline/body/renderers/bytes'; import { EVENT_DURATION_FIELD_NAME } from '../../../../timelines/components/duration'; import { getDisplayValue } from '../../../../timelines/components/timeline/data_providers/helpers'; -import { PORT_NAMES } from '../../../../network/components/port/helpers'; +import { PORT_NAMES } from '../../../../explore/network/components/port/helpers'; import { INDICATOR_REFERENCE } from '../../../../../common/cti/constants'; import type { BrowserField } from '../../../containers/source'; import type { DataProvider, QueryOperator } from '../../../../../common/types'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/use_risk_score_data.test.ts b/x-pack/plugins/security_solution/public/common/components/event_details/use_risk_score_data.test.ts index 6d6d7c46e954e..c135da358ebda 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/use_risk_score_data.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/event_details/use_risk_score_data.test.ts @@ -8,11 +8,11 @@ import { renderHook } from '@testing-library/react-hooks'; import { TestProviders } from '../../mock'; import { ONLY_FIRST_ITEM_PAGINATION, useRiskScoreData } from './use_risk_score_data'; -import { useRiskScore } from '../../../risk_score/containers'; +import { useRiskScore } from '../../../explore/containers/risk_score'; import { useBasicDataFromDetailsData } from '../../../timelines/components/side_panel/event_details/helpers'; import { RiskScoreEntity } from '../../../../common/search_strategy'; -jest.mock('../../../risk_score/containers'); +jest.mock('../../../explore/containers/risk_score'); jest.mock('../../../timelines/components/side_panel/event_details/helpers'); const mockUseRiskScore = useRiskScore as jest.Mock; const mockUseBasicDataFromDetailsData = useBasicDataFromDetailsData as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/use_risk_score_data.ts b/x-pack/plugins/security_solution/public/common/components/event_details/use_risk_score_data.ts index 5c9a246e31e00..aee2ee025072f 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/use_risk_score_data.ts +++ b/x-pack/plugins/security_solution/public/common/components/event_details/use_risk_score_data.ts @@ -12,8 +12,8 @@ import { buildUserNamesFilter, RiskScoreEntity, } from '../../../../common/search_strategy'; -import type { HostRisk, UserRisk } from '../../../risk_score/containers'; -import { useRiskScore } from '../../../risk_score/containers'; +import type { HostRisk, UserRisk } from '../../../explore/containers/risk_score'; +import { useRiskScore } from '../../../explore/containers/risk_score'; export const ONLY_FIRST_ITEM_PAGINATION = { cursorStart: 0, diff --git a/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.test.tsx b/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.test.tsx index 9e622ab2d718e..6737fdf2c525c 100644 --- a/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.test.tsx @@ -8,7 +8,7 @@ import { render } from '@testing-library/react'; import React from 'react'; import { TableId } from '../../../../common/types'; -import { HostsType } from '../../../hosts/store/model'; +import { HostsType } from '../../../explore/hosts/store/model'; import { TestProviders } from '../../mock'; import type { EventsQueryTabBodyComponentProps } from './events_query_tab_body'; import { EventsQueryTabBody, ALERTS_EVENTS_HISTOGRAM_ID } from './events_query_tab_body'; diff --git a/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.tsx b/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.tsx index e3b9245348a2a..5f36a30779ca3 100644 --- a/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.tsx @@ -32,9 +32,9 @@ import { useIsExperimentalFeatureEnabled } from '../../hooks/use_experimental_fe import { DEFAULT_COLUMN_MIN_WIDTH } from '../../../timelines/components/timeline/body/constants'; import { defaultCellActions } from '../../lib/cell_actions/default_cell_actions'; import type { GlobalTimeArgs } from '../../containers/use_global_time'; -import type { QueryTabBodyProps as UserQueryTabBodyProps } from '../../../users/pages/navigation/types'; -import type { QueryTabBodyProps as HostQueryTabBodyProps } from '../../../hosts/pages/navigation/types'; -import type { QueryTabBodyProps as NetworkQueryTabBodyProps } from '../../../network/pages/navigation/types'; +import type { QueryTabBodyProps as UserQueryTabBodyProps } from '../../../explore/users/pages/navigation/types'; +import type { QueryTabBodyProps as HostQueryTabBodyProps } from '../../../explore/hosts/pages/navigation/types'; +import type { QueryTabBodyProps as NetworkQueryTabBodyProps } from '../../../explore/network/pages/navigation/types'; import { useLicense } from '../../hooks/use_license'; import { useUiSetting$ } from '../../lib/kibana'; diff --git a/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_hosts.tsx b/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_hosts.tsx index caa9c00e1a90c..37048e6db2f9b 100644 --- a/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_hosts.tsx +++ b/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_hosts.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import type { HostsTableType } from '../../../hosts/store/model'; +import type { HostsTableType } from '../../../explore/hosts/store/model'; import { HOSTS_PATH } from '../../../../common/constants'; import { appendSearch } from './helpers'; diff --git a/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_network.tsx b/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_network.tsx index a1702dc766f57..7420cce573bdd 100644 --- a/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_network.tsx +++ b/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_network.tsx @@ -7,7 +7,7 @@ import type { FlowTargetSourceDest } from '../../../../common/search_strategy/security_solution/network'; import { FlowTarget } from '../../../../common/search_strategy/security_solution/network'; -import { NetworkDetailsRouteType } from '../../../network/pages/details/types'; +import { NetworkDetailsRouteType } from '../../../explore/network/pages/details/types'; import { appendSearch } from './helpers'; diff --git a/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_users.tsx b/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_users.tsx index 4635995ec914f..a35caf3c67741 100644 --- a/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_users.tsx +++ b/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_users.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import type { UsersTableType } from '../../../users/store/model'; +import type { UsersTableType } from '../../../explore/users/store/model'; import { appendSearch } from './helpers'; export const getUsersDetailsUrl = (detailName: string, search?: string) => diff --git a/x-pack/plugins/security_solution/public/common/components/links/index.tsx b/x-pack/plugins/security_solution/public/common/components/links/index.tsx index 1a4d94d20ef06..4e5a35480c251 100644 --- a/x-pack/plugins/security_solution/public/common/components/links/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/links/index.tsx @@ -41,8 +41,8 @@ import { LinkButton, ReputationLinksOverflow, } from './helpers'; -import type { HostsTableType } from '../../../hosts/store/model'; -import type { UsersTableType } from '../../../users/store/model'; +import type { HostsTableType } from '../../../explore/hosts/store/model'; +import type { UsersTableType } from '../../../explore/users/store/model'; export { LinkButton, LinkAnchor } from './helpers'; diff --git a/x-pack/plugins/security_solution/public/common/components/links/translations.ts b/x-pack/plugins/security_solution/public/common/components/links/translations.ts index 9e2f99c17a677..fd3d42eea2fa7 100644 --- a/x-pack/plugins/security_solution/public/common/components/links/translations.ts +++ b/x-pack/plugins/security_solution/public/common/components/links/translations.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; -export * from '../../../network/components/details/translations'; +export * from '../../../explore/network/components/details/translations'; export const CASE_DETAILS_LINK_ARIA = (detailName: string) => i18n.translate('xpack.securitySolution.cases.caseTable.caseDetailsLinkAria', { diff --git a/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/ml_host_conditional_container.tsx b/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/ml_host_conditional_container.tsx index 17b46ca398191..be872e89f1a21 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/ml_host_conditional_container.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/ml_host_conditional_container.tsx @@ -15,7 +15,7 @@ import { url as urlUtils } from '@kbn/kibana-utils-plugin/public'; import { addEntitiesToKql } from './add_entities_to_kql'; import { replaceKQLParts } from './replace_kql_parts'; import { emptyEntity, multipleEntities, getMultipleEntities } from './entity_helpers'; -import { HostsTableType } from '../../../../hosts/store/model'; +import { HostsTableType } from '../../../../explore/hosts/store/model'; import { HOSTS_PATH } from '../../../../../common/constants'; interface QueryStringType { '?_g': string; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_host_type.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_host_type.test.ts index 5d4d825d85b54..10cec0f6adde3 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_host_type.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_host_type.test.ts @@ -6,7 +6,7 @@ */ import { getCriteriaFromHostType } from './get_criteria_from_host_type'; -import { HostsType } from '../../../../hosts/store/model'; +import { HostsType } from '../../../../explore/hosts/store/model'; describe('get_criteria_from_host_type', () => { test('returns host names from criteria if the host type is details', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_host_type.ts b/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_host_type.ts index 14dfefb557f49..2e9b912dc5b4a 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_host_type.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_host_type.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { HostsType } from '../../../../hosts/store/model'; +import { HostsType } from '../../../../explore/hosts/store/model'; import type { CriteriaFields } from '../types'; export const getCriteriaFromHostType = ( diff --git a/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_network_type.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_network_type.test.ts index e5d395561cc0a..1daf337d9a262 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_network_type.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_network_type.test.ts @@ -6,7 +6,7 @@ */ import { getCriteriaFromNetworkType } from './get_criteria_from_network_type'; -import { NetworkType } from '../../../../network/store/model'; +import { NetworkType } from '../../../../explore/network/store/model'; import { FlowTarget } from '../../../../../common/search_strategy'; describe('get_criteria_from_network_type', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_network_type.ts b/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_network_type.ts index 52fbc60d58a2c..4797e4b07a540 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_network_type.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_network_type.ts @@ -6,7 +6,7 @@ */ import type { CriteriaFields } from '../types'; -import { NetworkType } from '../../../../network/store/model'; +import { NetworkType } from '../../../../explore/network/store/model'; import { FlowTarget } from '../../../../../common/search_strategy'; export const getCriteriaFromNetworkType = ( diff --git a/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_users_type.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_users_type.test.ts index 89a38bf34f9b8..01cd61ef341a6 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_users_type.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_users_type.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { UsersType } from '../../../../users/store/model'; +import { UsersType } from '../../../../explore/users/store/model'; import { getCriteriaFromUsersType } from './get_criteria_from_users_type'; describe('get_criteria_from_user_type', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_users_type.ts b/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_users_type.ts index aa3e9829c7d0e..daec38c7712d1 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_users_type.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_users_type.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { UsersType } from '../../../../users/store/model'; +import { UsersType } from '../../../../explore/users/store/model'; import type { CriteriaFields } from '../types'; export const getCriteriaFromUsersType = ( diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_host_table.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_host_table.test.tsx index 7701880bd7b2e..a4ca525bd6c24 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_host_table.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_host_table.test.tsx @@ -11,7 +11,7 @@ import { TestProviders } from '../../../mock'; import React from 'react'; import { useQueryToggle } from '../../../containers/query_toggle'; import { useAnomaliesTableData } from '../anomaly/use_anomalies_table_data'; -import { HostsType } from '../../../../hosts/store/model'; +import { HostsType } from '../../../../explore/hosts/store/model'; import { hasMlUserPermissions } from '../../../../../common/machine_learning/has_ml_user_permissions'; jest.mock('../../../containers/query_toggle'); diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_host_table.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_host_table.tsx index 1060d47375195..9863d8fdca11d 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_host_table.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_host_table.tsx @@ -27,7 +27,7 @@ import { useDeepEqualSelector } from '../../../hooks/use_selector'; import type { State } from '../../../store'; import { JobIdFilter } from './job_id_filter'; import { SelectInterval } from './select_interval'; -import { hostsActions, hostsSelectors } from '../../../../hosts/store'; +import { hostsActions, hostsSelectors } from '../../../../explore/hosts/store'; const sorting = { sort: { diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_network_table.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_network_table.test.tsx index b7491562a5d72..4af7161b95578 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_network_table.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_network_table.test.tsx @@ -11,7 +11,7 @@ import { TestProviders } from '../../../mock'; import React from 'react'; import { useQueryToggle } from '../../../containers/query_toggle'; import { useAnomaliesTableData } from '../anomaly/use_anomalies_table_data'; -import { NetworkType } from '../../../../network/store/model'; +import { NetworkType } from '../../../../explore/network/store/model'; import { hasMlUserPermissions } from '../../../../../common/machine_learning/has_ml_user_permissions'; import { FlowTarget } from '../../../../../common/search_strategy'; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_network_table.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_network_table.tsx index 7fdafcfc2ea8d..b3937da464fff 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_network_table.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_network_table.tsx @@ -26,7 +26,7 @@ import { useInstalledSecurityJobsIds } from '../hooks/use_installed_security_job import { useDeepEqualSelector } from '../../../hooks/use_selector'; import type { State } from '../../../store'; import { JobIdFilter } from './job_id_filter'; -import { networkActions, networkSelectors } from '../../../../network/store'; +import { networkActions, networkSelectors } from '../../../../explore/network/store'; import { SelectInterval } from './select_interval'; const sorting = { diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_user_table.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_user_table.test.tsx index 40aab638b854a..abbfa3d7bd942 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_user_table.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_user_table.test.tsx @@ -11,7 +11,7 @@ import { TestProviders } from '../../../mock'; import React from 'react'; import { useQueryToggle } from '../../../containers/query_toggle'; import { useAnomaliesTableData } from '../anomaly/use_anomalies_table_data'; -import { UsersType } from '../../../../users/store/model'; +import { UsersType } from '../../../../explore/users/store/model'; import { hasMlUserPermissions } from '../../../../../common/machine_learning/has_ml_user_permissions'; jest.mock('../../../containers/query_toggle'); diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_user_table.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_user_table.tsx index f1d8eb8daf328..2ff4f74884865 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_user_table.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_user_table.tsx @@ -28,7 +28,7 @@ import { useQueryToggle } from '../../../containers/query_toggle'; import { JobIdFilter } from './job_id_filter'; import { SelectInterval } from './select_interval'; import { useDeepEqualSelector } from '../../../hooks/use_selector'; -import { usersActions, usersSelectors } from '../../../../users/store'; +import { usersActions, usersSelectors } from '../../../../explore/users/store'; import type { State } from '../../../store/types'; import { useInstalledSecurityJobsIds } from '../hooks/use_installed_security_jobs'; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_host_table_columns.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_host_table_columns.test.tsx index 364c24f000905..d4818cc4436c3 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_host_table_columns.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_host_table_columns.test.tsx @@ -7,7 +7,7 @@ import '../../../mock/match_media'; import { getAnomaliesHostTableColumnsCurated } from './get_anomalies_host_table_columns'; -import { HostsType } from '../../../../hosts/store/model'; +import { HostsType } from '../../../../explore/hosts/store/model'; import * as i18n from './translations'; jest.mock('../../../lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_host_table_columns.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_host_table_columns.tsx index 16855824e907e..165f215f7ae0b 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_host_table_columns.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_host_table_columns.tsx @@ -6,13 +6,13 @@ */ import React from 'react'; -import type { Columns } from '../../paginated_table'; +import type { Columns } from '../../../../explore/components/paginated_table'; import type { AnomaliesByHost, Anomaly } from '../types'; import { getRowItemDraggable } from '../../tables/helpers'; import { createCompoundAnomalyKey } from './create_compound_key'; import { HostDetailsLink } from '../../links'; import * as i18n from './translations'; -import { HostsType } from '../../../../hosts/store/model'; +import { HostsType } from '../../../../explore/hosts/store/model'; import { getAnomaliesDefaultTableColumns } from './get_anomalies_table_columns'; export const getAnomaliesHostTableColumns = ( diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_network_table_columns.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_network_table_columns.test.tsx index c1628961a832b..f07308a9fa6cf 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_network_table_columns.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_network_table_columns.test.tsx @@ -7,7 +7,7 @@ import '../../../mock/match_media'; import { getAnomaliesNetworkTableColumnsCurated } from './get_anomalies_network_table_columns'; -import { NetworkType } from '../../../../network/store/model'; +import { NetworkType } from '../../../../explore/network/store/model'; import * as i18n from './translations'; jest.mock('../../../lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_network_table_columns.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_network_table_columns.tsx index 2ab7c2e8a66b9..78468320ab24f 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_network_table_columns.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_network_table_columns.tsx @@ -7,14 +7,14 @@ import React from 'react'; -import type { Columns } from '../../paginated_table'; +import type { Columns } from '../../../../explore/components/paginated_table'; import type { Anomaly, AnomaliesByNetwork } from '../types'; import { getRowItemDraggable } from '../../tables/helpers'; import { createCompoundAnomalyKey } from './create_compound_key'; import { NetworkDetailsLink } from '../../links'; import * as i18n from './translations'; -import { NetworkType } from '../../../../network/store/model'; +import { NetworkType } from '../../../../explore/network/store/model'; import type { FlowTarget } from '../../../../../common/search_strategy'; import { getAnomaliesDefaultTableColumns } from './get_anomalies_table_columns'; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_table_columns.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_table_columns.test.tsx index c1d9b6e1f5725..97b9657175e21 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_table_columns.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_table_columns.test.tsx @@ -8,7 +8,7 @@ import '../../../mock/match_media'; import * as i18n from './translations'; import type { AnomaliesBy, Anomaly } from '../types'; -import type { Columns } from '../../paginated_table'; +import type { Columns } from '../../../../explore/components/paginated_table'; import React from 'react'; import { TestProviders } from '../../../mock'; import { useMountAppended } from '../../../utils/use_mount_appended'; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_table_columns.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_table_columns.tsx index d204aaceba4ab..043ecd3971f5f 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_table_columns.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_table_columns.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import type { Columns } from '../../paginated_table'; +import type { Columns } from '../../../../explore/components/paginated_table'; import type { AnomaliesBy, Anomaly } from '../types'; import { EntityDraggable } from '../entity_draggable'; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_user_table_columns.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_user_table_columns.test.tsx index 5905a7ceaa114..af29e63c9f264 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_user_table_columns.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_user_table_columns.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { UsersType } from '../../../../users/store/model'; +import { UsersType } from '../../../../explore/users/store/model'; import '../../../mock/match_media'; import { getAnomaliesUserTableColumnsCurated } from './get_anomalies_user_table_columns'; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_user_table_columns.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_user_table_columns.tsx index f1c8b5808c055..02f36d9d504e4 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_user_table_columns.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_user_table_columns.tsx @@ -6,14 +6,14 @@ */ import React from 'react'; -import type { Columns } from '../../paginated_table'; +import type { Columns } from '../../../../explore/components/paginated_table'; import type { AnomaliesByUser, Anomaly } from '../types'; import { getRowItemDraggable } from '../../tables/helpers'; import { createCompoundAnomalyKey } from './create_compound_key'; import { UserDetailsLink } from '../../links'; import * as i18n from './translations'; -import { UsersType } from '../../../../users/store/model'; +import { UsersType } from '../../../../explore/users/store/model'; import { getAnomaliesDefaultTableColumns } from './get_anomalies_table_columns'; export const getAnomaliesUserTableColumns = ( diff --git a/x-pack/plugins/security_solution/public/common/components/ml/types.ts b/x-pack/plugins/security_solution/public/common/components/ml/types.ts index edfa14b8340dc..d88f2763056c9 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/types.ts @@ -8,9 +8,9 @@ import type { Influencer } from '@kbn/ml-plugin/public'; import type { FlowTarget } from '../../../../common/search_strategy'; -import type { HostsType } from '../../../hosts/store/model'; -import type { NetworkType } from '../../../network/store/model'; -import type { UsersType } from '../../../users/store/model'; +import type { HostsType } from '../../../explore/hosts/store/model'; +import type { NetworkType } from '../../../explore/network/store/model'; +import type { UsersType } from '../../../explore/users/store/model'; export interface Source { job_id: string; diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.test.ts b/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.test.ts index 0cb13b5bcc4a8..4ec5638fbd602 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.test.ts @@ -9,9 +9,9 @@ import '../../../mock/match_media'; import { encodeIpv6 } from '../../../lib/helpers'; import type { ObjectWithNavTabs } from '.'; import { getBreadcrumbsForRoute, useSetBreadcrumbs } from '.'; -import { HostsTableType } from '../../../../hosts/store/model'; +import { HostsTableType } from '../../../../explore/hosts/store/model'; import type { RouteSpyState, SiemRouteType } from '../../../utils/route/types'; -import { NetworkRouteType } from '../../../../network/pages/navigation/types'; +import { NetworkRouteType } from '../../../../explore/network/pages/navigation/types'; import { TimelineTabs } from '../../../../../common/types/timeline'; import { AdministrationSubTab } from '../../../../management/types'; import { renderHook } from '@testing-library/react-hooks'; diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.ts b/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.ts index 287238f57a11c..9ea2ef27d61e3 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.ts +++ b/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.ts @@ -10,12 +10,12 @@ import { last, omit } from 'lodash/fp'; import { useDispatch } from 'react-redux'; import type { ChromeBreadcrumb } from '@kbn/core/public'; import type { StartServices } from '../../../../types'; -import { getTrailingBreadcrumbs as getHostDetailsBreadcrumbs } from '../../../../hosts/pages/details/utils'; -import { getTrailingBreadcrumbs as getIPDetailsBreadcrumbs } from '../../../../network/pages/details'; +import { getTrailingBreadcrumbs as getHostDetailsBreadcrumbs } from '../../../../explore/hosts/pages/details/utils'; +import { getTrailingBreadcrumbs as getIPDetailsBreadcrumbs } from '../../../../explore/network/pages/details'; import { getTrailingBreadcrumbs as getDetectionRulesBreadcrumbs } from '../../../../detections/pages/detection_engine/rules/utils'; import { getTrailingBreadcrumbs as geExceptionsBreadcrumbs } from '../../../../exceptions/utils/pages.utils'; import { getTrailingBreadcrumbs as getCSPBreadcrumbs } from '../../../../cloud_security_posture/breadcrumbs'; -import { getTrailingBreadcrumbs as getUsersBreadcrumbs } from '../../../../users/pages/details/utils'; +import { getTrailingBreadcrumbs as getUsersBreadcrumbs } from '../../../../explore/users/pages/details/utils'; import { getTrailingBreadcrumbs as getKubernetesBreadcrumbs } from '../../../../kubernetes/pages/utils/breadcrumbs'; import { getTrailingBreadcrumbs as getAlertDetailBreadcrumbs } from '../../../../detections/pages/alert_details/utils/breadcrumbs'; import { SecurityPageName } from '../../../../app/types'; diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/navigation/index.test.tsx index 5d8505a8c52d5..0b0081a32133a 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/navigation/index.test.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { TabNavigationComponent } from '.'; import { navTabs } from '../../../app/home/home_navigations'; -import { HostsTableType } from '../../../hosts/store/model'; +import { HostsTableType } from '../../../explore/hosts/store/model'; import type { RouteSpyState } from '../../utils/route/types'; import type { TabNavigationComponentProps, SecuritySolutionTabNavigationProps } from './types'; import { SecurityPageName } from '../../../app/types'; diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/index.test.tsx index c5aa5fbfce880..ad51ea40cf466 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/index.test.tsx @@ -7,8 +7,8 @@ import { mount } from 'enzyme'; import React from 'react'; -import { navTabsHostDetails } from '../../../../hosts/pages/details/nav_tabs'; -import { HostsTableType } from '../../../../hosts/store/model'; +import { navTabsHostDetails } from '../../../../explore/hosts/pages/details/nav_tabs'; +import { HostsTableType } from '../../../../explore/hosts/store/model'; import type { RouteSpyState } from '../../../utils/route/types'; import { TabNavigationComponent } from '.'; import type { TabNavigationProps } from './types'; diff --git a/x-pack/plugins/security_solution/public/common/components/search_bar/index.tsx b/x-pack/plugins/security_solution/public/common/components/search_bar/index.tsx index ba7efafb6b0dd..dfbe1e5a39873 100644 --- a/x-pack/plugins/security_solution/public/common/components/search_bar/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/search_bar/index.tsx @@ -36,9 +36,9 @@ import { } from './selectors'; import { timelineActions } from '../../../timelines/store/timeline'; import { useKibana } from '../../lib/kibana'; -import { usersActions } from '../../../users/store'; -import { hostsActions } from '../../../hosts/store'; -import { networkActions } from '../../../network/store'; +import { usersActions } from '../../../explore/users/store'; +import { hostsActions } from '../../../explore/hosts/store'; +import { networkActions } from '../../../explore/network/store'; import { useSyncSearchBarUrlParams } from '../../hooks/search_bar/use_sync_search_bar_url_param'; import { useSyncTimerangeUrlParam } from '../../hooks/search_bar/use_sync_timerange_url_param'; diff --git a/x-pack/plugins/security_solution/public/common/components/sessions_viewer/types.ts b/x-pack/plugins/security_solution/public/common/components/sessions_viewer/types.ts index 24bc101199eeb..450a6129b9da1 100644 --- a/x-pack/plugins/security_solution/public/common/components/sessions_viewer/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/sessions_viewer/types.ts @@ -7,7 +7,7 @@ import type { Filter } from '@kbn/es-query'; import type { EntityType } from '@kbn/timelines-plugin/common'; import type { TableIdLiteral } from '../../../../common/types'; -import type { QueryTabBodyProps } from '../../../hosts/pages/navigation/types'; +import type { QueryTabBodyProps } from '../../../explore/hosts/pages/navigation/types'; import type { ColumnHeaderOptions } from '../../../../common/types/timeline'; export interface SessionsComponentsProps extends Pick { diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_lens_attributes.tsx b/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_lens_attributes.tsx index 43c96825cd026..635ef09bf31df 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_lens_attributes.tsx +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_lens_attributes.tsx @@ -7,8 +7,8 @@ import { useMemo } from 'react'; import { SecurityPageName } from '../../../../common/constants'; -import { HostsTableType } from '../../../hosts/store/model'; -import { NetworkRouteType } from '../../../network/pages/navigation/types'; +import { HostsTableType } from '../../../explore/hosts/store/model'; +import { NetworkRouteType } from '../../../explore/network/pages/navigation/types'; import { useSourcererDataView } from '../../containers/sourcerer'; import { useDeepEqualSelector } from '../../hooks/use_selector'; import { inputsSelectors } from '../../store'; diff --git a/x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/types.ts b/x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/types.ts index 59c5f6947537b..e724076aeeef6 100644 --- a/x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/types.ts +++ b/x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/types.ts @@ -7,10 +7,10 @@ import type { ESTermQuery } from '../../../../../common/typed_json'; import type { GlobalTimeArgs } from '../../use_global_time'; -import type { HostsType } from '../../../../hosts/store/model'; -import type { NetworkType } from '../../../../network/store/model'; +import type { HostsType } from '../../../../explore/hosts/store/model'; +import type { NetworkType } from '../../../../explore/network/store/model'; import type { FlowTargetSourceDest } from '../../../../../common/search_strategy'; -import type { UsersType } from '../../../../users/store/model'; +import type { UsersType } from '../../../../explore/users/store/model'; interface QueryTabBodyProps { type: HostsType | NetworkType | UsersType; diff --git a/x-pack/plugins/security_solution/public/common/lib/cell_actions/helpers.tsx b/x-pack/plugins/security_solution/public/common/lib/cell_actions/helpers.tsx index 4720a5c0a7b54..2b4e9f57be6bf 100644 --- a/x-pack/plugins/security_solution/public/common/lib/cell_actions/helpers.tsx +++ b/x-pack/plugins/security_solution/public/common/lib/cell_actions/helpers.tsx @@ -16,8 +16,8 @@ import { USER_NAME_FIELD_NAME, } from '../../../timelines/components/timeline/body/renderers/constants'; import { INDICATOR_REFERENCE } from '../../../../common/cti/constants'; -import { IP_FIELD_TYPE } from '../../../network/components/ip'; -import { PORT_NAMES } from '../../../network/components/port/helpers'; +import { IP_FIELD_TYPE } from '../../../explore/network/components/ip'; +import { PORT_NAMES } from '../../../explore/network/components/port/helpers'; import { useKibana } from '../kibana'; export const COLUMNS_WITH_LINKS = [ diff --git a/x-pack/plugins/security_solution/public/common/mock/global_state.ts b/x-pack/plugins/security_solution/public/common/mock/global_state.ts index b7b03c9315fa8..c04f9a1b7ecc9 100644 --- a/x-pack/plugins/security_solution/public/common/mock/global_state.ts +++ b/x-pack/plugins/security_solution/public/common/mock/global_state.ts @@ -29,7 +29,7 @@ import { DEFAULT_DATA_VIEW_ID, DEFAULT_SIGNALS_INDEX, } from '../../../common/constants'; -import { networkModel } from '../../network/store'; +import { networkModel } from '../../explore/network/store'; import { TimelineType, TimelineStatus, @@ -42,7 +42,7 @@ import { initialSourcererState, SourcererScopeName } from '../store/sourcerer/mo import { allowedExperimentalValues } from '../../../common/experimental_features'; import { getScopePatternListSelection } from '../store/sourcerer/helpers'; import { mockBrowserFields, mockIndexFields, mockRuntimeMappings } from '../containers/source/mock'; -import { usersModel } from '../../users/store'; +import { usersModel } from '../../explore/users/store'; import { UsersFields } from '../../../common/search_strategy/security_solution/users/common'; export const mockSourcererState = { diff --git a/x-pack/plugins/security_solution/public/common/mock/utils.ts b/x-pack/plugins/security_solution/public/common/mock/utils.ts index d8f3dd1ca6ada..43d7d0125817f 100644 --- a/x-pack/plugins/security_solution/public/common/mock/utils.ts +++ b/x-pack/plugins/security_solution/public/common/mock/utils.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { hostsReducer } from '../../hosts/store'; -import { networkReducer } from '../../network/store'; -import { usersReducer } from '../../users/store'; +import { hostsReducer } from '../../explore/hosts/store'; +import { networkReducer } from '../../explore/network/store'; +import { usersReducer } from '../../explore/users/store'; import { timelineReducer } from '../../timelines/store/timeline/reducer'; import { managementReducer } from '../../management/store/reducer'; import type { ManagementPluginReducer } from '../../management'; diff --git a/x-pack/plugins/security_solution/public/common/store/reducer.ts b/x-pack/plugins/security_solution/public/common/store/reducer.ts index 243bd4e57db17..ae75e32ce5958 100644 --- a/x-pack/plugins/security_solution/public/common/store/reducer.ts +++ b/x-pack/plugins/security_solution/public/common/store/reducer.ts @@ -13,9 +13,9 @@ import { dragAndDropReducer, initialDragAndDropState } from './drag_and_drop'; import { createInitialInputsState, inputsReducer } from './inputs'; import { sourcererReducer, sourcererModel } from './sourcerer'; -import type { HostsPluginReducer } from '../../hosts/store'; -import type { NetworkPluginReducer } from '../../network/store'; -import type { UsersPluginReducer } from '../../users/store'; +import type { HostsPluginReducer } from '../../explore/hosts/store'; +import type { NetworkPluginReducer } from '../../explore/network/store'; +import type { UsersPluginReducer } from '../../explore/users/store'; import type { TimelinePluginReducer } from '../../timelines/store/timeline'; import type { SecuritySubPlugins } from '../../app/types'; diff --git a/x-pack/plugins/security_solution/public/common/store/types.ts b/x-pack/plugins/security_solution/public/common/store/types.ts index 22620a8cf8fbf..a1f90bbd6351f 100644 --- a/x-pack/plugins/security_solution/public/common/store/types.ts +++ b/x-pack/plugins/security_solution/public/common/store/types.ts @@ -14,12 +14,12 @@ import type { Immutable } from '../../../common/endpoint/types'; import type { AppState } from './app/reducer'; import type { InputsState } from './inputs/reducer'; import type { SourcererState } from './sourcerer/reducer'; -import type { HostsPluginState } from '../../hosts/store'; +import type { HostsPluginState } from '../../explore/hosts/store'; import type { DragAndDropState } from './drag_and_drop/reducer'; import type { TimelinePluginState } from '../../timelines/store/timeline'; -import type { NetworkPluginState } from '../../network/store'; +import type { NetworkPluginState } from '../../explore/network/store'; import type { ManagementPluginState } from '../../management'; -import type { UsersPluginState } from '../../users/store'; +import type { UsersPluginState } from '../../explore/users/store'; import type { GlobalUrlParam } from './global_url_param'; import type { DataTableState } from './data_table/types'; diff --git a/x-pack/plugins/security_solution/public/common/utils/route/index.test.tsx b/x-pack/plugins/security_solution/public/common/utils/route/index.test.tsx index 03ccabf5ecce9..e16f93b5b852b 100644 --- a/x-pack/plugins/security_solution/public/common/utils/route/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/utils/route/index.test.tsx @@ -8,7 +8,7 @@ import { mount } from 'enzyme'; import React from 'react'; -import { HostsTableType } from '../../../hosts/store/model'; +import { HostsTableType } from '../../../explore/hosts/store/model'; import { ManageRoutesSpy } from './manage_spy_routes'; import { SpyRouteComponent } from './spy_routes'; import { useRouteSpy } from './use_route_spy'; diff --git a/x-pack/plugins/security_solution/public/common/utils/route/types.ts b/x-pack/plugins/security_solution/public/common/utils/route/types.ts index 168c918545844..1fb2b2aeaa1a6 100644 --- a/x-pack/plugins/security_solution/public/common/utils/route/types.ts +++ b/x-pack/plugins/security_solution/public/common/utils/route/types.ts @@ -11,12 +11,12 @@ import type { RouteComponentProps } from 'react-router-dom'; import type { TimelineType } from '../../../../common/types/timeline'; -import type { HostsTableType } from '../../../hosts/store/model'; -import type { NetworkRouteType } from '../../../network/pages/navigation/types'; +import type { HostsTableType } from '../../../explore/hosts/store/model'; +import type { NetworkRouteType } from '../../../explore/network/pages/navigation/types'; import type { AlertDetailRouteType } from '../../../detections/pages/alert_details/types'; import type { AdministrationSubTab as AdministrationType } from '../../../management/types'; import type { FlowTarget } from '../../../../common/search_strategy'; -import type { UsersTableType } from '../../../users/store/model'; +import type { UsersTableType } from '../../../explore/users/store/model'; import type { SecurityPageName } from '../../../app/types'; export type SiemRouteType = diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_details_ui/pages/rule_details/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_details_ui/pages/rule_details/index.tsx index a4b162ce57ce7..2fcf2d63110d2 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_details_ui/pages/rule_details/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_details_ui/pages/rule_details/index.tsx @@ -87,7 +87,7 @@ import { DEFAULT_THREAT_INDEX_KEY, } from '../../../../../common/constants'; import { useGlobalFullScreen } from '../../../../common/containers/use_full_screen'; -import { Display } from '../../../../hosts/pages/display'; +import { Display } from '../../../../explore/hosts/pages/display'; import { focusUtilityBarAction, diff --git a/x-pack/plugins/security_solution/public/detections/pages/alert_details/tabs/summary/host_panel/host_panel.test.tsx b/x-pack/plugins/security_solution/public/detections/pages/alert_details/tabs/summary/host_panel/host_panel.test.tsx index 407a604bc9e43..edca07bd3426f 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/alert_details/tabs/summary/host_panel/host_panel.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/alert_details/tabs/summary/host_panel/host_panel.test.tsx @@ -18,9 +18,9 @@ import { HostPanel } from '.'; import { mockBrowserFields } from '../../../../../../common/containers/source/mock'; import { getTimelineEventData } from '../../../utils/get_timeline_event_data'; import { RiskSeverity } from '../../../../../../../common/search_strategy'; -import { useRiskScore } from '../../../../../../risk_score/containers'; +import { useRiskScore } from '../../../../../../explore/containers/risk_score'; -jest.mock('../../../../../../risk_score/containers'); +jest.mock('../../../../../../explore/containers/risk_score'); const mockUseRiskScore = useRiskScore as jest.Mock; jest.mock('../../../../../containers/detection_engine/alerts/use_host_isolation_status', () => { diff --git a/x-pack/plugins/security_solution/public/detections/pages/alert_details/tabs/summary/host_panel/index.tsx b/x-pack/plugins/security_solution/public/detections/pages/alert_details/tabs/summary/host_panel/index.tsx index fccb839c3236c..378c3910b02fe 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/alert_details/tabs/summary/host_panel/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/alert_details/tabs/summary/host_panel/index.tsx @@ -13,10 +13,10 @@ import type { EuiFlexItemProps } from '@elastic/eui'; import { TimelineId } from '../../../../../../../common/types'; import { isAlertFromEndpointEvent } from '../../../../../../common/utils/endpoint_alert_check'; import { SummaryValueCell } from '../../../../../../common/components/event_details/table/summary_value_cell'; -import { useRiskScore } from '../../../../../../risk_score/containers'; +import { useRiskScore } from '../../../../../../explore/containers/risk_score'; import { RiskScoreEntity } from '../../../../../../../common/search_strategy'; import { getEmptyTagValue } from '../../../../../../common/components/empty_value'; -import { RiskScore } from '../../../../../../common/components/severity/common'; +import { RiskScore } from '../../../../../../explore/components/risk_score/severity/common'; import { FirstLastSeen, FirstLastSeenType, diff --git a/x-pack/plugins/security_solution/public/detections/pages/alert_details/tabs/summary/user_panel/index.tsx b/x-pack/plugins/security_solution/public/detections/pages/alert_details/tabs/summary/user_panel/index.tsx index 6813ea61a4dc9..e6999a14c274e 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/alert_details/tabs/summary/user_panel/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/alert_details/tabs/summary/user_panel/index.tsx @@ -10,10 +10,10 @@ import type { TimelineEventsDetailsItem } from '@kbn/timelines-plugin/common'; import React, { useCallback, useMemo } from 'react'; import { find } from 'lodash/fp'; import type { EuiFlexItemProps } from '@elastic/eui/src/components/flex/flex_item'; -import { useRiskScore } from '../../../../../../risk_score/containers'; +import { useRiskScore } from '../../../../../../explore/containers/risk_score'; import { RiskScoreEntity } from '../../../../../../../common/search_strategy'; import { getEmptyTagValue } from '../../../../../../common/components/empty_value'; -import { RiskScore } from '../../../../../../common/components/severity/common'; +import { RiskScore } from '../../../../../../explore/components/risk_score/severity/common'; import { FirstLastSeen, FirstLastSeenType, diff --git a/x-pack/plugins/security_solution/public/detections/pages/alert_details/tabs/summary/user_panel/user_panel.test.tsx b/x-pack/plugins/security_solution/public/detections/pages/alert_details/tabs/summary/user_panel/user_panel.test.tsx index aa93253993338..58e5fa65a9885 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/alert_details/tabs/summary/user_panel/user_panel.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/alert_details/tabs/summary/user_panel/user_panel.test.tsx @@ -16,10 +16,10 @@ import type { UserPanelProps } from '.'; import { UserPanel } from '.'; import { getTimelineEventData } from '../../../utils/get_timeline_event_data'; import { RiskSeverity } from '../../../../../../../common/search_strategy'; -import { useRiskScore } from '../../../../../../risk_score/containers'; +import { useRiskScore } from '../../../../../../explore/containers/risk_score'; import { find } from 'lodash/fp'; -jest.mock('../../../../../../risk_score/containers'); +jest.mock('../../../../../../explore/containers/risk_score'); const mockUseRiskScore = useRiskScore as jest.Mock; describe('AlertDetailsPage - SummaryTab - UserPanel', () => { diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.tsx index 500788e8cbbc8..cff7c40a0fe80 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.tsx @@ -51,7 +51,7 @@ import * as i18n from './translations'; import { SecuritySolutionLinkButton } from '../../../common/components/links'; import { useFormatUrl } from '../../../common/components/link_to'; import { useGlobalFullScreen } from '../../../common/containers/use_full_screen'; -import { Display } from '../../../hosts/pages/display'; +import { Display } from '../../../explore/hosts/pages/display'; import { focusUtilityBarAction, onTimelineTabKeyPressed, diff --git a/x-pack/plugins/security_solution/public/common/components/authentication/__snapshots__/authentications_host_table.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/components/authentication/__snapshots__/authentications_host_table.test.tsx.snap similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/authentication/__snapshots__/authentications_host_table.test.tsx.snap rename to x-pack/plugins/security_solution/public/explore/components/authentication/__snapshots__/authentications_host_table.test.tsx.snap diff --git a/x-pack/plugins/security_solution/public/common/components/authentication/__snapshots__/authentications_user_table.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/components/authentication/__snapshots__/authentications_user_table.test.tsx.snap similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/authentication/__snapshots__/authentications_user_table.test.tsx.snap rename to x-pack/plugins/security_solution/public/explore/components/authentication/__snapshots__/authentications_user_table.test.tsx.snap diff --git a/x-pack/plugins/security_solution/public/common/components/authentication/authentications_host_table.test.tsx b/x-pack/plugins/security_solution/public/explore/components/authentication/authentications_host_table.test.tsx similarity index 92% rename from x-pack/plugins/security_solution/public/common/components/authentication/authentications_host_table.test.tsx rename to x-pack/plugins/security_solution/public/explore/components/authentication/authentications_host_table.test.tsx index 422ec6b384531..7264fe382a760 100644 --- a/x-pack/plugins/security_solution/public/common/components/authentication/authentications_host_table.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/authentication/authentications_host_table.test.tsx @@ -7,16 +7,16 @@ import React from 'react'; import { render } from '@testing-library/react'; -import '../../mock/match_media'; +import '../../../common/mock/match_media'; import * as i18n from './translations'; import { AuthenticationsHostTable } from './authentications_host_table'; -import { hostsModel } from '../../../hosts/store'; -import { TestProviders } from '../../mock'; +import { hostsModel } from '../../hosts/store'; +import { TestProviders } from '../../../common/mock'; import { useAuthentications } from '../../containers/authentications'; -import { useQueryToggle } from '../../containers/query_toggle'; +import { useQueryToggle } from '../../../common/containers/query_toggle'; -jest.mock('../../containers/query_toggle', () => ({ +jest.mock('../../../common/containers/query_toggle', () => ({ useQueryToggle: jest.fn().mockReturnValue({ toggleStatus: true, setToggleStatus: jest.fn() }), })); jest.mock('../../containers/authentications', () => ({ diff --git a/x-pack/plugins/security_solution/public/common/components/authentication/authentications_host_table.tsx b/x-pack/plugins/security_solution/public/explore/components/authentication/authentications_host_table.tsx similarity index 91% rename from x-pack/plugins/security_solution/public/common/components/authentication/authentications_host_table.tsx rename to x-pack/plugins/security_solution/public/explore/components/authentication/authentications_host_table.tsx index 65ac3b8a790ff..732e4f242aa43 100644 --- a/x-pack/plugins/security_solution/public/common/components/authentication/authentications_host_table.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/authentication/authentications_host_table.tsx @@ -18,11 +18,11 @@ import { rowItems, } from './helpers'; import { useAuthentications } from '../../containers/authentications'; -import { useQueryInspector } from '../page/manage_query'; -import type { HostsComponentsQueryProps } from '../../../hosts/pages/navigation/types'; -import { hostsActions, hostsModel, hostsSelectors } from '../../../hosts/store'; -import { useQueryToggle } from '../../containers/query_toggle'; -import { useDeepEqualSelector } from '../../hooks/use_selector'; +import { useQueryInspector } from '../../../common/components/page/manage_query'; +import type { HostsComponentsQueryProps } from '../../hosts/pages/navigation/types'; +import { hostsActions, hostsModel, hostsSelectors } from '../../hosts/store'; +import { useQueryToggle } from '../../../common/containers/query_toggle'; +import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; import { AuthStackByField } from '../../../../common/search_strategy'; const TABLE_QUERY_ID = 'authenticationsHostsTableQuery'; diff --git a/x-pack/plugins/security_solution/public/common/components/authentication/authentications_user_table.test.tsx b/x-pack/plugins/security_solution/public/explore/components/authentication/authentications_user_table.test.tsx similarity index 91% rename from x-pack/plugins/security_solution/public/common/components/authentication/authentications_user_table.test.tsx rename to x-pack/plugins/security_solution/public/explore/components/authentication/authentications_user_table.test.tsx index 6936c147ae928..c78063ebfbfc1 100644 --- a/x-pack/plugins/security_solution/public/common/components/authentication/authentications_user_table.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/authentication/authentications_user_table.test.tsx @@ -7,16 +7,16 @@ import React from 'react'; import { render } from '@testing-library/react'; -import '../../mock/match_media'; +import '../../../common/mock/match_media'; -import { TestProviders } from '../../mock'; +import { TestProviders } from '../../../common/mock'; import { useAuthentications } from '../../containers/authentications'; -import { useQueryToggle } from '../../containers/query_toggle'; +import { useQueryToggle } from '../../../common/containers/query_toggle'; import { AuthenticationsUserTable } from './authentications_user_table'; -import { usersModel } from '../../../users/store'; +import { usersModel } from '../../users/store'; import { AuthStackByField } from '../../../../common/search_strategy'; -jest.mock('../../containers/query_toggle', () => ({ +jest.mock('../../../common/containers/query_toggle', () => ({ useQueryToggle: jest.fn().mockReturnValue({ toggleStatus: true, setToggleStatus: jest.fn() }), })); jest.mock('../../containers/authentications', () => ({ diff --git a/x-pack/plugins/security_solution/public/common/components/authentication/authentications_user_table.tsx b/x-pack/plugins/security_solution/public/explore/components/authentication/authentications_user_table.tsx similarity index 93% rename from x-pack/plugins/security_solution/public/common/components/authentication/authentications_user_table.tsx rename to x-pack/plugins/security_solution/public/explore/components/authentication/authentications_user_table.tsx index f0c9a7318bc9f..f6c5fc86e761c 100644 --- a/x-pack/plugins/security_solution/public/common/components/authentication/authentications_user_table.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/authentication/authentications_user_table.tsx @@ -19,10 +19,10 @@ import { rowItems, } from './helpers'; import { useAuthentications } from '../../containers/authentications'; -import { useQueryInspector } from '../page/manage_query'; -import { useQueryToggle } from '../../containers/query_toggle'; -import { useDeepEqualSelector } from '../../hooks/use_selector'; -import { usersActions, usersModel, usersSelectors } from '../../../users/store'; +import { useQueryInspector } from '../../../common/components/page/manage_query'; +import { useQueryToggle } from '../../../common/containers/query_toggle'; +import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; +import { usersActions, usersModel, usersSelectors } from '../../users/store'; import type { AuthenticationsUserTableProps } from './types'; const TABLE_QUERY_ID = 'authenticationsUsersTableQuery'; diff --git a/x-pack/plugins/security_solution/public/common/components/authentication/helpers.tsx b/x-pack/plugins/security_solution/public/explore/components/authentication/helpers.tsx similarity index 91% rename from x-pack/plugins/security_solution/public/common/components/authentication/helpers.tsx rename to x-pack/plugins/security_solution/public/explore/components/authentication/helpers.tsx index f87c0c3362359..62aa2537f11a5 100644 --- a/x-pack/plugins/security_solution/public/common/components/authentication/helpers.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/authentication/helpers.tsx @@ -8,13 +8,17 @@ import { has } from 'lodash/fp'; import React from 'react'; -import { getEmptyTagValue } from '../empty_value'; -import { FormattedRelativePreferenceDate } from '../formatted_date'; +import { getEmptyTagValue } from '../../../common/components/empty_value'; +import { FormattedRelativePreferenceDate } from '../../../common/components/formatted_date'; import type { Columns, ItemsPerRow } from '../paginated_table'; -import { getRowItemDraggables } from '../tables/helpers'; +import { getRowItemDraggables } from '../../../common/components/tables/helpers'; import * as i18n from './translations'; -import { HostDetailsLink, NetworkDetailsLink, UserDetailsLink } from '../links'; +import { + HostDetailsLink, + NetworkDetailsLink, + UserDetailsLink, +} from '../../../common/components/links'; import type { AuthenticationsEdges } from '../../../../common/search_strategy'; import { MatrixHistogramType } from '../../../../common/search_strategy'; import type { AuthTableColumns } from './types'; @@ -22,9 +26,9 @@ import type { MatrixHistogramConfigs, MatrixHistogramMappingTypes, MatrixHistogramOption, -} from '../matrix_histogram/types'; -import type { LensAttributes } from '../visualization_actions/types'; -import { authenticationLensAttributes } from '../visualization_actions/lens_attributes/common/authentication'; +} from '../../../common/components/matrix_histogram/types'; +import type { LensAttributes } from '../../../common/components/visualization_actions/types'; +import { authenticationLensAttributes } from '../../../common/components/visualization_actions/lens_attributes/common/authentication'; export const getHostDetailsAuthenticationColumns = (): AuthTableColumns => [ USER_COLUMN, diff --git a/x-pack/plugins/security_solution/public/common/components/authentication/translations.ts b/x-pack/plugins/security_solution/public/explore/components/authentication/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/authentication/translations.ts rename to x-pack/plugins/security_solution/public/explore/components/authentication/translations.ts diff --git a/x-pack/plugins/security_solution/public/common/components/authentication/types.ts b/x-pack/plugins/security_solution/public/explore/components/authentication/types.ts similarity index 86% rename from x-pack/plugins/security_solution/public/common/components/authentication/types.ts rename to x-pack/plugins/security_solution/public/explore/components/authentication/types.ts index 79bae099239fb..328515803b46d 100644 --- a/x-pack/plugins/security_solution/public/common/components/authentication/types.ts +++ b/x-pack/plugins/security_solution/public/explore/components/authentication/types.ts @@ -6,7 +6,7 @@ */ import type { AuthenticationsEdges } from '../../../../common/search_strategy'; -import type { UsersComponentsQueryProps } from '../../../users/pages/navigation/types'; +import type { UsersComponentsQueryProps } from '../../users/pages/navigation/types'; import type { Columns } from '../paginated_table'; export type AuthTableColumns = Array>; diff --git a/x-pack/plugins/security_solution/public/common/components/paginated_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/components/paginated_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/paginated_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/explore/components/paginated_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/security_solution/public/common/components/paginated_table/helpers.test.ts b/x-pack/plugins/security_solution/public/explore/components/paginated_table/helpers.test.ts similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/paginated_table/helpers.test.ts rename to x-pack/plugins/security_solution/public/explore/components/paginated_table/helpers.test.ts diff --git a/x-pack/plugins/security_solution/public/common/components/paginated_table/helpers.ts b/x-pack/plugins/security_solution/public/explore/components/paginated_table/helpers.ts similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/paginated_table/helpers.ts rename to x-pack/plugins/security_solution/public/explore/components/paginated_table/helpers.ts diff --git a/x-pack/plugins/security_solution/public/common/components/paginated_table/index.mock.tsx b/x-pack/plugins/security_solution/public/explore/components/paginated_table/index.mock.tsx similarity index 96% rename from x-pack/plugins/security_solution/public/common/components/paginated_table/index.mock.tsx rename to x-pack/plugins/security_solution/public/explore/components/paginated_table/index.mock.tsx index 40fa401694a2f..2720f4640957e 100644 --- a/x-pack/plugins/security_solution/public/common/components/paginated_table/index.mock.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/paginated_table/index.mock.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { getOrEmptyTagFromValue } from '../empty_value'; +import { getOrEmptyTagFromValue } from '../../../common/components/empty_value'; import type { Columns, ItemsPerRow } from '.'; diff --git a/x-pack/plugins/security_solution/public/common/components/paginated_table/index.test.tsx b/x-pack/plugins/security_solution/public/explore/components/paginated_table/index.test.tsx similarity index 98% rename from x-pack/plugins/security_solution/public/common/components/paginated_table/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/components/paginated_table/index.test.tsx index 0048bcdb46eee..f1f4f259e04f4 100644 --- a/x-pack/plugins/security_solution/public/common/components/paginated_table/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/paginated_table/index.test.tsx @@ -14,10 +14,10 @@ import type { BasicTableProps } from '.'; import { PaginatedTable } from '.'; import { getHostsColumns, mockData, rowItems, sortedHosts } from './index.mock'; import { ThemeProvider } from 'styled-components'; -import { getMockTheme } from '../../lib/kibana/kibana_react.mock'; +import { getMockTheme } from '../../../common/lib/kibana/kibana_react.mock'; import { Direction } from '../../../../common/search_strategy'; -import { useQueryToggle } from '../../containers/query_toggle'; -jest.mock('../../containers/query_toggle'); +import { useQueryToggle } from '../../../common/containers/query_toggle'; +jest.mock('../../../common/containers/query_toggle'); jest.mock('react', () => { const r = jest.requireActual('react'); diff --git a/x-pack/plugins/security_solution/public/common/components/paginated_table/index.tsx b/x-pack/plugins/security_solution/public/explore/components/paginated_table/index.tsx similarity index 89% rename from x-pack/plugins/security_solution/public/common/components/paginated_table/index.tsx rename to x-pack/plugins/security_solution/public/explore/components/paginated_table/index.tsx index 59bb9c060da96..ffb5e35f55688 100644 --- a/x-pack/plugins/security_solution/public/common/components/paginated_table/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/paginated_table/index.tsx @@ -28,31 +28,31 @@ import styled from 'styled-components'; import type { Direction } from '../../../../common/search_strategy'; import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../common/constants'; -import type { HostsTableColumns } from '../../../hosts/components/hosts_table'; -import type { NetworkDnsColumns } from '../../../network/components/network_dns_table/columns'; -import type { NetworkHttpColumns } from '../../../network/components/network_http_table/columns'; +import type { HostsTableColumns } from '../../hosts/components/hosts_table'; +import type { NetworkDnsColumns } from '../../network/components/network_dns_table/columns'; +import type { NetworkHttpColumns } from '../../network/components/network_http_table/columns'; import type { NetworkTopNFlowColumns, NetworkTopNFlowColumnsNetworkDetails, -} from '../../../network/components/network_top_n_flow_table/columns'; +} from '../../network/components/network_top_n_flow_table/columns'; import type { NetworkTopCountriesColumns, NetworkTopCountriesColumnsNetworkDetails, -} from '../../../network/components/network_top_countries_table/columns'; -import type { TlsColumns } from '../../../network/components/tls_table/columns'; -import type { UncommonProcessTableColumns } from '../../../hosts/components/uncommon_process_table'; -import type { HostRiskScoreColumns } from '../../../hosts/components/host_risk_score_table'; +} from '../../network/components/network_top_countries_table/columns'; +import type { TlsColumns } from '../../network/components/tls_table/columns'; +import type { UncommonProcessTableColumns } from '../../hosts/components/uncommon_process_table'; +import type { HostRiskScoreColumns } from '../../hosts/components/host_risk_score_table'; -import type { UsersColumns } from '../../../network/components/users_table/columns'; -import { HeaderSection } from '../header_section'; -import { Loader } from '../loader'; -import { useStateToaster } from '../toasters'; +import type { UsersColumns } from '../../network/components/users_table/columns'; +import { HeaderSection } from '../../../common/components/header_section'; +import { Loader } from '../../../common/components/loader'; +import { useStateToaster } from '../../../common/components/toasters'; import * as i18n from './translations'; -import { Panel } from '../panel'; -import { InspectButtonContainer } from '../inspect'; -import { useQueryToggle } from '../../containers/query_toggle'; -import type { UsersTableColumns } from '../../../users/components/all_users'; +import { Panel } from '../../../common/components/panel'; +import { InspectButtonContainer } from '../../../common/components/inspect'; +import { useQueryToggle } from '../../../common/containers/query_toggle'; +import type { UsersTableColumns } from '../../users/components/all_users'; import type { AuthTableColumns } from '../authentication/types'; const DEFAULT_DATA_TEST_SUBJ = 'paginated-table'; diff --git a/x-pack/plugins/security_solution/public/common/components/paginated_table/translations.ts b/x-pack/plugins/security_solution/public/explore/components/paginated_table/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/paginated_table/translations.ts rename to x-pack/plugins/security_solution/public/explore/components/paginated_table/translations.ts diff --git a/x-pack/plugins/security_solution/public/risk_score/constants.ts b/x-pack/plugins/security_solution/public/explore/components/risk_score/constants.ts similarity index 100% rename from x-pack/plugins/security_solution/public/risk_score/constants.ts rename to x-pack/plugins/security_solution/public/explore/components/risk_score/constants.ts diff --git a/x-pack/plugins/security_solution/public/risk_score/components/enable_risk_score/index.tsx b/x-pack/plugins/security_solution/public/explore/components/risk_score/enable_risk_score/index.tsx similarity index 88% rename from x-pack/plugins/security_solution/public/risk_score/components/enable_risk_score/index.tsx rename to x-pack/plugins/security_solution/public/explore/components/risk_score/enable_risk_score/index.tsx index 6a21df109c3a1..0b5b3c43a0a9d 100644 --- a/x-pack/plugins/security_solution/public/risk_score/components/enable_risk_score/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/enable_risk_score/index.tsx @@ -7,11 +7,11 @@ import { EuiEmptyPrompt, EuiPanel, EuiToolTip } from '@elastic/eui'; import React from 'react'; import { RiskScoreUpgradeButton } from '../risk_score_onboarding/risk_score_upgrade_button'; -import type { RiskScoreEntity } from '../../../../common/search_strategy'; -import { useCheckSignalIndex } from '../../../detections/containers/detection_engine/alerts/use_check_signal_index'; -import type { inputsModel } from '../../../common/store'; +import type { RiskScoreEntity } from '../../../../../common/search_strategy'; +import { useCheckSignalIndex } from '../../../../detections/containers/detection_engine/alerts/use_check_signal_index'; +import type { inputsModel } from '../../../../common/store'; import { RiskScoreHeaderTitle } from '../risk_score_onboarding/risk_score_header_title'; -import { HeaderSection } from '../../../common/components/header_section'; +import { HeaderSection } from '../../../../common/components/header_section'; import { RiskScoreDocLink } from '../risk_score_onboarding/risk_score_doc_link'; import { RiskScoreEnableButton } from '../risk_score_onboarding/risk_score_enable_button'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/risk_score/components/enable_risk_score/translations.ts b/x-pack/plugins/security_solution/public/explore/components/risk_score/enable_risk_score/translations.ts similarity index 96% rename from x-pack/plugins/security_solution/public/risk_score/components/enable_risk_score/translations.ts rename to x-pack/plugins/security_solution/public/explore/components/risk_score/enable_risk_score/translations.ts index 114f809eb4ad0..4c4d7073ed1db 100644 --- a/x-pack/plugins/security_solution/public/risk_score/components/enable_risk_score/translations.ts +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/enable_risk_score/translations.ts @@ -5,7 +5,7 @@ * 2.0. */ import { i18n } from '@kbn/i18n'; -import type { RiskScoreEntity } from '../../../../common/search_strategy'; +import type { RiskScoreEntity } from '../../../../../common/search_strategy'; import { getRiskEntityTranslation } from '../translations'; export const ENABLE_RISK_SCORE_POPOVER = i18n.translate( diff --git a/x-pack/plugins/security_solution/public/risk_score/components/risk_details_tab_body/index.test.tsx b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_details_tab_body/index.test.tsx similarity index 88% rename from x-pack/plugins/security_solution/public/risk_score/components/risk_details_tab_body/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/components/risk_score/risk_details_tab_body/index.test.tsx index 51d9b485ebe54..c190fb6413e52 100644 --- a/x-pack/plugins/security_solution/public/risk_score/components/risk_details_tab_body/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_details_tab_body/index.test.tsx @@ -7,18 +7,18 @@ import React from 'react'; import { render } from '@testing-library/react'; -import { TestProviders } from '../../../common/mock'; -import { useQueryToggle } from '../../../common/containers/query_toggle'; +import { TestProviders } from '../../../../common/mock'; +import { useQueryToggle } from '../../../../common/containers/query_toggle'; -import { useRiskScore } from '../../containers'; +import { useRiskScore } from '../../../containers/risk_score'; import { RiskDetailsTabBody } from '.'; -import { RiskScoreEntity } from '../../../../common/search_strategy'; +import { RiskScoreEntity } from '../../../../../common/search_strategy'; import { HostsType } from '../../../hosts/store/model'; import { UsersType } from '../../../users/store/model'; -jest.mock('../../containers'); -jest.mock('../../../common/containers/query_toggle'); -jest.mock('../../../common/lib/kibana'); +jest.mock('../../../containers/risk_score'); +jest.mock('../../../../common/containers/query_toggle'); +jest.mock('../../../../common/lib/kibana'); describe.each([RiskScoreEntity.host, RiskScoreEntity.user])( 'Risk Tab Body entityType: %s', (riskEntity) => { diff --git a/x-pack/plugins/security_solution/public/risk_score/components/risk_details_tab_body/index.tsx b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_details_tab_body/index.tsx similarity index 89% rename from x-pack/plugins/security_solution/public/risk_score/components/risk_details_tab_body/index.tsx rename to x-pack/plugins/security_solution/public/explore/components/risk_score/risk_details_tab_body/index.tsx index d2472628fe395..a7a81a491ee4f 100644 --- a/x-pack/plugins/security_solution/public/risk_score/components/risk_details_tab_body/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_details_tab_body/index.tsx @@ -8,25 +8,29 @@ import { EuiButton, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; -import { RISKY_HOSTS_DASHBOARD_TITLE, RISKY_USERS_DASHBOARD_TITLE } from '../../constants'; +import { RISKY_HOSTS_DASHBOARD_TITLE, RISKY_USERS_DASHBOARD_TITLE } from '../constants'; import { EnableRiskScore } from '../enable_risk_score'; -import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; -import type { State } from '../../../common/store'; +import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; +import type { State } from '../../../../common/store'; import { hostsModel, hostsSelectors } from '../../../hosts/store'; import { usersSelectors } from '../../../users/store'; import { RiskInformationButtonEmpty } from '../risk_information'; import * as i18n from './translations'; -import { useQueryInspector } from '../../../common/components/page/manage_query'; +import { useQueryInspector } from '../../../../common/components/page/manage_query'; import { RiskScoreOverTime } from '../risk_score_over_time'; -import { TopRiskScoreContributors } from '../../../common/components/top_risk_score_contributors'; -import { useQueryToggle } from '../../../common/containers/query_toggle'; -import { HostRiskScoreQueryId, UserRiskScoreQueryId, useRiskScore } from '../../containers'; -import type { HostRiskScore, UserRiskScore } from '../../../../common/search_strategy'; -import { buildEntityNameFilter, RiskScoreEntity } from '../../../../common/search_strategy'; +import { TopRiskScoreContributors } from '../top_risk_score_contributors'; +import { useQueryToggle } from '../../../../common/containers/query_toggle'; +import { + HostRiskScoreQueryId, + UserRiskScoreQueryId, + useRiskScore, +} from '../../../containers/risk_score'; +import type { HostRiskScore, UserRiskScore } from '../../../../../common/search_strategy'; +import { buildEntityNameFilter, RiskScoreEntity } from '../../../../../common/search_strategy'; import type { UsersComponentsQueryProps } from '../../../users/pages/navigation/types'; import type { HostsComponentsQueryProps } from '../../../hosts/pages/navigation/types'; -import { useDashboardButtonHref } from '../../../common/hooks/use_dashboard_button_href'; +import { useDashboardButtonHref } from '../../../../common/hooks/use_dashboard_button_href'; import { RiskScoresNoDataDetected } from '../risk_score_onboarding/risk_score_no_data_detected'; const StyledEuiFlexGroup = styled(EuiFlexGroup)` diff --git a/x-pack/plugins/security_solution/public/risk_score/components/risk_details_tab_body/translations.ts b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_details_tab_body/translations.ts similarity index 91% rename from x-pack/plugins/security_solution/public/risk_score/components/risk_details_tab_body/translations.ts rename to x-pack/plugins/security_solution/public/explore/components/risk_score/risk_details_tab_body/translations.ts index d0b2038caa919..4a98a8fc749d4 100644 --- a/x-pack/plugins/security_solution/public/risk_score/components/risk_details_tab_body/translations.ts +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_details_tab_body/translations.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import type { RiskScoreEntity } from '../../../../common/search_strategy'; +import type { RiskScoreEntity } from '../../../../../common/search_strategy'; import { getRiskEntityTranslation } from '../translations'; export const RISK_SCORE_OVER_TIME = (riskEntity: RiskScoreEntity) => diff --git a/x-pack/plugins/security_solution/public/risk_score/components/risk_information/index.test.tsx b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_information/index.test.tsx similarity index 92% rename from x-pack/plugins/security_solution/public/risk_score/components/risk_information/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/components/risk_score/risk_information/index.test.tsx index 44aee022f2f53..19e21a57e5559 100644 --- a/x-pack/plugins/security_solution/public/risk_score/components/risk_information/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_information/index.test.tsx @@ -8,8 +8,8 @@ import { render, fireEvent } from '@testing-library/react'; import React from 'react'; import { RiskInformationButtonEmpty, RiskInformationButtonIcon } from '.'; -import { TestProviders } from '../../../common/mock'; -import { RiskScoreEntity } from '../../../../common/search_strategy'; +import { TestProviders } from '../../../../common/mock'; +import { RiskScoreEntity } from '../../../../../common/search_strategy'; describe.each([RiskScoreEntity.host, RiskScoreEntity.user])( 'Risk Information entityType: %s', diff --git a/x-pack/plugins/security_solution/public/risk_score/components/risk_information/index.tsx b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_information/index.tsx similarity index 95% rename from x-pack/plugins/security_solution/public/risk_score/components/risk_information/index.tsx rename to x-pack/plugins/security_solution/public/explore/components/risk_score/risk_information/index.tsx index 144e8597eef56..3e1609e17d480 100644 --- a/x-pack/plugins/security_solution/public/risk_score/components/risk_information/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_information/index.tsx @@ -22,13 +22,13 @@ import { EuiTitle, useGeneratedHtmlId, } from '@elastic/eui'; -import { FormattedMessage } from '@kbn/i18n-react'; import React from 'react'; +import { FormattedMessage } from '@kbn/i18n-react'; import { getRiskEntityTranslation } from '../translations'; import * as i18n from './translations'; -import { useOnOpenCloseHandler } from '../../../helper_hooks'; -import { RiskScore } from '../../../common/components/severity/common'; -import { RiskScoreEntity, RiskSeverity } from '../../../../common/search_strategy'; +import { useOnOpenCloseHandler } from '../../../../helper_hooks'; +import { RiskScore } from '../severity/common'; +import { RiskScoreEntity, RiskSeverity } from '../../../../../common/search_strategy'; import { RiskScoreDocLink } from '../risk_score_onboarding/risk_score_doc_link'; const getTableColumns = (riskEntity: RiskScoreEntity): Array> => [ diff --git a/x-pack/plugins/security_solution/public/risk_score/components/risk_information/translations.ts b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_information/translations.ts similarity index 97% rename from x-pack/plugins/security_solution/public/risk_score/components/risk_information/translations.ts rename to x-pack/plugins/security_solution/public/explore/components/risk_score/risk_information/translations.ts index c3e5101f3790a..a79ccbafc5d31 100644 --- a/x-pack/plugins/security_solution/public/risk_score/components/risk_information/translations.ts +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_information/translations.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import type { RiskScoreEntity } from '../../../../common/search_strategy'; +import type { RiskScoreEntity } from '../../../../../common/search_strategy'; import { getRiskEntityTranslation } from '../translations'; export const INFORMATION_CLASSIFICATION_HEADER = i18n.translate( diff --git a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/risk_score_doc_link.tsx b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/risk_score_doc_link.tsx similarity index 81% rename from x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/risk_score_doc_link.tsx rename to x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/risk_score_doc_link.tsx index 0c71b364d138f..9f0fc185ed450 100644 --- a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/risk_score_doc_link.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/risk_score_doc_link.tsx @@ -7,9 +7,9 @@ import { EuiLink } from '@elastic/eui'; import React from 'react'; -import { RiskScoreEntity } from '../../../../common/search_strategy'; -import { RISKY_HOSTS_DOC_LINK, RISKY_USERS_DOC_LINK } from '../../../../common/constants'; -import { LEARN_MORE } from '../../../overview/components/entity_analytics/risk_score/translations'; +import { RiskScoreEntity } from '../../../../../common/search_strategy'; +import { RISKY_HOSTS_DOC_LINK, RISKY_USERS_DOC_LINK } from '../../../../../common/constants'; +import { LEARN_MORE } from '../../../../overview/components/entity_analytics/risk_score/translations'; const RiskScoreDocLinkComponent = ({ riskScoreEntity, diff --git a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/risk_score_enable_button.test.tsx b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/risk_score_enable_button.test.tsx similarity index 94% rename from x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/risk_score_enable_button.test.tsx rename to x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/risk_score_enable_button.test.tsx index b1df8fc2f9693..070b1df90fb6c 100644 --- a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/risk_score_enable_button.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/risk_score_enable_button.test.tsx @@ -7,8 +7,8 @@ import { act, render, screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import React from 'react'; -import { RiskScoreEntity } from '../../../../common/search_strategy'; -import { TestProviders } from '../../../common/mock'; +import { RiskScoreEntity } from '../../../../../common/search_strategy'; +import { TestProviders } from '../../../../common/mock'; import { RiskScoreEnableButton } from './risk_score_enable_button'; import { installRiskScoreModule } from './utils'; diff --git a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/risk_score_enable_button.tsx b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/risk_score_enable_button.tsx similarity index 85% rename from x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/risk_score_enable_button.tsx rename to x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/risk_score_enable_button.tsx index 24ad34757ead6..ec6c6ceb02192 100644 --- a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/risk_score_enable_button.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/risk_score_enable_button.tsx @@ -9,11 +9,11 @@ import { EuiButton } from '@elastic/eui'; import React, { useCallback } from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; -import type { RiskScoreEntity } from '../../../../common/search_strategy'; -import { useSpaceId } from '../../../common/hooks/use_space_id'; -import { useKibana } from '../../../common/lib/kibana'; -import type { inputsModel } from '../../../common/store'; -import { REQUEST_NAMES, useFetch } from '../../../common/hooks/use_fetch'; +import type { RiskScoreEntity } from '../../../../../common/search_strategy'; +import { useSpaceId } from '../../../../common/hooks/use_space_id'; +import { useKibana } from '../../../../common/lib/kibana'; +import type { inputsModel } from '../../../../common/store'; +import { REQUEST_NAMES, useFetch } from '../../../../common/hooks/use_fetch'; import { useRiskScoreToastContent } from './use_risk_score_toast_content'; import { installRiskScoreModule } from './utils'; diff --git a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/risk_score_header_title.tsx b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/risk_score_header_title.tsx similarity index 76% rename from x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/risk_score_header_title.tsx rename to x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/risk_score_header_title.tsx index c01b35ac1f08a..e24a89944180c 100644 --- a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/risk_score_header_title.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/risk_score_header_title.tsx @@ -6,9 +6,9 @@ */ import React from 'react'; -import { RiskScoreEntity } from '../../../../common/search_strategy'; -import { NavItemBetaBadge } from '../../../common/components/navigation/nav_item_beta_badge'; -import * as i18n from '../../../overview/components/entity_analytics/common/translations'; +import { RiskScoreEntity } from '../../../../../common/search_strategy'; +import { NavItemBetaBadge } from '../../../../common/components/navigation/nav_item_beta_badge'; +import * as i18n from '../../../../overview/components/entity_analytics/common/translations'; import { TECHNICAL_PREVIEW } from './translations'; const RiskScoreHeaderTitleComponent = ({ diff --git a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/risk_score_no_data_detected.tsx b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/risk_score_no_data_detected.tsx similarity index 85% rename from x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/risk_score_no_data_detected.tsx rename to x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/risk_score_no_data_detected.tsx index 4a0aed6a10c49..3ea3b4a6875fb 100644 --- a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/risk_score_no_data_detected.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/risk_score_no_data_detected.tsx @@ -7,14 +7,14 @@ import { EuiEmptyPrompt, EuiPanel, EuiToolTip } from '@elastic/eui'; import React, { useMemo } from 'react'; -import { RiskScoreEntity } from '../../../../common/search_strategy'; +import { RiskScoreEntity } from '../../../../../common/search_strategy'; -import { HeaderSection } from '../../../common/components/header_section'; +import { HeaderSection } from '../../../../common/components/header_section'; import * as i18n from './translations'; import { RiskScoreHeaderTitle } from './risk_score_header_title'; import { RiskScoreRestartButton } from './risk_score_restart_button'; -import type { inputsModel } from '../../../common/store'; -import * as overviewI18n from '../../../overview/components/entity_analytics/common/translations'; +import type { inputsModel } from '../../../../common/store'; +import * as overviewI18n from '../../../../overview/components/entity_analytics/common/translations'; const RiskScoresNoDataDetectedComponent = ({ entityType, diff --git a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/risk_score_restart_button.test.tsx b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/risk_score_restart_button.test.tsx similarity index 94% rename from x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/risk_score_restart_button.test.tsx rename to x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/risk_score_restart_button.test.tsx index dbccdd9a0c085..d6785847cd833 100644 --- a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/risk_score_restart_button.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/risk_score_restart_button.test.tsx @@ -7,8 +7,8 @@ import { act, render, screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import React from 'react'; -import { RiskScoreEntity } from '../../../../common/search_strategy'; -import { TestProviders } from '../../../common/mock'; +import { RiskScoreEntity } from '../../../../../common/search_strategy'; +import { TestProviders } from '../../../../common/mock'; import { RiskScoreRestartButton } from './risk_score_restart_button'; import { restartRiskScoreTransforms } from './utils'; diff --git a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/risk_score_restart_button.tsx b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/risk_score_restart_button.tsx similarity index 83% rename from x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/risk_score_restart_button.tsx rename to x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/risk_score_restart_button.tsx index 7f4316b77ee97..be1f5b5d16621 100644 --- a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/risk_score_restart_button.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/risk_score_restart_button.tsx @@ -9,11 +9,11 @@ import { EuiButton } from '@elastic/eui'; import React, { useCallback } from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; -import type { RiskScoreEntity } from '../../../../common/search_strategy'; -import { useSpaceId } from '../../../common/hooks/use_space_id'; -import { useKibana } from '../../../common/lib/kibana'; -import type { inputsModel } from '../../../common/store'; -import { REQUEST_NAMES, useFetch } from '../../../common/hooks/use_fetch'; +import type { RiskScoreEntity } from '../../../../../common/search_strategy'; +import { useSpaceId } from '../../../../common/hooks/use_space_id'; +import { useKibana } from '../../../../common/lib/kibana'; +import type { inputsModel } from '../../../../common/store'; +import { REQUEST_NAMES, useFetch } from '../../../../common/hooks/use_fetch'; import { useRiskScoreToastContent } from './use_risk_score_toast_content'; import { restartRiskScoreTransforms } from './utils'; diff --git a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/risk_score_upgrade_button.test.tsx b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/risk_score_upgrade_button.test.tsx similarity index 96% rename from x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/risk_score_upgrade_button.test.tsx rename to x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/risk_score_upgrade_button.test.tsx index ededbd896e3e4..41032690fdfd0 100644 --- a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/risk_score_upgrade_button.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/risk_score_upgrade_button.test.tsx @@ -7,8 +7,8 @@ import { act, render, screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import React from 'react'; -import { RiskScoreEntity } from '../../../../common/search_strategy'; -import { TestProviders } from '../../../common/mock'; +import { RiskScoreEntity } from '../../../../../common/search_strategy'; +import { TestProviders } from '../../../../common/mock'; import { RiskScoreUpgradeButton } from './risk_score_upgrade_button'; import { upgradeHostRiskScoreModule, upgradeUserRiskScoreModule } from './utils'; diff --git a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/risk_score_upgrade_button.tsx b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/risk_score_upgrade_button.tsx similarity index 91% rename from x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/risk_score_upgrade_button.tsx rename to x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/risk_score_upgrade_button.tsx index 24e08c770ec3e..a08710a17ed2d 100644 --- a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/risk_score_upgrade_button.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/risk_score_upgrade_button.tsx @@ -8,13 +8,13 @@ import { EuiButton, EuiConfirmModal } from '@elastic/eui'; import React, { useCallback, useState } from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; -import { useSpaceId } from '../../../common/hooks/use_space_id'; -import { useKibana } from '../../../common/lib/kibana'; -import type { inputsModel } from '../../../common/store'; +import { useSpaceId } from '../../../../common/hooks/use_space_id'; +import { useKibana } from '../../../../common/lib/kibana'; +import type { inputsModel } from '../../../../common/store'; import { upgradeHostRiskScoreModule, upgradeUserRiskScoreModule } from './utils'; -import { RiskScoreEntity } from '../../../../common/search_strategy'; +import { RiskScoreEntity } from '../../../../../common/search_strategy'; import { useRiskScoreToastContent } from './use_risk_score_toast_content'; -import { REQUEST_NAMES, useFetch } from '../../../common/hooks/use_fetch'; +import { REQUEST_NAMES, useFetch } from '../../../../common/hooks/use_fetch'; import { RiskScoreDocLink } from './risk_score_doc_link'; const RiskScoreUpgradeButtonComponent = ({ diff --git a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/translations.ts b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/translations.ts rename to x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/translations.ts diff --git a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/use_risk_score_toast_content.tsx b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/use_risk_score_toast_content.tsx similarity index 94% rename from x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/use_risk_score_toast_content.tsx rename to x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/use_risk_score_toast_content.tsx index 7df01d9f8bd86..60c00ab9d8cb6 100644 --- a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/use_risk_score_toast_content.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/use_risk_score_toast_content.tsx @@ -10,7 +10,7 @@ import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; import { FormattedMessage } from '@kbn/i18n-react'; -import type { RiskScoreEntity } from '../../../../common/search_strategy'; +import type { RiskScoreEntity } from '../../../../../common/search_strategy'; import { RiskScoreDocLink } from './risk_score_doc_link'; const StyledButton = styled(EuiButton)` diff --git a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/utils.test.ts b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/utils.test.ts similarity index 94% rename from x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/utils.test.ts rename to x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/utils.test.ts index cb46c3a255d3a..770c5b8caf72d 100644 --- a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/utils.test.ts +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/utils.test.ts @@ -5,26 +5,26 @@ * 2.0. */ import type { HttpSetup } from '@kbn/core/public'; -import { RiskScoreEntity } from '../../../../common/search_strategy'; +import { RiskScoreEntity } from '../../../../../common/search_strategy'; import { getIngestPipelineName, getLegacyIngestPipelineName, getRiskScoreLatestTransformId, getRiskScorePivotTransformId, -} from '../../../../common/utils/risk_score_modules'; +} from '../../../../../common/utils/risk_score_modules'; import { bulkDeletePrebuiltSavedObjects, bulkCreatePrebuiltSavedObjects, -} from '../../containers/onboarding/api'; +} from '../../../containers/risk_score/onboarding/api'; -import * as api from '../../containers/onboarding/api'; +import * as api from '../../../containers/risk_score/onboarding/api'; import { installRiskScoreModule, restartRiskScoreTransforms, uninstallRiskScoreModule, } from './utils'; -jest.mock('../../containers/onboarding/api'); +jest.mock('../../../containers/risk_score/onboarding/api'); const mockHttp = { post: jest.fn(), diff --git a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/utils.ts b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/utils.ts similarity index 96% rename from x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/utils.ts rename to x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/utils.ts index ee5eebd109b05..65677900f979e 100644 --- a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_onboarding/utils.ts +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_onboarding/utils.ts @@ -6,9 +6,9 @@ */ import type { HttpSetup, NotificationsStart, ThemeServiceStart } from '@kbn/core/public'; import type { DashboardStart } from '@kbn/dashboard-plugin/public'; -import { RiskScoreEntity } from '../../../../common/search_strategy'; -import * as utils from '../../../../common/utils/risk_score_modules'; -import type { inputsModel } from '../../../common/store'; +import { RiskScoreEntity } from '../../../../../common/search_strategy'; +import * as utils from '../../../../../common/utils/risk_score_modules'; +import type { inputsModel } from '../../../../common/store'; import { deleteStoredScripts, @@ -19,12 +19,12 @@ import { bulkCreatePrebuiltSavedObjects, stopTransforms, startTransforms, -} from '../../containers/onboarding/api'; +} from '../../../containers/risk_score/onboarding/api'; import { INGEST_PIPELINE_DELETION_ERROR_MESSAGE, TRANSFORM_DELETION_ERROR_MESSAGE, UNINSTALLATION_ERROR, -} from '../../containers/onboarding/api/translations'; +} from '../../../containers/risk_score/onboarding/api/translations'; interface InstallRiskScoreModule { dashboard?: DashboardStart; diff --git a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_over_time/index.test.tsx b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_over_time/index.test.tsx similarity index 97% rename from x-pack/plugins/security_solution/public/risk_score/components/risk_score_over_time/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_over_time/index.test.tsx index 0d97fbed2407a..d0f4239bae33a 100644 --- a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_over_time/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_over_time/index.test.tsx @@ -8,7 +8,7 @@ import { render } from '@testing-library/react'; import React from 'react'; import { RiskScoreOverTime, scoreFormatter } from '.'; -import { TestProviders } from '../../../common/mock'; +import { TestProviders } from '../../../../common/mock'; import { LineSeries } from '@elastic/charts'; const mockLineSeries = LineSeries as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_over_time/index.tsx b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_over_time/index.tsx similarity index 91% rename from x-pack/plugins/security_solution/public/risk_score/components/risk_score_over_time/index.tsx rename to x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_over_time/index.tsx index 970dfff6373cb..68a3727e8bad6 100644 --- a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_over_time/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_over_time/index.tsx @@ -17,18 +17,18 @@ import { AnnotationDomainType, LineAnnotation, } from '@elastic/charts'; -import { euiThemeVars } from '@kbn/ui-theme'; import { EuiFlexGroup, EuiFlexItem, EuiLoadingChart, EuiText, EuiPanel } from '@elastic/eui'; import styled from 'styled-components'; -import { chartDefaultSettings, useTheme } from '../../../common/components/charts/common'; -import { useTimeZone } from '../../../common/lib/kibana'; -import { histogramDateTimeFormatter } from '../../../common/components/utils'; -import { HeaderSection } from '../../../common/components/header_section'; -import { InspectButton, InspectButtonContainer } from '../../../common/components/inspect'; +import { euiThemeVars } from '@kbn/ui-theme'; +import { chartDefaultSettings, useTheme } from '../../../../common/components/charts/common'; +import { useTimeZone } from '../../../../common/lib/kibana'; +import { histogramDateTimeFormatter } from '../../../../common/components/utils'; +import { HeaderSection } from '../../../../common/components/header_section'; +import { InspectButton, InspectButtonContainer } from '../../../../common/components/inspect'; import * as i18n from './translations'; -import { PreferenceFormattedDate } from '../../../common/components/formatted_date'; -import type { HostRiskScore, UserRiskScore } from '../../../../common/search_strategy'; -import { isUserRiskScore } from '../../../../common/search_strategy'; +import { PreferenceFormattedDate } from '../../../../common/components/formatted_date'; +import type { HostRiskScore, UserRiskScore } from '../../../../../common/search_strategy'; +import { isUserRiskScore } from '../../../../../common/search_strategy'; export interface RiskScoreOverTimeProps { from: string; diff --git a/x-pack/plugins/security_solution/public/risk_score/components/risk_score_over_time/translations.ts b/x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_over_time/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/risk_score/components/risk_score_over_time/translations.ts rename to x-pack/plugins/security_solution/public/explore/components/risk_score/risk_score_over_time/translations.ts diff --git a/x-pack/plugins/security_solution/public/common/components/severity/common/index.test.tsx b/x-pack/plugins/security_solution/public/explore/components/risk_score/severity/common/index.test.tsx similarity index 96% rename from x-pack/plugins/security_solution/public/common/components/severity/common/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/components/risk_score/severity/common/index.test.tsx index 6ecd7f218ad14..5823c5a3be159 100644 --- a/x-pack/plugins/security_solution/public/common/components/severity/common/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/severity/common/index.test.tsx @@ -8,13 +8,13 @@ import { render } from '@testing-library/react'; import React from 'react'; -import { TestProviders } from '../../../mock'; +import { TestProviders } from '../../../../../common/mock'; import type { EuiHealthProps } from '@elastic/eui'; import { EuiHealth } from '@elastic/eui'; import { euiThemeVars } from '@kbn/ui-theme'; -import { RiskSeverity } from '../../../../../common/search_strategy'; +import { RiskSeverity } from '../../../../../../common/search_strategy'; import { RiskScore } from '.'; jest.mock('@elastic/eui', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/severity/common/index.tsx b/x-pack/plugins/security_solution/public/explore/components/risk_score/severity/common/index.tsx similarity index 92% rename from x-pack/plugins/security_solution/public/common/components/severity/common/index.tsx rename to x-pack/plugins/security_solution/public/explore/components/risk_score/severity/common/index.tsx index 1b89a91c1190e..d074f173b0da4 100644 --- a/x-pack/plugins/security_solution/public/common/components/severity/common/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/severity/common/index.tsx @@ -12,8 +12,8 @@ import { EuiHealth, transparentize } from '@elastic/eui'; import styled, { css } from 'styled-components'; import { euiLightVars } from '@kbn/ui-theme'; -import { WithHoverActions } from '../../with_hover_actions'; -import { RiskSeverity } from '../../../../../common/search_strategy'; +import { WithHoverActions } from '../../../../../common/components/with_hover_actions'; +import { RiskSeverity } from '../../../../../../common/search_strategy'; export const RISK_SEVERITY_COLOUR: { [k in RiskSeverity]: string } = { [RiskSeverity.unknown]: euiLightVars.euiColorMediumShade, diff --git a/x-pack/plugins/security_solution/public/common/components/severity/severity_badges.tsx b/x-pack/plugins/security_solution/public/explore/components/risk_score/severity/severity_badges.tsx similarity index 95% rename from x-pack/plugins/security_solution/public/common/components/severity/severity_badges.tsx rename to x-pack/plugins/security_solution/public/explore/components/risk_score/severity/severity_badges.tsx index edd1a1cc540bc..ef80d8a095699 100644 --- a/x-pack/plugins/security_solution/public/common/components/severity/severity_badges.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/severity/severity_badges.tsx @@ -7,7 +7,7 @@ import { EuiFlexGroup, EuiNotificationBadge, EuiFlexItem } from '@elastic/eui'; import React from 'react'; -import type { RiskSeverity } from '../../../../common/search_strategy'; +import type { RiskSeverity } from '../../../../../common/search_strategy'; import { RiskScore, RISK_SEVERITY_COLOUR } from './common'; import type { SeverityCount } from './types'; diff --git a/x-pack/plugins/security_solution/public/common/components/severity/severity_bar.tsx b/x-pack/plugins/security_solution/public/explore/components/risk_score/severity/severity_bar.tsx similarity index 95% rename from x-pack/plugins/security_solution/public/common/components/severity/severity_bar.tsx rename to x-pack/plugins/security_solution/public/explore/components/risk_score/severity/severity_bar.tsx index 671461771d0af..d53693b6d8e69 100644 --- a/x-pack/plugins/security_solution/public/common/components/severity/severity_bar.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/severity/severity_bar.tsx @@ -9,7 +9,7 @@ import styled from 'styled-components'; import { EuiColorPaletteDisplay } from '@elastic/eui'; import React, { useMemo } from 'react'; -import type { RiskSeverity } from '../../../../common/search_strategy'; +import type { RiskSeverity } from '../../../../../common/search_strategy'; import { RISK_SEVERITY_COLOUR } from './common'; import type { SeverityCount } from './types'; diff --git a/x-pack/plugins/security_solution/public/common/components/severity/severity_filter_group.test.tsx b/x-pack/plugins/security_solution/public/explore/components/risk_score/severity/severity_filter_group.test.tsx similarity index 90% rename from x-pack/plugins/security_solution/public/common/components/severity/severity_filter_group.test.tsx rename to x-pack/plugins/security_solution/public/explore/components/risk_score/severity/severity_filter_group.test.tsx index 187f743f0b468..186d6336f8ca4 100644 --- a/x-pack/plugins/security_solution/public/common/components/severity/severity_filter_group.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/severity/severity_filter_group.test.tsx @@ -7,8 +7,8 @@ import React from 'react'; import { render, fireEvent } from '@testing-library/react'; import { SeverityFilterGroup } from './severity_filter_group'; -import { RiskSeverity } from '../../../../common/search_strategy'; -import { TestProviders } from '../../mock'; +import { RiskSeverity } from '../../../../../common/search_strategy'; +import { TestProviders } from '../../../../common/mock'; describe('SeverityFilterGroup', () => { it('preserves sort order when severityCount is out of order', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/severity/severity_filter_group.tsx b/x-pack/plugins/security_solution/public/explore/components/risk_score/severity/severity_filter_group.tsx similarity index 95% rename from x-pack/plugins/security_solution/public/common/components/severity/severity_filter_group.tsx rename to x-pack/plugins/security_solution/public/explore/components/risk_score/severity/severity_filter_group.tsx index ea05c31d6f481..b736423a28d4f 100644 --- a/x-pack/plugins/security_solution/public/common/components/severity/severity_filter_group.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/severity/severity_filter_group.tsx @@ -15,8 +15,8 @@ import { useGeneratedHtmlId, } from '@elastic/eui'; -import type { RiskSeverity } from '../../../../common/search_strategy'; -import { SEVERITY_UI_SORT_ORDER } from '../../../../common/search_strategy'; +import type { RiskSeverity } from '../../../../../common/search_strategy'; +import { SEVERITY_UI_SORT_ORDER } from '../../../../../common/search_strategy'; import type { SeverityCount } from './types'; import { RiskScore } from './common'; diff --git a/x-pack/plugins/security_solution/public/common/components/severity/types.ts b/x-pack/plugins/security_solution/public/explore/components/risk_score/severity/types.ts similarity index 80% rename from x-pack/plugins/security_solution/public/common/components/severity/types.ts rename to x-pack/plugins/security_solution/public/explore/components/risk_score/severity/types.ts index 0c161ddd81470..c4760b55b6a83 100644 --- a/x-pack/plugins/security_solution/public/common/components/severity/types.ts +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/severity/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { RiskSeverity } from '../../../../common/search_strategy'; +import type { RiskSeverity } from '../../../../../common/search_strategy'; export type SeverityCount = { [k in RiskSeverity]: number; diff --git a/x-pack/plugins/security_solution/public/common/components/top_risk_score_contributors/index.test.tsx b/x-pack/plugins/security_solution/public/explore/components/risk_score/top_risk_score_contributors/index.test.tsx similarity index 91% rename from x-pack/plugins/security_solution/public/common/components/top_risk_score_contributors/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/components/risk_score/top_risk_score_contributors/index.test.tsx index 95712ee698a0d..8b1f3e7cfffff 100644 --- a/x-pack/plugins/security_solution/public/common/components/top_risk_score_contributors/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/top_risk_score_contributors/index.test.tsx @@ -8,12 +8,11 @@ import { render } from '@testing-library/react'; import React from 'react'; import { TopRiskScoreContributors } from '.'; -import { TestProviders } from '../../mock'; -import type { RuleRisk } from '../../../../common/search_strategy'; - -jest.mock('../../containers/query_toggle'); -jest.mock('../../../risk_score/containers'); +import { TestProviders } from '../../../../common/mock'; +import type { RuleRisk } from '../../../../../common/search_strategy'; +jest.mock('../../../../common/containers/query_toggle'); +jest.mock('../../../containers/risk_score'); const testProps = { riskScore: [], setQuery: jest.fn(), diff --git a/x-pack/plugins/security_solution/public/common/components/top_risk_score_contributors/index.tsx b/x-pack/plugins/security_solution/public/explore/components/risk_score/top_risk_score_contributors/index.tsx similarity index 89% rename from x-pack/plugins/security_solution/public/common/components/top_risk_score_contributors/index.tsx rename to x-pack/plugins/security_solution/public/explore/components/risk_score/top_risk_score_contributors/index.tsx index eaf8f9f35cc66..9f33fc9b7bc27 100644 --- a/x-pack/plugins/security_solution/public/common/components/top_risk_score_contributors/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/top_risk_score_contributors/index.tsx @@ -10,13 +10,13 @@ import React, { useMemo } from 'react'; import type { EuiTableFieldDataColumnType } from '@elastic/eui'; import { EuiFlexGroup, EuiFlexItem, EuiPanel, EuiInMemoryTable } from '@elastic/eui'; -import { HeaderSection } from '../header_section'; -import { InspectButton, InspectButtonContainer } from '../inspect'; +import { HeaderSection } from '../../../../common/components/header_section'; +import { InspectButton, InspectButtonContainer } from '../../../../common/components/inspect'; import * as i18n from './translations'; -import type { RuleRisk } from '../../../../common/search_strategy'; +import type { RuleRisk } from '../../../../../common/search_strategy'; -import { RuleLink } from '../../../detection_engine/rule_management_ui/components/rules_table/use_columns'; +import { RuleLink } from '../../../../detection_engine/rule_management_ui/components/rules_table/use_columns'; export interface TopRiskScoreContributorsProps { loading: boolean; diff --git a/x-pack/plugins/security_solution/public/common/components/top_risk_score_contributors/translations.ts b/x-pack/plugins/security_solution/public/explore/components/risk_score/top_risk_score_contributors/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/top_risk_score_contributors/translations.ts rename to x-pack/plugins/security_solution/public/explore/components/risk_score/top_risk_score_contributors/translations.ts diff --git a/x-pack/plugins/security_solution/public/risk_score/components/translations.ts b/x-pack/plugins/security_solution/public/explore/components/risk_score/translations.ts similarity index 95% rename from x-pack/plugins/security_solution/public/risk_score/components/translations.ts rename to x-pack/plugins/security_solution/public/explore/components/risk_score/translations.ts index 8d845c6d99987..5f9a33f66eac1 100644 --- a/x-pack/plugins/security_solution/public/risk_score/components/translations.ts +++ b/x-pack/plugins/security_solution/public/explore/components/risk_score/translations.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { RiskScoreEntity } from '../../../common/search_strategy'; +import { RiskScoreEntity } from '../../../../common/search_strategy'; export const HOST = i18n.translate('xpack.securitySolution.riskScore.overview.hostTitle', { defaultMessage: 'Host', diff --git a/x-pack/plugins/security_solution/public/common/components/stat_items/index.tsx b/x-pack/plugins/security_solution/public/explore/components/stat_items/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/stat_items/index.tsx rename to x-pack/plugins/security_solution/public/explore/components/stat_items/index.tsx diff --git a/x-pack/plugins/security_solution/public/common/components/stat_items/metric.test.tsx b/x-pack/plugins/security_solution/public/explore/components/stat_items/metric.test.tsx similarity index 89% rename from x-pack/plugins/security_solution/public/common/components/stat_items/metric.test.tsx rename to x-pack/plugins/security_solution/public/explore/components/stat_items/metric.test.tsx index b6f2bfe452a17..f7a7b96272fdb 100644 --- a/x-pack/plugins/security_solution/public/common/components/stat_items/metric.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/stat_items/metric.test.tsx @@ -10,10 +10,10 @@ import { Metric } from './metric'; import type { RenderResult } from '@testing-library/react'; import { render } from '@testing-library/react'; import React from 'react'; -import { TestProviders } from '../../mock'; -import type { LensAttributes } from '../visualization_actions/types'; +import { TestProviders } from '../../../common/mock'; +import type { LensAttributes } from '../../../common/components/visualization_actions/types'; -jest.mock('../visualization_actions', () => { +jest.mock('../../../common/components/visualization_actions', () => { return { VisualizationActions: () =>
, HISTOGRAM_ACTIONS_BUTTON_CLASS: 'histogram-actions-trigger', diff --git a/x-pack/plugins/security_solution/public/common/components/stat_items/metric.tsx b/x-pack/plugins/security_solution/public/explore/components/stat_items/metric.tsx similarity index 88% rename from x-pack/plugins/security_solution/public/common/components/stat_items/metric.tsx rename to x-pack/plugins/security_solution/public/explore/components/stat_items/metric.tsx index 23bef14a8ae33..1cde93e7793ac 100644 --- a/x-pack/plugins/security_solution/public/common/components/stat_items/metric.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/stat_items/metric.tsx @@ -7,10 +7,13 @@ import { EuiFlexGroup, EuiIcon } from '@elastic/eui'; import React from 'react'; import type { StatItem } from './types'; -import { HoverVisibilityContainer } from '../hover_visibility_container'; -import { VisualizationActions, HISTOGRAM_ACTIONS_BUTTON_CLASS } from '../visualization_actions'; +import { HoverVisibilityContainer } from '../../../common/components/hover_visibility_container'; +import { + VisualizationActions, + HISTOGRAM_ACTIONS_BUTTON_CLASS, +} from '../../../common/components/visualization_actions'; import { FlexItem, StatValue } from './utils'; -import { getEmptyTagValue } from '../empty_value'; +import { getEmptyTagValue } from '../../../common/components/empty_value'; export interface MetricProps { fields: StatItem[]; diff --git a/x-pack/plugins/security_solution/public/common/components/stat_items/metric_embeddable.test.tsx b/x-pack/plugins/security_solution/public/explore/components/stat_items/metric_embeddable.test.tsx similarity index 85% rename from x-pack/plugins/security_solution/public/common/components/stat_items/metric_embeddable.test.tsx rename to x-pack/plugins/security_solution/public/explore/components/stat_items/metric_embeddable.test.tsx index 5041d297f3403..0b7840260493b 100644 --- a/x-pack/plugins/security_solution/public/common/components/stat_items/metric_embeddable.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/stat_items/metric_embeddable.test.tsx @@ -10,17 +10,17 @@ import { MetricEmbeddable } from './metric_embeddable'; import type { RenderResult } from '@testing-library/react'; import { render } from '@testing-library/react'; import React from 'react'; -import { TestProviders } from '../../mock'; -import type { LensAttributes } from '../visualization_actions/types'; +import { TestProviders } from '../../../common/mock'; +import type { LensAttributes } from '../../../common/components/visualization_actions/types'; -jest.mock('../visualization_actions', () => { +jest.mock('../../../common/components/visualization_actions', () => { return { VisualizationActions: () =>
, HISTOGRAM_ACTIONS_BUTTON_CLASS: 'histogram-actions-trigger', }; }); -jest.mock('../visualization_actions/lens_embeddable', () => { +jest.mock('../../../common/components/visualization_actions/lens_embeddable', () => { return { LensEmbeddable: () =>
, }; diff --git a/x-pack/plugins/security_solution/public/common/components/stat_items/metric_embeddable.tsx b/x-pack/plugins/security_solution/public/explore/components/stat_items/metric_embeddable.tsx similarity index 95% rename from x-pack/plugins/security_solution/public/common/components/stat_items/metric_embeddable.tsx rename to x-pack/plugins/security_solution/public/explore/components/stat_items/metric_embeddable.tsx index abc21f1941691..d8e7ffbd60281 100644 --- a/x-pack/plugins/security_solution/public/common/components/stat_items/metric_embeddable.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/stat_items/metric_embeddable.tsx @@ -8,7 +8,7 @@ import { EuiFlexGroup, EuiIcon } from '@elastic/eui'; import React from 'react'; import { FlexItem, MetricItem, StatValue } from './utils'; import type { MetricStatItem } from './types'; -import { LensEmbeddable } from '../visualization_actions/lens_embeddable'; +import { LensEmbeddable } from '../../../common/components/visualization_actions/lens_embeddable'; export interface MetricEmbeddableProps { fields: MetricStatItem[]; diff --git a/x-pack/plugins/security_solution/public/common/components/stat_items/stat_item_header.test.tsx b/x-pack/plugins/security_solution/public/explore/components/stat_items/stat_item_header.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/stat_items/stat_item_header.test.tsx rename to x-pack/plugins/security_solution/public/explore/components/stat_items/stat_item_header.test.tsx diff --git a/x-pack/plugins/security_solution/public/common/components/stat_items/stat_item_header.tsx b/x-pack/plugins/security_solution/public/explore/components/stat_items/stat_item_header.tsx similarity index 95% rename from x-pack/plugins/security_solution/public/common/components/stat_items/stat_item_header.tsx rename to x-pack/plugins/security_solution/public/explore/components/stat_items/stat_item_header.tsx index 364b5acc897a8..9683e3526784c 100644 --- a/x-pack/plugins/security_solution/public/common/components/stat_items/stat_item_header.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/stat_items/stat_item_header.tsx @@ -7,7 +7,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiButtonIcon, EuiTitle } from '@elastic/eui'; import React from 'react'; import { FlexGroup, StyledTitle } from './utils'; -import * as i18n from '../../containers/query_toggle/translations'; +import * as i18n from '../../../common/containers/query_toggle/translations'; const StatItemHeaderComponent = ({ onToggle, diff --git a/x-pack/plugins/security_solution/public/common/components/stat_items/stat_items.test.tsx b/x-pack/plugins/security_solution/public/explore/components/stat_items/stat_items.test.tsx similarity index 89% rename from x-pack/plugins/security_solution/public/common/components/stat_items/stat_items.test.tsx rename to x-pack/plugins/security_solution/public/explore/components/stat_items/stat_items.test.tsx index d28a9a6f96f30..a677805a50cea 100644 --- a/x-pack/plugins/security_solution/public/common/components/stat_items/stat_items.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/stat_items/stat_items.test.tsx @@ -12,35 +12,35 @@ import { ThemeProvider } from 'styled-components'; import type { StatItemsProps } from '.'; import { StatItemsComponent } from './stat_items'; -import { BarChart } from '../charts/barchart'; -import { AreaChart } from '../charts/areachart'; +import { BarChart } from '../../../common/components/charts/barchart'; +import { AreaChart } from '../../../common/components/charts/areachart'; import { EuiHorizontalRule } from '@elastic/eui'; -import { mockUpdateDateRange } from '../../../network/components/kpi_network/mock'; +import { mockUpdateDateRange } from '../../network/components/kpi_network/mock'; import { createSecuritySolutionStorageMock, kibanaObservable, mockGlobalState, SUB_PLUGINS_REDUCER, -} from '../../mock'; -import type { State } from '../../store'; -import { createStore } from '../../store'; +} from '../../../common/mock'; +import type { State } from '../../../common/store'; +import { createStore } from '../../../common/store'; import { Provider as ReduxStoreProvider } from 'react-redux'; -import { getMockTheme } from '../../lib/kibana/kibana_react.mock'; -import * as module from '../../containers/query_toggle'; -import type { LensAttributes } from '../visualization_actions/types'; +import { getMockTheme } from '../../../common/lib/kibana/kibana_react.mock'; +import * as module from '../../../common/containers/query_toggle'; +import type { LensAttributes } from '../../../common/components/visualization_actions/types'; const from = '2019-06-15T06:00:00.000Z'; const to = '2019-06-18T06:00:00.000Z'; -jest.mock('../charts/areachart', () => { +jest.mock('../../../common/components/charts/areachart', () => { return { AreaChart: () =>
}; }); -jest.mock('../charts/barchart', () => { +jest.mock('../../../common/components/charts/barchart', () => { return { BarChart: () =>
}; }); -jest.mock('../visualization_actions', () => { +jest.mock('../../../common/components/visualization_actions', () => { return { VisualizationActions: () =>
, HISTOGRAM_ACTIONS_BUTTON_CLASS: 'histogram-actions-trigger', diff --git a/x-pack/plugins/security_solution/public/common/components/stat_items/stat_items.tsx b/x-pack/plugins/security_solution/public/explore/components/stat_items/stat_items.tsx similarity index 93% rename from x-pack/plugins/security_solution/public/common/components/stat_items/stat_items.tsx rename to x-pack/plugins/security_solution/public/explore/components/stat_items/stat_items.tsx index 9db63060c8e14..bc51940c4fe2a 100644 --- a/x-pack/plugins/security_solution/public/common/components/stat_items/stat_items.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/stat_items/stat_items.tsx @@ -15,10 +15,10 @@ import { import React, { useMemo } from 'react'; import deepEqual from 'fast-deep-equal'; -import { AreaChart } from '../charts/areachart'; -import { BarChart } from '../charts/barchart'; +import { AreaChart } from '../../../common/components/charts/areachart'; +import { BarChart } from '../../../common/components/charts/barchart'; -import { histogramDateTimeFormatter } from '../utils'; +import { histogramDateTimeFormatter } from '../../../common/components/utils'; import { StatItemHeader } from './stat_item_header'; import { useToggleStatus } from './use_toggle_status'; @@ -26,8 +26,8 @@ import type { StatItemsProps } from './types'; import { areachartConfigs, barchartConfigs, FlexItem, ChartHeight } from './utils'; import { Metric } from './metric'; import { MetricEmbeddable } from './metric_embeddable'; -import { useIsExperimentalFeatureEnabled } from '../../hooks/use_experimental_features'; -import { LensEmbeddable } from '../visualization_actions/lens_embeddable'; +import { useIsExperimentalFeatureEnabled } from '../../../common/hooks/use_experimental_features'; +import { LensEmbeddable } from '../../../common/components/visualization_actions/lens_embeddable'; export const StatItemsComponent = React.memo( ({ diff --git a/x-pack/plugins/security_solution/public/common/components/stat_items/types.ts b/x-pack/plugins/security_solution/public/explore/components/stat_items/types.ts similarity index 86% rename from x-pack/plugins/security_solution/public/common/components/stat_items/types.ts rename to x-pack/plugins/security_solution/public/explore/components/stat_items/types.ts index a8422d1e474ce..07003fd462e82 100644 --- a/x-pack/plugins/security_solution/public/common/components/stat_items/types.ts +++ b/x-pack/plugins/security_solution/public/explore/components/stat_items/types.ts @@ -5,8 +5,12 @@ * 2.0. */ import type { IconType } from '@elastic/eui'; -import type { ChartSeriesConfigs, ChartSeriesData, UpdateDateRange } from '../charts/common'; -import type { LensAttributes } from '../visualization_actions/types'; +import type { + ChartSeriesConfigs, + ChartSeriesData, + UpdateDateRange, +} from '../../../common/components/charts/common'; +import type { LensAttributes } from '../../../common/components/visualization_actions/types'; export interface MetricStatItem { color?: string; diff --git a/x-pack/plugins/security_solution/public/common/components/stat_items/use_kpi_matrix_status.test.tsx b/x-pack/plugins/security_solution/public/explore/components/stat_items/use_kpi_matrix_status.test.tsx similarity index 93% rename from x-pack/plugins/security_solution/public/common/components/stat_items/use_kpi_matrix_status.test.tsx rename to x-pack/plugins/security_solution/public/explore/components/stat_items/use_kpi_matrix_status.test.tsx index 00206a9909ed2..0cd675bdd6416 100644 --- a/x-pack/plugins/security_solution/public/common/components/stat_items/use_kpi_matrix_status.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/stat_items/use_kpi_matrix_status.test.tsx @@ -9,13 +9,13 @@ import { mount } from 'enzyme'; import React from 'react'; import type { StatItemsProps, StatItems } from '.'; -import { fieldsMapping as fieldTitleChartMapping } from '../../../network/components/kpi_network/unique_private_ips'; +import { fieldsMapping as fieldTitleChartMapping } from '../../network/components/kpi_network/unique_private_ips'; import { mockData, mockEnableChartsData, mockNoChartMappings, mockUpdateDateRange, -} from '../../../network/components/kpi_network/mock'; +} from '../../network/components/kpi_network/mock'; import type { HostsKpiStrategyResponse, diff --git a/x-pack/plugins/security_solution/public/common/components/stat_items/use_kpi_matrix_status.ts b/x-pack/plugins/security_solution/public/explore/components/stat_items/use_kpi_matrix_status.ts similarity index 94% rename from x-pack/plugins/security_solution/public/common/components/stat_items/use_kpi_matrix_status.ts rename to x-pack/plugins/security_solution/public/explore/components/stat_items/use_kpi_matrix_status.ts index a95064cee3167..218f8dbe77409 100644 --- a/x-pack/plugins/security_solution/public/common/components/stat_items/use_kpi_matrix_status.ts +++ b/x-pack/plugins/security_solution/public/explore/components/stat_items/use_kpi_matrix_status.ts @@ -9,7 +9,7 @@ import type { NetworkKpiStrategyResponse, UserskKpiStrategyResponse, } from '../../../../common/search_strategy'; -import type { UpdateDateRange } from '../charts/common'; +import type { UpdateDateRange } from '../../../common/components/charts/common'; import type { StatItems, StatItemsProps } from './types'; import { addValueToAreaChart, addValueToBarChart, addValueToFields } from './utils'; diff --git a/x-pack/plugins/security_solution/public/common/components/stat_items/use_toggle_status.ts b/x-pack/plugins/security_solution/public/explore/components/stat_items/use_toggle_status.ts similarity index 92% rename from x-pack/plugins/security_solution/public/common/components/stat_items/use_toggle_status.ts rename to x-pack/plugins/security_solution/public/explore/components/stat_items/use_toggle_status.ts index 11c25c7ea709d..900a97d99c09e 100644 --- a/x-pack/plugins/security_solution/public/common/components/stat_items/use_toggle_status.ts +++ b/x-pack/plugins/security_solution/public/explore/components/stat_items/use_toggle_status.ts @@ -5,7 +5,7 @@ * 2.0. */ import { useCallback } from 'react'; -import { useQueryToggle } from '../../containers/query_toggle'; +import { useQueryToggle } from '../../../common/containers/query_toggle'; export const useToggleStatus = ({ id, diff --git a/x-pack/plugins/security_solution/public/common/components/stat_items/utils.test.tsx b/x-pack/plugins/security_solution/public/explore/components/stat_items/utils.test.tsx similarity index 85% rename from x-pack/plugins/security_solution/public/common/components/stat_items/utils.test.tsx rename to x-pack/plugins/security_solution/public/explore/components/stat_items/utils.test.tsx index 7dba1d07ac9ed..afab433b2bf66 100644 --- a/x-pack/plugins/security_solution/public/common/components/stat_items/utils.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/stat_items/utils.test.tsx @@ -6,9 +6,9 @@ */ import { addValueToFields, addValueToAreaChart, addValueToBarChart } from './utils'; -import { fieldsMapping as fieldTitleChartMapping } from '../../../network/components/kpi_network/unique_private_ips'; +import { fieldsMapping as fieldTitleChartMapping } from '../../network/components/kpi_network/unique_private_ips'; -import { mockData, mockEnableChartsData } from '../../../network/components/kpi_network/mock'; +import { mockData, mockEnableChartsData } from '../../network/components/kpi_network/mock'; describe('addValueToFields', () => { const mockNetworkMappings = fieldTitleChartMapping[0]; diff --git a/x-pack/plugins/security_solution/public/common/components/stat_items/utils.tsx b/x-pack/plugins/security_solution/public/explore/components/stat_items/utils.tsx similarity index 97% rename from x-pack/plugins/security_solution/public/common/components/stat_items/utils.tsx rename to x-pack/plugins/security_solution/public/explore/components/stat_items/utils.tsx index 3c90d9615a767..62fbbdc393f67 100644 --- a/x-pack/plugins/security_solution/public/common/components/stat_items/utils.tsx +++ b/x-pack/plugins/security_solution/public/explore/components/stat_items/utils.tsx @@ -16,7 +16,7 @@ import type { NetworkKpiStrategyResponse, UserskKpiStrategyResponse, } from '../../../../common/search_strategy'; -import type { ChartSeriesData, ChartData } from '../charts/common'; +import type { ChartSeriesData, ChartData } from '../../../common/components/charts/common'; import type { StatItem } from './types'; diff --git a/x-pack/plugins/security_solution/public/common/containers/authentications/index.test.tsx b/x-pack/plugins/security_solution/public/explore/containers/authentications/index.test.tsx similarity index 90% rename from x-pack/plugins/security_solution/public/common/containers/authentications/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/containers/authentications/index.test.tsx index d1c19f86e4d9f..f37ec404274b1 100644 --- a/x-pack/plugins/security_solution/public/common/containers/authentications/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/containers/authentications/index.test.tsx @@ -8,10 +8,10 @@ import { act, renderHook } from '@testing-library/react-hooks'; import { useAuthentications } from '.'; import { AuthStackByField } from '../../../../common/search_strategy'; -import { TestProviders } from '../../mock'; -import { useSearchStrategy } from '../use_search_strategy'; +import { TestProviders } from '../../../common/mock'; +import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; -jest.mock('../use_search_strategy', () => ({ +jest.mock('../../../common/containers/use_search_strategy', () => ({ useSearchStrategy: jest.fn(), })); const mockUseSearchStrategy = useSearchStrategy as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/common/containers/authentications/index.tsx b/x-pack/plugins/security_solution/public/explore/containers/authentications/index.tsx similarity index 94% rename from x-pack/plugins/security_solution/public/common/containers/authentications/index.tsx rename to x-pack/plugins/security_solution/public/explore/containers/authentications/index.tsx index 3a038b6d2ac30..d3da701b4c6bb 100644 --- a/x-pack/plugins/security_solution/public/common/containers/authentications/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/containers/authentications/index.tsx @@ -17,14 +17,14 @@ import { UsersQueries } from '../../../../common/search_strategy/security_soluti import type { PageInfoPaginated, SortField } from '../../../../common/search_strategy'; import type { ESTermQuery } from '../../../../common/typed_json'; -import type { inputsModel } from '../../store'; -import { createFilter } from '../helpers'; +import type { inputsModel } from '../../../common/store'; +import { createFilter } from '../../../common/containers/helpers'; import { generateTablePaginationOptions } from '../../components/paginated_table/helpers'; import type { InspectResponse } from '../../../types'; import * as i18n from './translations'; -import { useSearchStrategy } from '../use_search_strategy'; +import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; export interface AuthenticationArgs { authentications: AuthenticationsEdges[]; diff --git a/x-pack/plugins/security_solution/public/common/containers/authentications/translations.ts b/x-pack/plugins/security_solution/public/explore/containers/authentications/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/common/containers/authentications/translations.ts rename to x-pack/plugins/security_solution/public/explore/containers/authentications/translations.ts diff --git a/x-pack/plugins/security_solution/public/risk_score/containers/all/index.test.tsx b/x-pack/plugins/security_solution/public/explore/containers/risk_score/all/index.test.tsx similarity index 90% rename from x-pack/plugins/security_solution/public/risk_score/containers/all/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/containers/risk_score/all/index.test.tsx index dc2b8dac58493..6ad707c2ddf7d 100644 --- a/x-pack/plugins/security_solution/public/risk_score/containers/all/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/containers/risk_score/all/index.test.tsx @@ -6,23 +6,23 @@ */ import { renderHook } from '@testing-library/react-hooks'; import { useRiskScore } from '.'; -import { TestProviders } from '../../../common/mock'; +import { TestProviders } from '../../../../common/mock'; -import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; -import { useAppToasts } from '../../../common/hooks/use_app_toasts'; -import { useAppToastsMock } from '../../../common/hooks/use_app_toasts.mock'; +import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; +import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; +import { useAppToastsMock } from '../../../../common/hooks/use_app_toasts.mock'; import { useRiskScoreFeatureStatus } from '../feature_status'; -import { RiskScoreEntity } from '../../../../common/search_strategy'; +import { RiskScoreEntity } from '../../../../../common/search_strategy'; -jest.mock('../../../common/containers/use_search_strategy', () => ({ +jest.mock('../../../../common/containers/use_search_strategy', () => ({ useSearchStrategy: jest.fn(), })); -jest.mock('../../../common/hooks/use_space_id', () => ({ +jest.mock('../../../../common/hooks/use_space_id', () => ({ useSpaceId: jest.fn().mockReturnValue('default'), })); -jest.mock('../../../common/hooks/use_app_toasts'); +jest.mock('../../../../common/hooks/use_app_toasts'); jest.mock('../feature_status'); const mockUseRiskScoreFeatureStatus = useRiskScoreFeatureStatus as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/risk_score/containers/all/index.tsx b/x-pack/plugins/security_solution/public/explore/containers/risk_score/all/index.tsx similarity index 88% rename from x-pack/plugins/security_solution/public/risk_score/containers/all/index.tsx rename to x-pack/plugins/security_solution/public/explore/containers/risk_score/all/index.tsx index 977bc10caecc5..5ad61b1b29b72 100644 --- a/x-pack/plugins/security_solution/public/risk_score/containers/all/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/containers/risk_score/all/index.tsx @@ -8,23 +8,26 @@ import { useCallback, useEffect, useMemo } from 'react'; import { useRiskScoreFeatureStatus } from '../feature_status'; -import { createFilter } from '../../../common/containers/helpers'; -import type { RiskScoreSortField, StrategyResponseType } from '../../../../common/search_strategy'; +import { createFilter } from '../../../../common/containers/helpers'; +import type { + RiskScoreSortField, + StrategyResponseType, +} from '../../../../../common/search_strategy'; import { RiskQueries, getUserRiskIndex, RiskScoreEntity, getHostRiskIndex, -} from '../../../../common/search_strategy'; -import type { ESQuery } from '../../../../common/typed_json'; +} from '../../../../../common/search_strategy'; +import type { ESQuery } from '../../../../../common/typed_json'; import * as i18n from './translations'; -import type { InspectResponse } from '../../../types'; -import { useAppToasts } from '../../../common/hooks/use_app_toasts'; -import { isIndexNotFoundError } from '../../../common/utils/exceptions'; -import type { inputsModel } from '../../../common/store'; -import { useSpaceId } from '../../../common/hooks/use_space_id'; -import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; +import type { InspectResponse } from '../../../../types'; +import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; +import { isIndexNotFoundError } from '../../../../common/utils/exceptions'; +import type { inputsModel } from '../../../../common/store'; +import { useSpaceId } from '../../../../common/hooks/use_space_id'; +import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; export interface RiskScoreState { data: diff --git a/x-pack/plugins/security_solution/public/risk_score/containers/all/translations.ts b/x-pack/plugins/security_solution/public/explore/containers/risk_score/all/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/risk_score/containers/all/translations.ts rename to x-pack/plugins/security_solution/public/explore/containers/risk_score/all/translations.ts diff --git a/x-pack/plugins/security_solution/public/risk_score/containers/feature_status/api.ts b/x-pack/plugins/security_solution/public/explore/containers/risk_score/feature_status/api.ts similarity index 77% rename from x-pack/plugins/security_solution/public/risk_score/containers/feature_status/api.ts rename to x-pack/plugins/security_solution/public/explore/containers/risk_score/feature_status/api.ts index ad2802e76ec00..c644e6b9a0ee8 100644 --- a/x-pack/plugins/security_solution/public/risk_score/containers/feature_status/api.ts +++ b/x-pack/plugins/security_solution/public/explore/containers/risk_score/feature_status/api.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { KibanaServices } from '../../../common/lib/kibana'; -import { RISK_SCORE_INDEX_STATUS_API_URL } from '../../../../common/constants'; -import type { RiskScoreEntity } from '../../../../common/search_strategy'; +import { KibanaServices } from '../../../../common/lib/kibana'; +import { RISK_SCORE_INDEX_STATUS_API_URL } from '../../../../../common/constants'; +import type { RiskScoreEntity } from '../../../../../common/search_strategy'; export const getRiskScoreIndexStatus = async (params: { query: { diff --git a/x-pack/plugins/security_solution/public/risk_score/containers/feature_status/index.test.ts b/x-pack/plugins/security_solution/public/explore/containers/risk_score/feature_status/index.test.ts similarity index 87% rename from x-pack/plugins/security_solution/public/risk_score/containers/feature_status/index.test.ts rename to x-pack/plugins/security_solution/public/explore/containers/risk_score/feature_status/index.test.ts index 525fda0a362d5..18792f6d86e87 100644 --- a/x-pack/plugins/security_solution/public/risk_score/containers/feature_status/index.test.ts +++ b/x-pack/plugins/security_solution/public/explore/containers/risk_score/feature_status/index.test.ts @@ -5,15 +5,15 @@ * 2.0. */ import { act, renderHook } from '@testing-library/react-hooks'; -import { TestProviders } from '../../../common/mock'; +import { TestProviders } from '../../../../common/mock'; import { useRiskScoreFeatureStatus } from '.'; -import { RiskScoreEntity } from '../../../../common/search_strategy'; -import { useFetch } from '../../../common/hooks/use_fetch'; -import { useMlCapabilities } from '../../../common/components/ml/hooks/use_ml_capabilities'; +import { RiskScoreEntity } from '../../../../../common/search_strategy'; +import { useFetch } from '../../../../common/hooks/use_fetch'; +import { useMlCapabilities } from '../../../../common/components/ml/hooks/use_ml_capabilities'; -jest.mock('../../../common/hooks/use_fetch'); -jest.mock('../../../common/components/ml/hooks/use_ml_capabilities'); +jest.mock('../../../../common/hooks/use_fetch'); +jest.mock('../../../../common/components/ml/hooks/use_ml_capabilities'); const mockFetch = jest.fn(); const mockUseMlCapabilities = useMlCapabilities as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/risk_score/containers/feature_status/index.ts b/x-pack/plugins/security_solution/public/explore/containers/risk_score/feature_status/index.ts similarity index 88% rename from x-pack/plugins/security_solution/public/risk_score/containers/feature_status/index.ts rename to x-pack/plugins/security_solution/public/explore/containers/risk_score/feature_status/index.ts index 4cb6507c559f3..20bfe8b7646d6 100644 --- a/x-pack/plugins/security_solution/public/risk_score/containers/feature_status/index.ts +++ b/x-pack/plugins/security_solution/public/explore/containers/risk_score/feature_status/index.ts @@ -6,9 +6,9 @@ */ import { useCallback, useEffect, useMemo } from 'react'; -import { useMlCapabilities } from '../../../common/components/ml/hooks/use_ml_capabilities'; -import { REQUEST_NAMES, useFetch } from '../../../common/hooks/use_fetch'; -import type { RiskScoreEntity } from '../../../../common/search_strategy'; +import { useMlCapabilities } from '../../../../common/components/ml/hooks/use_ml_capabilities'; +import { REQUEST_NAMES, useFetch } from '../../../../common/hooks/use_fetch'; +import type { RiskScoreEntity } from '../../../../../common/search_strategy'; import { getRiskScoreIndexStatus } from './api'; interface RiskScoresFeatureStatus { diff --git a/x-pack/plugins/security_solution/public/risk_score/containers/index.ts b/x-pack/plugins/security_solution/public/explore/containers/risk_score/index.ts similarity index 92% rename from x-pack/plugins/security_solution/public/risk_score/containers/index.ts rename to x-pack/plugins/security_solution/public/explore/containers/risk_score/index.ts index 21995266f0902..892bcd24dee74 100644 --- a/x-pack/plugins/security_solution/public/risk_score/containers/index.ts +++ b/x-pack/plugins/security_solution/public/explore/containers/risk_score/index.ts @@ -8,7 +8,7 @@ import type { HostRiskScore, UserRiskScore, -} from '../../../common/search_strategy/security_solution/risk_score'; +} from '../../../../common/search_strategy/security_solution/risk_score'; export * from './all'; export * from './kpi'; diff --git a/x-pack/plugins/security_solution/public/risk_score/containers/kpi/index.tsx b/x-pack/plugins/security_solution/public/explore/containers/risk_score/kpi/index.tsx similarity index 80% rename from x-pack/plugins/security_solution/public/risk_score/containers/kpi/index.tsx rename to x-pack/plugins/security_solution/public/explore/containers/risk_score/kpi/index.tsx index d8b004d94c669..e9fa86ed54303 100644 --- a/x-pack/plugins/security_solution/public/risk_score/containers/kpi/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/containers/risk_score/kpi/index.tsx @@ -14,17 +14,17 @@ import { RiskSeverity, RiskScoreEntity, EMPTY_SEVERITY_COUNT, -} from '../../../../common/search_strategy'; +} from '../../../../../common/search_strategy'; import * as i18n from './translations'; -import { isIndexNotFoundError } from '../../../common/utils/exceptions'; -import type { ESTermQuery } from '../../../../common/typed_json'; -import type { SeverityCount } from '../../../common/components/severity/types'; -import { useSpaceId } from '../../../common/hooks/use_space_id'; -import { useMlCapabilities } from '../../../common/components/ml/hooks/use_ml_capabilities'; -import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; -import type { InspectResponse } from '../../../types'; -import type { inputsModel } from '../../../common/store'; -import { useAppToasts } from '../../../common/hooks/use_app_toasts'; +import { isIndexNotFoundError } from '../../../../common/utils/exceptions'; +import type { ESTermQuery } from '../../../../../common/typed_json'; +import type { SeverityCount } from '../../../components/risk_score/severity/types'; +import { useSpaceId } from '../../../../common/hooks/use_space_id'; +import { useMlCapabilities } from '../../../../common/components/ml/hooks/use_ml_capabilities'; +import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; +import type { InspectResponse } from '../../../../types'; +import type { inputsModel } from '../../../../common/store'; +import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; interface RiskScoreKpi { error: unknown; diff --git a/x-pack/plugins/security_solution/public/risk_score/containers/kpi/translations.ts b/x-pack/plugins/security_solution/public/explore/containers/risk_score/kpi/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/risk_score/containers/kpi/translations.ts rename to x-pack/plugins/security_solution/public/explore/containers/risk_score/kpi/translations.ts diff --git a/x-pack/plugins/security_solution/public/risk_score/containers/onboarding/api/index.ts b/x-pack/plugins/security_solution/public/explore/containers/risk_score/onboarding/api/index.ts similarity index 100% rename from x-pack/plugins/security_solution/public/risk_score/containers/onboarding/api/index.ts rename to x-pack/plugins/security_solution/public/explore/containers/risk_score/onboarding/api/index.ts diff --git a/x-pack/plugins/security_solution/public/risk_score/containers/onboarding/api/ingest_pipelines.test.ts b/x-pack/plugins/security_solution/public/explore/containers/risk_score/onboarding/api/ingest_pipelines.test.ts similarity index 94% rename from x-pack/plugins/security_solution/public/risk_score/containers/onboarding/api/ingest_pipelines.test.ts rename to x-pack/plugins/security_solution/public/explore/containers/risk_score/onboarding/api/ingest_pipelines.test.ts index 0e24ecf96edc8..5b4c99e95fd9c 100644 --- a/x-pack/plugins/security_solution/public/risk_score/containers/onboarding/api/ingest_pipelines.test.ts +++ b/x-pack/plugins/security_solution/public/explore/containers/risk_score/onboarding/api/ingest_pipelines.test.ts @@ -5,8 +5,7 @@ * 2.0. */ -import type { HttpSetup } from '@kbn/core-http-browser'; -import type { NotificationsStart } from '@kbn/core-notifications-browser'; +import type { HttpSetup, NotificationsStart } from '@kbn/core/public'; import { createIngestPipeline, deleteIngestPipelines } from './ingest_pipelines'; const mockRequest = jest.fn(); diff --git a/x-pack/plugins/security_solution/public/risk_score/containers/onboarding/api/ingest_pipelines.ts b/x-pack/plugins/security_solution/public/explore/containers/risk_score/onboarding/api/ingest_pipelines.ts similarity index 100% rename from x-pack/plugins/security_solution/public/risk_score/containers/onboarding/api/ingest_pipelines.ts rename to x-pack/plugins/security_solution/public/explore/containers/risk_score/onboarding/api/ingest_pipelines.ts diff --git a/x-pack/plugins/security_solution/public/risk_score/containers/onboarding/api/onboarding.ts b/x-pack/plugins/security_solution/public/explore/containers/risk_score/onboarding/api/onboarding.ts similarity index 94% rename from x-pack/plugins/security_solution/public/risk_score/containers/onboarding/api/onboarding.ts rename to x-pack/plugins/security_solution/public/explore/containers/risk_score/onboarding/api/onboarding.ts index a7ff58cd76fe1..130d23b2df637 100644 --- a/x-pack/plugins/security_solution/public/risk_score/containers/onboarding/api/onboarding.ts +++ b/x-pack/plugins/security_solution/public/explore/containers/risk_score/onboarding/api/onboarding.ts @@ -7,9 +7,9 @@ import type { HttpSetup, NotificationsStart } from '@kbn/core/public'; -import { INTERNAL_RISK_SCORE_URL } from '../../../../../common/constants'; +import { INTERNAL_RISK_SCORE_URL } from '../../../../../../common/constants'; -import { RiskScoreEntity } from '../../../../../common/search_strategy'; +import { RiskScoreEntity } from '../../../../../../common/search_strategy'; import { HOST_RISK_SCORES_ENABLED_TITLE, INSTALLATION_ERROR, diff --git a/x-pack/plugins/security_solution/public/risk_score/containers/onboarding/api/saved_objects.ts b/x-pack/plugins/security_solution/public/explore/containers/risk_score/onboarding/api/saved_objects.ts similarity index 94% rename from x-pack/plugins/security_solution/public/risk_score/containers/onboarding/api/saved_objects.ts rename to x-pack/plugins/security_solution/public/explore/containers/risk_score/onboarding/api/saved_objects.ts index 06c7157da472b..ee3ff3bb64f9c 100644 --- a/x-pack/plugins/security_solution/public/risk_score/containers/onboarding/api/saved_objects.ts +++ b/x-pack/plugins/security_solution/public/explore/containers/risk_score/onboarding/api/saved_objects.ts @@ -8,13 +8,16 @@ import type { HttpSetup, NotificationsStart, ThemeServiceStart } from '@kbn/core/public'; import { toMountPoint } from '@kbn/kibana-react-plugin/public'; import type { DashboardStart } from '@kbn/dashboard-plugin/public'; -import { RISKY_HOSTS_DASHBOARD_TITLE, RISKY_USERS_DASHBOARD_TITLE } from '../../../constants'; +import { + RISKY_HOSTS_DASHBOARD_TITLE, + RISKY_USERS_DASHBOARD_TITLE, +} from '../../../../components/risk_score/constants'; import { prebuiltSavedObjectsBulkCreateUrl, prebuiltSavedObjectsBulkDeleteUrl, -} from '../../../../../common/constants'; +} from '../../../../../../common/constants'; -import { RiskScoreEntity } from '../../../../../common/search_strategy'; +import { RiskScoreEntity } from '../../../../../../common/search_strategy'; import { DELETE_SAVED_OBJECTS_FAILURE, diff --git a/x-pack/plugins/security_solution/public/risk_score/containers/onboarding/api/stored_scripts.test.ts b/x-pack/plugins/security_solution/public/explore/containers/risk_score/onboarding/api/stored_scripts.test.ts similarity index 94% rename from x-pack/plugins/security_solution/public/risk_score/containers/onboarding/api/stored_scripts.test.ts rename to x-pack/plugins/security_solution/public/explore/containers/risk_score/onboarding/api/stored_scripts.test.ts index 057a2927c6a96..90bcde6900a1c 100644 --- a/x-pack/plugins/security_solution/public/risk_score/containers/onboarding/api/stored_scripts.test.ts +++ b/x-pack/plugins/security_solution/public/explore/containers/risk_score/onboarding/api/stored_scripts.test.ts @@ -5,8 +5,7 @@ * 2.0. */ -import type { HttpSetup } from '@kbn/core-http-browser'; -import type { NotificationsStart } from '@kbn/core-notifications-browser'; +import type { HttpSetup, NotificationsStart } from '@kbn/core/public'; import { createStoredScript, deleteStoredScript } from './stored_scripts'; const mockRequest = jest.fn(); diff --git a/x-pack/plugins/security_solution/public/risk_score/containers/onboarding/api/stored_scripts.ts b/x-pack/plugins/security_solution/public/explore/containers/risk_score/onboarding/api/stored_scripts.ts similarity index 97% rename from x-pack/plugins/security_solution/public/risk_score/containers/onboarding/api/stored_scripts.ts rename to x-pack/plugins/security_solution/public/explore/containers/risk_score/onboarding/api/stored_scripts.ts index fd8d3899b294d..d94607cdf4893 100644 --- a/x-pack/plugins/security_solution/public/risk_score/containers/onboarding/api/stored_scripts.ts +++ b/x-pack/plugins/security_solution/public/explore/containers/risk_score/onboarding/api/stored_scripts.ts @@ -9,7 +9,7 @@ import { toMountPoint } from '@kbn/kibana-react-plugin/public'; import { RISK_SCORE_CREATE_STORED_SCRIPT, RISK_SCORE_DELETE_STORED_SCRIPT, -} from '../../../../../common/constants'; +} from '../../../../../../common/constants'; import { STORED_SCRIPT_CREATION_ERROR_MESSAGE, STORED_SCRIPT_DELETION_ERROR_MESSAGE, diff --git a/x-pack/plugins/security_solution/public/risk_score/containers/onboarding/api/transforms.test.ts b/x-pack/plugins/security_solution/public/explore/containers/risk_score/onboarding/api/transforms.test.ts similarity index 97% rename from x-pack/plugins/security_solution/public/risk_score/containers/onboarding/api/transforms.test.ts rename to x-pack/plugins/security_solution/public/explore/containers/risk_score/onboarding/api/transforms.test.ts index 90f6b67950c65..be952a5b7f0b3 100644 --- a/x-pack/plugins/security_solution/public/risk_score/containers/onboarding/api/transforms.test.ts +++ b/x-pack/plugins/security_solution/public/explore/containers/risk_score/onboarding/api/transforms.test.ts @@ -4,9 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - -import type { HttpSetup } from '@kbn/core-http-browser'; -import type { NotificationsStart } from '@kbn/core-notifications-browser'; +import type { HttpSetup, NotificationsStart } from '@kbn/core/public'; import { createTransform, deleteTransforms, getTransformState, stopTransforms } from './transforms'; const mockRequest = jest.fn(); diff --git a/x-pack/plugins/security_solution/public/risk_score/containers/onboarding/api/transforms.ts b/x-pack/plugins/security_solution/public/explore/containers/risk_score/onboarding/api/transforms.ts similarity index 100% rename from x-pack/plugins/security_solution/public/risk_score/containers/onboarding/api/transforms.ts rename to x-pack/plugins/security_solution/public/explore/containers/risk_score/onboarding/api/transforms.ts diff --git a/x-pack/plugins/security_solution/public/risk_score/containers/onboarding/api/translations.ts b/x-pack/plugins/security_solution/public/explore/containers/risk_score/onboarding/api/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/risk_score/containers/onboarding/api/translations.ts rename to x-pack/plugins/security_solution/public/explore/containers/risk_score/onboarding/api/translations.ts diff --git a/x-pack/plugins/security_solution/public/risk_score/containers/onboarding/api/types.ts b/x-pack/plugins/security_solution/public/explore/containers/risk_score/onboarding/api/types.ts similarity index 100% rename from x-pack/plugins/security_solution/public/risk_score/containers/onboarding/api/types.ts rename to x-pack/plugins/security_solution/public/explore/containers/risk_score/onboarding/api/types.ts diff --git a/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/columns.test.tsx b/x-pack/plugins/security_solution/public/explore/hosts/components/host_risk_score_table/columns.test.tsx similarity index 94% rename from x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/columns.test.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/components/host_risk_score_table/columns.test.tsx index ef908b973dde2..f1bf397637617 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/columns.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/components/host_risk_score_table/columns.test.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { render } from '@testing-library/react'; import { getHostRiskScoreColumns } from './columns'; -import { TestProviders } from '../../../common/mock'; +import { TestProviders } from '../../../../common/mock'; import type { HostRiskScoreColumns } from '.'; describe('getHostRiskScoreColumns', () => { diff --git a/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/columns.tsx b/x-pack/plugins/security_solution/public/explore/hosts/components/host_risk_score_table/columns.tsx similarity index 80% rename from x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/columns.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/components/host_risk_score_table/columns.tsx index 0fc7da65a40af..b6c34088bc592 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/columns.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/components/host_risk_score_table/columns.tsx @@ -10,19 +10,19 @@ import { EuiIcon, EuiLink, EuiText, EuiToolTip } from '@elastic/eui'; import { DragEffects, DraggableWrapper, -} from '../../../common/components/drag_and_drop/draggable_wrapper'; -import { escapeDataProviderId } from '../../../common/components/drag_and_drop/helpers'; -import { getEmptyTagValue } from '../../../common/components/empty_value'; -import { HostDetailsLink } from '../../../common/components/links'; -import { IS_OPERATOR } from '../../../timelines/components/timeline/data_providers/data_provider'; -import { Provider } from '../../../timelines/components/timeline/data_providers/provider'; +} from '../../../../common/components/drag_and_drop/draggable_wrapper'; +import { escapeDataProviderId } from '../../../../common/components/drag_and_drop/helpers'; +import { getEmptyTagValue } from '../../../../common/components/empty_value'; +import { HostDetailsLink } from '../../../../common/components/links'; +import { IS_OPERATOR } from '../../../../timelines/components/timeline/data_providers/data_provider'; +import { Provider } from '../../../../timelines/components/timeline/data_providers/provider'; import type { HostRiskScoreColumns } from '.'; import * as i18n from './translations'; import { HostsTableType } from '../../store/model'; -import type { RiskSeverity } from '../../../../common/search_strategy'; -import { RiskScoreFields } from '../../../../common/search_strategy'; -import { RiskScore } from '../../../common/components/severity/common'; +import type { RiskSeverity } from '../../../../../common/search_strategy'; +import { RiskScoreFields } from '../../../../../common/search_strategy'; +import { RiskScore } from '../../../components/risk_score/severity/common'; export const getHostRiskScoreColumns = ({ dispatchSeverityUpdate, diff --git a/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/index.tsx b/x-pack/plugins/security_solution/public/explore/hosts/components/host_risk_score_table/index.tsx similarity index 89% rename from x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/index.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/components/host_risk_score_table/index.tsx index dd2aacef77f65..a6c7f3cd69ded 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/components/host_risk_score_table/index.tsx @@ -9,9 +9,9 @@ import React, { useMemo, useCallback } from 'react'; import { useDispatch } from 'react-redux'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import type { Columns, Criteria, ItemsPerRow } from '../../../common/components/paginated_table'; -import { PaginatedTable } from '../../../common/components/paginated_table'; -import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; +import type { Columns, Criteria, ItemsPerRow } from '../../../components/paginated_table'; +import { PaginatedTable } from '../../../components/paginated_table'; +import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; import { hostsActions, hostsModel, hostsSelectors } from '../../store'; import { getHostRiskScoreColumns } from './columns'; import type { @@ -20,16 +20,16 @@ import type { RiskScoreSortField, RiskSeverity, RiskScoreFields, -} from '../../../../common/search_strategy'; -import type { State } from '../../../common/store'; +} from '../../../../../common/search_strategy'; +import type { State } from '../../../../common/store'; import * as i18n from '../hosts_table/translations'; import * as i18nHosts from './translations'; -import { SeverityBadges } from '../../../common/components/severity/severity_badges'; -import { SeverityBar } from '../../../common/components/severity/severity_bar'; -import { SeverityFilterGroup } from '../../../common/components/severity/severity_filter_group'; +import { SeverityBadges } from '../../../components/risk_score/severity/severity_badges'; +import { SeverityBar } from '../../../components/risk_score/severity/severity_bar'; +import { SeverityFilterGroup } from '../../../components/risk_score/severity/severity_filter_group'; -import type { SeverityCount } from '../../../common/components/severity/types'; +import type { SeverityCount } from '../../../components/risk_score/severity/types'; export const rowItems: ItemsPerRow[] = [ { diff --git a/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/translations.ts b/x-pack/plugins/security_solution/public/explore/hosts/components/host_risk_score_table/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/translations.ts rename to x-pack/plugins/security_solution/public/explore/hosts/components/host_risk_score_table/translations.ts diff --git a/x-pack/plugins/security_solution/public/hosts/components/hosts_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/hosts/components/hosts_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/security_solution/public/hosts/components/hosts_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/explore/hosts/components/hosts_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/security_solution/public/hosts/components/hosts_table/columns.tsx b/x-pack/plugins/security_solution/public/explore/hosts/components/hosts_table/columns.tsx similarity index 85% rename from x-pack/plugins/security_solution/public/hosts/components/hosts_table/columns.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/components/hosts_table/columns.tsx index 9512feeced415..d1214b0d97026 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/hosts_table/columns.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/components/hosts_table/columns.tsx @@ -10,20 +10,20 @@ import React from 'react'; import { DragEffects, DraggableWrapper, -} from '../../../common/components/drag_and_drop/draggable_wrapper'; -import { escapeDataProviderId } from '../../../common/components/drag_and_drop/helpers'; -import { getEmptyTagValue } from '../../../common/components/empty_value'; -import { HostDetailsLink } from '../../../common/components/links'; -import { FormattedRelativePreferenceDate } from '../../../common/components/formatted_date'; -import { IS_OPERATOR } from '../../../timelines/components/timeline/data_providers/data_provider'; -import { Provider } from '../../../timelines/components/timeline/data_providers/provider'; -import { DefaultDraggable } from '../../../common/components/draggables'; +} from '../../../../common/components/drag_and_drop/draggable_wrapper'; +import { escapeDataProviderId } from '../../../../common/components/drag_and_drop/helpers'; +import { getEmptyTagValue } from '../../../../common/components/empty_value'; +import { HostDetailsLink } from '../../../../common/components/links'; +import { FormattedRelativePreferenceDate } from '../../../../common/components/formatted_date'; +import { IS_OPERATOR } from '../../../../timelines/components/timeline/data_providers/data_provider'; +import { Provider } from '../../../../timelines/components/timeline/data_providers/provider'; +import { DefaultDraggable } from '../../../../common/components/draggables'; import type { HostsTableColumns } from '.'; import * as i18n from './translations'; -import type { Maybe, RiskSeverity } from '../../../../common/search_strategy'; +import type { Maybe, RiskSeverity } from '../../../../../common/search_strategy'; import { VIEW_HOSTS_BY_SEVERITY } from '../host_risk_score_table/translations'; -import { RiskScore } from '../../../common/components/severity/common'; +import { RiskScore } from '../../../components/risk_score/severity/common'; export const getHostsColumns = ( showRiskColumn: boolean, diff --git a/x-pack/plugins/security_solution/public/hosts/components/hosts_table/index.test.tsx b/x-pack/plugins/security_solution/public/explore/hosts/components/hosts_table/index.test.tsx similarity index 89% rename from x-pack/plugins/security_solution/public/hosts/components/hosts_table/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/components/hosts_table/index.test.tsx index 1da0711f21aa7..2c3772b02c8e8 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/hosts_table/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/components/hosts_table/index.test.tsx @@ -8,26 +8,26 @@ import { shallow } from 'enzyme'; import React from 'react'; -import '../../../common/mock/match_media'; +import '../../../../common/mock/match_media'; import { mockGlobalState, TestProviders, SUB_PLUGINS_REDUCER, kibanaObservable, createSecuritySolutionStorageMock, -} from '../../../common/mock'; -import { useMountAppended } from '../../../common/utils/use_mount_appended'; -import type { State } from '../../../common/store'; -import { createStore } from '../../../common/store'; +} from '../../../../common/mock'; +import { useMountAppended } from '../../../../common/utils/use_mount_appended'; +import type { State } from '../../../../common/store'; +import { createStore } from '../../../../common/store'; import { hostsModel } from '../../store'; import { HostsTableType } from '../../store/model'; import { HostsTable } from '.'; import { mockData } from './mock'; import { render } from '@testing-library/react'; -jest.mock('../../../common/lib/kibana'); +jest.mock('../../../../common/lib/kibana'); -jest.mock('../../../common/lib/kibana/hooks', () => ({ +jest.mock('../../../../common/lib/kibana/hooks', () => ({ useNavigateTo: () => ({ navigateTo: jest.fn(), }), @@ -35,18 +35,18 @@ jest.mock('../../../common/lib/kibana/hooks', () => ({ // Test will fail because we will to need to mock some core services to make the test work // For now let's forget about SiemSearchBar and QueryBar -jest.mock('../../../common/components/search_bar', () => ({ +jest.mock('../../../../common/components/search_bar', () => ({ SiemSearchBar: () => null, })); -jest.mock('../../../common/components/query_bar', () => ({ +jest.mock('../../../../common/components/query_bar', () => ({ QueryBar: () => null, })); -jest.mock('../../../common/components/link_to'); +jest.mock('../../../../common/components/link_to'); const mockUseMlCapabilities = jest.fn(); -jest.mock('../../../common/components/ml/hooks/use_ml_capabilities', () => ({ +jest.mock('../../../../common/components/ml/hooks/use_ml_capabilities', () => ({ useMlCapabilities: () => mockUseMlCapabilities(), })); diff --git a/x-pack/plugins/security_solution/public/hosts/components/hosts_table/index.tsx b/x-pack/plugins/security_solution/public/explore/hosts/components/hosts_table/index.tsx similarity index 87% rename from x-pack/plugins/security_solution/public/hosts/components/hosts_table/index.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/components/hosts_table/index.tsx index 4aeb80bbdeecd..c0a00e1769995 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/hosts_table/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/components/hosts_table/index.tsx @@ -13,9 +13,9 @@ import type { Criteria, ItemsPerRow, SortingBasicTable, -} from '../../../common/components/paginated_table'; -import { PaginatedTable } from '../../../common/components/paginated_table'; -import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; +} from '../../../components/paginated_table'; +import { PaginatedTable } from '../../../components/paginated_table'; +import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; import { hostsActions, hostsModel, hostsSelectors } from '../../store'; import { getHostsColumns } from './columns'; import * as i18n from './translations'; @@ -23,14 +23,14 @@ import type { HostsEdges, HostItem, HostsSortField, -} from '../../../../common/search_strategy/security_solution/hosts'; -import { HostsFields } from '../../../../common/search_strategy/security_solution/hosts'; -import type { Direction, RiskSeverity } from '../../../../common/search_strategy'; -import type { HostEcs, OsEcs } from '../../../../common/ecs/host'; -import { SecurityPageName } from '../../../../common/constants'; +} from '../../../../../common/search_strategy/security_solution/hosts'; +import { HostsFields } from '../../../../../common/search_strategy/security_solution/hosts'; +import type { Direction, RiskSeverity } from '../../../../../common/search_strategy'; +import type { HostEcs, OsEcs } from '../../../../../common/ecs/host'; +import { SecurityPageName } from '../../../../../common/constants'; import { HostsTableType } from '../../store/model'; -import { useNavigateTo } from '../../../common/lib/kibana/hooks'; -import { useMlCapabilities } from '../../../common/components/ml/hooks/use_ml_capabilities'; +import { useNavigateTo } from '../../../../common/lib/kibana/hooks'; +import { useMlCapabilities } from '../../../../common/components/ml/hooks/use_ml_capabilities'; const tableType = hostsModel.HostsTableType.hosts; diff --git a/x-pack/plugins/security_solution/public/hosts/components/hosts_table/mock.ts b/x-pack/plugins/security_solution/public/explore/hosts/components/hosts_table/mock.ts similarity index 87% rename from x-pack/plugins/security_solution/public/hosts/components/hosts_table/mock.ts rename to x-pack/plugins/security_solution/public/explore/hosts/components/hosts_table/mock.ts index 2eb5bc6f58766..d7fe9daf8716b 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/hosts_table/mock.ts +++ b/x-pack/plugins/security_solution/public/explore/hosts/components/hosts_table/mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { HostsEdges } from '../../../../common/search_strategy/security_solution/hosts'; +import type { HostsEdges } from '../../../../../common/search_strategy/security_solution/hosts'; export const mockData: HostsEdges[] = [ { diff --git a/x-pack/plugins/security_solution/public/hosts/components/hosts_table/translations.ts b/x-pack/plugins/security_solution/public/explore/hosts/components/hosts_table/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/hosts/components/hosts_table/translations.ts rename to x-pack/plugins/security_solution/public/explore/hosts/components/hosts_table/translations.ts diff --git a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/common/index.tsx b/x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/common/index.tsx similarity index 82% rename from x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/common/index.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/common/index.tsx index 439873bf59766..0c92362c1b026 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/common/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/common/index.tsx @@ -10,15 +10,15 @@ import { EuiFlexGroup } from '@elastic/eui'; import styled from 'styled-components'; import deepEqual from 'fast-deep-equal'; -import { manageQuery } from '../../../../common/components/page/manage_query'; +import { manageQuery } from '../../../../../common/components/page/manage_query'; import type { HostsKpiStrategyResponse, NetworkKpiStrategyResponse, -} from '../../../../../common/search_strategy'; -import type { StatItemsProps, StatItems } from '../../../../common/components/stat_items'; -import { StatItemsComponent, useKpiMatrixStatus } from '../../../../common/components/stat_items'; -import type { UpdateDateRange } from '../../../../common/components/charts/common'; -import type { UserskKpiStrategyResponse } from '../../../../../common/search_strategy/security_solution/users'; +} from '../../../../../../common/search_strategy'; +import type { StatItemsProps, StatItems } from '../../../../components/stat_items'; +import { StatItemsComponent, useKpiMatrixStatus } from '../../../../components/stat_items'; +import type { UpdateDateRange } from '../../../../../common/components/charts/common'; +import type { UserskKpiStrategyResponse } from '../../../../../../common/search_strategy/security_solution/users'; const kpiWidgetHeight = 247; diff --git a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/hosts/index.test.tsx b/x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/hosts/index.test.tsx similarity index 85% rename from x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/hosts/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/hosts/index.test.tsx index 308dc82af156b..44e8fce95725b 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/hosts/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/hosts/index.test.tsx @@ -6,26 +6,26 @@ */ import { useHostsKpiHosts } from '../../../containers/kpi_hosts/hosts'; -import { useQueryToggle } from '../../../../common/containers/query_toggle'; +import { useQueryToggle } from '../../../../../common/containers/query_toggle'; import { render } from '@testing-library/react'; -import { TestProviders } from '../../../../common/mock'; +import { TestProviders } from '../../../../../common/mock'; import React from 'react'; import { HostsKpiHosts } from '.'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; -import { useRefetchByRestartingSession } from '../../../../common/components/page/use_refetch_by_session'; +import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; +import { useRefetchByRestartingSession } from '../../../../../common/components/page/use_refetch_by_session'; import { KpiBaseComponentManage } from '../common'; -jest.mock('../../../../common/containers/query_toggle'); +jest.mock('../../../../../common/containers/query_toggle'); jest.mock('../../../containers/kpi_hosts/hosts'); jest.mock('../common', () => ({ KpiBaseComponentManage: jest .fn() .mockReturnValue(), })); -jest.mock('../../../../common/hooks/use_experimental_features', () => ({ +jest.mock('../../../../../common/hooks/use_experimental_features', () => ({ useIsExperimentalFeatureEnabled: jest.fn(), })); -jest.mock('../../../../common/components/page/use_refetch_by_session', () => ({ +jest.mock('../../../../../common/components/page/use_refetch_by_session', () => ({ useRefetchByRestartingSession: jest.fn(), })); diff --git a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/hosts/index.tsx b/x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/hosts/index.tsx similarity index 76% rename from x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/hosts/index.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/hosts/index.tsx index 500ec30368741..4cf9bd91f6c35 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/hosts/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/hosts/index.tsx @@ -7,18 +7,18 @@ import React, { useEffect, useState } from 'react'; -import type { StatItems } from '../../../../common/components/stat_items'; -import { kpiHostAreaLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/hosts/kpi_host_area'; -import { kpiHostMetricLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/hosts/kpi_host_metric'; +import type { StatItems } from '../../../../components/stat_items'; +import { kpiHostAreaLensAttributes } from '../../../../../common/components/visualization_actions/lens_attributes/hosts/kpi_host_area'; +import { kpiHostMetricLensAttributes } from '../../../../../common/components/visualization_actions/lens_attributes/hosts/kpi_host_metric'; import { useHostsKpiHosts, ID } from '../../../containers/kpi_hosts/hosts'; import { KpiBaseComponentManage } from '../common'; import type { HostsKpiProps } from '../types'; import { HostsKpiChartColors } from '../types'; import * as i18n from './translations'; -import { useQueryToggle } from '../../../../common/containers/query_toggle'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; -import { InputsModelId } from '../../../../common/store/inputs/constants'; -import { useRefetchByRestartingSession } from '../../../../common/components/page/use_refetch_by_session'; +import { useQueryToggle } from '../../../../../common/containers/query_toggle'; +import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; +import { InputsModelId } from '../../../../../common/store/inputs/constants'; +import { useRefetchByRestartingSession } from '../../../../../common/components/page/use_refetch_by_session'; export const fieldsMapping: Readonly = [ { diff --git a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/hosts/translations.ts b/x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/hosts/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/hosts/translations.ts rename to x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/hosts/translations.ts diff --git a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/index.tsx b/x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/index.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/index.tsx diff --git a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/risky_hosts/index.test.tsx b/x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/risky_hosts/index.test.tsx similarity index 96% rename from x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/risky_hosts/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/risky_hosts/index.test.tsx index 14c747aed04c7..b96c63e85b12b 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/risky_hosts/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/risky_hosts/index.test.tsx @@ -10,8 +10,8 @@ import React from 'react'; import { render } from '@testing-library/react'; import { RiskyHosts } from '.'; -import { TestProviders } from '../../../../common/mock'; -import type { KpiRiskScoreStrategyResponse } from '../../../../../common/search_strategy'; +import { TestProviders } from '../../../../../common/mock'; +import type { KpiRiskScoreStrategyResponse } from '../../../../../../common/search_strategy'; describe('RiskyHosts', () => { const defaultProps = { diff --git a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/risky_hosts/index.tsx b/x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/risky_hosts/index.tsx similarity index 89% rename from x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/risky_hosts/index.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/risky_hosts/index.tsx index 6785c95251d62..11843d25e4b97 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/risky_hosts/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/risky_hosts/index.tsx @@ -21,21 +21,21 @@ import { euiLightVars } from '@kbn/ui-theme'; import { RiskInformationButtonIcon, HOST_RISK_INFO_BUTTON_CLASS, -} from '../../../../risk_score/components/risk_information'; +} from '../../../../components/risk_score/risk_information'; import { InspectButton, BUTTON_CLASS as INPECT_BUTTON_CLASS, -} from '../../../../common/components/inspect'; +} from '../../../../../common/components/inspect'; import * as i18n from './translations'; -import { useInspectQuery } from '../../../../common/hooks/use_inspect_query'; -import { useErrorToast } from '../../../../common/hooks/use_error_toast'; +import { useInspectQuery } from '../../../../../common/hooks/use_inspect_query'; +import { useErrorToast } from '../../../../../common/hooks/use_error_toast'; -import { HoverVisibilityContainer } from '../../../../common/components/hover_visibility_container'; -import type { KpiRiskScoreStrategyResponse } from '../../../../../common/search_strategy'; -import { RiskScoreEntity, RiskSeverity } from '../../../../../common/search_strategy'; -import { RiskScore } from '../../../../common/components/severity/common'; +import { HoverVisibilityContainer } from '../../../../../common/components/hover_visibility_container'; +import type { KpiRiskScoreStrategyResponse } from '../../../../../../common/search_strategy'; +import { RiskScoreEntity, RiskSeverity } from '../../../../../../common/search_strategy'; +import { RiskScore } from '../../../../components/risk_score/severity/common'; const KpiBaseComponentLoader: React.FC = () => ( diff --git a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/risky_hosts/translations.ts b/x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/risky_hosts/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/risky_hosts/translations.ts rename to x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/risky_hosts/translations.ts diff --git a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/types.ts b/x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/types.ts similarity index 77% rename from x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/types.ts rename to x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/types.ts index dcbd04b099dfd..40e638bd645ce 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/types.ts +++ b/x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/types.ts @@ -5,8 +5,8 @@ * 2.0. */ -import type { UpdateDateRange } from '../../../common/components/charts/common'; -import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; +import type { UpdateDateRange } from '../../../../common/components/charts/common'; +import type { GlobalTimeArgs } from '../../../../common/containers/use_global_time'; export interface HostsKpiProps { filterQuery?: string; diff --git a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/unique_ips/index.test.tsx b/x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/unique_ips/index.test.tsx similarity index 85% rename from x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/unique_ips/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/unique_ips/index.test.tsx index 3a96c5ce58dd8..17e5ebd5e1306 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/unique_ips/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/unique_ips/index.test.tsx @@ -6,26 +6,26 @@ */ import { useHostsKpiUniqueIps } from '../../../containers/kpi_hosts/unique_ips'; -import { useQueryToggle } from '../../../../common/containers/query_toggle'; +import { useQueryToggle } from '../../../../../common/containers/query_toggle'; import { render } from '@testing-library/react'; -import { TestProviders } from '../../../../common/mock'; +import { TestProviders } from '../../../../../common/mock'; import React from 'react'; import { HostsKpiUniqueIps } from '.'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; -import { useRefetchByRestartingSession } from '../../../../common/components/page/use_refetch_by_session'; +import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; +import { useRefetchByRestartingSession } from '../../../../../common/components/page/use_refetch_by_session'; import { KpiBaseComponentManage } from '../common'; -jest.mock('../../../../common/containers/query_toggle'); +jest.mock('../../../../../common/containers/query_toggle'); jest.mock('../../../containers/kpi_hosts/unique_ips'); jest.mock('../common', () => ({ KpiBaseComponentManage: jest .fn() .mockReturnValue(), })); -jest.mock('../../../../common/hooks/use_experimental_features', () => ({ +jest.mock('../../../../../common/hooks/use_experimental_features', () => ({ useIsExperimentalFeatureEnabled: jest.fn(), })); -jest.mock('../../../../common/components/page/use_refetch_by_session', () => ({ +jest.mock('../../../../../common/components/page/use_refetch_by_session', () => ({ useRefetchByRestartingSession: jest.fn(), })); diff --git a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/unique_ips/index.tsx b/x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/unique_ips/index.tsx similarity index 76% rename from x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/unique_ips/index.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/unique_ips/index.tsx index 86e6c083fce1a..3cb0122d5687d 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/unique_ips/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/unique_ips/index.tsx @@ -7,20 +7,20 @@ import React, { useEffect, useState } from 'react'; -import type { StatItems } from '../../../../common/components/stat_items'; -import { kpiUniqueIpsAreaLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_area'; -import { kpiUniqueIpsBarLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_bar'; -import { kpiUniqueIpsDestinationMetricLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_destination_metric'; -import { kpiUniqueIpsSourceMetricLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_source_metric'; +import type { StatItems } from '../../../../components/stat_items'; +import { kpiUniqueIpsAreaLensAttributes } from '../../../../../common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_area'; +import { kpiUniqueIpsBarLensAttributes } from '../../../../../common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_bar'; +import { kpiUniqueIpsDestinationMetricLensAttributes } from '../../../../../common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_destination_metric'; +import { kpiUniqueIpsSourceMetricLensAttributes } from '../../../../../common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_source_metric'; import { useHostsKpiUniqueIps, ID } from '../../../containers/kpi_hosts/unique_ips'; import { KpiBaseComponentManage } from '../common'; import type { HostsKpiProps } from '../types'; import { HostsKpiChartColors } from '../types'; import * as i18n from './translations'; -import { useQueryToggle } from '../../../../common/containers/query_toggle'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; -import { InputsModelId } from '../../../../common/store/inputs/constants'; -import { useRefetchByRestartingSession } from '../../../../common/components/page/use_refetch_by_session'; +import { useQueryToggle } from '../../../../../common/containers/query_toggle'; +import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; +import { InputsModelId } from '../../../../../common/store/inputs/constants'; +import { useRefetchByRestartingSession } from '../../../../../common/components/page/use_refetch_by_session'; export const fieldsMapping: Readonly = [ { diff --git a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/unique_ips/translations.ts b/x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/unique_ips/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/unique_ips/translations.ts rename to x-pack/plugins/security_solution/public/explore/hosts/components/kpi_hosts/unique_ips/translations.ts diff --git a/x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/hosts/components/uncommon_process_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/explore/hosts/components/uncommon_process_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/index.test.tsx b/x-pack/plugins/security_solution/public/explore/hosts/components/uncommon_process_table/index.test.tsx similarity index 94% rename from x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/components/uncommon_process_table/index.test.tsx index 300abc60818cb..1c8c7997f41ad 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/components/uncommon_process_table/index.test.tsx @@ -9,18 +9,18 @@ import { shallow } from 'enzyme'; import { getOr } from 'lodash/fp'; import React from 'react'; -import { TestProviders } from '../../../common/mock'; -import '../../../common/mock/match_media'; +import { TestProviders } from '../../../../common/mock'; +import '../../../../common/mock/match_media'; import { hostsModel } from '../../store'; -import { getEmptyValue } from '../../../common/components/empty_value'; -import { useMountAppended } from '../../../common/utils/use_mount_appended'; +import { getEmptyValue } from '../../../../common/components/empty_value'; +import { useMountAppended } from '../../../../common/utils/use_mount_appended'; import { getArgs, UncommonProcessTable, getUncommonColumnsCurated } from '.'; import { mockData } from './mock'; import { HostsType } from '../../store/model'; import * as i18n from './translations'; -jest.mock('../../../common/lib/kibana'); +jest.mock('../../../../common/lib/kibana'); jest.mock('@elastic/eui', () => { const original = jest.requireActual('@elastic/eui'); @@ -30,7 +30,7 @@ jest.mock('@elastic/eui', () => { }; }); -jest.mock('../../../common/components/link_to'); +jest.mock('../../../../common/components/link_to'); describe('Uncommon Process Table Component', () => { const loadPage = jest.fn(); diff --git a/x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/index.tsx b/x-pack/plugins/security_solution/public/explore/hosts/components/uncommon_process_table/index.tsx similarity index 91% rename from x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/index.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/components/uncommon_process_table/index.tsx index 972b97ca1265d..a6475539e2d42 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/components/uncommon_process_table/index.tsx @@ -8,18 +8,18 @@ import React, { useCallback, useMemo } from 'react'; import { useDispatch } from 'react-redux'; -import type { HostsUncommonProcessesEdges } from '../../../../common/search_strategy'; +import type { HostsUncommonProcessesEdges } from '../../../../../common/search_strategy'; import { hostsActions, hostsModel, hostsSelectors } from '../../store'; -import { defaultToEmptyTag, getEmptyValue } from '../../../common/components/empty_value'; -import { HostDetailsLink } from '../../../common/components/links'; -import type { Columns, ItemsPerRow } from '../../../common/components/paginated_table'; -import { PaginatedTable } from '../../../common/components/paginated_table'; +import { defaultToEmptyTag, getEmptyValue } from '../../../../common/components/empty_value'; +import { HostDetailsLink } from '../../../../common/components/links'; +import type { Columns, ItemsPerRow } from '../../../components/paginated_table'; +import { PaginatedTable } from '../../../components/paginated_table'; import * as i18n from './translations'; -import { getRowItemDraggables } from '../../../common/components/tables/helpers'; +import { getRowItemDraggables } from '../../../../common/components/tables/helpers'; import { HostsType } from '../../store/model'; -import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; -import type { HostEcs } from '../../../../common/ecs/host'; +import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; +import type { HostEcs } from '../../../../../common/ecs/host'; const tableType = hostsModel.HostsTableType.uncommonProcesses; interface UncommonProcessTableProps { diff --git a/x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/mock.ts b/x-pack/plugins/security_solution/public/explore/hosts/components/uncommon_process_table/mock.ts similarity index 98% rename from x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/mock.ts rename to x-pack/plugins/security_solution/public/explore/hosts/components/uncommon_process_table/mock.ts index e303f6a756350..3de942d82013f 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/mock.ts +++ b/x-pack/plugins/security_solution/public/explore/hosts/components/uncommon_process_table/mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { HostsUncommonProcessesStrategyResponse } from '../../../../common/search_strategy'; +import type { HostsUncommonProcessesStrategyResponse } from '../../../../../common/search_strategy'; export const mockData: HostsUncommonProcessesStrategyResponse = { totalCount: 5, diff --git a/x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/translations.ts b/x-pack/plugins/security_solution/public/explore/hosts/components/uncommon_process_table/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/translations.ts rename to x-pack/plugins/security_solution/public/explore/hosts/components/uncommon_process_table/translations.ts diff --git a/x-pack/plugins/security_solution/public/hosts/containers/hosts/details/index.test.tsx b/x-pack/plugins/security_solution/public/explore/hosts/containers/hosts/details/index.test.tsx similarity index 88% rename from x-pack/plugins/security_solution/public/hosts/containers/hosts/details/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/containers/hosts/details/index.test.tsx index 8fdc2e82c1b34..e4800a89f1092 100644 --- a/x-pack/plugins/security_solution/public/hosts/containers/hosts/details/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/containers/hosts/details/index.test.tsx @@ -5,11 +5,11 @@ * 2.0. */ import { act, renderHook } from '@testing-library/react-hooks'; -import { TestProviders } from '../../../../common/mock'; +import { TestProviders } from '../../../../../common/mock'; import { ID, useHostDetails } from '.'; -import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; +import { useSearchStrategy } from '../../../../../common/containers/use_search_strategy'; -jest.mock('../../../../common/containers/use_search_strategy', () => ({ +jest.mock('../../../../../common/containers/use_search_strategy', () => ({ useSearchStrategy: jest.fn(), })); const mockUseSearchStrategy = useSearchStrategy as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/hosts/containers/hosts/details/index.tsx b/x-pack/plugins/security_solution/public/explore/hosts/containers/hosts/details/index.tsx similarity index 82% rename from x-pack/plugins/security_solution/public/hosts/containers/hosts/details/index.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/containers/hosts/details/index.tsx index 4b92602d9d8ae..f6ea1ff14a264 100644 --- a/x-pack/plugins/security_solution/public/hosts/containers/hosts/details/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/containers/hosts/details/index.tsx @@ -7,13 +7,13 @@ import { useEffect, useMemo } from 'react'; -import type { inputsModel } from '../../../../common/store'; -import type { HostItem } from '../../../../../common/search_strategy/security_solution/hosts'; -import { HostsQueries } from '../../../../../common/search_strategy/security_solution/hosts'; +import type { inputsModel } from '../../../../../common/store'; +import type { HostItem } from '../../../../../../common/search_strategy/security_solution/hosts'; +import { HostsQueries } from '../../../../../../common/search_strategy/security_solution/hosts'; import * as i18n from './translations'; -import type { InspectResponse } from '../../../../types'; -import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; +import type { InspectResponse } from '../../../../../types'; +import { useSearchStrategy } from '../../../../../common/containers/use_search_strategy'; export const ID = 'hostsDetailsQuery'; diff --git a/x-pack/plugins/security_solution/public/hosts/containers/hosts/details/translations.ts b/x-pack/plugins/security_solution/public/explore/hosts/containers/hosts/details/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/hosts/containers/hosts/details/translations.ts rename to x-pack/plugins/security_solution/public/explore/hosts/containers/hosts/details/translations.ts diff --git a/x-pack/plugins/security_solution/public/hosts/containers/hosts/index.test.tsx b/x-pack/plugins/security_solution/public/explore/hosts/containers/hosts/index.test.tsx similarity index 90% rename from x-pack/plugins/security_solution/public/hosts/containers/hosts/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/containers/hosts/index.test.tsx index 1fcd9318753cd..fdd4bf21e118c 100644 --- a/x-pack/plugins/security_solution/public/hosts/containers/hosts/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/containers/hosts/index.test.tsx @@ -6,12 +6,12 @@ */ import { act, renderHook } from '@testing-library/react-hooks'; -import { TestProviders } from '../../../common/mock'; +import { TestProviders } from '../../../../common/mock'; import { useAllHost } from '.'; import { HostsType } from '../../store/model'; -import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; +import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; -jest.mock('../../../common/containers/use_search_strategy', () => ({ +jest.mock('../../../../common/containers/use_search_strategy', () => ({ useSearchStrategy: jest.fn(), })); const mockUseSearchStrategy = useSearchStrategy as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/hosts/containers/hosts/index.tsx b/x-pack/plugins/security_solution/public/explore/hosts/containers/hosts/index.tsx similarity index 85% rename from x-pack/plugins/security_solution/public/hosts/containers/hosts/index.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/containers/hosts/index.tsx index 156af86d9df37..0086d9bef4ae8 100644 --- a/x-pack/plugins/security_solution/public/hosts/containers/hosts/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/containers/hosts/index.tsx @@ -8,23 +8,23 @@ import deepEqual from 'fast-deep-equal'; import { useCallback, useEffect, useMemo, useState } from 'react'; -import type { inputsModel, State } from '../../../common/store'; -import { createFilter } from '../../../common/containers/helpers'; -import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; +import type { inputsModel, State } from '../../../../common/store'; +import { createFilter } from '../../../../common/containers/helpers'; +import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; import type { hostsModel } from '../../store'; import { hostsSelectors } from '../../store'; -import { generateTablePaginationOptions } from '../../../common/components/paginated_table/helpers'; +import { generateTablePaginationOptions } from '../../../components/paginated_table/helpers'; import type { HostsEdges, PageInfoPaginated, HostsRequestOptions, -} from '../../../../common/search_strategy'; -import { HostsQueries } from '../../../../common/search_strategy'; -import type { ESTermQuery } from '../../../../common/typed_json'; +} from '../../../../../common/search_strategy'; +import { HostsQueries } from '../../../../../common/search_strategy'; +import type { ESTermQuery } from '../../../../../common/typed_json'; import * as i18n from './translations'; -import type { InspectResponse } from '../../../types'; -import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; +import type { InspectResponse } from '../../../../types'; +import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; export const ID = 'hostsAllQuery'; diff --git a/x-pack/plugins/security_solution/public/hosts/containers/hosts/translations.ts b/x-pack/plugins/security_solution/public/explore/hosts/containers/hosts/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/hosts/containers/hosts/translations.ts rename to x-pack/plugins/security_solution/public/explore/hosts/containers/hosts/translations.ts diff --git a/x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/hosts/index.test.tsx b/x-pack/plugins/security_solution/public/explore/hosts/containers/kpi_hosts/hosts/index.test.tsx similarity index 93% rename from x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/hosts/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/containers/kpi_hosts/hosts/index.test.tsx index 69155eb7c979d..04ddb28a8c61c 100644 --- a/x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/hosts/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/containers/kpi_hosts/hosts/index.test.tsx @@ -6,7 +6,7 @@ */ import { act, renderHook } from '@testing-library/react-hooks'; -import { TestProviders } from '../../../../common/mock'; +import { TestProviders } from '../../../../../common/mock'; import { useHostsKpiHosts } from '.'; describe('kpi hosts - hosts', () => { diff --git a/x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/hosts/index.tsx b/x-pack/plugins/security_solution/public/explore/hosts/containers/kpi_hosts/hosts/index.tsx similarity index 88% rename from x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/hosts/index.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/containers/kpi_hosts/hosts/index.tsx index 1bc08cee95553..bf78194964f09 100644 --- a/x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/hosts/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/containers/kpi_hosts/hosts/index.tsx @@ -10,20 +10,20 @@ import { noop } from 'lodash/fp'; import { useCallback, useEffect, useRef, useState } from 'react'; import { Subscription } from 'rxjs'; -import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import type { inputsModel } from '../../../../common/store'; -import { createFilter } from '../../../../common/containers/helpers'; -import { useKibana } from '../../../../common/lib/kibana'; +import { useAppToasts } from '../../../../../common/hooks/use_app_toasts'; +import type { inputsModel } from '../../../../../common/store'; +import { createFilter } from '../../../../../common/containers/helpers'; +import { useKibana } from '../../../../../common/lib/kibana'; import type { HostsKpiHostsRequestOptions, HostsKpiHostsStrategyResponse, -} from '../../../../../common/search_strategy'; -import { HostsKpiQueries } from '../../../../../common/search_strategy'; -import type { ESTermQuery } from '../../../../../common/typed_json'; +} from '../../../../../../common/search_strategy'; +import { HostsKpiQueries } from '../../../../../../common/search_strategy'; +import type { ESTermQuery } from '../../../../../../common/typed_json'; import * as i18n from './translations'; -import { getInspectResponse } from '../../../../helpers'; -import type { InspectResponse } from '../../../../types'; +import { getInspectResponse } from '../../../../../helpers'; +import type { InspectResponse } from '../../../../../types'; export const ID = 'hostsKpiHostsQuery'; diff --git a/x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/hosts/translations.ts b/x-pack/plugins/security_solution/public/explore/hosts/containers/kpi_hosts/hosts/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/hosts/translations.ts rename to x-pack/plugins/security_solution/public/explore/hosts/containers/kpi_hosts/hosts/translations.ts diff --git a/x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/unique_ips/index.test.tsx b/x-pack/plugins/security_solution/public/explore/hosts/containers/kpi_hosts/unique_ips/index.test.tsx similarity index 93% rename from x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/unique_ips/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/containers/kpi_hosts/unique_ips/index.test.tsx index f50f46bdf90d2..0050bde419807 100644 --- a/x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/unique_ips/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/containers/kpi_hosts/unique_ips/index.test.tsx @@ -6,7 +6,7 @@ */ import { act, renderHook } from '@testing-library/react-hooks'; -import { TestProviders } from '../../../../common/mock'; +import { TestProviders } from '../../../../../common/mock'; import { useHostsKpiUniqueIps } from '.'; describe('kpi hosts - Unique Ips', () => { diff --git a/x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/unique_ips/index.tsx b/x-pack/plugins/security_solution/public/explore/hosts/containers/kpi_hosts/unique_ips/index.tsx similarity index 89% rename from x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/unique_ips/index.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/containers/kpi_hosts/unique_ips/index.tsx index 7bcb0cc98dce0..730bb48b97a23 100644 --- a/x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/unique_ips/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/containers/kpi_hosts/unique_ips/index.tsx @@ -10,20 +10,20 @@ import { noop } from 'lodash/fp'; import { useCallback, useEffect, useRef, useState } from 'react'; import { Subscription } from 'rxjs'; -import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import type { inputsModel } from '../../../../common/store'; -import { createFilter } from '../../../../common/containers/helpers'; -import { useKibana } from '../../../../common/lib/kibana'; +import { useAppToasts } from '../../../../../common/hooks/use_app_toasts'; +import type { inputsModel } from '../../../../../common/store'; +import { createFilter } from '../../../../../common/containers/helpers'; +import { useKibana } from '../../../../../common/lib/kibana'; import type { HostsKpiUniqueIpsRequestOptions, HostsKpiUniqueIpsStrategyResponse, -} from '../../../../../common/search_strategy'; -import { HostsKpiQueries } from '../../../../../common/search_strategy'; -import type { ESTermQuery } from '../../../../../common/typed_json'; +} from '../../../../../../common/search_strategy'; +import { HostsKpiQueries } from '../../../../../../common/search_strategy'; +import type { ESTermQuery } from '../../../../../../common/typed_json'; import * as i18n from './translations'; -import { getInspectResponse } from '../../../../helpers'; -import type { InspectResponse } from '../../../../types'; +import { getInspectResponse } from '../../../../../helpers'; +import type { InspectResponse } from '../../../../../types'; export const ID = 'hostsKpiUniqueIpsQuery'; diff --git a/x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/unique_ips/translations.ts b/x-pack/plugins/security_solution/public/explore/hosts/containers/kpi_hosts/unique_ips/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/unique_ips/translations.ts rename to x-pack/plugins/security_solution/public/explore/hosts/containers/kpi_hosts/unique_ips/translations.ts diff --git a/x-pack/plugins/security_solution/public/hosts/containers/uncommon_processes/index.test.tsx b/x-pack/plugins/security_solution/public/explore/hosts/containers/uncommon_processes/index.test.tsx similarity index 90% rename from x-pack/plugins/security_solution/public/hosts/containers/uncommon_processes/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/containers/uncommon_processes/index.test.tsx index d8635f4505bb2..452f2aba5a8da 100644 --- a/x-pack/plugins/security_solution/public/hosts/containers/uncommon_processes/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/containers/uncommon_processes/index.test.tsx @@ -6,12 +6,12 @@ */ import { act, renderHook } from '@testing-library/react-hooks'; -import { TestProviders } from '../../../common/mock'; +import { TestProviders } from '../../../../common/mock'; import { useUncommonProcesses } from '.'; import { HostsType } from '../../store/model'; -import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; +import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; -jest.mock('../../../common/containers/use_search_strategy', () => ({ +jest.mock('../../../../common/containers/use_search_strategy', () => ({ useSearchStrategy: jest.fn(), })); const mockUseSearchStrategy = useSearchStrategy as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/hosts/containers/uncommon_processes/index.tsx b/x-pack/plugins/security_solution/public/explore/hosts/containers/uncommon_processes/index.tsx similarity index 85% rename from x-pack/plugins/security_solution/public/hosts/containers/uncommon_processes/index.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/containers/uncommon_processes/index.tsx index ce56786729c1c..49facc76c33bc 100644 --- a/x-pack/plugins/security_solution/public/hosts/containers/uncommon_processes/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/containers/uncommon_processes/index.tsx @@ -8,10 +8,10 @@ import deepEqual from 'fast-deep-equal'; import { useCallback, useEffect, useMemo, useState } from 'react'; -import type { inputsModel, State } from '../../../common/store'; +import type { inputsModel, State } from '../../../../common/store'; -import { generateTablePaginationOptions } from '../../../common/components/paginated_table/helpers'; -import { createFilter } from '../../../common/containers/helpers'; +import { generateTablePaginationOptions } from '../../../components/paginated_table/helpers'; +import { createFilter } from '../../../../common/containers/helpers'; import type { hostsModel } from '../../store'; import { hostsSelectors } from '../../store'; import type { @@ -19,14 +19,14 @@ import type { PageInfoPaginated, HostsUncommonProcessesEdges, HostsUncommonProcessesRequestOptions, -} from '../../../../common/search_strategy'; -import { HostsQueries } from '../../../../common/search_strategy'; +} from '../../../../../common/search_strategy'; +import { HostsQueries } from '../../../../../common/search_strategy'; import * as i18n from './translations'; -import type { ESTermQuery } from '../../../../common/typed_json'; -import type { InspectResponse } from '../../../types'; -import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; -import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; +import type { ESTermQuery } from '../../../../../common/typed_json'; +import type { InspectResponse } from '../../../../types'; +import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; +import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; export const ID = 'hostsUncommonProcessesQuery'; diff --git a/x-pack/plugins/security_solution/public/hosts/containers/uncommon_processes/translations.ts b/x-pack/plugins/security_solution/public/explore/hosts/containers/uncommon_processes/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/hosts/containers/uncommon_processes/translations.ts rename to x-pack/plugins/security_solution/public/explore/hosts/containers/uncommon_processes/translations.ts diff --git a/x-pack/plugins/security_solution/public/hosts/index.ts b/x-pack/plugins/security_solution/public/explore/hosts/index.ts similarity index 78% rename from x-pack/plugins/security_solution/public/hosts/index.ts rename to x-pack/plugins/security_solution/public/explore/hosts/index.ts index 3a1d1ef8b4b1c..06e61e8ace88c 100644 --- a/x-pack/plugins/security_solution/public/hosts/index.ts +++ b/x-pack/plugins/security_solution/public/explore/hosts/index.ts @@ -6,10 +6,10 @@ */ import type { Storage } from '@kbn/kibana-utils-plugin/public'; -import type { TableIdLiteral } from '../../common/types'; -import { TableId } from '../../common/types'; -import type { SecuritySubPluginWithStore } from '../app/types'; -import { getDataTablesInStorageByIds } from '../timelines/containers/local_storage'; +import type { TableIdLiteral } from '../../../common/types'; +import { TableId } from '../../../common/types'; +import type { SecuritySubPluginWithStore } from '../../app/types'; +import { getDataTablesInStorageByIds } from '../../timelines/containers/local_storage'; import { routes } from './routes'; import type { HostsState } from './store'; import { initialHostsState, hostsReducer } from './store'; diff --git a/x-pack/plugins/security_solution/public/hosts/links.ts b/x-pack/plugins/security_solution/public/explore/hosts/links.ts similarity index 88% rename from x-pack/plugins/security_solution/public/hosts/links.ts rename to x-pack/plugins/security_solution/public/explore/hosts/links.ts index ccb7941f2a182..5c7225b6da452 100644 --- a/x-pack/plugins/security_solution/public/hosts/links.ts +++ b/x-pack/plugins/security_solution/public/explore/hosts/links.ts @@ -5,10 +5,10 @@ * 2.0. */ import { i18n } from '@kbn/i18n'; -import { HOSTS_PATH, SecurityPageName } from '../../common/constants'; -import { HOSTS } from '../app/translations'; -import type { LinkItem } from '../common/links/types'; -import hostsPageImg from '../common/images/hosts_page.png'; +import { HOSTS_PATH, SecurityPageName } from '../../../common/constants'; +import { HOSTS } from '../../app/translations'; +import type { LinkItem } from '../../common/links/types'; +import hostsPageImg from '../../common/images/hosts_page.png'; export const links: LinkItem = { id: SecurityPageName.hosts, diff --git a/x-pack/plugins/security_solution/public/hosts/pages/details/details_tabs.test.tsx b/x-pack/plugins/security_solution/public/explore/hosts/pages/details/details_tabs.test.tsx similarity index 87% rename from x-pack/plugins/security_solution/public/hosts/pages/details/details_tabs.test.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/pages/details/details_tabs.test.tsx index 9ec3f62dc3e0f..3d6dd5c6c4658 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/details/details_tabs.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/pages/details/details_tabs.test.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { MemoryRouter } from 'react-router-dom'; import useResizeObserver from 'use-resize-observer/polyfilled'; -import '../../../common/mock/match_media'; +import '../../../../common/mock/match_media'; import { createSecuritySolutionStorageMock, kibanaObservable, @@ -17,20 +17,20 @@ import { mockIndexPattern, SUB_PLUGINS_REDUCER, TestProviders, -} from '../../../common/mock'; +} from '../../../../common/mock'; import { HostDetailsTabs } from './details_tabs'; import { hostDetailsPagePath } from '../types'; import { type } from './utils'; -import { useMountAppended } from '../../../common/utils/use_mount_appended'; +import { useMountAppended } from '../../../../common/utils/use_mount_appended'; import { getHostDetailsPageFilters } from './helpers'; import { HostsTableType } from '../../store/model'; import { mockCasesContract } from '@kbn/cases-plugin/public/mocks'; -import type { State } from '../../../common/store'; -import { createStore } from '../../../common/store'; -import { TableId } from '../../../../common/types'; +import type { State } from '../../../../common/store'; +import { createStore } from '../../../../common/store'; +import { TableId } from '../../../../../common/types'; -jest.mock('../../../common/lib/kibana', () => { - const original = jest.requireActual('../../../common/lib/kibana'); +jest.mock('../../../../common/lib/kibana', () => { + const original = jest.requireActual('../../../../common/lib/kibana'); return { ...original, @@ -44,13 +44,13 @@ jest.mock('../../../common/lib/kibana', () => { }; }); -jest.mock('../../../common/utils/normalize_time_range'); +jest.mock('../../../../common/utils/normalize_time_range'); -jest.mock('../../../common/containers/source', () => ({ +jest.mock('../../../../common/containers/source', () => ({ useFetchIndex: () => [false, { indicesExist: true, indexPatterns: mockIndexPattern }], })); -jest.mock('../../../common/containers/use_global_time', () => ({ +jest.mock('../../../../common/containers/use_global_time', () => ({ useGlobalTime: jest.fn().mockReturnValue({ from: '2020-07-07T08:20:18.966Z', isInitializing: false, @@ -61,17 +61,17 @@ jest.mock('../../../common/containers/use_global_time', () => ({ // Test will fail because we will to need to mock some core services to make the test work // For now let's forget about SiemSearchBar and QueryBar -jest.mock('../../../common/components/search_bar', () => ({ +jest.mock('../../../../common/components/search_bar', () => ({ SiemSearchBar: () => null, })); -jest.mock('../../../common/components/query_bar', () => ({ +jest.mock('../../../../common/components/query_bar', () => ({ QueryBar: () => null, })); const mockUseResizeObserver: jest.Mock = useResizeObserver as jest.Mock; jest.mock('use-resize-observer/polyfilled'); mockUseResizeObserver.mockImplementation(() => ({})); -jest.mock('../../../common/components/visualization_actions', () => ({ +jest.mock('../../../../common/components/visualization_actions', () => ({ VisualizationActions: jest.fn(() =>
), })); diff --git a/x-pack/plugins/security_solution/public/hosts/pages/details/details_tabs.tsx b/x-pack/plugins/security_solution/public/explore/hosts/pages/details/details_tabs.tsx similarity index 80% rename from x-pack/plugins/security_solution/public/hosts/pages/details/details_tabs.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/pages/details/details_tabs.tsx index 8837f28c08200..e1d6de9b80eb2 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/details/details_tabs.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/pages/details/details_tabs.tsx @@ -9,13 +9,13 @@ import React from 'react'; import { Switch } from 'react-router-dom'; import { Route } from '@kbn/kibana-react-plugin/public'; -import { RiskScoreEntity } from '../../../../common/search_strategy'; -import { RiskDetailsTabBody } from '../../../risk_score/components/risk_details_tab_body'; +import { RiskScoreEntity } from '../../../../../common/search_strategy'; +import { RiskDetailsTabBody } from '../../../components/risk_score/risk_details_tab_body'; import { HostsTableType } from '../../store/model'; -import { AnomaliesQueryTabBody } from '../../../common/containers/anomalies/anomalies_query_tab_body'; -import { useGlobalTime } from '../../../common/containers/use_global_time'; -import { AnomaliesHostTable } from '../../../common/components/ml/tables/anomalies_host_table'; -import { EventsQueryTabBody } from '../../../common/components/events_tab'; +import { AnomaliesQueryTabBody } from '../../../../common/containers/anomalies/anomalies_query_tab_body'; +import { useGlobalTime } from '../../../../common/containers/use_global_time'; +import { AnomaliesHostTable } from '../../../../common/components/ml/tables/anomalies_host_table'; +import { EventsQueryTabBody } from '../../../../common/components/events_tab'; import type { HostDetailsTabsProps } from './types'; import { type } from './utils'; @@ -25,7 +25,7 @@ import { UncommonProcessQueryTabBody, SessionsTabBody, } from '../navigation'; -import { TableId } from '../../../../common/types'; +import { TableId } from '../../../../../common/types'; export const HostDetailsTabs = React.memo( ({ diff --git a/x-pack/plugins/security_solution/public/hosts/pages/details/helpers.test.ts b/x-pack/plugins/security_solution/public/explore/hosts/pages/details/helpers.test.ts similarity index 100% rename from x-pack/plugins/security_solution/public/hosts/pages/details/helpers.test.ts rename to x-pack/plugins/security_solution/public/explore/hosts/pages/details/helpers.test.ts diff --git a/x-pack/plugins/security_solution/public/hosts/pages/details/helpers.ts b/x-pack/plugins/security_solution/public/explore/hosts/pages/details/helpers.ts similarity index 95% rename from x-pack/plugins/security_solution/public/hosts/pages/details/helpers.ts rename to x-pack/plugins/security_solution/public/explore/hosts/pages/details/helpers.ts index 99cdba73760a0..feea9db7ef496 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/details/helpers.ts +++ b/x-pack/plugins/security_solution/public/explore/hosts/pages/details/helpers.ts @@ -6,7 +6,7 @@ */ import type { Filter } from '@kbn/es-query'; -import { escapeQueryValue } from '../../../common/lib/kuery'; +import { escapeQueryValue } from '../../../../common/lib/kuery'; /** Returns the kqlQueryExpression for the `Events` widget on the `Host Details` page */ export const getHostDetailsEventsKqlQueryExpression = ({ diff --git a/x-pack/plugins/security_solution/public/hosts/pages/details/index.tsx b/x-pack/plugins/security_solution/public/explore/hosts/pages/details/index.tsx similarity index 72% rename from x-pack/plugins/security_solution/public/hosts/pages/details/index.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/pages/details/index.tsx index 9368eb2d61570..6cdaecc7bf9f5 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/details/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/pages/details/index.tsx @@ -19,52 +19,55 @@ import { useDispatch } from 'react-redux'; import type { Filter } from '@kbn/es-query'; import { buildEsQuery } from '@kbn/es-query'; import { getEsQueryConfig } from '@kbn/data-plugin/common'; -import { TableId } from '../../../../common/types'; -import { tableDefaults } from '../../../common/store/data_table/defaults'; -import { dataTableSelectors } from '../../../common/store/data_table'; -import { AlertsByStatus } from '../../../overview/components/detection_response/alerts_by_status'; -import { useSignalIndex } from '../../../detections/containers/detection_engine/alerts/use_signal_index'; -import { useAlertsPrivileges } from '../../../detections/containers/detection_engine/alerts/use_alerts_privileges'; -import { InputsModelId } from '../../../common/store/inputs/constants'; -import type { HostItem } from '../../../../common/search_strategy'; -import { LastEventIndexKey } from '../../../../common/search_strategy'; -import { SecurityPageName } from '../../../app/types'; -import { FiltersGlobal } from '../../../common/components/filters_global'; -import { HeaderPage } from '../../../common/components/header_page'; -import { LastEventTime } from '../../../common/components/last_event_time'; -import { AnomalyTableProvider } from '../../../common/components/ml/anomaly/anomaly_table_provider'; -import { hostToCriteria } from '../../../common/components/ml/criteria/host_to_criteria'; -import { hasMlUserPermissions } from '../../../../common/machine_learning/has_ml_user_permissions'; -import { useMlCapabilities } from '../../../common/components/ml/hooks/use_ml_capabilities'; -import { scoreIntervalToDateTime } from '../../../common/components/ml/score/score_interval_to_datetime'; -import { SecuritySolutionTabNavigation } from '../../../common/components/navigation'; -import { HostOverview } from '../../../overview/components/host_overview'; -import { SiemSearchBar } from '../../../common/components/search_bar'; -import { SecuritySolutionPageWrapper } from '../../../common/components/page_wrapper'; -import { useGlobalTime } from '../../../common/containers/use_global_time'; -import { useKibana } from '../../../common/lib/kibana'; -import { inputsSelectors } from '../../../common/store'; +import { TableId } from '../../../../../common/types'; +import { tableDefaults } from '../../../../common/store/data_table/defaults'; +import { dataTableSelectors } from '../../../../common/store/data_table'; +import { AlertsByStatus } from '../../../../overview/components/detection_response/alerts_by_status'; +import { useSignalIndex } from '../../../../detections/containers/detection_engine/alerts/use_signal_index'; +import { useAlertsPrivileges } from '../../../../detections/containers/detection_engine/alerts/use_alerts_privileges'; +import { InputsModelId } from '../../../../common/store/inputs/constants'; +import type { HostItem } from '../../../../../common/search_strategy'; +import { LastEventIndexKey } from '../../../../../common/search_strategy'; +import { SecurityPageName } from '../../../../app/types'; +import { FiltersGlobal } from '../../../../common/components/filters_global'; +import { HeaderPage } from '../../../../common/components/header_page'; +import { LastEventTime } from '../../../../common/components/last_event_time'; +import { AnomalyTableProvider } from '../../../../common/components/ml/anomaly/anomaly_table_provider'; +import { hostToCriteria } from '../../../../common/components/ml/criteria/host_to_criteria'; +import { hasMlUserPermissions } from '../../../../../common/machine_learning/has_ml_user_permissions'; +import { useMlCapabilities } from '../../../../common/components/ml/hooks/use_ml_capabilities'; +import { scoreIntervalToDateTime } from '../../../../common/components/ml/score/score_interval_to_datetime'; +import { SecuritySolutionTabNavigation } from '../../../../common/components/navigation'; +import { HostOverview } from '../../../../overview/components/host_overview'; +import { SiemSearchBar } from '../../../../common/components/search_bar'; +import { SecuritySolutionPageWrapper } from '../../../../common/components/page_wrapper'; +import { useGlobalTime } from '../../../../common/containers/use_global_time'; +import { useKibana } from '../../../../common/lib/kibana'; +import { inputsSelectors } from '../../../../common/store'; import { setHostDetailsTablesActivePageToZero } from '../../store/actions'; -import { setAbsoluteRangeDatePicker } from '../../../common/store/inputs/actions'; -import { SpyRoute } from '../../../common/utils/route/spy_routes'; +import { setAbsoluteRangeDatePicker } from '../../../../common/store/inputs/actions'; +import { SpyRoute } from '../../../../common/utils/route/spy_routes'; import { HostDetailsTabs } from './details_tabs'; import { navTabsHostDetails } from './nav_tabs'; import type { HostDetailsProps } from './types'; import { type } from './utils'; import { getHostDetailsPageFilters } from './helpers'; -import { showGlobalFilters } from '../../../timelines/components/timeline/helpers'; -import { useGlobalFullScreen } from '../../../common/containers/use_full_screen'; +import { showGlobalFilters } from '../../../../timelines/components/timeline/helpers'; +import { useGlobalFullScreen } from '../../../../common/containers/use_full_screen'; import { Display } from '../display'; -import { useDeepEqualSelector, useShallowEqualSelector } from '../../../common/hooks/use_selector'; +import { + useDeepEqualSelector, + useShallowEqualSelector, +} from '../../../../common/hooks/use_selector'; import { ID, useHostDetails } from '../../containers/hosts/details'; -import { manageQuery } from '../../../common/components/page/manage_query'; -import { useInvalidFilterQuery } from '../../../common/hooks/use_invalid_filter_query'; -import { useSourcererDataView } from '../../../common/containers/sourcerer'; -import { LandingPageComponent } from '../../../common/components/landing_page'; -import { AlertCountByRuleByStatus } from '../../../common/components/alert_count_by_status'; -import { useLicense } from '../../../common/hooks/use_license'; -import { ResponderActionButton } from '../../../detections/components/endpoint_responder/responder_action_button'; +import { manageQuery } from '../../../../common/components/page/manage_query'; +import { useInvalidFilterQuery } from '../../../../common/hooks/use_invalid_filter_query'; +import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { LandingPageComponent } from '../../../../common/components/landing_page'; +import { AlertCountByRuleByStatus } from '../../../../common/components/alert_count_by_status'; +import { useLicense } from '../../../../common/hooks/use_license'; +import { ResponderActionButton } from '../../../../detections/components/endpoint_responder/responder_action_button'; const ES_HOST_FIELD = 'host.hostname'; const HostOverviewManage = manageQuery(HostOverview); diff --git a/x-pack/plugins/security_solution/public/hosts/pages/details/nav_tabs.test.tsx b/x-pack/plugins/security_solution/public/explore/hosts/pages/details/nav_tabs.test.tsx similarity index 96% rename from x-pack/plugins/security_solution/public/hosts/pages/details/nav_tabs.test.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/pages/details/nav_tabs.test.tsx index da6871e1986a8..5e4d70e420147 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/details/nav_tabs.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/pages/details/nav_tabs.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import type { TabNavigationItemProps } from '../../../common/components/navigation/tab_navigation/types'; +import type { TabNavigationItemProps } from '../../../../common/components/navigation/tab_navigation/types'; import { HostsTableType } from '../../store/model'; import { navTabsHostDetails } from './nav_tabs'; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/details/nav_tabs.tsx b/x-pack/plugins/security_solution/public/explore/hosts/pages/details/nav_tabs.tsx similarity index 94% rename from x-pack/plugins/security_solution/public/hosts/pages/details/nav_tabs.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/pages/details/nav_tabs.tsx index 3ca8a14640500..ddb6bf53c7ea2 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/details/nav_tabs.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/pages/details/nav_tabs.tsx @@ -9,8 +9,8 @@ import { omit } from 'lodash/fp'; import * as i18n from '../translations'; import type { HostDetailsNavTab } from './types'; import { HostsTableType } from '../../store/model'; -import { HOSTS_PATH } from '../../../../common/constants'; -import { TECHNICAL_PREVIEW } from '../../../overview/pages/translations'; +import { HOSTS_PATH } from '../../../../../common/constants'; +import { TECHNICAL_PREVIEW } from '../../../../overview/pages/translations'; const getTabsOnHostDetailsUrl = (hostName: string, tabName: HostsTableType) => `${HOSTS_PATH}/name/${hostName}/${tabName}`; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/details/types.ts b/x-pack/plugins/security_solution/public/explore/hosts/pages/details/types.ts similarity index 94% rename from x-pack/plugins/security_solution/public/hosts/pages/details/types.ts rename to x-pack/plugins/security_solution/public/explore/hosts/pages/details/types.ts index 67129bb9fe430..dc5b3baccdc5c 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/details/types.ts +++ b/x-pack/plugins/security_solution/public/explore/hosts/pages/details/types.ts @@ -8,7 +8,7 @@ import type { DataViewBase, Filter } from '@kbn/es-query'; import type { HostsTableType } from '../../store/model'; import type { HostsQueryProps } from '../types'; -import type { NavTab } from '../../../common/components/navigation/types'; +import type { NavTab } from '../../../../common/components/navigation/types'; import type { KeyHostsNavTabWithoutMlPermission } from '../navigation/types'; import type { hostsModel } from '../../store'; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/details/utils.ts b/x-pack/plugins/security_solution/public/explore/hosts/pages/details/utils.ts similarity index 85% rename from x-pack/plugins/security_solution/public/hosts/pages/details/utils.ts rename to x-pack/plugins/security_solution/public/explore/hosts/pages/details/utils.ts index 631905cbadb44..634f4e3889cb6 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/details/utils.ts +++ b/x-pack/plugins/security_solution/public/explore/hosts/pages/details/utils.ts @@ -10,12 +10,12 @@ import { get } from 'lodash/fp'; import type { ChromeBreadcrumb } from '@kbn/core/public'; import { hostsModel } from '../../store'; import { HostsTableType } from '../../store/model'; -import { getHostDetailsUrl } from '../../../common/components/link_to/redirect_to_hosts'; +import { getHostDetailsUrl } from '../../../../common/components/link_to/redirect_to_hosts'; import * as i18n from '../translations'; -import type { HostRouteSpyState } from '../../../common/utils/route/types'; -import { SecurityPageName } from '../../../app/types'; -import type { GetSecuritySolutionUrl } from '../../../common/components/link_to'; +import type { HostRouteSpyState } from '../../../../common/utils/route/types'; +import { SecurityPageName } from '../../../../app/types'; +import type { GetSecuritySolutionUrl } from '../../../../common/components/link_to'; export const type = hostsModel.HostsType.details; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/display.tsx b/x-pack/plugins/security_solution/public/explore/hosts/pages/display.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/hosts/pages/display.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/pages/display.tsx diff --git a/x-pack/plugins/security_solution/public/hosts/pages/hosts.test.tsx b/x-pack/plugins/security_solution/public/explore/hosts/pages/hosts.test.tsx similarity index 83% rename from x-pack/plugins/security_solution/public/hosts/pages/hosts.test.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/pages/hosts.test.tsx index 7a189b6dd4e64..58d26206a887c 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/hosts.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/pages/hosts.test.tsx @@ -10,44 +10,44 @@ import React from 'react'; import { Router } from 'react-router-dom'; import type { Filter } from '@kbn/es-query'; -import '../../common/mock/match_media'; +import '../../../common/mock/match_media'; import { TestProviders, mockGlobalState, SUB_PLUGINS_REDUCER, kibanaObservable, createSecuritySolutionStorageMock, -} from '../../common/mock'; -import { SecuritySolutionTabNavigation } from '../../common/components/navigation'; -import { inputsActions } from '../../common/store/inputs'; -import type { State } from '../../common/store'; -import { createStore } from '../../common/store'; +} from '../../../common/mock'; +import { SecuritySolutionTabNavigation } from '../../../common/components/navigation'; +import { inputsActions } from '../../../common/store/inputs'; +import type { State } from '../../../common/store'; +import { createStore } from '../../../common/store'; import { Hosts } from './hosts'; import { HostsTabs } from './hosts_tabs'; -import { useSourcererDataView } from '../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../common/containers/sourcerer'; import { mockCasesContract } from '@kbn/cases-plugin/public/mocks'; -import { LandingPageComponent } from '../../common/components/landing_page'; -import { InputsModelId } from '../../common/store/inputs/constants'; +import { LandingPageComponent } from '../../../common/components/landing_page'; +import { InputsModelId } from '../../../common/store/inputs/constants'; -jest.mock('../../common/containers/sourcerer'); +jest.mock('../../../common/containers/sourcerer'); // Test will fail because we will to need to mock some core services to make the test work // For now let's forget about SiemSearchBar and QueryBar -jest.mock('../../common/components/search_bar', () => ({ +jest.mock('../../../common/components/search_bar', () => ({ SiemSearchBar: () => null, })); -jest.mock('../../common/components/query_bar', () => ({ +jest.mock('../../../common/components/query_bar', () => ({ QueryBar: () => null, })); -jest.mock('../../common/components/visualization_actions', () => ({ +jest.mock('../../../common/components/visualization_actions', () => ({ VisualizationActions: jest.fn(() =>
), })); -jest.mock('../../common/components/visualization_actions/lens_embeddable', () => ({ +jest.mock('../../../common/components/visualization_actions/lens_embeddable', () => ({ LensEmbeddable: jest.fn(() =>
), })); const mockNavigateToApp = jest.fn(); -jest.mock('../../common/lib/kibana', () => { - const original = jest.requireActual('../../common/lib/kibana'); +jest.mock('../../../common/lib/kibana', () => { + const original = jest.requireActual('../../../common/lib/kibana'); return { ...original, diff --git a/x-pack/plugins/security_solution/public/hosts/pages/hosts.tsx b/x-pack/plugins/security_solution/public/explore/hosts/pages/hosts.tsx similarity index 76% rename from x-pack/plugins/security_solution/public/hosts/pages/hosts.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/pages/hosts.tsx index cd4d838a1a52f..9ed292bfe344f 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/hosts.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/pages/hosts.tsx @@ -14,29 +14,29 @@ import { useParams } from 'react-router-dom'; import type { Filter } from '@kbn/es-query'; import { isTab } from '@kbn/timelines-plugin/public'; import { getEsQueryConfig } from '@kbn/data-plugin/common'; -import { TableId } from '../../../common/types'; -import { InputsModelId } from '../../common/store/inputs/constants'; -import { SecurityPageName } from '../../app/types'; -import type { UpdateDateRange } from '../../common/components/charts/common'; -import { FiltersGlobal } from '../../common/components/filters_global'; -import { HeaderPage } from '../../common/components/header_page'; -import { LastEventTime } from '../../common/components/last_event_time'; -import { hasMlUserPermissions } from '../../../common/machine_learning/has_ml_user_permissions'; -import { SecuritySolutionTabNavigation } from '../../common/components/navigation'; +import { TableId } from '../../../../common/types'; +import { InputsModelId } from '../../../common/store/inputs/constants'; +import { SecurityPageName } from '../../../app/types'; +import type { UpdateDateRange } from '../../../common/components/charts/common'; +import { FiltersGlobal } from '../../../common/components/filters_global'; +import { HeaderPage } from '../../../common/components/header_page'; +import { LastEventTime } from '../../../common/components/last_event_time'; +import { hasMlUserPermissions } from '../../../../common/machine_learning/has_ml_user_permissions'; +import { SecuritySolutionTabNavigation } from '../../../common/components/navigation'; import { HostsKpiComponent } from '../components/kpi_hosts'; -import { SiemSearchBar } from '../../common/components/search_bar'; -import { SecuritySolutionPageWrapper } from '../../common/components/page_wrapper'; -import { useGlobalFullScreen } from '../../common/containers/use_full_screen'; -import { useGlobalTime } from '../../common/containers/use_global_time'; -import { LastEventIndexKey, RiskScoreEntity } from '../../../common/search_strategy'; -import { useKibana } from '../../common/lib/kibana'; -import { convertToBuildEsQuery } from '../../common/lib/kuery'; -import type { State } from '../../common/store'; -import { inputsSelectors } from '../../common/store'; -import { setAbsoluteRangeDatePicker } from '../../common/store/inputs/actions'; - -import { SpyRoute } from '../../common/utils/route/spy_routes'; -import { useMlCapabilities } from '../../common/components/ml/hooks/use_ml_capabilities'; +import { SiemSearchBar } from '../../../common/components/search_bar'; +import { SecuritySolutionPageWrapper } from '../../../common/components/page_wrapper'; +import { useGlobalFullScreen } from '../../../common/containers/use_full_screen'; +import { useGlobalTime } from '../../../common/containers/use_global_time'; +import { LastEventIndexKey, RiskScoreEntity } from '../../../../common/search_strategy'; +import { useKibana } from '../../../common/lib/kibana'; +import { convertToBuildEsQuery } from '../../../common/lib/kuery'; +import type { State } from '../../../common/store'; +import { inputsSelectors } from '../../../common/store'; +import { setAbsoluteRangeDatePicker } from '../../../common/store/inputs/actions'; + +import { SpyRoute } from '../../../common/utils/route/spy_routes'; +import { useMlCapabilities } from '../../../common/components/ml/hooks/use_ml_capabilities'; import { Display } from './display'; import { HostsTabs } from './hosts_tabs'; import { navTabsHosts } from './nav_tabs'; @@ -48,16 +48,16 @@ import { onTimelineTabKeyPressed, resetKeyboardFocus, showGlobalFilters, -} from '../../timelines/components/timeline/helpers'; -import { useSourcererDataView } from '../../common/containers/sourcerer'; -import { useDeepEqualSelector, useShallowEqualSelector } from '../../common/hooks/use_selector'; -import { useInvalidFilterQuery } from '../../common/hooks/use_invalid_filter_query'; +} from '../../../timelines/components/timeline/helpers'; +import { useSourcererDataView } from '../../../common/containers/sourcerer'; +import { useDeepEqualSelector, useShallowEqualSelector } from '../../../common/hooks/use_selector'; +import { useInvalidFilterQuery } from '../../../common/hooks/use_invalid_filter_query'; import { ID } from '../containers/hosts'; -import { LandingPageComponent } from '../../common/components/landing_page'; -import { hostNameExistsFilter } from '../../common/components/visualization_actions/utils'; -import { dataTableSelectors } from '../../common/store/data_table'; -import { useLicense } from '../../common/hooks/use_license'; -import { tableDefaults } from '../../common/store/data_table/defaults'; +import { LandingPageComponent } from '../../../common/components/landing_page'; +import { hostNameExistsFilter } from '../../../common/components/visualization_actions/utils'; +import { dataTableSelectors } from '../../../common/store/data_table'; +import { useLicense } from '../../../common/hooks/use_license'; +import { tableDefaults } from '../../../common/store/data_table/defaults'; /** * Need a 100% height here to account for the graph/analyze tool, which sets no explicit height parameters, but fills the available space. diff --git a/x-pack/plugins/security_solution/public/hosts/pages/hosts_tabs.tsx b/x-pack/plugins/security_solution/public/explore/hosts/pages/hosts_tabs.tsx similarity index 81% rename from x-pack/plugins/security_solution/public/hosts/pages/hosts_tabs.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/pages/hosts_tabs.tsx index 18fd5628d2ebc..5deb95d06551e 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/hosts_tabs.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/pages/hosts_tabs.tsx @@ -11,10 +11,10 @@ import { Route } from '@kbn/kibana-react-plugin/public'; import type { HostsTabsProps } from './types'; import { HostsTableType } from '../store/model'; -import { AnomaliesQueryTabBody } from '../../common/containers/anomalies/anomalies_query_tab_body'; -import { AnomaliesHostTable } from '../../common/components/ml/tables/anomalies_host_table'; -import { EventsQueryTabBody } from '../../common/components/events_tab'; -import { HOSTS_PATH } from '../../../common/constants'; +import { AnomaliesQueryTabBody } from '../../../common/containers/anomalies/anomalies_query_tab_body'; +import { AnomaliesHostTable } from '../../../common/components/ml/tables/anomalies_host_table'; +import { EventsQueryTabBody } from '../../../common/components/events_tab'; +import { HOSTS_PATH } from '../../../../common/constants'; import { HostsQueryTabBody, @@ -22,8 +22,8 @@ import { UncommonProcessQueryTabBody, SessionsTabBody, } from './navigation'; -import { TableId } from '../../../common/types'; -import { hostNameExistsFilter } from '../../common/components/visualization_actions/utils'; +import { TableId } from '../../../../common/types'; +import { hostNameExistsFilter } from '../../../common/components/visualization_actions/utils'; export const HostsTabs = React.memo( ({ deleteQuery, filterQuery, from, indexNames, isInitializing, setQuery, to, type }) => { diff --git a/x-pack/plugins/security_solution/public/hosts/pages/index.tsx b/x-pack/plugins/security_solution/public/explore/hosts/pages/index.tsx similarity index 94% rename from x-pack/plugins/security_solution/public/hosts/pages/index.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/pages/index.tsx index dffb800c213a7..3179f03032ead 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/pages/index.tsx @@ -8,11 +8,11 @@ import React from 'react'; import { Switch, Redirect } from 'react-router-dom'; import { Route } from '@kbn/kibana-react-plugin/public'; -import { HOSTS_PATH } from '../../../common/constants'; +import { HOSTS_PATH } from '../../../../common/constants'; import { HostDetails } from './details'; import { HostsTableType } from '../store/model'; -import { MlHostConditionalContainer } from '../../common/components/ml/conditional_links/ml_host_conditional_container'; +import { MlHostConditionalContainer } from '../../../common/components/ml/conditional_links/ml_host_conditional_container'; import { Hosts } from './hosts'; import { hostDetailsPagePath } from './types'; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/nav_tabs.test.tsx b/x-pack/plugins/security_solution/public/explore/hosts/pages/nav_tabs.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/hosts/pages/nav_tabs.test.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/pages/nav_tabs.test.tsx diff --git a/x-pack/plugins/security_solution/public/hosts/pages/nav_tabs.tsx b/x-pack/plugins/security_solution/public/explore/hosts/pages/nav_tabs.tsx similarity index 94% rename from x-pack/plugins/security_solution/public/hosts/pages/nav_tabs.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/pages/nav_tabs.tsx index e278166ab4dbf..7752eb188f3bb 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/nav_tabs.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/pages/nav_tabs.tsx @@ -9,8 +9,8 @@ import { omit } from 'lodash/fp'; import * as i18n from './translations'; import { HostsTableType } from '../store/model'; import type { HostsNavTab } from './navigation/types'; -import { HOSTS_PATH } from '../../../common/constants'; -import { TECHNICAL_PREVIEW } from '../../overview/pages/translations'; +import { HOSTS_PATH } from '../../../../common/constants'; +import { TECHNICAL_PREVIEW } from '../../../overview/pages/translations'; const getTabsOnHostsUrl = (tabName: HostsTableType) => `${HOSTS_PATH}/${tabName}`; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/navigation/authentications_query_tab_body.tsx b/x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/authentications_query_tab_body.tsx similarity index 83% rename from x-pack/plugins/security_solution/public/hosts/pages/navigation/authentications_query_tab_body.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/authentications_query_tab_body.tsx index 32875830909d9..2df170cd65b15 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/navigation/authentications_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/authentications_query_tab_body.tsx @@ -7,9 +7,9 @@ import React from 'react'; import type { HostsComponentsQueryProps } from './types'; -import { MatrixHistogram } from '../../../common/components/matrix_histogram'; -import { AuthenticationsHostTable } from '../../../common/components/authentication/authentications_host_table'; -import { histogramConfigs } from '../../../common/components/authentication/helpers'; +import { MatrixHistogram } from '../../../../common/components/matrix_histogram'; +import { AuthenticationsHostTable } from '../../../components/authentication/authentications_host_table'; +import { histogramConfigs } from '../../../components/authentication/helpers'; const HISTOGRAM_QUERY_ID = 'authenticationsHistogramQuery'; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/navigation/host_risk_score_tab_body.test.tsx b/x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/host_risk_score_tab_body.test.tsx similarity index 86% rename from x-pack/plugins/security_solution/public/hosts/pages/navigation/host_risk_score_tab_body.test.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/host_risk_score_tab_body.test.tsx index 134c8674a4a8f..0ea63088628bf 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/navigation/host_risk_score_tab_body.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/host_risk_score_tab_body.test.tsx @@ -7,15 +7,15 @@ import React from 'react'; import { render } from '@testing-library/react'; -import { TestProviders } from '../../../common/mock'; -import { useRiskScore, useRiskScoreKpi } from '../../../risk_score/containers'; -import { useQueryToggle } from '../../../common/containers/query_toggle'; +import { TestProviders } from '../../../../common/mock'; +import { useRiskScore, useRiskScoreKpi } from '../../../containers/risk_score'; +import { useQueryToggle } from '../../../../common/containers/query_toggle'; import { HostRiskScoreQueryTabBody } from './host_risk_score_tab_body'; import { HostsType } from '../../store/model'; -jest.mock('../../../risk_score/containers'); -jest.mock('../../../common/containers/query_toggle'); -jest.mock('../../../common/lib/kibana'); +jest.mock('../../../containers/risk_score'); +jest.mock('../../../../common/containers/query_toggle'); +jest.mock('../../../../common/lib/kibana'); describe('Host risk score query tab body', () => { const mockUseRiskScore = useRiskScore as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/navigation/host_risk_score_tab_body.tsx b/x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/host_risk_score_tab_body.tsx similarity index 86% rename from x-pack/plugins/security_solution/public/hosts/pages/navigation/host_risk_score_tab_body.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/host_risk_score_tab_body.tsx index c027d48aece26..8f000f53a35c3 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/navigation/host_risk_score_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/host_risk_score_tab_body.tsx @@ -7,21 +7,21 @@ import React, { useEffect, useMemo, useState } from 'react'; import { noop } from 'lodash/fp'; -import { EnableRiskScore } from '../../../risk_score/components/enable_risk_score'; +import { EnableRiskScore } from '../../../components/risk_score/enable_risk_score'; import type { HostsComponentsQueryProps } from './types'; -import { manageQuery } from '../../../common/components/page/manage_query'; +import { manageQuery } from '../../../../common/components/page/manage_query'; import { HostRiskScoreTable } from '../../components/host_risk_score_table'; -import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; +import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; import { hostsModel, hostsSelectors } from '../../store'; -import type { State } from '../../../common/store'; +import type { State } from '../../../../common/store'; import { HostRiskScoreQueryId, useRiskScore, useRiskScoreKpi, -} from '../../../risk_score/containers'; -import { useQueryToggle } from '../../../common/containers/query_toggle'; -import { EMPTY_SEVERITY_COUNT, RiskScoreEntity } from '../../../../common/search_strategy'; -import { RiskScoresNoDataDetected } from '../../../risk_score/components/risk_score_onboarding/risk_score_no_data_detected'; +} from '../../../containers/risk_score'; +import { useQueryToggle } from '../../../../common/containers/query_toggle'; +import { EMPTY_SEVERITY_COUNT, RiskScoreEntity } from '../../../../../common/search_strategy'; +import { RiskScoresNoDataDetected } from '../../../components/risk_score/risk_score_onboarding/risk_score_no_data_detected'; const HostRiskScoreTableManage = manageQuery(HostRiskScoreTable); diff --git a/x-pack/plugins/security_solution/public/hosts/pages/navigation/hosts_query_tab_body.test.tsx b/x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/hosts_query_tab_body.test.tsx similarity index 89% rename from x-pack/plugins/security_solution/public/hosts/pages/navigation/hosts_query_tab_body.test.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/hosts_query_tab_body.test.tsx index 487934f30e8d6..3778292359d64 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/navigation/hosts_query_tab_body.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/hosts_query_tab_body.test.tsx @@ -7,15 +7,15 @@ import React from 'react'; import { render } from '@testing-library/react'; -import { TestProviders } from '../../../common/mock'; +import { TestProviders } from '../../../../common/mock'; import { useAllHost } from '../../containers/hosts'; -import { useQueryToggle } from '../../../common/containers/query_toggle'; +import { useQueryToggle } from '../../../../common/containers/query_toggle'; import { HostsQueryTabBody } from './hosts_query_tab_body'; import { HostsType } from '../../store/model'; jest.mock('../../containers/hosts'); -jest.mock('../../../common/containers/query_toggle'); -jest.mock('../../../common/lib/kibana'); +jest.mock('../../../../common/containers/query_toggle'); +jest.mock('../../../../common/lib/kibana'); describe('Hosts query tab body', () => { const mockUseAllHost = useAllHost as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/navigation/hosts_query_tab_body.tsx b/x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/hosts_query_tab_body.tsx similarity index 91% rename from x-pack/plugins/security_solution/public/hosts/pages/navigation/hosts_query_tab_body.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/hosts_query_tab_body.tsx index 4af707a96f008..7290ce5a98d0b 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/navigation/hosts_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/hosts_query_tab_body.tsx @@ -10,8 +10,8 @@ import React, { useEffect, useState } from 'react'; import { useAllHost, ID } from '../../containers/hosts'; import type { HostsComponentsQueryProps } from './types'; import { HostsTable } from '../../components/hosts_table'; -import { manageQuery } from '../../../common/components/page/manage_query'; -import { useQueryToggle } from '../../../common/containers/query_toggle'; +import { manageQuery } from '../../../../common/components/page/manage_query'; +import { useQueryToggle } from '../../../../common/containers/query_toggle'; const HostsTableManage = manageQuery(HostsTable); diff --git a/x-pack/plugins/security_solution/public/hosts/pages/navigation/index.ts b/x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/index.ts similarity index 100% rename from x-pack/plugins/security_solution/public/hosts/pages/navigation/index.ts rename to x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/index.ts diff --git a/x-pack/plugins/security_solution/public/hosts/pages/navigation/sessions_tab_body.tsx b/x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/sessions_tab_body.tsx similarity index 76% rename from x-pack/plugins/security_solution/public/hosts/pages/navigation/sessions_tab_body.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/sessions_tab_body.tsx index 5f996ffd70333..647ac95148b98 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/navigation/sessions_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/sessions_tab_body.tsx @@ -6,10 +6,10 @@ */ import React, { useMemo } from 'react'; -import { TableId } from '../../../../common/types'; -import { SessionsView } from '../../../common/components/sessions_viewer'; -import { hostNameExistsFilter } from '../../../common/components/visualization_actions/utils'; -import { useLicense } from '../../../common/hooks/use_license'; +import { TableId } from '../../../../../common/types'; +import { SessionsView } from '../../../../common/components/sessions_viewer'; +import { hostNameExistsFilter } from '../../../../common/components/visualization_actions/utils'; +import { useLicense } from '../../../../common/hooks/use_license'; import type { AlertsComponentQueryProps } from './types'; export const SessionsTabBody = React.memo((alertsProps: AlertsComponentQueryProps) => { diff --git a/x-pack/plugins/security_solution/public/hosts/pages/navigation/types.ts b/x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/types.ts similarity index 84% rename from x-pack/plugins/security_solution/public/hosts/pages/navigation/types.ts rename to x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/types.ts index 7128ab76e412a..df302e8885797 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/navigation/types.ts +++ b/x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/types.ts @@ -6,11 +6,11 @@ */ import type { Filter } from '@kbn/es-query'; -import type { ESTermQuery } from '../../../../common/typed_json'; +import type { ESTermQuery } from '../../../../../common/typed_json'; -import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; +import type { GlobalTimeArgs } from '../../../../common/containers/use_global_time'; import type { HostsTableType, HostsType } from '../../store/model'; -import type { NavTab } from '../../../common/components/navigation/types'; +import type { NavTab } from '../../../../common/components/navigation/types'; export type KeyHostsNavTabWithoutMlPermission = HostsTableType.hosts & HostsTableType.authentications & diff --git a/x-pack/plugins/security_solution/public/hosts/pages/navigation/uncommon_process_query_tab_body.test.tsx b/x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/uncommon_process_query_tab_body.test.tsx similarity index 89% rename from x-pack/plugins/security_solution/public/hosts/pages/navigation/uncommon_process_query_tab_body.test.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/uncommon_process_query_tab_body.test.tsx index 7274cf651b5b6..da09ba92f29fc 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/navigation/uncommon_process_query_tab_body.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/uncommon_process_query_tab_body.test.tsx @@ -7,15 +7,15 @@ import React from 'react'; import { render } from '@testing-library/react'; -import { TestProviders } from '../../../common/mock'; +import { TestProviders } from '../../../../common/mock'; import { useUncommonProcesses } from '../../containers/uncommon_processes'; -import { useQueryToggle } from '../../../common/containers/query_toggle'; +import { useQueryToggle } from '../../../../common/containers/query_toggle'; import { UncommonProcessQueryTabBody } from './uncommon_process_query_tab_body'; import { HostsType } from '../../store/model'; jest.mock('../../containers/uncommon_processes'); -jest.mock('../../../common/containers/query_toggle'); -jest.mock('../../../common/lib/kibana'); +jest.mock('../../../../common/containers/query_toggle'); +jest.mock('../../../../common/lib/kibana'); describe('Uncommon process query tab body', () => { const mockUseUncommonProcesses = useUncommonProcesses as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/navigation/uncommon_process_query_tab_body.tsx b/x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/uncommon_process_query_tab_body.tsx similarity index 92% rename from x-pack/plugins/security_solution/public/hosts/pages/navigation/uncommon_process_query_tab_body.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/uncommon_process_query_tab_body.tsx index 5ede0f08383ec..1a3e7f31a03fc 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/navigation/uncommon_process_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/pages/navigation/uncommon_process_query_tab_body.tsx @@ -10,8 +10,8 @@ import React, { useEffect, useState } from 'react'; import { useUncommonProcesses, ID } from '../../containers/uncommon_processes'; import type { HostsComponentsQueryProps } from './types'; import { UncommonProcessTable } from '../../components/uncommon_process_table'; -import { manageQuery } from '../../../common/components/page/manage_query'; -import { useQueryToggle } from '../../../common/containers/query_toggle'; +import { manageQuery } from '../../../../common/components/page/manage_query'; +import { useQueryToggle } from '../../../../common/containers/query_toggle'; const UncommonProcessTableManage = manageQuery(UncommonProcessTable); diff --git a/x-pack/plugins/security_solution/public/hosts/pages/translations.ts b/x-pack/plugins/security_solution/public/explore/hosts/pages/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/hosts/pages/translations.ts rename to x-pack/plugins/security_solution/public/explore/hosts/pages/translations.ts diff --git a/x-pack/plugins/security_solution/public/hosts/pages/types.ts b/x-pack/plugins/security_solution/public/explore/hosts/pages/types.ts similarity index 79% rename from x-pack/plugins/security_solution/public/hosts/pages/types.ts rename to x-pack/plugins/security_solution/public/explore/hosts/pages/types.ts index e04e61ddeac90..75ccdcbb55afe 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/types.ts +++ b/x-pack/plugins/security_solution/public/explore/hosts/pages/types.ts @@ -6,8 +6,8 @@ */ import type { hostsModel } from '../store'; -import type { GlobalTimeArgs } from '../../common/containers/use_global_time'; -import { HOSTS_PATH } from '../../../common/constants'; +import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; +import { HOSTS_PATH } from '../../../../common/constants'; export const hostDetailsPagePath = `${HOSTS_PATH}/name/:detailName`; diff --git a/x-pack/plugins/security_solution/public/hosts/routes.tsx b/x-pack/plugins/security_solution/public/explore/hosts/routes.tsx similarity index 73% rename from x-pack/plugins/security_solution/public/hosts/routes.tsx rename to x-pack/plugins/security_solution/public/explore/hosts/routes.tsx index fbc757ba39f61..e062a4743be57 100644 --- a/x-pack/plugins/security_solution/public/hosts/routes.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/routes.tsx @@ -8,10 +8,10 @@ import React from 'react'; import { TrackApplicationView } from '@kbn/usage-collection-plugin/public'; import { HostsContainer } from './pages'; -import type { SecuritySubPluginRoutes } from '../app/types'; -import { SecurityPageName } from '../app/types'; -import { HOSTS_PATH } from '../../common/constants'; -import { PluginTemplateWrapper } from '../common/components/plugin_template_wrapper'; +import type { SecuritySubPluginRoutes } from '../../app/types'; +import { SecurityPageName } from '../../app/types'; +import { HOSTS_PATH } from '../../../common/constants'; +import { PluginTemplateWrapper } from '../../common/components/plugin_template_wrapper'; export const HostsRoutes = () => ( diff --git a/x-pack/plugins/security_solution/public/hosts/store/actions.ts b/x-pack/plugins/security_solution/public/explore/hosts/store/actions.ts similarity index 93% rename from x-pack/plugins/security_solution/public/hosts/store/actions.ts rename to x-pack/plugins/security_solution/public/explore/hosts/store/actions.ts index ed5f29342e827..8516a2c72d31b 100644 --- a/x-pack/plugins/security_solution/public/hosts/store/actions.ts +++ b/x-pack/plugins/security_solution/public/explore/hosts/store/actions.ts @@ -6,8 +6,8 @@ */ import actionCreatorFactory from 'typescript-fsa'; -import type { RiskScoreSortField, RiskSeverity } from '../../../common/search_strategy'; -import type { HostsSortField } from '../../../common/search_strategy/security_solution/hosts'; +import type { RiskScoreSortField, RiskSeverity } from '../../../../common/search_strategy'; +import type { HostsSortField } from '../../../../common/search_strategy/security_solution/hosts'; import type { HostsTableType, HostsType } from './model'; const actionCreator = actionCreatorFactory('x-pack/security_solution/local/hosts'); diff --git a/x-pack/plugins/security_solution/public/hosts/store/helpers.test.ts b/x-pack/plugins/security_solution/public/explore/hosts/store/helpers.test.ts similarity index 98% rename from x-pack/plugins/security_solution/public/hosts/store/helpers.test.ts rename to x-pack/plugins/security_solution/public/explore/hosts/store/helpers.test.ts index daaa2e54ca300..2c85317a0f4fc 100644 --- a/x-pack/plugins/security_solution/public/hosts/store/helpers.test.ts +++ b/x-pack/plugins/security_solution/public/explore/hosts/store/helpers.test.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { DEFAULT_TABLE_ACTIVE_PAGE, DEFAULT_TABLE_LIMIT } from '../../common/store/constants'; +import { DEFAULT_TABLE_ACTIVE_PAGE, DEFAULT_TABLE_LIMIT } from '../../../common/store/constants'; import type { HostsModel } from './model'; import { HostsTableType, HostsType } from './model'; import { setHostsQueriesActivePageToZero } from './helpers'; -import { Direction, HostsFields, RiskScoreFields } from '../../../common/search_strategy'; +import { Direction, HostsFields, RiskScoreFields } from '../../../../common/search_strategy'; export const mockHostsState: HostsModel = { page: { diff --git a/x-pack/plugins/security_solution/public/hosts/store/helpers.ts b/x-pack/plugins/security_solution/public/explore/hosts/store/helpers.ts similarity index 92% rename from x-pack/plugins/security_solution/public/hosts/store/helpers.ts rename to x-pack/plugins/security_solution/public/explore/hosts/store/helpers.ts index eaf1bb5d7c5aa..be51dcd3668e4 100644 --- a/x-pack/plugins/security_solution/public/hosts/store/helpers.ts +++ b/x-pack/plugins/security_solution/public/explore/hosts/store/helpers.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { RiskScoreEntity, RiskScoreFields } from '../../../common/search_strategy'; -import type { RiskSeverity } from '../../../common/search_strategy'; -import { DEFAULT_TABLE_ACTIVE_PAGE } from '../../common/store/constants'; +import { RiskScoreEntity, RiskScoreFields } from '../../../../common/search_strategy'; +import type { RiskSeverity } from '../../../../common/search_strategy'; +import { DEFAULT_TABLE_ACTIVE_PAGE } from '../../../common/store/constants'; import type { HostsModel, Queries } from './model'; import { HostsTableType, HostsType } from './model'; diff --git a/x-pack/plugins/security_solution/public/hosts/store/index.ts b/x-pack/plugins/security_solution/public/explore/hosts/store/index.ts similarity index 100% rename from x-pack/plugins/security_solution/public/hosts/store/index.ts rename to x-pack/plugins/security_solution/public/explore/hosts/store/index.ts diff --git a/x-pack/plugins/security_solution/public/hosts/store/model.ts b/x-pack/plugins/security_solution/public/explore/hosts/store/model.ts similarity index 92% rename from x-pack/plugins/security_solution/public/hosts/store/model.ts rename to x-pack/plugins/security_solution/public/explore/hosts/store/model.ts index 07c6803f77e2f..d0b05ef57ae8d 100644 --- a/x-pack/plugins/security_solution/public/hosts/store/model.ts +++ b/x-pack/plugins/security_solution/public/explore/hosts/store/model.ts @@ -5,12 +5,12 @@ * 2.0. */ -import type { Direction } from '../../../common/search_strategy'; +import type { Direction } from '../../../../common/search_strategy'; import type { HostsFields, RiskScoreSortField, RiskSeverity, -} from '../../../common/search_strategy/security_solution'; +} from '../../../../common/search_strategy/security_solution'; export enum HostsType { page = 'page', diff --git a/x-pack/plugins/security_solution/public/hosts/store/reducer.ts b/x-pack/plugins/security_solution/public/explore/hosts/store/reducer.ts similarity index 99% rename from x-pack/plugins/security_solution/public/hosts/store/reducer.ts rename to x-pack/plugins/security_solution/public/explore/hosts/store/reducer.ts index f549b07b3850b..7208f331b1263 100644 --- a/x-pack/plugins/security_solution/public/hosts/store/reducer.ts +++ b/x-pack/plugins/security_solution/public/explore/hosts/store/reducer.ts @@ -6,9 +6,9 @@ */ import { reducerWithInitialState } from 'typescript-fsa-reducers'; -import { Direction, HostsFields, RiskScoreFields } from '../../../common/search_strategy'; +import { Direction, HostsFields, RiskScoreFields } from '../../../../common/search_strategy'; -import { DEFAULT_TABLE_ACTIVE_PAGE, DEFAULT_TABLE_LIMIT } from '../../common/store/constants'; +import { DEFAULT_TABLE_ACTIVE_PAGE, DEFAULT_TABLE_LIMIT } from '../../../common/store/constants'; import { setHostDetailsTablesActivePageToZero, diff --git a/x-pack/plugins/security_solution/public/hosts/store/selectors.ts b/x-pack/plugins/security_solution/public/explore/hosts/store/selectors.ts similarity index 96% rename from x-pack/plugins/security_solution/public/hosts/store/selectors.ts rename to x-pack/plugins/security_solution/public/explore/hosts/store/selectors.ts index 72b039df120c6..285a53e9e5624 100644 --- a/x-pack/plugins/security_solution/public/hosts/store/selectors.ts +++ b/x-pack/plugins/security_solution/public/explore/hosts/store/selectors.ts @@ -8,7 +8,7 @@ import { get } from 'lodash/fp'; import { createSelector } from 'reselect'; -import type { State } from '../../common/store/types'; +import type { State } from '../../../common/store/types'; import type { GenericHostsModel, HostsType } from './model'; import { HostsTableType } from './model'; diff --git a/x-pack/plugins/security_solution/public/hosts/jest.config.js b/x-pack/plugins/security_solution/public/explore/jest.config.js similarity index 88% rename from x-pack/plugins/security_solution/public/hosts/jest.config.js rename to x-pack/plugins/security_solution/public/explore/jest.config.js index d8354b47c3cbe..20f7bfc74c310 100644 --- a/x-pack/plugins/security_solution/public/hosts/jest.config.js +++ b/x-pack/plugins/security_solution/public/explore/jest.config.js @@ -8,11 +8,11 @@ module.exports = { preset: '@kbn/test', rootDir: '../../../../..', - roots: ['/x-pack/plugins/security_solution/public/hosts'], + roots: ['/x-pack/plugins/security_solution/public/explore'], coverageDirectory: - '/target/kibana-coverage/jest/x-pack/plugins/security_solution/public/hosts', + '/target/kibana-coverage/jest/x-pack/plugins/security_solution/public/explore', coverageReporters: ['text', 'html'], - collectCoverageFrom: ['/x-pack/plugins/security_solution/public/hosts/**/*.{ts,tsx}'], + collectCoverageFrom: ['/x-pack/plugins/security_solution/public/explore/**/*.{ts,tsx}'], // See: https://github.com/elastic/kibana/issues/117255, the moduleNameMapper creates mocks to avoid memory leaks from kibana core. moduleNameMapper: { 'core/server$': '/x-pack/plugins/security_solution/server/__mocks__/core.mock.ts', diff --git a/x-pack/plugins/security_solution/public/network/components/arrows/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/network/components/arrows/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/arrows/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/explore/network/components/arrows/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/security_solution/public/network/components/arrows/helpers.test.ts b/x-pack/plugins/security_solution/public/explore/network/components/arrows/helpers.test.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/arrows/helpers.test.ts rename to x-pack/plugins/security_solution/public/explore/network/components/arrows/helpers.test.ts diff --git a/x-pack/plugins/security_solution/public/network/components/arrows/helpers.ts b/x-pack/plugins/security_solution/public/explore/network/components/arrows/helpers.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/arrows/helpers.ts rename to x-pack/plugins/security_solution/public/explore/network/components/arrows/helpers.ts diff --git a/x-pack/plugins/security_solution/public/network/components/arrows/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/arrows/index.test.tsx similarity index 94% rename from x-pack/plugins/security_solution/public/network/components/arrows/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/arrows/index.test.tsx index ba36bff9dbbc7..f4b79e8b721ba 100644 --- a/x-pack/plugins/security_solution/public/network/components/arrows/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/arrows/index.test.tsx @@ -8,7 +8,7 @@ import { mount } from 'enzyme'; import React from 'react'; -import { TestProviders } from '../../../common/mock'; +import { TestProviders } from '../../../../common/mock'; import { ArrowBody, ArrowHead } from '.'; diff --git a/x-pack/plugins/security_solution/public/network/components/arrows/index.tsx b/x-pack/plugins/security_solution/public/explore/network/components/arrows/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/arrows/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/arrows/index.tsx diff --git a/x-pack/plugins/security_solution/public/network/components/details/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/network/components/details/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/details/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/explore/network/components/details/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/security_solution/public/network/components/details/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/details/index.test.tsx similarity index 84% rename from x-pack/plugins/security_solution/public/network/components/details/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/details/index.test.tsx index a05e62a5b252d..58d2d5b1abc5b 100644 --- a/x-pack/plugins/security_solution/public/network/components/details/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/details/index.test.tsx @@ -9,23 +9,23 @@ import { shallow } from 'enzyme'; import React from 'react'; import type { ActionCreator } from 'typescript-fsa'; -import '../../../common/mock/match_media'; +import '../../../../common/mock/match_media'; import { mockGlobalState, TestProviders, SUB_PLUGINS_REDUCER, kibanaObservable, createSecuritySolutionStorageMock, -} from '../../../common/mock'; -import type { State } from '../../../common/store'; -import { createStore } from '../../../common/store'; +} from '../../../../common/mock'; +import type { State } from '../../../../common/store'; +import { createStore } from '../../../../common/store'; import { networkModel } from '../../store'; import { IpOverview } from '.'; import { mockData } from './mock'; -import { mockAnomalies } from '../../../common/components/ml/mock'; -import type { NarrowDateRange } from '../../../common/components/ml/types'; -import { FlowTargetSourceDest } from '../../../../common/search_strategy'; +import { mockAnomalies } from '../../../../common/components/ml/mock'; +import type { NarrowDateRange } from '../../../../common/components/ml/types'; +import { FlowTargetSourceDest } from '../../../../../common/search_strategy'; describe('IP Overview Component', () => { const state: State = mockGlobalState; diff --git a/x-pack/plugins/security_solution/public/network/components/details/index.tsx b/x-pack/plugins/security_solution/public/explore/network/components/details/index.tsx similarity index 81% rename from x-pack/plugins/security_solution/public/network/components/details/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/details/index.tsx index 8541d2453c120..9c67e227ec4db 100644 --- a/x-pack/plugins/security_solution/public/network/components/details/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/details/index.tsx @@ -8,15 +8,15 @@ import { euiLightVars as lightTheme, euiDarkVars as darkTheme } from '@kbn/ui-theme'; import React from 'react'; -import { DEFAULT_DARK_MODE } from '../../../../common/constants'; -import type { DescriptionList } from '../../../../common/utility_types'; -import { useUiSetting$ } from '../../../common/lib/kibana'; +import { DEFAULT_DARK_MODE } from '../../../../../common/constants'; +import type { DescriptionList } from '../../../../../common/utility_types'; +import { useUiSetting$ } from '../../../../common/lib/kibana'; import type { FlowTargetSourceDest, NetworkDetailsStrategyResponse, -} from '../../../../common/search_strategy'; +} from '../../../../../common/search_strategy'; import type { networkModel } from '../../store'; -import { getEmptyTagValue } from '../../../common/components/empty_value'; +import { getEmptyTagValue } from '../../../../common/components/empty_value'; import { autonomousSystemRenderer, @@ -25,20 +25,20 @@ import { locationRenderer, reputationRenderer, whoisRenderer, -} from '../../../timelines/components/field_renderers/field_renderers'; +} from '../../../../timelines/components/field_renderers/field_renderers'; import { FirstLastSeen, FirstLastSeenType, -} from '../../../common/components/first_last_seen/first_last_seen'; +} from '../../../../common/components/first_last_seen/first_last_seen'; import * as i18n from './translations'; -import { OverviewWrapper } from '../../../common/components/page'; -import { Loader } from '../../../common/components/loader'; -import type { Anomalies, NarrowDateRange } from '../../../common/components/ml/types'; -import { AnomalyScores } from '../../../common/components/ml/score/anomaly_scores'; -import { useMlCapabilities } from '../../../common/components/ml/hooks/use_ml_capabilities'; -import { hasMlUserPermissions } from '../../../../common/machine_learning/has_ml_user_permissions'; -import { InspectButton, InspectButtonContainer } from '../../../common/components/inspect'; -import { OverviewDescriptionList } from '../../../common/components/overview_description_list'; +import { OverviewWrapper } from '../../../../common/components/page'; +import { Loader } from '../../../../common/components/loader'; +import type { Anomalies, NarrowDateRange } from '../../../../common/components/ml/types'; +import { AnomalyScores } from '../../../../common/components/ml/score/anomaly_scores'; +import { useMlCapabilities } from '../../../../common/components/ml/hooks/use_ml_capabilities'; +import { hasMlUserPermissions } from '../../../../../common/machine_learning/has_ml_user_permissions'; +import { InspectButton, InspectButtonContainer } from '../../../../common/components/inspect'; +import { OverviewDescriptionList } from '../../../../common/components/overview_description_list'; export interface IpOverviewProps { anomaliesData: Anomalies | null; diff --git a/x-pack/plugins/security_solution/public/network/components/details/mock.ts b/x-pack/plugins/security_solution/public/explore/network/components/details/mock.ts similarity index 98% rename from x-pack/plugins/security_solution/public/network/components/details/mock.ts rename to x-pack/plugins/security_solution/public/explore/network/components/details/mock.ts index c101456ca55b5..86d84750bc539 100644 --- a/x-pack/plugins/security_solution/public/network/components/details/mock.ts +++ b/x-pack/plugins/security_solution/public/explore/network/components/details/mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { NetworkDetailsStrategyResponse } from '../../../../common/search_strategy'; +import type { NetworkDetailsStrategyResponse } from '../../../../../common/search_strategy'; export const mockData: Readonly> = { diff --git a/x-pack/plugins/security_solution/public/network/components/details/translations.ts b/x-pack/plugins/security_solution/public/explore/network/components/details/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/details/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/components/details/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/components/direction/direction.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/direction/direction.test.tsx similarity index 96% rename from x-pack/plugins/security_solution/public/network/components/direction/direction.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/direction/direction.test.tsx index ba0c225b22436..e44ec02298cc5 100644 --- a/x-pack/plugins/security_solution/public/network/components/direction/direction.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/direction/direction.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import '../../../common/mock/match_media'; +import '../../../../common/mock/match_media'; import { DEFAULT_ICON, EXTERNAL, diff --git a/x-pack/plugins/security_solution/public/network/components/direction/index.tsx b/x-pack/plugins/security_solution/public/explore/network/components/direction/index.tsx similarity index 93% rename from x-pack/plugins/security_solution/public/network/components/direction/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/direction/index.tsx index ce4052ed8bd74..159b05ce835db 100644 --- a/x-pack/plugins/security_solution/public/network/components/direction/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/direction/index.tsx @@ -7,8 +7,8 @@ import React from 'react'; -import { NetworkDirectionEcs } from '../../../../common/search_strategy'; -import { DraggableBadge } from '../../../common/components/draggables'; +import { NetworkDirectionEcs } from '../../../../../common/search_strategy'; +import { DraggableBadge } from '../../../../common/components/draggables'; import { NETWORK_DIRECTION_FIELD_NAME } from '../source_destination/field_names'; export const INBOUND = 'inbound'; diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/__mocks__/mock.ts b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/__mocks__/mock.ts similarity index 99% rename from x-pack/plugins/security_solution/public/network/components/embeddables/__mocks__/mock.ts rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/__mocks__/mock.ts index e63fff5009152..1cc0591d29727 100644 --- a/x-pack/plugins/security_solution/public/network/components/embeddables/__mocks__/mock.ts +++ b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/__mocks__/mock.ts @@ -6,7 +6,7 @@ */ import type { IndexPatternMapping } from '../types'; -import type { IndexPatternSavedObject } from '../../../../common/hooks/types'; +import type { IndexPatternSavedObject } from '../../../../../common/hooks/types'; import { LAYER_TYPE } from '@kbn/maps-plugin/common'; export const mockIndexPatternIds: IndexPatternMapping[] = [ diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/__snapshots__/embeddable.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/__snapshots__/embeddable.test.tsx.snap similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/embeddables/__snapshots__/embeddable.test.tsx.snap rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/__snapshots__/embeddable.test.tsx.snap diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/__snapshots__/embedded_map.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/__snapshots__/embedded_map.test.tsx.snap similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/embeddables/__snapshots__/embedded_map.test.tsx.snap rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/__snapshots__/embedded_map.test.tsx.snap diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/__snapshots__/index_patterns_missing_prompt.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/__snapshots__/index_patterns_missing_prompt.test.tsx.snap similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/embeddables/__snapshots__/index_patterns_missing_prompt.test.tsx.snap rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/__snapshots__/index_patterns_missing_prompt.test.tsx.snap diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/embeddable.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embeddable.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/embeddables/embeddable.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/embeddable.test.tsx diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/embeddable.tsx b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embeddable.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/embeddables/embeddable.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/embeddable.tsx diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map.test.tsx similarity index 94% rename from x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map.test.tsx index 7da3a90a6d4fb..6426e87c246f2 100644 --- a/x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map.test.tsx @@ -11,18 +11,18 @@ import React from 'react'; import * as redux from 'react-redux'; import { waitFor } from '@testing-library/react'; -import '../../../common/mock/match_media'; -import { useIndexPatterns } from '../../../common/hooks/use_index_patterns'; -import { TestProviders } from '../../../common/mock'; +import '../../../../common/mock/match_media'; +import { useIndexPatterns } from '../../../../common/hooks/use_index_patterns'; +import { TestProviders } from '../../../../common/mock'; import { EmbeddedMapComponent } from './embedded_map'; import { createEmbeddable } from './embedded_map_helpers'; const mockUseIndexPatterns = useIndexPatterns as jest.Mock; -jest.mock('../../../common/hooks/use_index_patterns'); +jest.mock('../../../../common/hooks/use_index_patterns'); mockUseIndexPatterns.mockImplementation(() => [true, []]); -jest.mock('../../../common/lib/kibana'); +jest.mock('../../../../common/lib/kibana'); jest.mock('./embedded_map_helpers', () => ({ createEmbeddable: jest.fn(), })); @@ -30,7 +30,7 @@ jest.mock('./embedded_map_helpers', () => ({ const mockGetStorage = jest.fn(); const mockSetStorage = jest.fn(); -jest.mock('../../../common/lib/kibana', () => { +jest.mock('../../../../common/lib/kibana', () => { return { useKibana: () => ({ services: { @@ -51,7 +51,7 @@ jest.mock('../../../common/lib/kibana', () => { }), }; }); -jest.mock('../../../common/containers/sourcerer', () => { +jest.mock('../../../../common/containers/sourcerer', () => { return { useSourcererDataView: () => ({ selectedPatterns: ['filebeat-*', 'packetbeat-*'], diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map.tsx b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map.tsx similarity index 93% rename from x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map.tsx index 53c69b5b47afd..5fae6c4343ff0 100644 --- a/x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map.tsx @@ -15,20 +15,20 @@ import type { Filter, Query } from '@kbn/es-query'; import type { ErrorEmbeddable } from '@kbn/embeddable-plugin/public'; import { isErrorEmbeddable } from '@kbn/embeddable-plugin/public'; import type { MapEmbeddable } from '@kbn/maps-plugin/public/embeddable'; -import { Loader } from '../../../common/components/loader'; -import { displayErrorToast, useStateToaster } from '../../../common/components/toasters'; -import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; +import { Loader } from '../../../../common/components/loader'; +import { displayErrorToast, useStateToaster } from '../../../../common/components/toasters'; +import type { GlobalTimeArgs } from '../../../../common/containers/use_global_time'; import { Embeddable } from './embeddable'; import { createEmbeddable } from './embedded_map_helpers'; import { IndexPatternsMissingPrompt } from './index_patterns_missing_prompt'; import { MapToolTip } from './map_tool_tip/map_tool_tip'; import * as i18n from './translations'; -import { useKibana } from '../../../common/lib/kibana'; +import { useKibana } from '../../../../common/lib/kibana'; import { getLayerList } from './map_config'; -import { sourcererSelectors } from '../../../common/store/sourcerer'; -import { SourcererScopeName } from '../../../common/store/sourcerer/model'; -import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; -import { useSourcererDataView } from '../../../common/containers/sourcerer'; +import { sourcererSelectors } from '../../../../common/store/sourcerer'; +import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; +import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; +import { useSourcererDataView } from '../../../../common/containers/sourcerer'; export const NETWORK_MAP_VISIBLE = 'network_map_visbile'; diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map_helpers.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map_helpers.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map_helpers.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map_helpers.test.tsx diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map_helpers.tsx b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map_helpers.tsx similarity index 96% rename from x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map_helpers.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map_helpers.tsx index 3583e54f4c980..610ae3efb6647 100644 --- a/x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map_helpers.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/embedded_map_helpers.tsx @@ -27,8 +27,8 @@ import type { IndexPatternMapping } from './types'; import { getLayerList } from './map_config'; import * as i18n from './translations'; -import type { IndexPatternSavedObject } from '../../../common/hooks/types'; -import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; +import type { IndexPatternSavedObject } from '../../../../common/hooks/types'; +import type { GlobalTimeArgs } from '../../../../common/containers/use_global_time'; /** * Creates MapEmbeddable with provided initial configuration diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/index_patterns_missing_prompt.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/index_patterns_missing_prompt.test.tsx similarity index 93% rename from x-pack/plugins/security_solution/public/network/components/embeddables/index_patterns_missing_prompt.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/index_patterns_missing_prompt.test.tsx index e67e692b43beb..f048037157060 100644 --- a/x-pack/plugins/security_solution/public/network/components/embeddables/index_patterns_missing_prompt.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/index_patterns_missing_prompt.test.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { IndexPatternsMissingPromptComponent } from './index_patterns_missing_prompt'; -jest.mock('../../../common/lib/kibana'); +jest.mock('../../../../common/lib/kibana'); describe('IndexPatternsMissingPrompt', () => { test('renders correctly against snapshot', () => { diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/index_patterns_missing_prompt.tsx b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/index_patterns_missing_prompt.tsx similarity index 97% rename from x-pack/plugins/security_solution/public/network/components/embeddables/index_patterns_missing_prompt.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/index_patterns_missing_prompt.tsx index 97fe8713705e3..deda93b45d3da 100644 --- a/x-pack/plugins/security_solution/public/network/components/embeddables/index_patterns_missing_prompt.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/index_patterns_missing_prompt.tsx @@ -9,7 +9,7 @@ import { EuiButton, EuiCode, EuiEmptyPrompt } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import React from 'react'; -import { useKibana, useBasePath } from '../../../common/lib/kibana'; +import { useKibana, useBasePath } from '../../../../common/lib/kibana'; import * as i18n from './translations'; export const IndexPatternsMissingPromptComponent = () => { diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/map_config.test.ts b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_config.test.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/embeddables/map_config.test.ts rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_config.test.ts diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/map_config.ts b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_config.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/embeddables/map_config.ts rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_config.ts diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/__snapshots__/line_tool_tip_content.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/__snapshots__/line_tool_tip_content.test.tsx.snap similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/__snapshots__/line_tool_tip_content.test.tsx.snap rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/__snapshots__/line_tool_tip_content.test.tsx.snap diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/__snapshots__/map_tool_tip.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/__snapshots__/map_tool_tip.test.tsx.snap similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/__snapshots__/map_tool_tip.test.tsx.snap rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/__snapshots__/map_tool_tip.test.tsx.snap diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/__snapshots__/point_tool_tip_content.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/__snapshots__/point_tool_tip_content.test.tsx.snap similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/__snapshots__/point_tool_tip_content.test.tsx.snap rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/__snapshots__/point_tool_tip_content.test.tsx.snap diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/__snapshots__/tooltip_footer.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/__snapshots__/tooltip_footer.test.tsx.snap similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/__snapshots__/tooltip_footer.test.tsx.snap rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/__snapshots__/tooltip_footer.test.tsx.snap diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/line_tool_tip_content.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/line_tool_tip_content.test.tsx similarity index 97% rename from x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/line_tool_tip_content.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/line_tool_tip_content.test.tsx index 3733ad22a23a6..119013a62f929 100644 --- a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/line_tool_tip_content.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/line_tool_tip_content.test.tsx @@ -8,7 +8,7 @@ import { shallow } from 'enzyme'; import React from 'react'; -import '../../../../common/mock/match_media'; +import '../../../../../common/mock/match_media'; import { LineToolTipContentComponent } from './line_tool_tip_content'; import { SUM_OF_CLIENT_BYTES, diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/line_tool_tip_content.tsx b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/line_tool_tip_content.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/line_tool_tip_content.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/line_tool_tip_content.tsx diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/map_tool_tip.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/map_tool_tip.test.tsx similarity index 96% rename from x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/map_tool_tip.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/map_tool_tip.test.tsx index 1002c6bed86cd..6d18f3ec624d8 100644 --- a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/map_tool_tip.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/map_tool_tip.test.tsx @@ -7,7 +7,7 @@ import { shallow } from 'enzyme'; import React from 'react'; -import '../../../../common/mock/match_media'; +import '../../../../../common/mock/match_media'; import { MapToolTipComponent } from './map_tool_tip'; import type { TooltipFeature } from '@kbn/maps-plugin/common'; diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/map_tool_tip.tsx b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/map_tool_tip.tsx similarity index 98% rename from x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/map_tool_tip.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/map_tool_tip.tsx index 3db7e496cb88d..d82bf1ce18051 100644 --- a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/map_tool_tip.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/map_tool_tip.tsx @@ -18,7 +18,7 @@ import type { MapToolTipProps } from '../types'; import { ToolTipFooter } from './tooltip_footer'; import { LineToolTipContent } from './line_tool_tip_content'; import { PointToolTipContent } from './point_tool_tip_content'; -import { Loader } from '../../../../common/components/loader'; +import { Loader } from '../../../../../common/components/loader'; import * as i18n from '../translations'; export const MapToolTipComponent = ({ diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/point_tool_tip_content.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/point_tool_tip_content.test.tsx similarity index 89% rename from x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/point_tool_tip_content.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/point_tool_tip_content.test.tsx index ca040a9c0b9c2..74976ca856e08 100644 --- a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/point_tool_tip_content.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/point_tool_tip_content.test.tsx @@ -8,14 +8,14 @@ import { shallow } from 'enzyme'; import React from 'react'; -import '../../../../common/mock/match_media'; +import '../../../../../common/mock/match_media'; import { getRenderedFieldValue, PointToolTipContentComponent } from './point_tool_tip_content'; -import { TestProviders } from '../../../../common/mock'; -import { getEmptyStringTag } from '../../../../common/components/empty_value'; -import { HostDetailsLink, NetworkDetailsLink } from '../../../../common/components/links'; +import { TestProviders } from '../../../../../common/mock'; +import { getEmptyStringTag } from '../../../../../common/components/empty_value'; +import { HostDetailsLink, NetworkDetailsLink } from '../../../../../common/components/links'; import type { ITooltipProperty } from '@kbn/maps-plugin/public/classes/tooltips/tooltip_property'; import { TooltipProperty } from '@kbn/maps-plugin/public/classes/tooltips/tooltip_property'; -import { FlowTarget } from '../../../../../common/search_strategy'; +import { FlowTarget } from '../../../../../../common/search_strategy'; describe('PointToolTipContent', () => { const mockFeatureProps: ITooltipProperty[] = [ diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/point_tool_tip_content.tsx b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/point_tool_tip_content.tsx similarity index 87% rename from x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/point_tool_tip_content.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/point_tool_tip_content.tsx index ce476b488571c..01f6641133dad 100644 --- a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/point_tool_tip_content.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/point_tool_tip_content.tsx @@ -11,11 +11,11 @@ import { sourceDestinationFieldMappings } from '../map_config'; import { getEmptyTagValue, getOrEmptyTagFromValue, -} from '../../../../common/components/empty_value'; -import { DescriptionListStyled } from '../../../../common/components/page'; -import { HostDetailsLink, NetworkDetailsLink } from '../../../../common/components/links'; -import { DefaultFieldRenderer } from '../../../../timelines/components/field_renderers/field_renderers'; -import type { FlowTarget } from '../../../../../common/search_strategy'; +} from '../../../../../common/components/empty_value'; +import { DescriptionListStyled } from '../../../../../common/components/page'; +import { HostDetailsLink, NetworkDetailsLink } from '../../../../../common/components/links'; +import { DefaultFieldRenderer } from '../../../../../timelines/components/field_renderers/field_renderers'; +import type { FlowTarget } from '../../../../../../common/search_strategy'; interface PointToolTipContentProps { contextId: string; diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/tooltip_footer.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/tooltip_footer.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/tooltip_footer.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/tooltip_footer.test.tsx diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/tooltip_footer.tsx b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/tooltip_footer.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/tooltip_footer.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/map_tool_tip/tooltip_footer.tsx diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/translations.ts b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/embeddables/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/types.ts b/x-pack/plugins/security_solution/public/explore/network/components/embeddables/types.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/embeddables/types.ts rename to x-pack/plugins/security_solution/public/explore/network/components/embeddables/types.ts diff --git a/x-pack/plugins/security_solution/public/network/components/flow_controls/__snapshots__/flow_direction_select.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/network/components/flow_controls/__snapshots__/flow_direction_select.test.tsx.snap similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/flow_controls/__snapshots__/flow_direction_select.test.tsx.snap rename to x-pack/plugins/security_solution/public/explore/network/components/flow_controls/__snapshots__/flow_direction_select.test.tsx.snap diff --git a/x-pack/plugins/security_solution/public/network/components/flow_controls/__snapshots__/flow_target_select.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/network/components/flow_controls/__snapshots__/flow_target_select.test.tsx.snap similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/flow_controls/__snapshots__/flow_target_select.test.tsx.snap rename to x-pack/plugins/security_solution/public/explore/network/components/flow_controls/__snapshots__/flow_target_select.test.tsx.snap diff --git a/x-pack/plugins/security_solution/public/network/components/flow_controls/flow_direction_select.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/flow_controls/flow_direction_select.test.tsx similarity index 95% rename from x-pack/plugins/security_solution/public/network/components/flow_controls/flow_direction_select.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/flow_controls/flow_direction_select.test.tsx index d98db616c9cde..57d31bd2a03e5 100644 --- a/x-pack/plugins/security_solution/public/network/components/flow_controls/flow_direction_select.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/flow_controls/flow_direction_select.test.tsx @@ -7,7 +7,7 @@ import { mount, shallow } from 'enzyme'; import React from 'react'; -import { FlowDirection } from '../../../../common/search_strategy'; +import { FlowDirection } from '../../../../../common/search_strategy'; import { FlowDirectionSelect } from './flow_direction_select'; diff --git a/x-pack/plugins/security_solution/public/network/components/flow_controls/flow_direction_select.tsx b/x-pack/plugins/security_solution/public/explore/network/components/flow_controls/flow_direction_select.tsx similarity index 94% rename from x-pack/plugins/security_solution/public/network/components/flow_controls/flow_direction_select.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/flow_controls/flow_direction_select.tsx index 12fa1e6a0d00d..70d2ef30ad97c 100644 --- a/x-pack/plugins/security_solution/public/network/components/flow_controls/flow_direction_select.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/flow_controls/flow_direction_select.tsx @@ -7,7 +7,7 @@ import { EuiFilterButton, EuiFilterGroup } from '@elastic/eui'; import React from 'react'; -import { FlowDirection } from '../../../../common/search_strategy'; +import { FlowDirection } from '../../../../../common/search_strategy'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/network/components/flow_controls/flow_target_select.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/flow_controls/flow_target_select.test.tsx similarity index 97% rename from x-pack/plugins/security_solution/public/network/components/flow_controls/flow_target_select.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/flow_controls/flow_target_select.test.tsx index 918114f9e7196..7a3fecfaae703 100644 --- a/x-pack/plugins/security_solution/public/network/components/flow_controls/flow_target_select.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/flow_controls/flow_target_select.test.tsx @@ -8,7 +8,7 @@ import { mount, shallow } from 'enzyme'; import { clone } from 'lodash/fp'; import React from 'react'; -import { FlowDirection, FlowTarget } from '../../../../common/search_strategy'; +import { FlowDirection, FlowTarget } from '../../../../../common/search_strategy'; import { FlowTargetSelect } from './flow_target_select'; diff --git a/x-pack/plugins/security_solution/public/network/components/flow_controls/flow_target_select.tsx b/x-pack/plugins/security_solution/public/explore/network/components/flow_controls/flow_target_select.tsx similarity index 93% rename from x-pack/plugins/security_solution/public/network/components/flow_controls/flow_target_select.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/flow_controls/flow_target_select.tsx index ab3796096b45a..ff0dc4f8b66e0 100644 --- a/x-pack/plugins/security_solution/public/network/components/flow_controls/flow_target_select.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/flow_controls/flow_target_select.tsx @@ -7,8 +7,8 @@ import { EuiSuperSelect } from '@elastic/eui'; import React from 'react'; -import type { FlowTargetSourceDest } from '../../../../common/search_strategy'; -import { FlowTarget, FlowDirection } from '../../../../common/search_strategy'; +import type { FlowTargetSourceDest } from '../../../../../common/search_strategy'; +import { FlowTarget, FlowDirection } from '../../../../../common/search_strategy'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/network/components/flow_controls/translations.ts b/x-pack/plugins/security_solution/public/explore/network/components/flow_controls/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/flow_controls/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/components/flow_controls/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/components/flow_target_select_connected/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/flow_target_select_connected/index.test.tsx similarity index 88% rename from x-pack/plugins/security_solution/public/network/components/flow_target_select_connected/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/flow_target_select_connected/index.test.tsx index 8a964d53c9123..84f256068e958 100644 --- a/x-pack/plugins/security_solution/public/network/components/flow_target_select_connected/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/flow_target_select_connected/index.test.tsx @@ -9,10 +9,10 @@ import { mount } from 'enzyme'; import React from 'react'; import { MemoryRouter } from 'react-router-dom'; -import '../../../common/mock/match_media'; -import { TestProviders } from '../../../common/mock'; +import '../../../../common/mock/match_media'; +import { TestProviders } from '../../../../common/mock'; import { FlowTargetSelectConnectedComponent } from '.'; -import { FlowTarget } from '../../../../common/search_strategy'; +import { FlowTarget } from '../../../../../common/search_strategy'; describe('Flow Target Select Connected', () => { test('renders correctly against snapshot flowTarget source', () => { diff --git a/x-pack/plugins/security_solution/public/network/components/flow_target_select_connected/index.tsx b/x-pack/plugins/security_solution/public/explore/network/components/flow_target_select_connected/index.tsx similarity index 91% rename from x-pack/plugins/security_solution/public/network/components/flow_target_select_connected/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/flow_target_select_connected/index.tsx index 5b3cc427cad62..b175f44a5532b 100644 --- a/x-pack/plugins/security_solution/public/network/components/flow_target_select_connected/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/flow_target_select_connected/index.tsx @@ -14,9 +14,9 @@ import styled from 'styled-components'; import * as i18nIp from '../details/translations'; import { FlowTargetSelect } from '../flow_controls/flow_target_select'; -import { IpOverviewId } from '../../../timelines/components/field_renderers/field_renderers'; -import type { FlowTarget, FlowTargetSourceDest } from '../../../../common/search_strategy'; -import { FlowDirection } from '../../../../common/search_strategy'; +import { IpOverviewId } from '../../../../timelines/components/field_renderers/field_renderers'; +import type { FlowTarget, FlowTargetSourceDest } from '../../../../../common/search_strategy'; +import { FlowDirection } from '../../../../../common/search_strategy'; const SelectTypeItem = styled(EuiFlexItem)` min-width: 180px; diff --git a/x-pack/plugins/security_solution/public/network/components/ip/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/network/components/ip/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/ip/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/explore/network/components/ip/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/security_solution/public/network/components/ip/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/ip/index.test.tsx similarity index 83% rename from x-pack/plugins/security_solution/public/network/components/ip/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/ip/index.test.tsx index 836d6885d1674..eb9d92b4f0264 100644 --- a/x-pack/plugins/security_solution/public/network/components/ip/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/ip/index.test.tsx @@ -8,13 +8,13 @@ import { shallow } from 'enzyme'; import React from 'react'; -import '../../../common/mock/match_media'; -import { TestProviders } from '../../../common/mock/test_providers'; -import { useMountAppended } from '../../../common/utils/use_mount_appended'; +import '../../../../common/mock/match_media'; +import { TestProviders } from '../../../../common/mock/test_providers'; +import { useMountAppended } from '../../../../common/utils/use_mount_appended'; import { Ip } from '.'; -jest.mock('../../../common/lib/kibana'); +jest.mock('../../../../common/lib/kibana'); jest.mock('@elastic/eui', () => { const original = jest.requireActual('@elastic/eui'); @@ -24,7 +24,7 @@ jest.mock('@elastic/eui', () => { }; }); -jest.mock('../../../common/components/link_to'); +jest.mock('../../../../common/components/link_to'); describe('Port', () => { const mount = useMountAppended(); diff --git a/x-pack/plugins/security_solution/public/network/components/ip/index.tsx b/x-pack/plugins/security_solution/public/explore/network/components/ip/index.tsx similarity index 90% rename from x-pack/plugins/security_solution/public/network/components/ip/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/ip/index.tsx index 2fa3e988784ca..ada0dc97999e5 100644 --- a/x-pack/plugins/security_solution/public/network/components/ip/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/ip/index.tsx @@ -7,7 +7,7 @@ import React from 'react'; -import { FormattedFieldValue } from '../../../timelines/components/timeline/body/renderers/formatted_field'; +import { FormattedFieldValue } from '../../../../timelines/components/timeline/body/renderers/formatted_field'; export const SOURCE_IP_FIELD_NAME = 'source.ip'; export const DESTINATION_IP_FIELD_NAME = 'destination.ip'; diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/kpi_network/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/explore/network/components/kpi_network/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/dns/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/dns/index.test.tsx similarity index 85% rename from x-pack/plugins/security_solution/public/network/components/kpi_network/dns/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/kpi_network/dns/index.test.tsx index 3421a23ccf66d..46c26543ab862 100644 --- a/x-pack/plugins/security_solution/public/network/components/kpi_network/dns/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/dns/index.test.tsx @@ -6,26 +6,26 @@ */ import { useNetworkKpiDns } from '../../../containers/kpi_network/dns'; -import { useQueryToggle } from '../../../../common/containers/query_toggle'; +import { useQueryToggle } from '../../../../../common/containers/query_toggle'; import { render } from '@testing-library/react'; -import { TestProviders } from '../../../../common/mock'; +import { TestProviders } from '../../../../../common/mock'; import React from 'react'; import { NetworkKpiDns } from '.'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; -import { useRefetchByRestartingSession } from '../../../../common/components/page/use_refetch_by_session'; +import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; +import { useRefetchByRestartingSession } from '../../../../../common/components/page/use_refetch_by_session'; import { KpiBaseComponentManage } from '../../../../hosts/components/kpi_hosts/common'; -jest.mock('../../../../common/containers/query_toggle'); +jest.mock('../../../../../common/containers/query_toggle'); jest.mock('../../../containers/kpi_network/dns'); jest.mock('../../../../hosts/components/kpi_hosts/common', () => ({ KpiBaseComponentManage: jest .fn() .mockReturnValue(), })); -jest.mock('../../../../common/hooks/use_experimental_features', () => ({ +jest.mock('../../../../../common/hooks/use_experimental_features', () => ({ useIsExperimentalFeatureEnabled: jest.fn(), })); -jest.mock('../../../../common/components/page/use_refetch_by_session', () => ({ +jest.mock('../../../../../common/components/page/use_refetch_by_session', () => ({ useRefetchByRestartingSession: jest.fn(), })); diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/dns/index.tsx b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/dns/index.tsx similarity index 78% rename from x-pack/plugins/security_solution/public/network/components/kpi_network/dns/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/kpi_network/dns/index.tsx index e97ab79d53ff6..bea6ef43de363 100644 --- a/x-pack/plugins/security_solution/public/network/components/kpi_network/dns/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/dns/index.tsx @@ -7,17 +7,17 @@ import React, { useEffect, useState } from 'react'; -import type { StatItems } from '../../../../common/components/stat_items'; -import { kpiDnsQueriesLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/network/kpi_dns_queries'; +import type { StatItems } from '../../../../components/stat_items'; +import { kpiDnsQueriesLensAttributes } from '../../../../../common/components/visualization_actions/lens_attributes/network/kpi_dns_queries'; import { useNetworkKpiDns, ID } from '../../../containers/kpi_network/dns'; import { KpiBaseComponentManage } from '../../../../hosts/components/kpi_hosts/common'; import type { NetworkKpiProps } from '../types'; import * as i18n from './translations'; -import { useQueryToggle } from '../../../../common/containers/query_toggle'; -import { InputsModelId } from '../../../../common/store/inputs/constants'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; -import { useRefetchByRestartingSession } from '../../../../common/components/page/use_refetch_by_session'; +import { useQueryToggle } from '../../../../../common/containers/query_toggle'; +import { InputsModelId } from '../../../../../common/store/inputs/constants'; +import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; +import { useRefetchByRestartingSession } from '../../../../../common/components/page/use_refetch_by_session'; export const fieldsMapping: Readonly = [ { diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/dns/translations.ts b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/dns/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/kpi_network/dns/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/components/kpi_network/dns/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/index.test.tsx similarity index 87% rename from x-pack/plugins/security_solution/public/network/components/kpi_network/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/kpi_network/index.test.tsx index f3460f8cbea1d..e213f2f166977 100644 --- a/x-pack/plugins/security_solution/public/network/components/kpi_network/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/index.test.tsx @@ -14,10 +14,10 @@ import { SUB_PLUGINS_REDUCER, kibanaObservable, createSecuritySolutionStorageMock, -} from '../../../common/mock'; -import '../../../common/mock/match_media'; -import type { State } from '../../../common/store'; -import { createStore } from '../../../common/store'; +} from '../../../../common/mock'; +import '../../../../common/mock/match_media'; +import type { State } from '../../../../common/store'; +import { createStore } from '../../../../common/store'; import { NetworkKpiComponent } from '.'; describe('NetworkKpiComponent', () => { diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/index.tsx b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/kpi_network/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/kpi_network/index.tsx diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/mock.ts b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/mock.ts similarity index 85% rename from x-pack/plugins/security_solution/public/network/components/kpi_network/mock.ts rename to x-pack/plugins/security_solution/public/explore/network/components/kpi_network/mock.ts index 949bf35879ab5..cc30a9b920edc 100644 --- a/x-pack/plugins/security_solution/public/network/components/kpi_network/mock.ts +++ b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/mock.ts @@ -5,12 +5,12 @@ * 2.0. */ -import type { NetworkKpiStrategyResponse } from '../../../../common/search_strategy'; -import type { StatItems } from '../../../common/components/stat_items'; -import { kpiUniquePrivateIpsAreaLensAttributes } from '../../../common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_area'; -import { kpiUniquePrivateIpsBarLensAttributes } from '../../../common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_bar'; -import { kpiUniquePrivateIpsDestinationMetricLensAttributes } from '../../../common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_destination_metric'; -import { kpiUniquePrivateIpsSourceMetricLensAttributes } from '../../../common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_source_metric'; +import type { NetworkKpiStrategyResponse } from '../../../../../common/search_strategy'; +import type { StatItems } from '../../../components/stat_items'; +import { kpiUniquePrivateIpsAreaLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_area'; +import { kpiUniquePrivateIpsBarLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_bar'; +import { kpiUniquePrivateIpsDestinationMetricLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_destination_metric'; +import { kpiUniquePrivateIpsSourceMetricLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_source_metric'; export const mockUpdateDateRange = jest.fn(); diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/network_events/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/network_events/index.test.tsx similarity index 86% rename from x-pack/plugins/security_solution/public/network/components/kpi_network/network_events/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/kpi_network/network_events/index.test.tsx index f7f9a70cdfaf8..bb894d795e16c 100644 --- a/x-pack/plugins/security_solution/public/network/components/kpi_network/network_events/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/network_events/index.test.tsx @@ -6,26 +6,26 @@ */ import { useNetworkKpiNetworkEvents } from '../../../containers/kpi_network/network_events'; -import { useQueryToggle } from '../../../../common/containers/query_toggle'; +import { useQueryToggle } from '../../../../../common/containers/query_toggle'; import { render } from '@testing-library/react'; -import { TestProviders } from '../../../../common/mock'; +import { TestProviders } from '../../../../../common/mock'; import React from 'react'; import { NetworkKpiNetworkEvents } from '.'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; -import { useRefetchByRestartingSession } from '../../../../common/components/page/use_refetch_by_session'; +import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; +import { useRefetchByRestartingSession } from '../../../../../common/components/page/use_refetch_by_session'; import { KpiBaseComponentManage } from '../../../../hosts/components/kpi_hosts/common'; -jest.mock('../../../../common/containers/query_toggle'); +jest.mock('../../../../../common/containers/query_toggle'); jest.mock('../../../containers/kpi_network/network_events'); jest.mock('../../../../hosts/components/kpi_hosts/common', () => ({ KpiBaseComponentManage: jest .fn() .mockReturnValue(), })); -jest.mock('../../../../common/hooks/use_experimental_features', () => ({ +jest.mock('../../../../../common/hooks/use_experimental_features', () => ({ useIsExperimentalFeatureEnabled: jest.fn(), })); -jest.mock('../../../../common/components/page/use_refetch_by_session', () => ({ +jest.mock('../../../../../common/components/page/use_refetch_by_session', () => ({ useRefetchByRestartingSession: jest.fn(), })); diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/network_events/index.tsx b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/network_events/index.tsx similarity index 80% rename from x-pack/plugins/security_solution/public/network/components/kpi_network/network_events/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/kpi_network/network_events/index.tsx index edbfeb0275696..5aa792fd7c220 100644 --- a/x-pack/plugins/security_solution/public/network/components/kpi_network/network_events/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/network_events/index.tsx @@ -8,16 +8,16 @@ import React, { useEffect, useState } from 'react'; import { euiPaletteColorBlind } from '@elastic/eui'; -import type { StatItems } from '../../../../common/components/stat_items'; +import type { StatItems } from '../../../../components/stat_items'; import { ID, useNetworkKpiNetworkEvents } from '../../../containers/kpi_network/network_events'; import type { NetworkKpiProps } from '../types'; import * as i18n from './translations'; -import { kpiNetworkEventsLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/network/kpi_network_events'; +import { kpiNetworkEventsLensAttributes } from '../../../../../common/components/visualization_actions/lens_attributes/network/kpi_network_events'; import { KpiBaseComponentManage } from '../../../../hosts/components/kpi_hosts/common'; -import { useQueryToggle } from '../../../../common/containers/query_toggle'; -import { InputsModelId } from '../../../../common/store/inputs/constants'; -import { useRefetchByRestartingSession } from '../../../../common/components/page/use_refetch_by_session'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; +import { useQueryToggle } from '../../../../../common/containers/query_toggle'; +import { InputsModelId } from '../../../../../common/store/inputs/constants'; +import { useRefetchByRestartingSession } from '../../../../../common/components/page/use_refetch_by_session'; +import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; const euiVisColorPalette = euiPaletteColorBlind(); const euiColorVis1 = euiVisColorPalette[1]; diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/network_events/translations.ts b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/network_events/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/kpi_network/network_events/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/components/kpi_network/network_events/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/tls_handshakes/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/tls_handshakes/index.test.tsx similarity index 86% rename from x-pack/plugins/security_solution/public/network/components/kpi_network/tls_handshakes/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/kpi_network/tls_handshakes/index.test.tsx index c3c77a2e47758..f3d6192536ad4 100644 --- a/x-pack/plugins/security_solution/public/network/components/kpi_network/tls_handshakes/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/tls_handshakes/index.test.tsx @@ -6,26 +6,26 @@ */ import { useNetworkKpiTlsHandshakes } from '../../../containers/kpi_network/tls_handshakes'; -import { useQueryToggle } from '../../../../common/containers/query_toggle'; +import { useQueryToggle } from '../../../../../common/containers/query_toggle'; import { render } from '@testing-library/react'; -import { TestProviders } from '../../../../common/mock'; +import { TestProviders } from '../../../../../common/mock'; import React from 'react'; import { NetworkKpiTlsHandshakes } from '.'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; -import { useRefetchByRestartingSession } from '../../../../common/components/page/use_refetch_by_session'; +import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; +import { useRefetchByRestartingSession } from '../../../../../common/components/page/use_refetch_by_session'; import { KpiBaseComponentManage } from '../../../../hosts/components/kpi_hosts/common'; -jest.mock('../../../../common/containers/query_toggle'); +jest.mock('../../../../../common/containers/query_toggle'); jest.mock('../../../containers/kpi_network/tls_handshakes'); jest.mock('../../../../hosts/components/kpi_hosts/common', () => ({ KpiBaseComponentManage: jest .fn() .mockReturnValue(), })); -jest.mock('../../../../common/hooks/use_experimental_features', () => ({ +jest.mock('../../../../../common/hooks/use_experimental_features', () => ({ useIsExperimentalFeatureEnabled: jest.fn(), })); -jest.mock('../../../../common/components/page/use_refetch_by_session', () => ({ +jest.mock('../../../../../common/components/page/use_refetch_by_session', () => ({ useRefetchByRestartingSession: jest.fn(), })); diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/tls_handshakes/index.tsx b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/tls_handshakes/index.tsx similarity index 79% rename from x-pack/plugins/security_solution/public/network/components/kpi_network/tls_handshakes/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/kpi_network/tls_handshakes/index.tsx index 0a26337abb6a6..53eb79d88e3fa 100644 --- a/x-pack/plugins/security_solution/public/network/components/kpi_network/tls_handshakes/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/tls_handshakes/index.tsx @@ -7,16 +7,16 @@ import React, { useEffect, useState } from 'react'; -import type { StatItems } from '../../../../common/components/stat_items'; -import { kpiTlsHandshakesLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/network/kpi_tls_handshakes'; +import type { StatItems } from '../../../../components/stat_items'; +import { kpiTlsHandshakesLensAttributes } from '../../../../../common/components/visualization_actions/lens_attributes/network/kpi_tls_handshakes'; import { useNetworkKpiTlsHandshakes, ID } from '../../../containers/kpi_network/tls_handshakes'; import { KpiBaseComponentManage } from '../../../../hosts/components/kpi_hosts/common'; import type { NetworkKpiProps } from '../types'; import * as i18n from './translations'; -import { useQueryToggle } from '../../../../common/containers/query_toggle'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; -import { InputsModelId } from '../../../../common/store/inputs/constants'; -import { useRefetchByRestartingSession } from '../../../../common/components/page/use_refetch_by_session'; +import { useQueryToggle } from '../../../../../common/containers/query_toggle'; +import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; +import { InputsModelId } from '../../../../../common/store/inputs/constants'; +import { useRefetchByRestartingSession } from '../../../../../common/components/page/use_refetch_by_session'; export const fieldsMapping: Readonly = [ { diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/tls_handshakes/translations.ts b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/tls_handshakes/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/kpi_network/tls_handshakes/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/components/kpi_network/tls_handshakes/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/types.ts b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/types.ts similarity index 73% rename from x-pack/plugins/security_solution/public/network/components/kpi_network/types.ts rename to x-pack/plugins/security_solution/public/explore/network/components/kpi_network/types.ts index 5f3e824f5c2bd..84f28481a8c56 100644 --- a/x-pack/plugins/security_solution/public/network/components/kpi_network/types.ts +++ b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/types.ts @@ -5,8 +5,8 @@ * 2.0. */ -import type { UpdateDateRange } from '../../../common/components/charts/common'; -import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; +import type { UpdateDateRange } from '../../../../common/components/charts/common'; +import type { GlobalTimeArgs } from '../../../../common/containers/use_global_time'; export interface NetworkKpiProps { filterQuery?: string; diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/unique_flows/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/unique_flows/index.test.tsx similarity index 86% rename from x-pack/plugins/security_solution/public/network/components/kpi_network/unique_flows/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/kpi_network/unique_flows/index.test.tsx index 23b4c241a36ed..39bbe9a2968c2 100644 --- a/x-pack/plugins/security_solution/public/network/components/kpi_network/unique_flows/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/unique_flows/index.test.tsx @@ -6,26 +6,26 @@ */ import { useNetworkKpiUniqueFlows } from '../../../containers/kpi_network/unique_flows'; -import { useQueryToggle } from '../../../../common/containers/query_toggle'; +import { useQueryToggle } from '../../../../../common/containers/query_toggle'; import { render } from '@testing-library/react'; -import { TestProviders } from '../../../../common/mock'; +import { TestProviders } from '../../../../../common/mock'; import React from 'react'; import { NetworkKpiUniqueFlows } from '.'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; -import { useRefetchByRestartingSession } from '../../../../common/components/page/use_refetch_by_session'; +import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; +import { useRefetchByRestartingSession } from '../../../../../common/components/page/use_refetch_by_session'; import { KpiBaseComponentManage } from '../../../../hosts/components/kpi_hosts/common'; -jest.mock('../../../../common/containers/query_toggle'); +jest.mock('../../../../../common/containers/query_toggle'); jest.mock('../../../containers/kpi_network/unique_flows'); jest.mock('../../../../hosts/components/kpi_hosts/common', () => ({ KpiBaseComponentManage: jest .fn() .mockReturnValue(), })); -jest.mock('../../../../common/hooks/use_experimental_features', () => ({ +jest.mock('../../../../../common/hooks/use_experimental_features', () => ({ useIsExperimentalFeatureEnabled: jest.fn(), })); -jest.mock('../../../../common/components/page/use_refetch_by_session', () => ({ +jest.mock('../../../../../common/components/page/use_refetch_by_session', () => ({ useRefetchByRestartingSession: jest.fn(), })); diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/unique_flows/index.tsx b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/unique_flows/index.tsx similarity index 78% rename from x-pack/plugins/security_solution/public/network/components/kpi_network/unique_flows/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/kpi_network/unique_flows/index.tsx index 846c95dbbde2d..6df7b9a2798a4 100644 --- a/x-pack/plugins/security_solution/public/network/components/kpi_network/unique_flows/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/unique_flows/index.tsx @@ -7,16 +7,16 @@ import React, { useState, useEffect } from 'react'; -import type { StatItems } from '../../../../common/components/stat_items'; -import { kpiUniqueFlowIdsLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/network/kpi_unique_flow_ids'; +import type { StatItems } from '../../../../components/stat_items'; +import { kpiUniqueFlowIdsLensAttributes } from '../../../../../common/components/visualization_actions/lens_attributes/network/kpi_unique_flow_ids'; import { useNetworkKpiUniqueFlows, ID } from '../../../containers/kpi_network/unique_flows'; import { KpiBaseComponentManage } from '../../../../hosts/components/kpi_hosts/common'; import type { NetworkKpiProps } from '../types'; import * as i18n from './translations'; -import { useQueryToggle } from '../../../../common/containers/query_toggle'; -import { InputsModelId } from '../../../../common/store/inputs/constants'; -import { useRefetchByRestartingSession } from '../../../../common/components/page/use_refetch_by_session'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; +import { useQueryToggle } from '../../../../../common/containers/query_toggle'; +import { InputsModelId } from '../../../../../common/store/inputs/constants'; +import { useRefetchByRestartingSession } from '../../../../../common/components/page/use_refetch_by_session'; +import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; export const fieldsMapping: Readonly = [ { diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/unique_flows/translations.ts b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/unique_flows/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/kpi_network/unique_flows/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/components/kpi_network/unique_flows/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/unique_private_ips/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/unique_private_ips/index.test.tsx similarity index 86% rename from x-pack/plugins/security_solution/public/network/components/kpi_network/unique_private_ips/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/kpi_network/unique_private_ips/index.test.tsx index da18fac7c568a..9d7cfdf128bd5 100644 --- a/x-pack/plugins/security_solution/public/network/components/kpi_network/unique_private_ips/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/unique_private_ips/index.test.tsx @@ -6,26 +6,26 @@ */ import { useNetworkKpiUniquePrivateIps } from '../../../containers/kpi_network/unique_private_ips'; -import { useQueryToggle } from '../../../../common/containers/query_toggle'; +import { useQueryToggle } from '../../../../../common/containers/query_toggle'; import { render } from '@testing-library/react'; -import { TestProviders } from '../../../../common/mock'; +import { TestProviders } from '../../../../../common/mock'; import React from 'react'; import { NetworkKpiUniquePrivateIps } from '.'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; -import { useRefetchByRestartingSession } from '../../../../common/components/page/use_refetch_by_session'; +import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; +import { useRefetchByRestartingSession } from '../../../../../common/components/page/use_refetch_by_session'; import { KpiBaseComponentManage } from '../../../../hosts/components/kpi_hosts/common'; -jest.mock('../../../../common/containers/query_toggle'); +jest.mock('../../../../../common/containers/query_toggle'); jest.mock('../../../containers/kpi_network/unique_private_ips'); jest.mock('../../../../hosts/components/kpi_hosts/common', () => ({ KpiBaseComponentManage: jest .fn() .mockReturnValue(), })); -jest.mock('../../../../common/hooks/use_experimental_features', () => ({ +jest.mock('../../../../../common/hooks/use_experimental_features', () => ({ useIsExperimentalFeatureEnabled: jest.fn(), })); -jest.mock('../../../../common/components/page/use_refetch_by_session', () => ({ +jest.mock('../../../../../common/components/page/use_refetch_by_session', () => ({ useRefetchByRestartingSession: jest.fn(), })); diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/unique_private_ips/index.tsx b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/unique_private_ips/index.tsx similarity index 79% rename from x-pack/plugins/security_solution/public/network/components/kpi_network/unique_private_ips/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/kpi_network/unique_private_ips/index.tsx index a24419112bf33..8f8e5e5df620f 100644 --- a/x-pack/plugins/security_solution/public/network/components/kpi_network/unique_private_ips/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/unique_private_ips/index.tsx @@ -8,22 +8,22 @@ import React, { useEffect, useState } from 'react'; import { euiPaletteColorBlind } from '@elastic/eui'; -import type { StatItems } from '../../../../common/components/stat_items'; +import type { StatItems } from '../../../../components/stat_items'; import { useNetworkKpiUniquePrivateIps, ID, } from '../../../containers/kpi_network/unique_private_ips'; import type { NetworkKpiProps } from '../types'; import * as i18n from './translations'; -import { kpiUniquePrivateIpsSourceMetricLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_source_metric'; -import { kpiUniquePrivateIpsDestinationMetricLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_destination_metric'; -import { kpiUniquePrivateIpsAreaLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_area'; -import { kpiUniquePrivateIpsBarLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_bar'; +import { kpiUniquePrivateIpsSourceMetricLensAttributes } from '../../../../../common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_source_metric'; +import { kpiUniquePrivateIpsDestinationMetricLensAttributes } from '../../../../../common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_destination_metric'; +import { kpiUniquePrivateIpsAreaLensAttributes } from '../../../../../common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_area'; +import { kpiUniquePrivateIpsBarLensAttributes } from '../../../../../common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_bar'; import { KpiBaseComponentManage } from '../../../../hosts/components/kpi_hosts/common'; -import { useQueryToggle } from '../../../../common/containers/query_toggle'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; -import { InputsModelId } from '../../../../common/store/inputs/constants'; -import { useRefetchByRestartingSession } from '../../../../common/components/page/use_refetch_by_session'; +import { useQueryToggle } from '../../../../../common/containers/query_toggle'; +import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; +import { InputsModelId } from '../../../../../common/store/inputs/constants'; +import { useRefetchByRestartingSession } from '../../../../../common/components/page/use_refetch_by_session'; const euiVisColorPalette = euiPaletteColorBlind(); const euiColorVis2 = euiVisColorPalette[2]; diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/unique_private_ips/translations.ts b/x-pack/plugins/security_solution/public/explore/network/components/kpi_network/unique_private_ips/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/kpi_network/unique_private_ips/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/components/kpi_network/unique_private_ips/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/components/network_dns_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/network/components/network_dns_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/network_dns_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/explore/network/components/network_dns_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/security_solution/public/network/components/network_dns_table/__snapshots__/is_ptr_included.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/network/components/network_dns_table/__snapshots__/is_ptr_included.test.tsx.snap similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/network_dns_table/__snapshots__/is_ptr_included.test.tsx.snap rename to x-pack/plugins/security_solution/public/explore/network/components/network_dns_table/__snapshots__/is_ptr_included.test.tsx.snap diff --git a/x-pack/plugins/security_solution/public/network/components/network_dns_table/columns.tsx b/x-pack/plugins/security_solution/public/explore/network/components/network_dns_table/columns.tsx similarity index 81% rename from x-pack/plugins/security_solution/public/network/components/network_dns_table/columns.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/network_dns_table/columns.tsx index fc332d30fedc1..7de86b8cde273 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_dns_table/columns.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/network_dns_table/columns.tsx @@ -8,18 +8,18 @@ import numeral from '@elastic/numeral'; import React from 'react'; -import type { NetworkDnsItem } from '../../../../common/search_strategy'; -import { NetworkDnsFields } from '../../../../common/search_strategy'; +import type { NetworkDnsItem } from '../../../../../common/search_strategy'; +import { NetworkDnsFields } from '../../../../../common/search_strategy'; import { DragEffects, DraggableWrapper, -} from '../../../common/components/drag_and_drop/draggable_wrapper'; -import { escapeDataProviderId } from '../../../common/components/drag_and_drop/helpers'; -import { defaultToEmptyTag, getEmptyTagValue } from '../../../common/components/empty_value'; -import type { Columns } from '../../../common/components/paginated_table'; -import { IS_OPERATOR } from '../../../timelines/components/timeline/data_providers/data_provider'; -import { PreferenceFormattedBytes } from '../../../common/components/formatted_bytes'; -import { Provider } from '../../../timelines/components/timeline/data_providers/provider'; +} from '../../../../common/components/drag_and_drop/draggable_wrapper'; +import { escapeDataProviderId } from '../../../../common/components/drag_and_drop/helpers'; +import { defaultToEmptyTag, getEmptyTagValue } from '../../../../common/components/empty_value'; +import type { Columns } from '../../../components/paginated_table'; +import { IS_OPERATOR } from '../../../../timelines/components/timeline/data_providers/data_provider'; +import { PreferenceFormattedBytes } from '../../../../common/components/formatted_bytes'; +import { Provider } from '../../../../timelines/components/timeline/data_providers/provider'; import * as i18n from './translations'; export type NetworkDnsColumns = [ diff --git a/x-pack/plugins/security_solution/public/network/components/network_dns_table/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/network_dns_table/index.test.tsx similarity index 89% rename from x-pack/plugins/security_solution/public/network/components/network_dns_table/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/network_dns_table/index.test.tsx index e65d13274001e..29fef52c3fd06 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_dns_table/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/network_dns_table/index.test.tsx @@ -10,23 +10,23 @@ import { getOr } from 'lodash/fp'; import React from 'react'; import { Provider as ReduxStoreProvider } from 'react-redux'; -import '../../../common/mock/match_media'; +import '../../../../common/mock/match_media'; import { mockGlobalState, TestProviders, SUB_PLUGINS_REDUCER, kibanaObservable, createSecuritySolutionStorageMock, -} from '../../../common/mock'; -import type { State } from '../../../common/store'; -import { createStore } from '../../../common/store'; +} from '../../../../common/mock'; +import type { State } from '../../../../common/store'; +import { createStore } from '../../../../common/store'; import { networkModel } from '../../store'; -import { useMountAppended } from '../../../common/utils/use_mount_appended'; +import { useMountAppended } from '../../../../common/utils/use_mount_appended'; import { NetworkDnsTable } from '.'; import { mockData } from './mock'; -jest.mock('../../../common/lib/kibana'); +jest.mock('../../../../common/lib/kibana'); describe('NetworkTopNFlow Table Component', () => { const loadPage = jest.fn(); diff --git a/x-pack/plugins/security_solution/public/network/components/network_dns_table/index.tsx b/x-pack/plugins/security_solution/public/explore/network/components/network_dns_table/index.tsx similarity index 93% rename from x-pack/plugins/security_solution/public/network/components/network_dns_table/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/network_dns_table/index.tsx index 1961f50bce631..be0558b00f670 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_dns_table/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/network_dns_table/index.tsx @@ -15,10 +15,10 @@ import type { SortField, NetworkDnsEdges, NetworkDnsFields, -} from '../../../../common/search_strategy'; -import type { Criteria, ItemsPerRow } from '../../../common/components/paginated_table'; -import { PaginatedTable } from '../../../common/components/paginated_table'; -import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; +} from '../../../../../common/search_strategy'; +import type { Criteria, ItemsPerRow } from '../../../components/paginated_table'; +import { PaginatedTable } from '../../../components/paginated_table'; +import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; import { getNetworkDnsColumns } from './columns'; import { IsPtrIncluded } from './is_ptr_included'; diff --git a/x-pack/plugins/security_solution/public/network/components/network_dns_table/is_ptr_included.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/network_dns_table/is_ptr_included.test.tsx similarity index 94% rename from x-pack/plugins/security_solution/public/network/components/network_dns_table/is_ptr_included.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/network_dns_table/is_ptr_included.test.tsx index 762cd4006002b..02be3bc3acbbd 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_dns_table/is_ptr_included.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/network_dns_table/is_ptr_included.test.tsx @@ -7,7 +7,7 @@ import { mount, shallow } from 'enzyme'; import React from 'react'; -import { FlowDirection } from '../../../../common/search_strategy'; +import { FlowDirection } from '../../../../../common/search_strategy'; import { IsPtrIncluded } from './is_ptr_included'; diff --git a/x-pack/plugins/security_solution/public/network/components/network_dns_table/is_ptr_included.tsx b/x-pack/plugins/security_solution/public/explore/network/components/network_dns_table/is_ptr_included.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/network_dns_table/is_ptr_included.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/network_dns_table/is_ptr_included.tsx diff --git a/x-pack/plugins/security_solution/public/network/components/network_dns_table/mock.ts b/x-pack/plugins/security_solution/public/explore/network/components/network_dns_table/mock.ts similarity index 97% rename from x-pack/plugins/security_solution/public/network/components/network_dns_table/mock.ts rename to x-pack/plugins/security_solution/public/explore/network/components/network_dns_table/mock.ts index 2af67776534b2..e8d8ef7d13d8c 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_dns_table/mock.ts +++ b/x-pack/plugins/security_solution/public/explore/network/components/network_dns_table/mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { NetworkDnsStrategyResponse } from '../../../../common/search_strategy'; +import type { NetworkDnsStrategyResponse } from '../../../../../common/search_strategy'; export const mockData: NetworkDnsStrategyResponse = { totalCount: 80, diff --git a/x-pack/plugins/security_solution/public/network/components/network_dns_table/translations.ts b/x-pack/plugins/security_solution/public/explore/network/components/network_dns_table/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/network_dns_table/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/components/network_dns_table/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/components/network_http_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/network/components/network_http_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/network_http_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/explore/network/components/network_http_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/security_solution/public/network/components/network_http_table/columns.tsx b/x-pack/plugins/security_solution/public/explore/network/components/network_http_table/columns.tsx similarity index 87% rename from x-pack/plugins/security_solution/public/network/components/network_http_table/columns.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/network_http_table/columns.tsx index b2724fc4cb4a5..ae3df4159e8da 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_http_table/columns.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/network_http_table/columns.tsx @@ -10,18 +10,18 @@ import numeral from '@elastic/numeral'; import type { NetworkHttpEdges, NetworkHttpItem, -} from '../../../../common/search_strategy/security_solution/network'; -import { NetworkHttpFields } from '../../../../common/search_strategy/security_solution/network'; -import { escapeDataProviderId } from '../../../common/components/drag_and_drop/helpers'; -import { getEmptyTagValue } from '../../../common/components/empty_value'; -import { NetworkDetailsLink } from '../../../common/components/links'; -import type { Columns } from '../../../common/components/paginated_table'; +} from '../../../../../common/search_strategy/security_solution/network'; +import { NetworkHttpFields } from '../../../../../common/search_strategy/security_solution/network'; +import { escapeDataProviderId } from '../../../../common/components/drag_and_drop/helpers'; +import { getEmptyTagValue } from '../../../../common/components/empty_value'; +import { NetworkDetailsLink } from '../../../../common/components/links'; +import type { Columns } from '../../../components/paginated_table'; import * as i18n from './translations'; import { getRowItemDraggable, getRowItemDraggables, -} from '../../../common/components/tables/helpers'; +} from '../../../../common/components/tables/helpers'; export type NetworkHttpColumns = [ Columns, Columns, diff --git a/x-pack/plugins/security_solution/public/network/components/network_http_table/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/network_http_table/index.test.tsx similarity index 87% rename from x-pack/plugins/security_solution/public/network/components/network_http_table/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/network_http_table/index.test.tsx index 2f1cf3696ffc7..a65c1bf3b472f 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_http_table/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/network_http_table/index.test.tsx @@ -10,24 +10,24 @@ import { getOr } from 'lodash/fp'; import React from 'react'; import { Provider as ReduxStoreProvider } from 'react-redux'; -import '../../../common/mock/match_media'; +import '../../../../common/mock/match_media'; import { mockGlobalState, TestProviders, SUB_PLUGINS_REDUCER, kibanaObservable, createSecuritySolutionStorageMock, -} from '../../../common/mock'; -import { useMountAppended } from '../../../common/utils/use_mount_appended'; -import type { State } from '../../../common/store'; -import { createStore } from '../../../common/store'; +} from '../../../../common/mock'; +import { useMountAppended } from '../../../../common/utils/use_mount_appended'; +import type { State } from '../../../../common/store'; +import { createStore } from '../../../../common/store'; import { networkModel } from '../../store'; import { NetworkHttpTable } from '.'; import { mockData } from './mock'; -jest.mock('../../../common/lib/kibana'); -jest.mock('../../../common/components/link_to'); +jest.mock('../../../../common/lib/kibana'); +jest.mock('../../../../common/components/link_to'); describe('NetworkHttp Table Component', () => { const loadPage = jest.fn(); diff --git a/x-pack/plugins/security_solution/public/network/components/network_http_table/index.tsx b/x-pack/plugins/security_solution/public/explore/network/components/network_http_table/index.tsx similarity index 90% rename from x-pack/plugins/security_solution/public/network/components/network_http_table/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/network_http_table/index.tsx index beba355f38ace..4d6cd8773d06c 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_http_table/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/network_http_table/index.tsx @@ -9,11 +9,11 @@ import React, { useCallback, useMemo } from 'react'; import { useDispatch } from 'react-redux'; import { networkActions, networkModel, networkSelectors } from '../../store'; -import type { NetworkHttpEdges } from '../../../../common/search_strategy'; -import { NetworkHttpFields } from '../../../../common/search_strategy'; -import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; -import type { Criteria, ItemsPerRow } from '../../../common/components/paginated_table'; -import { PaginatedTable } from '../../../common/components/paginated_table'; +import type { NetworkHttpEdges } from '../../../../../common/search_strategy'; +import { NetworkHttpFields } from '../../../../../common/search_strategy'; +import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; +import type { Criteria, ItemsPerRow } from '../../../components/paginated_table'; +import { PaginatedTable } from '../../../components/paginated_table'; import { getNetworkHttpColumns } from './columns'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/network/components/network_http_table/mock.ts b/x-pack/plugins/security_solution/public/explore/network/components/network_http_table/mock.ts similarity index 96% rename from x-pack/plugins/security_solution/public/network/components/network_http_table/mock.ts rename to x-pack/plugins/security_solution/public/explore/network/components/network_http_table/mock.ts index 751edf77a13e9..d500f6e792aa9 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_http_table/mock.ts +++ b/x-pack/plugins/security_solution/public/explore/network/components/network_http_table/mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { NetworkHttpStrategyResponse } from '../../../../common/search_strategy'; +import type { NetworkHttpStrategyResponse } from '../../../../../common/search_strategy'; export const mockData: NetworkHttpStrategyResponse = { edges: [ diff --git a/x-pack/plugins/security_solution/public/network/components/network_http_table/translations.ts b/x-pack/plugins/security_solution/public/explore/network/components/network_http_table/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/network_http_table/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/components/network_http_table/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/network/components/network_top_countries_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/network_top_countries_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/explore/network/components/network_top_countries_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/columns.tsx b/x-pack/plugins/security_solution/public/explore/network/components/network_top_countries_table/columns.tsx similarity index 86% rename from x-pack/plugins/security_solution/public/network/components/network_top_countries_table/columns.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/network_top_countries_table/columns.tsx index 286ad973d4706..af7fe2f42e63b 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/columns.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/network_top_countries_table/columns.tsx @@ -13,20 +13,20 @@ import { CountryFlagAndName } from '../source_destination/country_flag'; import type { NetworkTopCountriesEdges, TopNetworkTablesEcsField, -} from '../../../../common/search_strategy/security_solution/network'; -import { FlowTargetSourceDest } from '../../../../common/search_strategy/security_solution/network'; +} from '../../../../../common/search_strategy/security_solution/network'; +import { FlowTargetSourceDest } from '../../../../../common/search_strategy/security_solution/network'; import { networkModel } from '../../store'; import { DragEffects, DraggableWrapper, -} from '../../../common/components/drag_and_drop/draggable_wrapper'; -import { escapeDataProviderId } from '../../../common/components/drag_and_drop/helpers'; -import { getEmptyTagValue } from '../../../common/components/empty_value'; -import type { Columns } from '../../../common/components/paginated_table'; -import { IS_OPERATOR } from '../../../timelines/components/timeline/data_providers/data_provider'; -import { Provider } from '../../../timelines/components/timeline/data_providers/provider'; +} from '../../../../common/components/drag_and_drop/draggable_wrapper'; +import { escapeDataProviderId } from '../../../../common/components/drag_and_drop/helpers'; +import { getEmptyTagValue } from '../../../../common/components/empty_value'; +import type { Columns } from '../../../components/paginated_table'; +import { IS_OPERATOR } from '../../../../timelines/components/timeline/data_providers/data_provider'; +import { Provider } from '../../../../timelines/components/timeline/data_providers/provider'; import * as i18n from './translations'; -import { PreferenceFormattedBytes } from '../../../common/components/formatted_bytes'; +import { PreferenceFormattedBytes } from '../../../../common/components/formatted_bytes'; export type NetworkTopCountriesColumns = [ Columns, diff --git a/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/network_top_countries_table/index.test.tsx similarity index 89% rename from x-pack/plugins/security_solution/public/network/components/network_top_countries_table/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/network_top_countries_table/index.test.tsx index 97cd7523c1746..c169bda5696d5 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/network_top_countries_table/index.test.tsx @@ -10,8 +10,8 @@ import { getOr } from 'lodash/fp'; import React from 'react'; import { Provider as ReduxStoreProvider } from 'react-redux'; -import '../../../common/mock/match_media'; -import { FlowTargetSourceDest } from '../../../../common/search_strategy/security_solution/network'; +import '../../../../common/mock/match_media'; +import { FlowTargetSourceDest } from '../../../../../common/search_strategy/security_solution/network'; import { mockGlobalState, mockIndexPattern, @@ -19,16 +19,16 @@ import { SUB_PLUGINS_REDUCER, kibanaObservable, createSecuritySolutionStorageMock, -} from '../../../common/mock'; -import { useMountAppended } from '../../../common/utils/use_mount_appended'; -import type { State } from '../../../common/store'; -import { createStore } from '../../../common/store'; +} from '../../../../common/mock'; +import { useMountAppended } from '../../../../common/utils/use_mount_appended'; +import type { State } from '../../../../common/store'; +import { createStore } from '../../../../common/store'; import { networkModel } from '../../store'; import { NetworkTopCountriesTable } from '.'; import { mockData } from './mock'; -jest.mock('../../../common/lib/kibana'); +jest.mock('../../../../common/lib/kibana'); describe('NetworkTopCountries Table Component', () => { const loadPage = jest.fn(); diff --git a/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/index.tsx b/x-pack/plugins/security_solution/public/explore/network/components/network_top_countries_table/index.tsx similarity index 94% rename from x-pack/plugins/security_solution/public/network/components/network_top_countries_table/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/network_top_countries_table/index.tsx index da6a4b862b6f8..d149e1bb474ef 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/network_top_countries_table/index.tsx @@ -12,16 +12,16 @@ import deepEqual from 'fast-deep-equal'; import type { DataViewBase } from '@kbn/es-query'; import { networkActions, networkModel, networkSelectors } from '../../store'; -import type { NetworkTopCountriesEdges, SortField } from '../../../../common/search_strategy'; +import type { NetworkTopCountriesEdges, SortField } from '../../../../../common/search_strategy'; import { Direction, FlowTargetSourceDest, NetworkTopTablesFields, -} from '../../../../common/search_strategy'; -import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; +} from '../../../../../common/search_strategy'; +import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; -import type { Criteria, ItemsPerRow } from '../../../common/components/paginated_table'; -import { PaginatedTable } from '../../../common/components/paginated_table'; +import type { Criteria, ItemsPerRow } from '../../../components/paginated_table'; +import { PaginatedTable } from '../../../components/paginated_table'; import { getCountriesColumnsCurated } from './columns'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/mock.ts b/x-pack/plugins/security_solution/public/explore/network/components/network_top_countries_table/mock.ts similarity index 95% rename from x-pack/plugins/security_solution/public/network/components/network_top_countries_table/mock.ts rename to x-pack/plugins/security_solution/public/explore/network/components/network_top_countries_table/mock.ts index c213d0535d992..6cac69624b4da 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/mock.ts +++ b/x-pack/plugins/security_solution/public/explore/network/components/network_top_countries_table/mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { NetworkTopCountriesStrategyResponse } from '../../../../common/search_strategy/security_solution/network'; +import type { NetworkTopCountriesStrategyResponse } from '../../../../../common/search_strategy/security_solution/network'; export const mockData: { NetworkTopCountries: NetworkTopCountriesStrategyResponse } = { NetworkTopCountries: { diff --git a/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/translations.ts b/x-pack/plugins/security_solution/public/explore/network/components/network_top_countries_table/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/network_top_countries_table/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/components/network_top_countries_table/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/network/components/network_top_n_flow_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/explore/network/components/network_top_n_flow_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/columns.tsx b/x-pack/plugins/security_solution/public/explore/network/components/network_top_n_flow_table/columns.tsx similarity index 89% rename from x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/columns.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/network_top_n_flow_table/columns.tsx index 18a5e808b699a..ef36956ff98a6 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/columns.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/network_top_n_flow_table/columns.tsx @@ -14,25 +14,25 @@ import type { AutonomousSystemItem, NetworkTopNFlowEdges, TopNetworkTablesEcsField, -} from '../../../../common/search_strategy'; -import { FlowTargetSourceDest } from '../../../../common/search_strategy'; +} from '../../../../../common/search_strategy'; +import { FlowTargetSourceDest } from '../../../../../common/search_strategy'; import { networkModel } from '../../store'; import { DragEffects, DraggableWrapper, -} from '../../../common/components/drag_and_drop/draggable_wrapper'; -import { escapeDataProviderId } from '../../../common/components/drag_and_drop/helpers'; -import { getEmptyTagValue } from '../../../common/components/empty_value'; -import { NetworkDetailsLink } from '../../../common/components/links'; -import type { Columns } from '../../../common/components/paginated_table'; -import { IS_OPERATOR } from '../../../timelines/components/timeline/data_providers/data_provider'; -import { Provider } from '../../../timelines/components/timeline/data_providers/provider'; +} from '../../../../common/components/drag_and_drop/draggable_wrapper'; +import { escapeDataProviderId } from '../../../../common/components/drag_and_drop/helpers'; +import { getEmptyTagValue } from '../../../../common/components/empty_value'; +import { NetworkDetailsLink } from '../../../../common/components/links'; +import type { Columns } from '../../../components/paginated_table'; +import { IS_OPERATOR } from '../../../../timelines/components/timeline/data_providers/data_provider'; +import { Provider } from '../../../../timelines/components/timeline/data_providers/provider'; import * as i18n from './translations'; import { getRowItemDraggable, getRowItemDraggables, -} from '../../../common/components/tables/helpers'; -import { PreferenceFormattedBytes } from '../../../common/components/formatted_bytes'; +} from '../../../../common/components/tables/helpers'; +import { PreferenceFormattedBytes } from '../../../../common/components/formatted_bytes'; export type NetworkTopNFlowColumns = [ Columns, diff --git a/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/network_top_n_flow_table/index.test.tsx similarity index 88% rename from x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/network_top_n_flow_table/index.test.tsx index 0ab7736e2ec09..b1f4c11ad54dc 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/network_top_n_flow_table/index.test.tsx @@ -10,24 +10,24 @@ import { getOr } from 'lodash/fp'; import React from 'react'; import { Provider as ReduxStoreProvider } from 'react-redux'; -import '../../../common/mock/match_media'; +import '../../../../common/mock/match_media'; import { mockGlobalState, TestProviders, SUB_PLUGINS_REDUCER, kibanaObservable, createSecuritySolutionStorageMock, -} from '../../../common/mock'; -import { useMountAppended } from '../../../common/utils/use_mount_appended'; -import type { State } from '../../../common/store'; -import { createStore } from '../../../common/store'; +} from '../../../../common/mock'; +import { useMountAppended } from '../../../../common/utils/use_mount_appended'; +import type { State } from '../../../../common/store'; +import { createStore } from '../../../../common/store'; import { networkModel } from '../../store'; import { NetworkTopNFlowTable } from '.'; import { mockData } from './mock'; -import { FlowTargetSourceDest } from '../../../../common/search_strategy'; +import { FlowTargetSourceDest } from '../../../../../common/search_strategy'; -jest.mock('../../../common/lib/kibana'); -jest.mock('../../../common/components/link_to'); +jest.mock('../../../../common/lib/kibana'); +jest.mock('../../../../common/components/link_to'); describe('NetworkTopNFlow Table Component', () => { const loadPage = jest.fn(); diff --git a/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/index.tsx b/x-pack/plugins/security_solution/public/explore/network/components/network_top_n_flow_table/index.tsx similarity index 94% rename from x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/network_top_n_flow_table/index.tsx index 4dde37630f08c..0870263f9f894 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/network_top_n_flow_table/index.tsx @@ -10,15 +10,15 @@ import React, { useCallback, useMemo } from 'react'; import { useDispatch } from 'react-redux'; import deepEqual from 'fast-deep-equal'; -import type { SortField, NetworkTopNFlowEdges } from '../../../../common/search_strategy'; +import type { SortField, NetworkTopNFlowEdges } from '../../../../../common/search_strategy'; import { Direction, FlowTargetSourceDest, NetworkTopTablesFields, -} from '../../../../common/search_strategy'; -import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; -import type { Criteria, ItemsPerRow } from '../../../common/components/paginated_table'; -import { PaginatedTable } from '../../../common/components/paginated_table'; +} from '../../../../../common/search_strategy'; +import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; +import type { Criteria, ItemsPerRow } from '../../../components/paginated_table'; +import { PaginatedTable } from '../../../components/paginated_table'; import { networkActions, networkModel, networkSelectors } from '../../store'; import { getNFlowColumnsCurated } from './columns'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/mock.ts b/x-pack/plugins/security_solution/public/explore/network/components/network_top_n_flow_table/mock.ts similarity index 95% rename from x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/mock.ts rename to x-pack/plugins/security_solution/public/explore/network/components/network_top_n_flow_table/mock.ts index 387ec9d7d72b9..3538721337796 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/mock.ts +++ b/x-pack/plugins/security_solution/public/explore/network/components/network_top_n_flow_table/mock.ts @@ -5,8 +5,8 @@ * 2.0. */ -import type { NetworkTopNFlowStrategyResponse } from '../../../../common/search_strategy'; -import { FlowTargetSourceDest } from '../../../../common/search_strategy'; +import type { NetworkTopNFlowStrategyResponse } from '../../../../../common/search_strategy'; +import { FlowTargetSourceDest } from '../../../../../common/search_strategy'; export const mockData: NetworkTopNFlowStrategyResponse = { totalCount: 524, diff --git a/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/translations.ts b/x-pack/plugins/security_solution/public/explore/network/components/network_top_n_flow_table/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/components/network_top_n_flow_table/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/components/port/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/network/components/port/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/port/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/explore/network/components/port/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/security_solution/public/network/components/port/helpers.ts b/x-pack/plugins/security_solution/public/explore/network/components/port/helpers.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/port/helpers.ts rename to x-pack/plugins/security_solution/public/explore/network/components/port/helpers.ts diff --git a/x-pack/plugins/security_solution/public/network/components/port/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/port/index.test.tsx similarity index 90% rename from x-pack/plugins/security_solution/public/network/components/port/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/port/index.test.tsx index ec56dd6934463..de274fca2fbb4 100644 --- a/x-pack/plugins/security_solution/public/network/components/port/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/port/index.test.tsx @@ -9,13 +9,13 @@ import { shallow } from 'enzyme'; import React from 'react'; import { removeExternalLinkText } from '@kbn/securitysolution-io-ts-utils'; -import '../../../common/mock/match_media'; -import { TestProviders } from '../../../common/mock/test_providers'; -import { useMountAppended } from '../../../common/utils/use_mount_appended'; +import '../../../../common/mock/match_media'; +import { TestProviders } from '../../../../common/mock/test_providers'; +import { useMountAppended } from '../../../../common/utils/use_mount_appended'; import { Port } from '.'; -jest.mock('../../../common/lib/kibana'); +jest.mock('../../../../common/lib/kibana'); jest.mock('@elastic/eui', () => { const original = jest.requireActual('@elastic/eui'); diff --git a/x-pack/plugins/security_solution/public/network/components/port/index.tsx b/x-pack/plugins/security_solution/public/explore/network/components/port/index.tsx similarity index 86% rename from x-pack/plugins/security_solution/public/network/components/port/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/port/index.tsx index 57e2cd8398214..102143e54c959 100644 --- a/x-pack/plugins/security_solution/public/network/components/port/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/port/index.tsx @@ -8,9 +8,9 @@ import type { EuiButtonEmpty, EuiButtonIcon } from '@elastic/eui'; import React from 'react'; -import { DefaultDraggable } from '../../../common/components/draggables'; -import { getEmptyValue } from '../../../common/components/empty_value'; -import { PortOrServiceNameLink } from '../../../common/components/links'; +import { DefaultDraggable } from '../../../../common/components/draggables'; +import { getEmptyValue } from '../../../../common/components/empty_value'; +import { PortOrServiceNameLink } from '../../../../common/components/links'; export const Port = React.memo<{ contextId: string; diff --git a/x-pack/plugins/security_solution/public/network/components/source_destination/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/network/components/source_destination/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/source_destination/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/explore/network/components/source_destination/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/security_solution/public/network/components/source_destination/country_flag.tsx b/x-pack/plugins/security_solution/public/explore/network/components/source_destination/country_flag.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/source_destination/country_flag.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/source_destination/country_flag.tsx diff --git a/x-pack/plugins/security_solution/public/network/components/source_destination/field_names.ts b/x-pack/plugins/security_solution/public/explore/network/components/source_destination/field_names.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/source_destination/field_names.ts rename to x-pack/plugins/security_solution/public/explore/network/components/source_destination/field_names.ts diff --git a/x-pack/plugins/security_solution/public/network/components/source_destination/geo_fields.tsx b/x-pack/plugins/security_solution/public/explore/network/components/source_destination/geo_fields.tsx similarity index 98% rename from x-pack/plugins/security_solution/public/network/components/source_destination/geo_fields.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/source_destination/geo_fields.tsx index b414f7e8ee363..65521d03f3d38 100644 --- a/x-pack/plugins/security_solution/public/network/components/source_destination/geo_fields.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/source_destination/geo_fields.tsx @@ -10,7 +10,7 @@ import { get, uniq } from 'lodash/fp'; import React from 'react'; import styled from 'styled-components'; -import { DefaultDraggable } from '../../../common/components/draggables'; +import { DefaultDraggable } from '../../../../common/components/draggables'; import { CountryFlag } from './country_flag'; import type { GeoFieldsProps, SourceDestinationType } from './types'; diff --git a/x-pack/plugins/security_solution/public/network/components/source_destination/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/source_destination/index.test.tsx similarity index 96% rename from x-pack/plugins/security_solution/public/network/components/source_destination/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/source_destination/index.test.tsx index 3eea6972971a7..414d35ae67748 100644 --- a/x-pack/plugins/security_solution/public/network/components/source_destination/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/source_destination/index.test.tsx @@ -10,11 +10,11 @@ import { get } from 'lodash/fp'; import React from 'react'; import { render, screen, within } from '@testing-library/react'; -import { asArrayIfExists } from '../../../common/lib/helpers'; -import { getMockNetflowData } from '../../../common/mock'; -import '../../../common/mock/match_media'; -import { TestProviders } from '../../../common/mock/test_providers'; -import { ID_FIELD_NAME } from '../../../common/components/event_details/event_id'; +import { asArrayIfExists } from '../../../../common/lib/helpers'; +import { getMockNetflowData } from '../../../../common/mock'; +import '../../../../common/mock/match_media'; +import { TestProviders } from '../../../../common/mock/test_providers'; +import { ID_FIELD_NAME } from '../../../../common/components/event_details/event_id'; import { DESTINATION_IP_FIELD_NAME, SOURCE_IP_FIELD_NAME } from '../ip'; import { DESTINATION_PORT_FIELD_NAME, SOURCE_PORT_FIELD_NAME } from '../port/helpers'; import { @@ -23,7 +23,7 @@ import { SOURCE_BYTES_FIELD_NAME, SOURCE_PACKETS_FIELD_NAME, } from './source_destination_arrows'; -import * as i18n from '../../../timelines/components/timeline/body/renderers/translations'; +import * as i18n from '../../../../timelines/components/timeline/body/renderers/translations'; import { SourceDestination } from '.'; import { @@ -47,7 +47,7 @@ import { NETWORK_TRANSPORT_FIELD_NAME, } from './field_names'; -jest.mock('../../../common/lib/kibana'); +jest.mock('../../../../common/lib/kibana'); jest.mock('@elastic/eui', () => { const original = jest.requireActual('@elastic/eui'); diff --git a/x-pack/plugins/security_solution/public/network/components/source_destination/index.tsx b/x-pack/plugins/security_solution/public/explore/network/components/source_destination/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/source_destination/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/source_destination/index.tsx diff --git a/x-pack/plugins/security_solution/public/network/components/source_destination/ip_with_port.tsx b/x-pack/plugins/security_solution/public/explore/network/components/source_destination/ip_with_port.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/source_destination/ip_with_port.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/source_destination/ip_with_port.tsx diff --git a/x-pack/plugins/security_solution/public/network/components/source_destination/label.tsx b/x-pack/plugins/security_solution/public/explore/network/components/source_destination/label.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/source_destination/label.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/source_destination/label.tsx diff --git a/x-pack/plugins/security_solution/public/network/components/source_destination/network.tsx b/x-pack/plugins/security_solution/public/explore/network/components/source_destination/network.tsx similarity index 96% rename from x-pack/plugins/security_solution/public/network/components/source_destination/network.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/source_destination/network.tsx index 727818ebad2a8..ff29cdcb0f5b4 100644 --- a/x-pack/plugins/security_solution/public/network/components/source_destination/network.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/source_destination/network.tsx @@ -11,7 +11,7 @@ import React from 'react'; import styled from 'styled-components'; import { DirectionBadge } from '../direction'; -import { DefaultDraggable, DraggableBadge } from '../../../common/components/draggables'; +import { DefaultDraggable, DraggableBadge } from '../../../../common/components/draggables'; import * as i18n from './translations'; import { @@ -21,7 +21,7 @@ import { NETWORK_PROTOCOL_FIELD_NAME, NETWORK_TRANSPORT_FIELD_NAME, } from './field_names'; -import { PreferenceFormattedBytes } from '../../../common/components/formatted_bytes'; +import { PreferenceFormattedBytes } from '../../../../common/components/formatted_bytes'; const EuiFlexItemMarginRight = styled(EuiFlexItem)` margin-right: 3px; diff --git a/x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_arrows.tsx b/x-pack/plugins/security_solution/public/explore/network/components/source_destination/source_destination_arrows.tsx similarity index 98% rename from x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_arrows.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/source_destination/source_destination_arrows.tsx index a88861682b6f2..050dedd79325c 100644 --- a/x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_arrows.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/source_destination/source_destination_arrows.tsx @@ -17,8 +17,8 @@ import { getPercent, hasOneValue, } from '../arrows/helpers'; -import { DefaultDraggable } from '../../../common/components/draggables'; -import { PreferenceFormattedBytes } from '../../../common/components/formatted_bytes'; +import { DefaultDraggable } from '../../../../common/components/draggables'; +import { PreferenceFormattedBytes } from '../../../../common/components/formatted_bytes'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_ip.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/source_destination/source_destination_ip.test.tsx similarity index 98% rename from x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_ip.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/source_destination/source_destination_ip.test.tsx index b2ae67f8d7372..2f988c37a4b8f 100644 --- a/x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_ip.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/source_destination/source_destination_ip.test.tsx @@ -9,14 +9,14 @@ import { get } from 'lodash/fp'; import React from 'react'; import { render, screen } from '@testing-library/react'; -import { asArrayIfExists } from '../../../common/lib/helpers'; -import { getMockNetflowData } from '../../../common/mock'; -import '../../../common/mock/match_media'; -import { TestProviders } from '../../../common/mock/test_providers'; -import { ID_FIELD_NAME } from '../../../common/components/event_details/event_id'; +import { asArrayIfExists } from '../../../../common/lib/helpers'; +import { getMockNetflowData } from '../../../../common/mock'; +import '../../../../common/mock/match_media'; +import { TestProviders } from '../../../../common/mock/test_providers'; +import { ID_FIELD_NAME } from '../../../../common/components/event_details/event_id'; import { DESTINATION_IP_FIELD_NAME, SOURCE_IP_FIELD_NAME } from '../ip'; import { DESTINATION_PORT_FIELD_NAME, SOURCE_PORT_FIELD_NAME } from '../port/helpers'; -import * as i18n from '../../../timelines/components/timeline/body/renderers/translations'; +import * as i18n from '../../../../timelines/components/timeline/body/renderers/translations'; import { getPorts, @@ -37,9 +37,9 @@ import { SOURCE_GEO_REGION_NAME_FIELD_NAME, } from './geo_fields'; -jest.mock('../../../common/lib/kibana'); +jest.mock('../../../../common/lib/kibana'); -jest.mock('../../../common/components/link_to'); +jest.mock('../../../../common/components/link_to'); describe('SourceDestinationIp', () => { describe('#isIpFieldPopulated', () => { diff --git a/x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_ip.tsx b/x-pack/plugins/security_solution/public/explore/network/components/source_destination/source_destination_ip.tsx similarity index 98% rename from x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_ip.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/source_destination/source_destination_ip.tsx index e577d91205aea..4d06e9fa9d5dc 100644 --- a/x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_ip.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/source_destination/source_destination_ip.tsx @@ -13,7 +13,7 @@ import deepEqual from 'fast-deep-equal'; import { DESTINATION_IP_FIELD_NAME, SOURCE_IP_FIELD_NAME } from '../ip'; import { Port } from '../port'; import { DESTINATION_PORT_FIELD_NAME, SOURCE_PORT_FIELD_NAME } from '../port/helpers'; -import * as i18n from '../../../timelines/components/timeline/body/renderers/translations'; +import * as i18n from '../../../../timelines/components/timeline/body/renderers/translations'; import { GeoFields } from './geo_fields'; import { IpWithPort } from './ip_with_port'; diff --git a/x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_with_arrows.tsx b/x-pack/plugins/security_solution/public/explore/network/components/source_destination/source_destination_with_arrows.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_with_arrows.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/source_destination/source_destination_with_arrows.tsx diff --git a/x-pack/plugins/security_solution/public/network/components/source_destination/translations.ts b/x-pack/plugins/security_solution/public/explore/network/components/source_destination/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/source_destination/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/components/source_destination/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/components/source_destination/types.ts b/x-pack/plugins/security_solution/public/explore/network/components/source_destination/types.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/source_destination/types.ts rename to x-pack/plugins/security_solution/public/explore/network/components/source_destination/types.ts diff --git a/x-pack/plugins/security_solution/public/network/components/tls_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/network/components/tls_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/tls_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/explore/network/components/tls_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/security_solution/public/network/components/tls_table/columns.tsx b/x-pack/plugins/security_solution/public/explore/network/components/tls_table/columns.tsx similarity index 87% rename from x-pack/plugins/security_solution/public/network/components/tls_table/columns.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/tls_table/columns.tsx index 580bd0734071b..b76d438a4fd01 100644 --- a/x-pack/plugins/security_solution/public/network/components/tls_table/columns.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/tls_table/columns.tsx @@ -8,14 +8,14 @@ import React from 'react'; import moment from 'moment'; -import type { NetworkTlsNode } from '../../../../common/search_strategy'; -import type { Columns } from '../../../common/components/paginated_table'; +import type { NetworkTlsNode } from '../../../../../common/search_strategy'; +import type { Columns } from '../../../components/paginated_table'; import { getRowItemDraggables, getRowItemDraggable, -} from '../../../common/components/tables/helpers'; -import { LocalizedDateTooltip } from '../../../common/components/localized_date_tooltip'; -import { PreferenceFormattedDate } from '../../../common/components/formatted_date'; +} from '../../../../common/components/tables/helpers'; +import { LocalizedDateTooltip } from '../../../../common/components/localized_date_tooltip'; +import { PreferenceFormattedDate } from '../../../../common/components/formatted_date'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/network/components/tls_table/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/tls_table/index.test.tsx similarity index 88% rename from x-pack/plugins/security_solution/public/network/components/tls_table/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/tls_table/index.test.tsx index b52b4cd685b9b..44112c86b23f2 100644 --- a/x-pack/plugins/security_solution/public/network/components/tls_table/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/tls_table/index.test.tsx @@ -10,22 +10,22 @@ import { getOr } from 'lodash/fp'; import React from 'react'; import { Provider as ReduxStoreProvider } from 'react-redux'; -import '../../../common/mock/match_media'; +import '../../../../common/mock/match_media'; import { mockGlobalState, TestProviders, SUB_PLUGINS_REDUCER, kibanaObservable, createSecuritySolutionStorageMock, -} from '../../../common/mock'; -import { useMountAppended } from '../../../common/utils/use_mount_appended'; -import type { State } from '../../../common/store'; -import { createStore } from '../../../common/store'; +} from '../../../../common/mock'; +import { useMountAppended } from '../../../../common/utils/use_mount_appended'; +import type { State } from '../../../../common/store'; +import { createStore } from '../../../../common/store'; import { networkModel } from '../../store'; import { TlsTable } from '.'; import { mockTlsData } from './mock'; -jest.mock('../../../common/lib/kibana'); +jest.mock('../../../../common/lib/kibana'); describe('Tls Table Component', () => { const loadPage = jest.fn(); diff --git a/x-pack/plugins/security_solution/public/network/components/tls_table/index.tsx b/x-pack/plugins/security_solution/public/explore/network/components/tls_table/index.tsx similarity index 91% rename from x-pack/plugins/security_solution/public/network/components/tls_table/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/tls_table/index.tsx index fa98daf40794b..b981dba31c2b6 100644 --- a/x-pack/plugins/security_solution/public/network/components/tls_table/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/tls_table/index.tsx @@ -10,15 +10,11 @@ import { useDispatch } from 'react-redux'; import deepEqual from 'fast-deep-equal'; import { networkActions, networkModel, networkSelectors } from '../../store'; -import type { Direction, NetworkTlsEdges, SortField } from '../../../../common/search_strategy'; -import { NetworkTlsFields } from '../../../../common/search_strategy'; -import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; -import type { - Criteria, - ItemsPerRow, - SortingBasicTable, -} from '../../../common/components/paginated_table'; -import { PaginatedTable } from '../../../common/components/paginated_table'; +import type { Direction, NetworkTlsEdges, SortField } from '../../../../../common/search_strategy'; +import { NetworkTlsFields } from '../../../../../common/search_strategy'; +import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; +import type { Criteria, ItemsPerRow, SortingBasicTable } from '../../../components/paginated_table'; +import { PaginatedTable } from '../../../components/paginated_table'; import { getTlsColumns } from './columns'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/network/components/tls_table/mock.ts b/x-pack/plugins/security_solution/public/explore/network/components/tls_table/mock.ts similarity index 94% rename from x-pack/plugins/security_solution/public/network/components/tls_table/mock.ts rename to x-pack/plugins/security_solution/public/explore/network/components/tls_table/mock.ts index c2c3f5fe265fd..5e3e696c7470f 100644 --- a/x-pack/plugins/security_solution/public/network/components/tls_table/mock.ts +++ b/x-pack/plugins/security_solution/public/explore/network/components/tls_table/mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { NetworkTlsStrategyResponse } from '../../../../common/search_strategy'; +import type { NetworkTlsStrategyResponse } from '../../../../../common/search_strategy'; export const mockTlsData: NetworkTlsStrategyResponse = { totalCount: 2, diff --git a/x-pack/plugins/security_solution/public/network/components/tls_table/translations.ts b/x-pack/plugins/security_solution/public/explore/network/components/tls_table/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/tls_table/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/components/tls_table/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/components/users_table/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/network/components/users_table/__snapshots__/index.test.tsx.snap similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/users_table/__snapshots__/index.test.tsx.snap rename to x-pack/plugins/security_solution/public/explore/network/components/users_table/__snapshots__/index.test.tsx.snap diff --git a/x-pack/plugins/security_solution/public/network/components/users_table/columns.tsx b/x-pack/plugins/security_solution/public/explore/network/components/users_table/columns.tsx similarity index 91% rename from x-pack/plugins/security_solution/public/network/components/users_table/columns.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/users_table/columns.tsx index a20b8eefdf335..12ffc2b3a834b 100644 --- a/x-pack/plugins/security_solution/public/network/components/users_table/columns.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/users_table/columns.tsx @@ -5,15 +5,15 @@ * 2.0. */ -import type { FlowTargetSourceDest, NetworkUsersItem } from '../../../../common/search_strategy'; -import { defaultToEmptyTag } from '../../../common/components/empty_value'; -import type { Columns } from '../../../common/components/paginated_table'; +import type { FlowTargetSourceDest, NetworkUsersItem } from '../../../../../common/search_strategy'; +import { defaultToEmptyTag } from '../../../../common/components/empty_value'; +import type { Columns } from '../../../components/paginated_table'; import * as i18n from './translations'; import { getRowItemDraggables, getRowItemDraggable, -} from '../../../common/components/tables/helpers'; +} from '../../../../common/components/tables/helpers'; export type UsersColumns = [ Columns, diff --git a/x-pack/plugins/security_solution/public/network/components/users_table/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/components/users_table/index.test.tsx similarity index 86% rename from x-pack/plugins/security_solution/public/network/components/users_table/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/users_table/index.test.tsx index a7b6e98054790..42d1b3eaf351b 100644 --- a/x-pack/plugins/security_solution/public/network/components/users_table/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/users_table/index.test.tsx @@ -10,24 +10,24 @@ import { getOr } from 'lodash/fp'; import React from 'react'; import { Provider as ReduxStoreProvider } from 'react-redux'; -import '../../../common/mock/match_media'; +import '../../../../common/mock/match_media'; import { mockGlobalState, TestProviders, SUB_PLUGINS_REDUCER, kibanaObservable, createSecuritySolutionStorageMock, -} from '../../../common/mock'; -import { useMountAppended } from '../../../common/utils/use_mount_appended'; -import type { State } from '../../../common/store'; -import { createStore } from '../../../common/store'; +} from '../../../../common/mock'; +import { useMountAppended } from '../../../../common/utils/use_mount_appended'; +import type { State } from '../../../../common/store'; +import { createStore } from '../../../../common/store'; import { networkModel } from '../../store'; import { UsersTable } from '.'; import { mockUsersData } from './mock'; -import { FlowTargetSourceDest } from '../../../../common/search_strategy'; +import { FlowTargetSourceDest } from '../../../../../common/search_strategy'; -jest.mock('../../../common/lib/kibana'); +jest.mock('../../../../common/lib/kibana'); describe('Users Table Component', () => { const loadPage = jest.fn(); diff --git a/x-pack/plugins/security_solution/public/network/components/users_table/index.tsx b/x-pack/plugins/security_solution/public/explore/network/components/users_table/index.tsx similarity index 90% rename from x-pack/plugins/security_solution/public/network/components/users_table/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/components/users_table/index.tsx index eed8ddad9dddf..909f4fa77d94d 100644 --- a/x-pack/plugins/security_solution/public/network/components/users_table/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/components/users_table/index.tsx @@ -9,22 +9,18 @@ import React, { useCallback, useMemo } from 'react'; import { useDispatch } from 'react-redux'; import deepEqual from 'fast-deep-equal'; -import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; -import { assertUnreachable } from '../../../../common/utility_types'; +import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; +import { assertUnreachable } from '../../../../../common/utility_types'; import { networkActions, networkModel, networkSelectors } from '../../store'; import type { Direction, FlowTargetSourceDest, NetworkUsersEdges, SortField, -} from '../../../../common/search_strategy'; -import { NetworkUsersFields } from '../../../../common/search_strategy'; -import type { - Criteria, - ItemsPerRow, - SortingBasicTable, -} from '../../../common/components/paginated_table'; -import { PaginatedTable } from '../../../common/components/paginated_table'; +} from '../../../../../common/search_strategy'; +import { NetworkUsersFields } from '../../../../../common/search_strategy'; +import type { Criteria, ItemsPerRow, SortingBasicTable } from '../../../components/paginated_table'; +import { PaginatedTable } from '../../../components/paginated_table'; import { getUsersColumns } from './columns'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/network/components/users_table/mock.ts b/x-pack/plugins/security_solution/public/explore/network/components/users_table/mock.ts similarity index 93% rename from x-pack/plugins/security_solution/public/network/components/users_table/mock.ts rename to x-pack/plugins/security_solution/public/explore/network/components/users_table/mock.ts index ae4d182733613..8ce32a793af19 100644 --- a/x-pack/plugins/security_solution/public/network/components/users_table/mock.ts +++ b/x-pack/plugins/security_solution/public/explore/network/components/users_table/mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { NetworkUsersStrategyResponse } from '../../../../common/search_strategy'; +import type { NetworkUsersStrategyResponse } from '../../../../../common/search_strategy'; export const mockUsersData: NetworkUsersStrategyResponse = { edges: [ diff --git a/x-pack/plugins/security_solution/public/network/components/users_table/translations.ts b/x-pack/plugins/security_solution/public/explore/network/components/users_table/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/components/users_table/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/components/users_table/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/containers/details/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/details/index.test.tsx similarity index 88% rename from x-pack/plugins/security_solution/public/network/containers/details/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/containers/details/index.test.tsx index 266fb15f4b40d..dde6ff13a4a81 100644 --- a/x-pack/plugins/security_solution/public/network/containers/details/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/details/index.test.tsx @@ -5,11 +5,11 @@ * 2.0. */ import { act, renderHook } from '@testing-library/react-hooks'; -import { TestProviders } from '../../../common/mock'; +import { TestProviders } from '../../../../common/mock'; import { ID, useNetworkDetails } from '.'; -import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; +import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; -jest.mock('../../../common/containers/use_search_strategy', () => ({ +jest.mock('../../../../common/containers/use_search_strategy', () => ({ useSearchStrategy: jest.fn(), })); const mockUseSearchStrategy = useSearchStrategy as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/network/containers/details/index.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/details/index.tsx similarity index 81% rename from x-pack/plugins/security_solution/public/network/containers/details/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/containers/details/index.tsx index 1ab84d9f0fe37..0f1c49189ba92 100644 --- a/x-pack/plugins/security_solution/public/network/containers/details/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/details/index.tsx @@ -7,15 +7,15 @@ import { useEffect, useMemo } from 'react'; -import type { ESTermQuery } from '../../../../common/typed_json'; -import type { inputsModel } from '../../../common/store'; -import { createFilter } from '../../../common/containers/helpers'; -import type { NetworkDetailsStrategyResponse } from '../../../../common/search_strategy'; -import { NetworkQueries } from '../../../../common/search_strategy'; +import type { ESTermQuery } from '../../../../../common/typed_json'; +import type { inputsModel } from '../../../../common/store'; +import { createFilter } from '../../../../common/containers/helpers'; +import type { NetworkDetailsStrategyResponse } from '../../../../../common/search_strategy'; +import { NetworkQueries } from '../../../../../common/search_strategy'; import * as i18n from './translations'; -import type { InspectResponse } from '../../../types'; +import type { InspectResponse } from '../../../../types'; -import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; +import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; export const ID = 'networkDetailsQuery'; diff --git a/x-pack/plugins/security_solution/public/network/containers/details/translations.ts b/x-pack/plugins/security_solution/public/explore/network/containers/details/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/containers/details/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/containers/details/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/containers/kpi_network/dns/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/dns/index.test.tsx similarity index 93% rename from x-pack/plugins/security_solution/public/network/containers/kpi_network/dns/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/dns/index.test.tsx index 1c84df8b6e57a..869baa2203f82 100644 --- a/x-pack/plugins/security_solution/public/network/containers/kpi_network/dns/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/dns/index.test.tsx @@ -6,7 +6,7 @@ */ import { act, renderHook } from '@testing-library/react-hooks'; -import { TestProviders } from '../../../../common/mock'; +import { TestProviders } from '../../../../../common/mock'; import { useNetworkKpiDns } from '.'; describe('kpi network - dns', () => { diff --git a/x-pack/plugins/security_solution/public/network/containers/kpi_network/dns/index.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/dns/index.tsx similarity index 88% rename from x-pack/plugins/security_solution/public/network/containers/kpi_network/dns/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/dns/index.tsx index 96de20a02ff6e..806c8d67e0c8e 100644 --- a/x-pack/plugins/security_solution/public/network/containers/kpi_network/dns/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/dns/index.tsx @@ -11,20 +11,20 @@ import { useCallback, useEffect, useRef, useState } from 'react'; import { Subscription } from 'rxjs'; import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; -import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import type { inputsModel } from '../../../../common/store'; -import { createFilter } from '../../../../common/containers/helpers'; -import { useKibana } from '../../../../common/lib/kibana'; +import { useAppToasts } from '../../../../../common/hooks/use_app_toasts'; +import type { inputsModel } from '../../../../../common/store'; +import { createFilter } from '../../../../../common/containers/helpers'; +import { useKibana } from '../../../../../common/lib/kibana'; import type { NetworkKpiDnsRequestOptions, NetworkKpiDnsStrategyResponse, -} from '../../../../../common/search_strategy'; -import { NetworkKpiQueries } from '../../../../../common/search_strategy'; -import type { ESTermQuery } from '../../../../../common/typed_json'; +} from '../../../../../../common/search_strategy'; +import { NetworkKpiQueries } from '../../../../../../common/search_strategy'; +import type { ESTermQuery } from '../../../../../../common/typed_json'; import * as i18n from './translations'; -import { getInspectResponse } from '../../../../helpers'; -import type { InspectResponse } from '../../../../types'; +import { getInspectResponse } from '../../../../../helpers'; +import type { InspectResponse } from '../../../../../types'; export const ID = 'networkKpiDnsQuery'; diff --git a/x-pack/plugins/security_solution/public/network/containers/kpi_network/dns/translations.ts b/x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/dns/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/containers/kpi_network/dns/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/dns/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/containers/kpi_network/network_events/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/network_events/index.test.tsx similarity index 94% rename from x-pack/plugins/security_solution/public/network/containers/kpi_network/network_events/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/network_events/index.test.tsx index 4c82590b1b0c4..05f193dd5f8ac 100644 --- a/x-pack/plugins/security_solution/public/network/containers/kpi_network/network_events/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/network_events/index.test.tsx @@ -6,7 +6,7 @@ */ import { act, renderHook } from '@testing-library/react-hooks'; -import { TestProviders } from '../../../../common/mock'; +import { TestProviders } from '../../../../../common/mock'; import { useNetworkKpiNetworkEvents } from '.'; describe('kpi network - network events', () => { diff --git a/x-pack/plugins/security_solution/public/network/containers/kpi_network/network_events/index.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/network_events/index.tsx similarity index 89% rename from x-pack/plugins/security_solution/public/network/containers/kpi_network/network_events/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/network_events/index.tsx index c6d3d37bc4581..fe631b6b7e975 100644 --- a/x-pack/plugins/security_solution/public/network/containers/kpi_network/network_events/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/network_events/index.tsx @@ -11,20 +11,20 @@ import { useCallback, useEffect, useRef, useState } from 'react'; import { Subscription } from 'rxjs'; import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; -import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import type { inputsModel } from '../../../../common/store'; -import { createFilter } from '../../../../common/containers/helpers'; -import { useKibana } from '../../../../common/lib/kibana'; +import { useAppToasts } from '../../../../../common/hooks/use_app_toasts'; +import type { inputsModel } from '../../../../../common/store'; +import { createFilter } from '../../../../../common/containers/helpers'; +import { useKibana } from '../../../../../common/lib/kibana'; import type { NetworkKpiNetworkEventsRequestOptions, NetworkKpiNetworkEventsStrategyResponse, -} from '../../../../../common/search_strategy'; -import { NetworkKpiQueries } from '../../../../../common/search_strategy'; -import type { ESTermQuery } from '../../../../../common/typed_json'; +} from '../../../../../../common/search_strategy'; +import { NetworkKpiQueries } from '../../../../../../common/search_strategy'; +import type { ESTermQuery } from '../../../../../../common/typed_json'; import * as i18n from './translations'; -import { getInspectResponse } from '../../../../helpers'; -import type { InspectResponse } from '../../../../types'; +import { getInspectResponse } from '../../../../../helpers'; +import type { InspectResponse } from '../../../../../types'; export const ID = 'networkKpiNetworkEventsQuery'; diff --git a/x-pack/plugins/security_solution/public/network/containers/kpi_network/network_events/translations.ts b/x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/network_events/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/containers/kpi_network/network_events/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/network_events/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/containers/kpi_network/tls_handshakes/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/tls_handshakes/index.test.tsx similarity index 94% rename from x-pack/plugins/security_solution/public/network/containers/kpi_network/tls_handshakes/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/tls_handshakes/index.test.tsx index b431a55d05741..c7e3b8c2f3aa5 100644 --- a/x-pack/plugins/security_solution/public/network/containers/kpi_network/tls_handshakes/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/tls_handshakes/index.test.tsx @@ -6,7 +6,7 @@ */ import { act, renderHook } from '@testing-library/react-hooks'; -import { TestProviders } from '../../../../common/mock'; +import { TestProviders } from '../../../../../common/mock'; import { useNetworkKpiTlsHandshakes } from '.'; describe('kpi network - tls handshakes', () => { diff --git a/x-pack/plugins/security_solution/public/network/containers/kpi_network/tls_handshakes/index.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/tls_handshakes/index.tsx similarity index 89% rename from x-pack/plugins/security_solution/public/network/containers/kpi_network/tls_handshakes/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/tls_handshakes/index.tsx index 855d25a1c2da1..63beacc2d297d 100644 --- a/x-pack/plugins/security_solution/public/network/containers/kpi_network/tls_handshakes/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/tls_handshakes/index.tsx @@ -11,20 +11,20 @@ import { useCallback, useEffect, useRef, useState } from 'react'; import { Subscription } from 'rxjs'; import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; -import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import type { inputsModel } from '../../../../common/store'; -import { createFilter } from '../../../../common/containers/helpers'; -import { useKibana } from '../../../../common/lib/kibana'; +import { useAppToasts } from '../../../../../common/hooks/use_app_toasts'; +import type { inputsModel } from '../../../../../common/store'; +import { createFilter } from '../../../../../common/containers/helpers'; +import { useKibana } from '../../../../../common/lib/kibana'; import type { NetworkKpiTlsHandshakesRequestOptions, NetworkKpiTlsHandshakesStrategyResponse, -} from '../../../../../common/search_strategy'; -import { NetworkKpiQueries } from '../../../../../common/search_strategy'; -import type { ESTermQuery } from '../../../../../common/typed_json'; +} from '../../../../../../common/search_strategy'; +import { NetworkKpiQueries } from '../../../../../../common/search_strategy'; +import type { ESTermQuery } from '../../../../../../common/typed_json'; import * as i18n from './translations'; -import { getInspectResponse } from '../../../../helpers'; -import type { InspectResponse } from '../../../../types'; +import { getInspectResponse } from '../../../../../helpers'; +import type { InspectResponse } from '../../../../../types'; export const ID = 'networkKpiTlsHandshakesQuery'; diff --git a/x-pack/plugins/security_solution/public/network/containers/kpi_network/tls_handshakes/translations.ts b/x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/tls_handshakes/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/containers/kpi_network/tls_handshakes/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/tls_handshakes/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/containers/kpi_network/unique_flows/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/unique_flows/index.test.tsx similarity index 94% rename from x-pack/plugins/security_solution/public/network/containers/kpi_network/unique_flows/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/unique_flows/index.test.tsx index 037db82c2d660..75004d1b92ef2 100644 --- a/x-pack/plugins/security_solution/public/network/containers/kpi_network/unique_flows/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/unique_flows/index.test.tsx @@ -6,7 +6,7 @@ */ import { act, renderHook } from '@testing-library/react-hooks'; -import { TestProviders } from '../../../../common/mock'; +import { TestProviders } from '../../../../../common/mock'; import { useNetworkKpiUniqueFlows } from '.'; describe('kpi network - unique flows', () => { diff --git a/x-pack/plugins/security_solution/public/network/containers/kpi_network/unique_flows/index.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/unique_flows/index.tsx similarity index 88% rename from x-pack/plugins/security_solution/public/network/containers/kpi_network/unique_flows/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/unique_flows/index.tsx index 1a33d693662b8..0d62d4e286201 100644 --- a/x-pack/plugins/security_solution/public/network/containers/kpi_network/unique_flows/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/unique_flows/index.tsx @@ -11,20 +11,20 @@ import { useCallback, useEffect, useRef, useState } from 'react'; import { Subscription } from 'rxjs'; import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; -import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import type { inputsModel } from '../../../../common/store'; -import { createFilter } from '../../../../common/containers/helpers'; -import { useKibana } from '../../../../common/lib/kibana'; +import { useAppToasts } from '../../../../../common/hooks/use_app_toasts'; +import type { inputsModel } from '../../../../../common/store'; +import { createFilter } from '../../../../../common/containers/helpers'; +import { useKibana } from '../../../../../common/lib/kibana'; import type { NetworkKpiUniqueFlowsRequestOptions, NetworkKpiUniqueFlowsStrategyResponse, -} from '../../../../../common/search_strategy'; -import { NetworkKpiQueries } from '../../../../../common/search_strategy'; -import type { ESTermQuery } from '../../../../../common/typed_json'; +} from '../../../../../../common/search_strategy'; +import { NetworkKpiQueries } from '../../../../../../common/search_strategy'; +import type { ESTermQuery } from '../../../../../../common/typed_json'; import * as i18n from './translations'; -import { getInspectResponse } from '../../../../helpers'; -import type { InspectResponse } from '../../../../types'; +import { getInspectResponse } from '../../../../../helpers'; +import type { InspectResponse } from '../../../../../types'; export const ID = 'networkKpiUniqueFlowsQuery'; diff --git a/x-pack/plugins/security_solution/public/network/containers/kpi_network/unique_flows/translations.ts b/x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/unique_flows/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/containers/kpi_network/unique_flows/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/unique_flows/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/containers/kpi_network/unique_private_ips/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/unique_private_ips/index.test.tsx similarity index 94% rename from x-pack/plugins/security_solution/public/network/containers/kpi_network/unique_private_ips/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/unique_private_ips/index.test.tsx index 30653ce2e638c..0d5ca709b31ee 100644 --- a/x-pack/plugins/security_solution/public/network/containers/kpi_network/unique_private_ips/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/unique_private_ips/index.test.tsx @@ -6,7 +6,7 @@ */ import { act, renderHook } from '@testing-library/react-hooks'; -import { TestProviders } from '../../../../common/mock'; +import { TestProviders } from '../../../../../common/mock'; import { useNetworkKpiUniquePrivateIps } from '.'; describe('kpi network - unique private ips', () => { diff --git a/x-pack/plugins/security_solution/public/network/containers/kpi_network/unique_private_ips/index.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/unique_private_ips/index.tsx similarity index 90% rename from x-pack/plugins/security_solution/public/network/containers/kpi_network/unique_private_ips/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/unique_private_ips/index.tsx index 902ca3620afca..2e73cb18ef52d 100644 --- a/x-pack/plugins/security_solution/public/network/containers/kpi_network/unique_private_ips/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/unique_private_ips/index.tsx @@ -11,21 +11,21 @@ import { useCallback, useEffect, useRef, useState } from 'react'; import { Subscription } from 'rxjs'; import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; -import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import type { inputsModel } from '../../../../common/store'; -import { createFilter } from '../../../../common/containers/helpers'; -import { useKibana } from '../../../../common/lib/kibana'; +import { useAppToasts } from '../../../../../common/hooks/use_app_toasts'; +import type { inputsModel } from '../../../../../common/store'; +import { createFilter } from '../../../../../common/containers/helpers'; +import { useKibana } from '../../../../../common/lib/kibana'; import type { NetworkKpiHistogramData, NetworkKpiUniquePrivateIpsRequestOptions, NetworkKpiUniquePrivateIpsStrategyResponse, -} from '../../../../../common/search_strategy'; -import { NetworkKpiQueries } from '../../../../../common/search_strategy'; -import type { ESTermQuery } from '../../../../../common/typed_json'; +} from '../../../../../../common/search_strategy'; +import { NetworkKpiQueries } from '../../../../../../common/search_strategy'; +import type { ESTermQuery } from '../../../../../../common/typed_json'; import * as i18n from './translations'; -import { getInspectResponse } from '../../../../helpers'; -import type { InspectResponse } from '../../../../types'; +import { getInspectResponse } from '../../../../../helpers'; +import type { InspectResponse } from '../../../../../types'; export const ID = 'networkKpiUniquePrivateIpsQuery'; diff --git a/x-pack/plugins/security_solution/public/network/containers/kpi_network/unique_private_ips/translations.ts b/x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/unique_private_ips/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/containers/kpi_network/unique_private_ips/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/containers/kpi_network/unique_private_ips/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/containers/network_dns/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/network_dns/index.test.tsx similarity index 89% rename from x-pack/plugins/security_solution/public/network/containers/network_dns/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/containers/network_dns/index.test.tsx index aa260236da39d..8efcfc5dbee6d 100644 --- a/x-pack/plugins/security_solution/public/network/containers/network_dns/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/network_dns/index.test.tsx @@ -6,11 +6,11 @@ */ import { act, renderHook } from '@testing-library/react-hooks'; -import { TestProviders } from '../../../common/mock'; +import { TestProviders } from '../../../../common/mock'; import { ID, useNetworkDns } from '.'; -import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; +import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; -jest.mock('../../../common/containers/use_search_strategy', () => ({ +jest.mock('../../../../common/containers/use_search_strategy', () => ({ useSearchStrategy: jest.fn(), })); const mockUseSearchStrategy = useSearchStrategy as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/network/containers/network_dns/index.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/network_dns/index.tsx similarity index 84% rename from x-pack/plugins/security_solution/public/network/containers/network_dns/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/containers/network_dns/index.tsx index 833efc839b600..326d0112e544e 100644 --- a/x-pack/plugins/security_solution/public/network/containers/network_dns/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/network_dns/index.tsx @@ -8,21 +8,21 @@ import { useState, useEffect, useCallback, useMemo } from 'react'; import deepEqual from 'fast-deep-equal'; -import type { ESTermQuery } from '../../../../common/typed_json'; -import type { inputsModel } from '../../../common/store'; -import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; -import { createFilter } from '../../../common/containers/helpers'; -import { generateTablePaginationOptions } from '../../../common/components/paginated_table/helpers'; +import type { ESTermQuery } from '../../../../../common/typed_json'; +import type { inputsModel } from '../../../../common/store'; +import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; +import { createFilter } from '../../../../common/containers/helpers'; +import { generateTablePaginationOptions } from '../../../components/paginated_table/helpers'; import { networkSelectors } from '../../store'; import type { NetworkDnsRequestOptions, NetworkDnsEdges, PageInfoPaginated, -} from '../../../../common/search_strategy'; -import { NetworkQueries } from '../../../../common/search_strategy'; +} from '../../../../../common/search_strategy'; +import { NetworkQueries } from '../../../../../common/search_strategy'; import * as i18n from './translations'; -import type { InspectResponse } from '../../../types'; -import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; +import type { InspectResponse } from '../../../../types'; +import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; export const ID = 'networkDnsQuery'; diff --git a/x-pack/plugins/security_solution/public/network/containers/network_dns/translations.ts b/x-pack/plugins/security_solution/public/explore/network/containers/network_dns/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/containers/network_dns/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/containers/network_dns/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/containers/network_http/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/network_http/index.test.tsx similarity index 90% rename from x-pack/plugins/security_solution/public/network/containers/network_http/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/containers/network_http/index.test.tsx index e91af28390736..e7232359b0336 100644 --- a/x-pack/plugins/security_solution/public/network/containers/network_http/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/network_http/index.test.tsx @@ -6,12 +6,12 @@ */ import { act, renderHook } from '@testing-library/react-hooks'; -import { TestProviders } from '../../../common/mock'; +import { TestProviders } from '../../../../common/mock'; import { useNetworkHttp, ID } from '.'; -import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; +import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; import { networkModel } from '../../store'; -jest.mock('../../../common/containers/use_search_strategy', () => ({ +jest.mock('../../../../common/containers/use_search_strategy', () => ({ useSearchStrategy: jest.fn(), })); const mockUseSearchStrategy = useSearchStrategy as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/network/containers/network_http/index.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/network_http/index.tsx similarity index 85% rename from x-pack/plugins/security_solution/public/network/containers/network_http/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/containers/network_http/index.tsx index fbfd2e762b672..68d0d97f258b6 100644 --- a/x-pack/plugins/security_solution/public/network/containers/network_http/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/network_http/index.tsx @@ -8,11 +8,11 @@ import { useState, useEffect, useCallback, useMemo } from 'react'; import deepEqual from 'fast-deep-equal'; -import type { ESTermQuery } from '../../../../common/typed_json'; -import type { inputsModel } from '../../../common/store'; -import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; -import { createFilter } from '../../../common/containers/helpers'; -import { generateTablePaginationOptions } from '../../../common/components/paginated_table/helpers'; +import type { ESTermQuery } from '../../../../../common/typed_json'; +import type { inputsModel } from '../../../../common/store'; +import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; +import { createFilter } from '../../../../common/containers/helpers'; +import { generateTablePaginationOptions } from '../../../components/paginated_table/helpers'; import type { networkModel } from '../../store'; import { networkSelectors } from '../../store'; import type { @@ -20,12 +20,12 @@ import type { PageInfoPaginated, NetworkHttpRequestOptions, SortField, -} from '../../../../common/search_strategy'; -import { NetworkQueries } from '../../../../common/search_strategy'; +} from '../../../../../common/search_strategy'; +import { NetworkQueries } from '../../../../../common/search_strategy'; import * as i18n from './translations'; -import type { InspectResponse } from '../../../types'; +import type { InspectResponse } from '../../../../types'; -import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; +import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; export const ID = 'networkHttpQuery'; diff --git a/x-pack/plugins/security_solution/public/network/containers/network_http/translations.ts b/x-pack/plugins/security_solution/public/explore/network/containers/network_http/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/containers/network_http/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/containers/network_http/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/containers/network_top_countries/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/network_top_countries/index.test.tsx similarity index 87% rename from x-pack/plugins/security_solution/public/network/containers/network_top_countries/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/containers/network_top_countries/index.test.tsx index eef2087f51dad..fb67611f43a74 100644 --- a/x-pack/plugins/security_solution/public/network/containers/network_top_countries/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/network_top_countries/index.test.tsx @@ -6,13 +6,13 @@ */ import { act, renderHook } from '@testing-library/react-hooks'; -import { TestProviders } from '../../../common/mock'; +import { TestProviders } from '../../../../common/mock'; import { ID, useNetworkTopCountries } from '.'; -import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; +import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; import { networkModel } from '../../store'; -import { FlowTargetSourceDest } from '../../../../common/search_strategy'; +import { FlowTargetSourceDest } from '../../../../../common/search_strategy'; -jest.mock('../../../common/containers/use_search_strategy', () => ({ +jest.mock('../../../../common/containers/use_search_strategy', () => ({ useSearchStrategy: jest.fn(), })); const mockUseSearchStrategy = useSearchStrategy as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/network/containers/network_top_countries/index.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/network_top_countries/index.tsx similarity index 86% rename from x-pack/plugins/security_solution/public/network/containers/network_top_countries/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/containers/network_top_countries/index.tsx index ab44e80043e3e..5d6b45b12b422 100644 --- a/x-pack/plugins/security_solution/public/network/containers/network_top_countries/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/network_top_countries/index.tsx @@ -8,11 +8,11 @@ import { useState, useEffect, useCallback, useMemo } from 'react'; import deepEqual from 'fast-deep-equal'; -import type { ESTermQuery } from '../../../../common/typed_json'; -import type { inputsModel } from '../../../common/store'; -import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; -import { createFilter } from '../../../common/containers/helpers'; -import { generateTablePaginationOptions } from '../../../common/components/paginated_table/helpers'; +import type { ESTermQuery } from '../../../../../common/typed_json'; +import type { inputsModel } from '../../../../common/store'; +import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; +import { createFilter } from '../../../../common/containers/helpers'; +import { generateTablePaginationOptions } from '../../../components/paginated_table/helpers'; import type { networkModel } from '../../store'; import { networkSelectors } from '../../store'; import type { @@ -20,11 +20,11 @@ import type { NetworkTopCountriesEdges, NetworkTopCountriesRequestOptions, PageInfoPaginated, -} from '../../../../common/search_strategy'; -import { NetworkQueries } from '../../../../common/search_strategy'; -import type { InspectResponse } from '../../../types'; +} from '../../../../../common/search_strategy'; +import { NetworkQueries } from '../../../../../common/search_strategy'; +import type { InspectResponse } from '../../../../types'; import * as i18n from './translations'; -import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; +import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; export const ID = 'networkTopCountriesQuery'; diff --git a/x-pack/plugins/security_solution/public/network/containers/network_top_countries/translations.ts b/x-pack/plugins/security_solution/public/explore/network/containers/network_top_countries/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/containers/network_top_countries/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/containers/network_top_countries/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/containers/network_top_n_flow/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/network_top_n_flow/index.test.tsx similarity index 87% rename from x-pack/plugins/security_solution/public/network/containers/network_top_n_flow/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/containers/network_top_n_flow/index.test.tsx index f8066011fe0ab..a28c5632ff42c 100644 --- a/x-pack/plugins/security_solution/public/network/containers/network_top_n_flow/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/network_top_n_flow/index.test.tsx @@ -6,13 +6,13 @@ */ import { act, renderHook } from '@testing-library/react-hooks'; -import { TestProviders } from '../../../common/mock'; +import { TestProviders } from '../../../../common/mock'; import { ID, useNetworkTopNFlow } from '.'; -import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; +import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; import { networkModel } from '../../store'; -import { FlowTargetSourceDest } from '../../../../common/search_strategy'; +import { FlowTargetSourceDest } from '../../../../../common/search_strategy'; -jest.mock('../../../common/containers/use_search_strategy', () => ({ +jest.mock('../../../../common/containers/use_search_strategy', () => ({ useSearchStrategy: jest.fn(), })); const mockUseSearchStrategy = useSearchStrategy as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/network/containers/network_top_n_flow/index.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/network_top_n_flow/index.tsx similarity index 85% rename from x-pack/plugins/security_solution/public/network/containers/network_top_n_flow/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/containers/network_top_n_flow/index.tsx index 74455e2a273f2..a90ba02f5c17d 100644 --- a/x-pack/plugins/security_solution/public/network/containers/network_top_n_flow/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/network_top_n_flow/index.tsx @@ -8,11 +8,11 @@ import { useState, useEffect, useCallback, useMemo } from 'react'; import deepEqual from 'fast-deep-equal'; -import type { ESTermQuery } from '../../../../common/typed_json'; -import type { inputsModel } from '../../../common/store'; -import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; -import { createFilter } from '../../../common/containers/helpers'; -import { generateTablePaginationOptions } from '../../../common/components/paginated_table/helpers'; +import type { ESTermQuery } from '../../../../../common/typed_json'; +import type { inputsModel } from '../../../../common/store'; +import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; +import { createFilter } from '../../../../common/containers/helpers'; +import { generateTablePaginationOptions } from '../../../components/paginated_table/helpers'; import type { networkModel } from '../../store'; import { networkSelectors } from '../../store'; import type { @@ -20,11 +20,11 @@ import type { NetworkTopNFlowEdges, NetworkTopNFlowRequestOptions, PageInfoPaginated, -} from '../../../../common/search_strategy'; -import { NetworkQueries } from '../../../../common/search_strategy'; -import type { InspectResponse } from '../../../types'; +} from '../../../../../common/search_strategy'; +import { NetworkQueries } from '../../../../../common/search_strategy'; +import type { InspectResponse } from '../../../../types'; import * as i18n from './translations'; -import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; +import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; export const ID = 'networkTopNFlowQuery'; diff --git a/x-pack/plugins/security_solution/public/network/containers/network_top_n_flow/translations.ts b/x-pack/plugins/security_solution/public/explore/network/containers/network_top_n_flow/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/containers/network_top_n_flow/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/containers/network_top_n_flow/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/containers/tls/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/tls/index.test.tsx similarity index 87% rename from x-pack/plugins/security_solution/public/network/containers/tls/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/containers/tls/index.test.tsx index db1c028b74fb3..b6fa06590f626 100644 --- a/x-pack/plugins/security_solution/public/network/containers/tls/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/tls/index.test.tsx @@ -6,13 +6,13 @@ */ import { act, renderHook } from '@testing-library/react-hooks'; -import { TestProviders } from '../../../common/mock'; +import { TestProviders } from '../../../../common/mock'; import { ID, useNetworkTls } from '.'; -import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; +import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; import { networkModel } from '../../store'; -import { FlowTargetSourceDest } from '../../../../common/search_strategy'; +import { FlowTargetSourceDest } from '../../../../../common/search_strategy'; -jest.mock('../../../common/containers/use_search_strategy', () => ({ +jest.mock('../../../../common/containers/use_search_strategy', () => ({ useSearchStrategy: jest.fn(), })); const mockUseSearchStrategy = useSearchStrategy as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/network/containers/tls/index.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/tls/index.tsx similarity index 83% rename from x-pack/plugins/security_solution/public/network/containers/tls/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/containers/tls/index.tsx index 5568488fd0caa..c3d34c02c69c5 100644 --- a/x-pack/plugins/security_solution/public/network/containers/tls/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/tls/index.tsx @@ -8,22 +8,25 @@ import { useState, useEffect, useCallback, useMemo } from 'react'; import deepEqual from 'fast-deep-equal'; -import type { ESTermQuery } from '../../../../common/typed_json'; -import type { inputsModel } from '../../../common/store'; -import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; -import { createFilter } from '../../../common/containers/helpers'; -import { generateTablePaginationOptions } from '../../../common/components/paginated_table/helpers'; +import type { ESTermQuery } from '../../../../../common/typed_json'; +import type { inputsModel } from '../../../../common/store'; +import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; +import { createFilter } from '../../../../common/containers/helpers'; +import { generateTablePaginationOptions } from '../../../components/paginated_table/helpers'; import type { networkModel } from '../../store'; import { networkSelectors } from '../../store'; import type { NetworkTlsRequestOptions, NetworkTlsStrategyResponse, -} from '../../../../common/search_strategy/security_solution/network'; -import { NetworkQueries } from '../../../../common/search_strategy/security_solution/network'; +} from '../../../../../common/search_strategy/security_solution/network'; +import { NetworkQueries } from '../../../../../common/search_strategy/security_solution/network'; import * as i18n from './translations'; -import type { FlowTargetSourceDest, PageInfoPaginated } from '../../../../common/search_strategy'; -import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; +import type { + FlowTargetSourceDest, + PageInfoPaginated, +} from '../../../../../common/search_strategy'; +import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; export const ID = 'networkTlsQuery'; diff --git a/x-pack/plugins/security_solution/public/network/containers/tls/translations.ts b/x-pack/plugins/security_solution/public/explore/network/containers/tls/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/containers/tls/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/containers/tls/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/containers/users/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/users/index.test.tsx similarity index 87% rename from x-pack/plugins/security_solution/public/network/containers/users/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/containers/users/index.test.tsx index 409b5238bba79..a7f3eb69fc5ba 100644 --- a/x-pack/plugins/security_solution/public/network/containers/users/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/users/index.test.tsx @@ -6,13 +6,13 @@ */ import { act, renderHook } from '@testing-library/react-hooks'; -import { TestProviders } from '../../../common/mock'; +import { TestProviders } from '../../../../common/mock'; import { useNetworkUsers, ID } from '.'; -import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; +import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; import { networkModel } from '../../store'; -import { FlowTargetSourceDest } from '../../../../common/search_strategy'; +import { FlowTargetSourceDest } from '../../../../../common/search_strategy'; -jest.mock('../../../common/containers/use_search_strategy', () => ({ +jest.mock('../../../../common/containers/use_search_strategy', () => ({ useSearchStrategy: jest.fn(), })); const mockUseSearchStrategy = useSearchStrategy as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/network/containers/users/index.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/users/index.tsx similarity index 80% rename from x-pack/plugins/security_solution/public/network/containers/users/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/containers/users/index.tsx index 6f9ecc8b353cf..217b4a9baae15 100644 --- a/x-pack/plugins/security_solution/public/network/containers/users/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/users/index.tsx @@ -8,24 +8,24 @@ import { useState, useEffect, useCallback, useMemo } from 'react'; import deepEqual from 'fast-deep-equal'; -import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; -import type { ESTermQuery } from '../../../../common/typed_json'; -import { DEFAULT_INDEX_KEY } from '../../../../common/constants'; -import type { inputsModel } from '../../../common/store'; -import { useKibana } from '../../../common/lib/kibana'; -import { createFilter } from '../../../common/containers/helpers'; -import { generateTablePaginationOptions } from '../../../common/components/paginated_table/helpers'; +import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; +import type { ESTermQuery } from '../../../../../common/typed_json'; +import { DEFAULT_INDEX_KEY } from '../../../../../common/constants'; +import type { inputsModel } from '../../../../common/store'; +import { useKibana } from '../../../../common/lib/kibana'; +import { createFilter } from '../../../../common/containers/helpers'; +import { generateTablePaginationOptions } from '../../../components/paginated_table/helpers'; import { networkSelectors } from '../../store'; import type { FlowTargetSourceDest, NetworkUsersRequestOptions, NetworkUsersStrategyResponse, -} from '../../../../common/search_strategy/security_solution/network'; -import { NetworkQueries } from '../../../../common/search_strategy/security_solution/network'; +} from '../../../../../common/search_strategy/security_solution/network'; +import { NetworkQueries } from '../../../../../common/search_strategy/security_solution/network'; import * as i18n from './translations'; -import type { InspectResponse } from '../../../types'; -import type { PageInfoPaginated } from '../../../../common/search_strategy'; -import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; +import type { InspectResponse } from '../../../../types'; +import type { PageInfoPaginated } from '../../../../../common/search_strategy'; +import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; export const ID = 'networkUsersQuery'; diff --git a/x-pack/plugins/security_solution/public/network/containers/users/translations.ts b/x-pack/plugins/security_solution/public/explore/network/containers/users/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/containers/users/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/containers/users/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/index.ts b/x-pack/plugins/security_solution/public/explore/network/index.ts similarity index 81% rename from x-pack/plugins/security_solution/public/network/index.ts rename to x-pack/plugins/security_solution/public/explore/network/index.ts index b3930a81c371c..8dd650c0f5ebf 100644 --- a/x-pack/plugins/security_solution/public/network/index.ts +++ b/x-pack/plugins/security_solution/public/explore/network/index.ts @@ -6,12 +6,12 @@ */ import type { Storage } from '@kbn/kibana-utils-plugin/public'; -import { TableId } from '../../common/types'; -import type { SecuritySubPluginWithStore } from '../app/types'; +import { TableId } from '../../../common/types'; +import type { SecuritySubPluginWithStore } from '../../app/types'; import { routes } from './routes'; import type { NetworkState } from './store'; import { initialNetworkState, networkReducer } from './store'; -import { getDataTablesInStorageByIds } from '../timelines/containers/local_storage'; +import { getDataTablesInStorageByIds } from '../../timelines/containers/local_storage'; export class Network { public setup() {} diff --git a/x-pack/plugins/security_solution/public/network/links.ts b/x-pack/plugins/security_solution/public/explore/network/links.ts similarity index 88% rename from x-pack/plugins/security_solution/public/network/links.ts rename to x-pack/plugins/security_solution/public/explore/network/links.ts index 2d2d31f0ecd4b..f762d09dd2ecd 100644 --- a/x-pack/plugins/security_solution/public/network/links.ts +++ b/x-pack/plugins/security_solution/public/explore/network/links.ts @@ -6,10 +6,10 @@ */ import { i18n } from '@kbn/i18n'; -import { NETWORK_PATH, SecurityPageName } from '../../common/constants'; -import { NETWORK } from '../app/translations'; -import type { LinkItem } from '../common/links/types'; -import networkPageImg from '../common/images/network_page.png'; +import { NETWORK_PATH, SecurityPageName } from '../../../common/constants'; +import { NETWORK } from '../../app/translations'; +import type { LinkItem } from '../../common/links/types'; +import networkPageImg from '../../common/images/network_page.png'; export const links: LinkItem = { id: SecurityPageName.network, diff --git a/x-pack/plugins/security_solution/public/network/pages/constants.ts b/x-pack/plugins/security_solution/public/explore/network/pages/constants.ts similarity index 91% rename from x-pack/plugins/security_solution/public/network/pages/constants.ts rename to x-pack/plugins/security_solution/public/explore/network/pages/constants.ts index 3ddfe713db1f2..882263dc866f8 100644 --- a/x-pack/plugins/security_solution/public/network/pages/constants.ts +++ b/x-pack/plugins/security_solution/public/explore/network/pages/constants.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { NETWORK_PATH } from '../../../common/constants'; -import { FlowTargetSourceDest } from '../../../common/search_strategy'; +import { NETWORK_PATH } from '../../../../common/constants'; +import { FlowTargetSourceDest } from '../../../../common/search_strategy'; import { NetworkDetailsRouteType } from './details/types'; import { NetworkRouteType } from './navigation/types'; diff --git a/x-pack/plugins/security_solution/public/network/pages/details/details_tabs.tsx b/x-pack/plugins/security_solution/public/explore/network/pages/details/details_tabs.tsx similarity index 87% rename from x-pack/plugins/security_solution/public/network/pages/details/details_tabs.tsx rename to x-pack/plugins/security_solution/public/explore/network/pages/details/details_tabs.tsx index 560fc65583301..20570a26724fe 100644 --- a/x-pack/plugins/security_solution/public/network/pages/details/details_tabs.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/pages/details/details_tabs.tsx @@ -11,13 +11,13 @@ import { Switch } from 'react-router-dom'; import { EuiFlexItem, EuiSpacer } from '@elastic/eui'; import type { DataViewBase, Filter } from '@kbn/es-query'; import { Route } from '@kbn/kibana-react-plugin/public'; -import { TableId } from '../../../../common/types'; -import { AnomaliesNetworkTable } from '../../../common/components/ml/tables/anomalies_network_table'; -import { FlowTargetSourceDest } from '../../../../common/search_strategy/security_solution/network'; -import { EventsQueryTabBody } from '../../../common/components/events_tab/events_query_tab_body'; -import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; +import { TableId } from '../../../../../common/types'; +import { AnomaliesNetworkTable } from '../../../../common/components/ml/tables/anomalies_network_table'; +import { FlowTargetSourceDest } from '../../../../../common/search_strategy/security_solution/network'; +import { EventsQueryTabBody } from '../../../../common/components/events_tab/events_query_tab_body'; +import type { GlobalTimeArgs } from '../../../../common/containers/use_global_time'; -import { AnomaliesQueryTabBody } from '../../../common/containers/anomalies/anomalies_query_tab_body'; +import { AnomaliesQueryTabBody } from '../../../../common/containers/anomalies/anomalies_query_tab_body'; import { NETWORK_DETAILS_PAGE_PATH } from '../constants'; diff --git a/x-pack/plugins/security_solution/public/network/pages/details/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/pages/details/index.test.tsx similarity index 83% rename from x-pack/plugins/security_solution/public/network/pages/details/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/pages/details/index.test.tsx index 0763d856277ab..a2a9ecdf368d5 100644 --- a/x-pack/plugins/security_solution/public/network/pages/details/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/pages/details/index.test.tsx @@ -8,23 +8,23 @@ import React from 'react'; import { Router, useParams } from 'react-router-dom'; -import '../../../common/mock/match_media'; +import '../../../../common/mock/match_media'; -import { useSourcererDataView } from '../../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../../common/containers/sourcerer'; import { mockGlobalState, TestProviders, SUB_PLUGINS_REDUCER, kibanaObservable, createSecuritySolutionStorageMock, -} from '../../../common/mock'; -import { useMountAppended } from '../../../common/utils/use_mount_appended'; -import type { State } from '../../../common/store'; -import { createStore } from '../../../common/store'; +} from '../../../../common/mock'; +import { useMountAppended } from '../../../../common/utils/use_mount_appended'; +import type { State } from '../../../../common/store'; +import { createStore } from '../../../../common/store'; import { NetworkDetails } from '.'; -import { FlowTargetSourceDest } from '../../../../common/search_strategy'; +import { FlowTargetSourceDest } from '../../../../../common/search_strategy'; -jest.mock('../../../common/containers/use_search_strategy', () => ({ +jest.mock('../../../../common/containers/use_search_strategy', () => ({ useSearchStrategy: jest.fn().mockReturnValue({ loading: false, result: { @@ -64,8 +64,8 @@ jest.mock('react-router-dom', () => { jest.mock('../../containers/details', () => ({ useNetworkDetails: jest.fn().mockReturnValue([true, { networkDetails: {} }]), })); -jest.mock('../../../common/containers/sourcerer'); -jest.mock('../../../common/containers/use_global_time', () => ({ +jest.mock('../../../../common/containers/sourcerer'); +jest.mock('../../../../common/containers/use_global_time', () => ({ useGlobalTime: jest.fn().mockReturnValue({ from: '2020-07-07T08:20:18.966Z', isInitializing: false, @@ -83,8 +83,8 @@ const useAddToTimeline = () => ({ startDragToTimeline: jest.fn(), }); -jest.mock('../../../common/lib/kibana', () => { - const original = jest.requireActual('../../../common/lib/kibana'); +jest.mock('../../../../common/lib/kibana', () => { + const original = jest.requireActual('../../../../common/lib/kibana'); return { ...original, useNavigation: () => ({ @@ -103,10 +103,10 @@ jest.mock('../../../common/lib/kibana', () => { // Test will fail because we will to need to mock some core services to make the test work // For now let's forget about SiemSearchBar and QueryBar -jest.mock('../../../common/components/search_bar', () => ({ +jest.mock('../../../../common/components/search_bar', () => ({ SiemSearchBar: () => null, })); -jest.mock('../../../common/components/query_bar', () => ({ +jest.mock('../../../../common/components/query_bar', () => ({ QueryBar: () => null, })); diff --git a/x-pack/plugins/security_solution/public/network/pages/details/index.tsx b/x-pack/plugins/security_solution/public/explore/network/pages/details/index.tsx similarity index 72% rename from x-pack/plugins/security_solution/public/network/pages/details/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/pages/details/index.tsx index 63eb9a1cb60c0..e525f2e6241ef 100644 --- a/x-pack/plugins/security_solution/public/network/pages/details/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/pages/details/index.tsx @@ -13,45 +13,45 @@ import { EuiFlexGroup, EuiFlexItem, EuiHorizontalRule, EuiSpacer } from '@elasti import { getEsQueryConfig } from '@kbn/data-plugin/common'; import { buildEsQuery } from '@kbn/es-query'; -import { AlertsByStatus } from '../../../overview/components/detection_response/alerts_by_status'; -import { useSignalIndex } from '../../../detections/containers/detection_engine/alerts/use_signal_index'; -import { InputsModelId } from '../../../common/store/inputs/constants'; -import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; -import { LastEventIndexKey } from '../../../../common/search_strategy'; -import type { FlowTargetSourceDest } from '../../../../common/search_strategy'; -import { useGlobalTime } from '../../../common/containers/use_global_time'; -import { FiltersGlobal } from '../../../common/components/filters_global'; -import { HeaderPage } from '../../../common/components/header_page'; -import { LastEventTime } from '../../../common/components/last_event_time'; -import { useAnomaliesTableData } from '../../../common/components/ml/anomaly/use_anomalies_table_data'; -import { networkToCriteria } from '../../../common/components/ml/criteria/network_to_criteria'; -import { scoreIntervalToDateTime } from '../../../common/components/ml/score/score_interval_to_datetime'; -import { manageQuery } from '../../../common/components/page/manage_query'; +import { AlertsByStatus } from '../../../../overview/components/detection_response/alerts_by_status'; +import { useSignalIndex } from '../../../../detections/containers/detection_engine/alerts/use_signal_index'; +import { InputsModelId } from '../../../../common/store/inputs/constants'; +import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; +import { LastEventIndexKey } from '../../../../../common/search_strategy'; +import type { FlowTargetSourceDest } from '../../../../../common/search_strategy'; +import { useGlobalTime } from '../../../../common/containers/use_global_time'; +import { FiltersGlobal } from '../../../../common/components/filters_global'; +import { HeaderPage } from '../../../../common/components/header_page'; +import { LastEventTime } from '../../../../common/components/last_event_time'; +import { useAnomaliesTableData } from '../../../../common/components/ml/anomaly/use_anomalies_table_data'; +import { networkToCriteria } from '../../../../common/components/ml/criteria/network_to_criteria'; +import { scoreIntervalToDateTime } from '../../../../common/components/ml/score/score_interval_to_datetime'; +import { manageQuery } from '../../../../common/components/page/manage_query'; import { FlowTargetSelectConnected } from '../../components/flow_target_select_connected'; import { IpOverview } from '../../components/details'; -import { SiemSearchBar } from '../../../common/components/search_bar'; -import { SecuritySolutionPageWrapper } from '../../../common/components/page_wrapper'; +import { SiemSearchBar } from '../../../../common/components/search_bar'; +import { SecuritySolutionPageWrapper } from '../../../../common/components/page_wrapper'; import { useNetworkDetails, ID } from '../../containers/details'; -import { useKibana } from '../../../common/lib/kibana'; -import { decodeIpv6 } from '../../../common/lib/helpers'; -import { inputsSelectors } from '../../../common/store'; -import { setAbsoluteRangeDatePicker } from '../../../common/store/inputs/actions'; +import { useKibana } from '../../../../common/lib/kibana'; +import { decodeIpv6 } from '../../../../common/lib/helpers'; +import { inputsSelectors } from '../../../../common/store'; +import { setAbsoluteRangeDatePicker } from '../../../../common/store/inputs/actions'; import { setNetworkDetailsTablesActivePageToZero } from '../../store/actions'; -import { SpyRoute } from '../../../common/utils/route/spy_routes'; +import { SpyRoute } from '../../../../common/utils/route/spy_routes'; import { networkModel } from '../../store'; -import { SecurityPageName } from '../../../app/types'; -import { useSourcererDataView } from '../../../common/containers/sourcerer'; -import { useInvalidFilterQuery } from '../../../common/hooks/use_invalid_filter_query'; -import { LandingPageComponent } from '../../../common/components/landing_page'; -import { SecuritySolutionTabNavigation } from '../../../common/components/navigation'; -import { getNetworkDetailsPageFilter } from '../../../common/components/visualization_actions/utils'; -import { hasMlUserPermissions } from '../../../../common/machine_learning/has_ml_user_permissions'; -import { AlertCountByRuleByStatus } from '../../../common/components/alert_count_by_status'; -import { useMlCapabilities } from '../../../common/components/ml/hooks/use_ml_capabilities'; -import { useAlertsPrivileges } from '../../../detections/containers/detection_engine/alerts/use_alerts_privileges'; +import { SecurityPageName } from '../../../../app/types'; +import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { useInvalidFilterQuery } from '../../../../common/hooks/use_invalid_filter_query'; +import { LandingPageComponent } from '../../../../common/components/landing_page'; +import { SecuritySolutionTabNavigation } from '../../../../common/components/navigation'; +import { getNetworkDetailsPageFilter } from '../../../../common/components/visualization_actions/utils'; +import { hasMlUserPermissions } from '../../../../../common/machine_learning/has_ml_user_permissions'; +import { AlertCountByRuleByStatus } from '../../../../common/components/alert_count_by_status'; +import { useMlCapabilities } from '../../../../common/components/ml/hooks/use_ml_capabilities'; +import { useAlertsPrivileges } from '../../../../detections/containers/detection_engine/alerts/use_alerts_privileges'; import { navTabsNetworkDetails } from './nav_tabs'; import { NetworkDetailsTabs } from './details_tabs'; -import { useInstalledSecurityJobsIds } from '../../../common/components/ml/hooks/use_installed_security_jobs'; +import { useInstalledSecurityJobsIds } from '../../../../common/components/ml/hooks/use_installed_security_jobs'; export { getTrailingBreadcrumbs } from './utils'; diff --git a/x-pack/plugins/security_solution/public/network/pages/details/nav_tabs.test.tsx b/x-pack/plugins/security_solution/public/explore/network/pages/details/nav_tabs.test.tsx similarity index 95% rename from x-pack/plugins/security_solution/public/network/pages/details/nav_tabs.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/pages/details/nav_tabs.test.tsx index 25572e2f954e7..251c2a5c1aa14 100644 --- a/x-pack/plugins/security_solution/public/network/pages/details/nav_tabs.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/pages/details/nav_tabs.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { FlowTargetSourceDest } from '../../../../common/search_strategy'; +import { FlowTargetSourceDest } from '../../../../../common/search_strategy'; import { navTabsNetworkDetails } from './nav_tabs'; import { NetworkDetailsRouteType } from './types'; diff --git a/x-pack/plugins/security_solution/public/network/pages/details/nav_tabs.tsx b/x-pack/plugins/security_solution/public/explore/network/pages/details/nav_tabs.tsx similarity index 94% rename from x-pack/plugins/security_solution/public/network/pages/details/nav_tabs.tsx rename to x-pack/plugins/security_solution/public/explore/network/pages/details/nav_tabs.tsx index 6569b68815040..8a055b2a666a9 100644 --- a/x-pack/plugins/security_solution/public/network/pages/details/nav_tabs.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/pages/details/nav_tabs.tsx @@ -5,8 +5,8 @@ * 2.0. */ -import type { FlowTargetSourceDest } from '../../../../common/search_strategy'; -import { NETWORK_PATH } from '../../../../common/constants'; +import type { FlowTargetSourceDest } from '../../../../../common/search_strategy'; +import { NETWORK_PATH } from '../../../../../common/constants'; import * as i18n from '../translations'; import type { NetworkDetailsNavTabs } from './types'; import { NetworkDetailsRouteType } from './types'; diff --git a/x-pack/plugins/security_solution/public/network/pages/details/types.ts b/x-pack/plugins/security_solution/public/explore/network/pages/details/types.ts similarity index 79% rename from x-pack/plugins/security_solution/public/network/pages/details/types.ts rename to x-pack/plugins/security_solution/public/explore/network/pages/details/types.ts index 726232aed3068..6985770e3d7a3 100644 --- a/x-pack/plugins/security_solution/public/network/pages/details/types.ts +++ b/x-pack/plugins/security_solution/public/explore/network/pages/details/types.ts @@ -7,9 +7,9 @@ import type { Optional } from '@kbn/utility-types'; -import type { ESTermQuery } from '../../../../common/typed_json'; -import type { NavTab } from '../../../common/components/navigation/types'; -import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; +import type { ESTermQuery } from '../../../../../common/typed_json'; +import type { NavTab } from '../../../../common/components/navigation/types'; +import type { GlobalTimeArgs } from '../../../../common/containers/use_global_time'; import { NetworkType } from '../../store/model'; export const type = NetworkType.details; diff --git a/x-pack/plugins/security_solution/public/network/pages/details/utils.ts b/x-pack/plugins/security_solution/public/explore/network/pages/details/utils.ts similarity index 82% rename from x-pack/plugins/security_solution/public/network/pages/details/utils.ts rename to x-pack/plugins/security_solution/public/explore/network/pages/details/utils.ts index 54bb1720d2d5d..ba8bb5ec7acd4 100644 --- a/x-pack/plugins/security_solution/public/network/pages/details/utils.ts +++ b/x-pack/plugins/security_solution/public/explore/network/pages/details/utils.ts @@ -8,14 +8,14 @@ import { get } from 'lodash/fp'; import type { ChromeBreadcrumb } from '@kbn/core/public'; -import { decodeIpv6 } from '../../../common/lib/helpers'; -import { getNetworkDetailsUrl } from '../../../common/components/link_to/redirect_to_network'; +import { decodeIpv6 } from '../../../../common/lib/helpers'; +import { getNetworkDetailsUrl } from '../../../../common/components/link_to/redirect_to_network'; import { networkModel } from '../../store'; import * as i18n from '../translations'; import { NetworkDetailsRouteType } from './types'; -import type { NetworkRouteSpyState } from '../../../common/utils/route/types'; -import { SecurityPageName } from '../../../app/types'; -import type { GetSecuritySolutionUrl } from '../../../common/components/link_to'; +import type { NetworkRouteSpyState } from '../../../../common/utils/route/types'; +import { SecurityPageName } from '../../../../app/types'; +import type { GetSecuritySolutionUrl } from '../../../../common/components/link_to'; import { NetworkRouteType } from '../navigation/types'; export const type = networkModel.NetworkType.details; diff --git a/x-pack/plugins/security_solution/public/network/pages/index.tsx b/x-pack/plugins/security_solution/public/explore/network/pages/index.tsx similarity index 85% rename from x-pack/plugins/security_solution/public/network/pages/index.tsx rename to x-pack/plugins/security_solution/public/explore/network/pages/index.tsx index e55e501a17176..8007d438a0de1 100644 --- a/x-pack/plugins/security_solution/public/network/pages/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/pages/index.tsx @@ -9,16 +9,16 @@ import React, { useMemo } from 'react'; import { Redirect, Switch } from 'react-router-dom'; import { Route } from '@kbn/kibana-react-plugin/public'; -import { useMlCapabilities } from '../../common/components/ml/hooks/use_ml_capabilities'; -import { hasMlUserPermissions } from '../../../common/machine_learning/has_ml_user_permissions'; +import { useMlCapabilities } from '../../../common/components/ml/hooks/use_ml_capabilities'; +import { hasMlUserPermissions } from '../../../../common/machine_learning/has_ml_user_permissions'; import { NetworkDetails } from './details'; import { Network } from './network'; import { getNetworkRoutePath } from './navigation'; import { NetworkRouteType } from './navigation/types'; -import { MlNetworkConditionalContainer } from '../../common/components/ml/conditional_links/ml_network_conditional_container'; -import { NETWORK_PATH } from '../../../common/constants'; -import { FlowTargetSourceDest } from '../../../common/search_strategy'; +import { MlNetworkConditionalContainer } from '../../../common/components/ml/conditional_links/ml_network_conditional_container'; +import { NETWORK_PATH } from '../../../../common/constants'; +import { FlowTargetSourceDest } from '../../../../common/search_strategy'; import { FLOW_TARGET_PARAM, NETWORK_DETAILS_PAGE_PATH, diff --git a/x-pack/plugins/security_solution/public/network/pages/navigation/conditional_flex_group.tsx b/x-pack/plugins/security_solution/public/explore/network/pages/navigation/conditional_flex_group.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/network/pages/navigation/conditional_flex_group.tsx rename to x-pack/plugins/security_solution/public/explore/network/pages/navigation/conditional_flex_group.tsx diff --git a/x-pack/plugins/security_solution/public/network/pages/navigation/countries_query_tab_body.tsx b/x-pack/plugins/security_solution/public/explore/network/pages/navigation/countries_query_tab_body.tsx similarity index 92% rename from x-pack/plugins/security_solution/public/network/pages/navigation/countries_query_tab_body.tsx rename to x-pack/plugins/security_solution/public/explore/network/pages/navigation/countries_query_tab_body.tsx index 979c87f5f1852..e7c378f19768b 100644 --- a/x-pack/plugins/security_solution/public/network/pages/navigation/countries_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/pages/navigation/countries_query_tab_body.tsx @@ -10,10 +10,10 @@ import { getOr } from 'lodash/fp'; import { NetworkTopCountriesTable } from '../../components/network_top_countries_table'; import { useNetworkTopCountries, ID } from '../../containers/network_top_countries'; -import { manageQuery } from '../../../common/components/page/manage_query'; +import { manageQuery } from '../../../../common/components/page/manage_query'; import type { IPsQueryTabBodyProps as CountriesQueryTabBodyProps } from './types'; -import { useQueryToggle } from '../../../common/containers/query_toggle'; +import { useQueryToggle } from '../../../../common/containers/query_toggle'; const NetworkTopCountriesTableManage = manageQuery(NetworkTopCountriesTable); diff --git a/x-pack/plugins/security_solution/public/network/pages/navigation/dns_query_tab_body.tsx b/x-pack/plugins/security_solution/public/explore/network/pages/navigation/dns_query_tab_body.tsx similarity index 85% rename from x-pack/plugins/security_solution/public/network/pages/navigation/dns_query_tab_body.tsx rename to x-pack/plugins/security_solution/public/explore/network/pages/navigation/dns_query_tab_body.tsx index 54bdb1acd81b6..5c859618be7b9 100644 --- a/x-pack/plugins/security_solution/public/network/pages/navigation/dns_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/pages/navigation/dns_query_tab_body.tsx @@ -10,21 +10,21 @@ import { getOr } from 'lodash/fp'; import { NetworkDnsTable } from '../../components/network_dns_table'; import { useNetworkDns, ID } from '../../containers/network_dns'; -import { manageQuery } from '../../../common/components/page/manage_query'; +import { manageQuery } from '../../../../common/components/page/manage_query'; import type { NetworkComponentQueryProps } from './types'; import type { MatrixHistogramOption, MatrixHistogramConfigs, -} from '../../../common/components/matrix_histogram/types'; +} from '../../../../common/components/matrix_histogram/types'; import * as i18n from './translations'; -import { MatrixHistogram } from '../../../common/components/matrix_histogram'; -import { MatrixHistogramType } from '../../../../common/search_strategy/security_solution'; +import { MatrixHistogram } from '../../../../common/components/matrix_histogram'; +import { MatrixHistogramType } from '../../../../../common/search_strategy/security_solution'; import { networkSelectors } from '../../store'; -import { useShallowEqualSelector } from '../../../common/hooks/use_selector'; -import { dnsTopDomainsLensAttributes } from '../../../common/components/visualization_actions/lens_attributes/network/dns_top_domains'; -import { useQueryToggle } from '../../../common/containers/query_toggle'; +import { useShallowEqualSelector } from '../../../../common/hooks/use_selector'; +import { dnsTopDomainsLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/network/dns_top_domains'; +import { useQueryToggle } from '../../../../common/containers/query_toggle'; const HISTOGRAM_ID = 'networkDnsHistogramQuery'; diff --git a/x-pack/plugins/security_solution/public/network/pages/navigation/http_query_tab_body.tsx b/x-pack/plugins/security_solution/public/explore/network/pages/navigation/http_query_tab_body.tsx similarity index 91% rename from x-pack/plugins/security_solution/public/network/pages/navigation/http_query_tab_body.tsx rename to x-pack/plugins/security_solution/public/explore/network/pages/navigation/http_query_tab_body.tsx index fe46f639c35de..32f07ab1f791e 100644 --- a/x-pack/plugins/security_solution/public/network/pages/navigation/http_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/pages/navigation/http_query_tab_body.tsx @@ -10,10 +10,10 @@ import { getOr } from 'lodash/fp'; import { NetworkHttpTable } from '../../components/network_http_table'; import { ID, useNetworkHttp } from '../../containers/network_http'; -import { manageQuery } from '../../../common/components/page/manage_query'; +import { manageQuery } from '../../../../common/components/page/manage_query'; import type { HttpQueryTabBodyProps } from './types'; -import { useQueryToggle } from '../../../common/containers/query_toggle'; +import { useQueryToggle } from '../../../../common/containers/query_toggle'; const NetworkHttpTableManage = manageQuery(NetworkHttpTable); diff --git a/x-pack/plugins/security_solution/public/network/pages/navigation/index.ts b/x-pack/plugins/security_solution/public/explore/network/pages/navigation/index.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/pages/navigation/index.ts rename to x-pack/plugins/security_solution/public/explore/network/pages/navigation/index.ts diff --git a/x-pack/plugins/security_solution/public/network/pages/navigation/ips_query_tab_body.tsx b/x-pack/plugins/security_solution/public/explore/network/pages/navigation/ips_query_tab_body.tsx similarity index 92% rename from x-pack/plugins/security_solution/public/network/pages/navigation/ips_query_tab_body.tsx rename to x-pack/plugins/security_solution/public/explore/network/pages/navigation/ips_query_tab_body.tsx index 5860fc90ea386..a479cc2d8d9b8 100644 --- a/x-pack/plugins/security_solution/public/network/pages/navigation/ips_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/pages/navigation/ips_query_tab_body.tsx @@ -10,10 +10,10 @@ import { getOr } from 'lodash/fp'; import { NetworkTopNFlowTable } from '../../components/network_top_n_flow_table'; import { ID, useNetworkTopNFlow } from '../../containers/network_top_n_flow'; -import { manageQuery } from '../../../common/components/page/manage_query'; +import { manageQuery } from '../../../../common/components/page/manage_query'; import type { IPsQueryTabBodyProps } from './types'; -import { useQueryToggle } from '../../../common/containers/query_toggle'; +import { useQueryToggle } from '../../../../common/containers/query_toggle'; const NetworkTopNFlowTableManage = manageQuery(NetworkTopNFlowTable); diff --git a/x-pack/plugins/security_solution/public/network/pages/navigation/nav_tabs.tsx b/x-pack/plugins/security_solution/public/explore/network/pages/navigation/nav_tabs.tsx similarity index 96% rename from x-pack/plugins/security_solution/public/network/pages/navigation/nav_tabs.tsx rename to x-pack/plugins/security_solution/public/explore/network/pages/navigation/nav_tabs.tsx index 9097bb10a1c58..5d394afe162f5 100644 --- a/x-pack/plugins/security_solution/public/network/pages/navigation/nav_tabs.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/pages/navigation/nav_tabs.tsx @@ -9,7 +9,7 @@ import { omit } from 'lodash/fp'; import * as i18n from '../translations'; import type { NetworkNavTab } from './types'; import { NetworkRouteType } from './types'; -import { NETWORK_PATH } from '../../../../common/constants'; +import { NETWORK_PATH } from '../../../../../common/constants'; const getTabsOnNetworkUrl = (tabName: NetworkRouteType) => `${NETWORK_PATH}/${tabName}`; diff --git a/x-pack/plugins/security_solution/public/network/pages/navigation/network_routes.tsx b/x-pack/plugins/security_solution/public/explore/network/pages/navigation/network_routes.tsx similarity index 85% rename from x-pack/plugins/security_solution/public/network/pages/navigation/network_routes.tsx rename to x-pack/plugins/security_solution/public/explore/network/pages/navigation/network_routes.tsx index b336fe1cf2a7f..5f4d2211cd8af 100644 --- a/x-pack/plugins/security_solution/public/network/pages/navigation/network_routes.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/pages/navigation/network_routes.tsx @@ -10,7 +10,7 @@ import { Switch } from 'react-router-dom'; import { Route } from '@kbn/kibana-react-plugin/public'; import { EuiFlexItem, EuiSpacer } from '@elastic/eui'; -import { FlowTargetSourceDest } from '../../../../common/search_strategy/security_solution/network'; +import { FlowTargetSourceDest } from '../../../../../common/search_strategy/security_solution/network'; import { CountriesQueryTabBody, @@ -19,15 +19,15 @@ import { IPsQueryTabBody, TlsQueryTabBody, } from '.'; -import { EventsQueryTabBody } from '../../../common/components/events_tab'; -import { AnomaliesNetworkTable } from '../../../common/components/ml/tables/anomalies_network_table'; -import { sourceOrDestinationIpExistsFilter } from '../../../common/components/visualization_actions/utils'; -import { AnomaliesQueryTabBody } from '../../../common/containers/anomalies/anomalies_query_tab_body'; -import { TableId } from '../../../../common/types'; +import { EventsQueryTabBody } from '../../../../common/components/events_tab'; +import { AnomaliesNetworkTable } from '../../../../common/components/ml/tables/anomalies_network_table'; +import { sourceOrDestinationIpExistsFilter } from '../../../../common/components/visualization_actions/utils'; +import { AnomaliesQueryTabBody } from '../../../../common/containers/anomalies/anomalies_query_tab_body'; +import { TableId } from '../../../../../common/types'; import { ConditionalFlexGroup } from './conditional_flex_group'; import type { NetworkRoutesProps } from './types'; import { NetworkRouteType } from './types'; -import { NETWORK_PATH } from '../../../../common/constants'; +import { NETWORK_PATH } from '../../../../../common/constants'; export const NetworkRoutes = React.memo( ({ type, to, filterQuery, isInitializing, from, indexPattern, indexNames, setQuery }) => { diff --git a/x-pack/plugins/security_solution/public/network/pages/navigation/network_routes_loading.tsx b/x-pack/plugins/security_solution/public/explore/network/pages/navigation/network_routes_loading.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/network/pages/navigation/network_routes_loading.tsx rename to x-pack/plugins/security_solution/public/explore/network/pages/navigation/network_routes_loading.tsx diff --git a/x-pack/plugins/security_solution/public/network/pages/navigation/tls_query_tab_body.tsx b/x-pack/plugins/security_solution/public/explore/network/pages/navigation/tls_query_tab_body.tsx similarity index 92% rename from x-pack/plugins/security_solution/public/network/pages/navigation/tls_query_tab_body.tsx rename to x-pack/plugins/security_solution/public/explore/network/pages/navigation/tls_query_tab_body.tsx index 04e9192f30673..b9f57e82eabba 100644 --- a/x-pack/plugins/security_solution/public/network/pages/navigation/tls_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/pages/navigation/tls_query_tab_body.tsx @@ -7,11 +7,11 @@ import React, { useEffect, useState } from 'react'; import { getOr } from 'lodash/fp'; -import { manageQuery } from '../../../common/components/page/manage_query'; +import { manageQuery } from '../../../../common/components/page/manage_query'; import { useNetworkTls, ID } from '../../containers/tls'; import { TlsTable } from '../../components/tls_table'; import type { FTQueryTabBodyProps } from './types'; -import { useQueryToggle } from '../../../common/containers/query_toggle'; +import { useQueryToggle } from '../../../../common/containers/query_toggle'; const TlsTableManage = manageQuery(TlsTable); diff --git a/x-pack/plugins/security_solution/public/network/pages/navigation/translations.ts b/x-pack/plugins/security_solution/public/explore/network/pages/navigation/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/pages/navigation/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/pages/navigation/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/pages/navigation/types.ts b/x-pack/plugins/security_solution/public/explore/network/pages/navigation/types.ts similarity index 82% rename from x-pack/plugins/security_solution/public/network/pages/navigation/types.ts rename to x-pack/plugins/security_solution/public/explore/network/pages/navigation/types.ts index 941ace5049cdf..2ed0756634707 100644 --- a/x-pack/plugins/security_solution/public/network/pages/navigation/types.ts +++ b/x-pack/plugins/security_solution/public/explore/network/pages/navigation/types.ts @@ -8,12 +8,12 @@ import type { DataViewBase } from '@kbn/es-query'; import type { Optional } from 'utility-types'; -import type { ESTermQuery } from '../../../../common/typed_json'; +import type { ESTermQuery } from '../../../../../common/typed_json'; -import type { NavTab } from '../../../common/components/navigation/types'; -import type { FlowTargetSourceDest } from '../../../../common/search_strategy/security_solution/network'; +import type { NavTab } from '../../../../common/components/navigation/types'; +import type { FlowTargetSourceDest } from '../../../../../common/search_strategy/security_solution/network'; import type { networkModel } from '../../store'; -import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; +import type { GlobalTimeArgs } from '../../../../common/containers/use_global_time'; export interface QueryTabBodyProps extends Pick { endDate: string; diff --git a/x-pack/plugins/security_solution/public/network/pages/navigation/users_query_tab_body.tsx b/x-pack/plugins/security_solution/public/explore/network/pages/navigation/users_query_tab_body.tsx similarity index 91% rename from x-pack/plugins/security_solution/public/network/pages/navigation/users_query_tab_body.tsx rename to x-pack/plugins/security_solution/public/explore/network/pages/navigation/users_query_tab_body.tsx index 201cda20ad433..96dd35de895de 100644 --- a/x-pack/plugins/security_solution/public/network/pages/navigation/users_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/pages/navigation/users_query_tab_body.tsx @@ -7,11 +7,11 @@ import React, { useEffect, useState } from 'react'; import { getOr } from 'lodash/fp'; -import { manageQuery } from '../../../common/components/page/manage_query'; +import { manageQuery } from '../../../../common/components/page/manage_query'; import { useNetworkUsers, ID } from '../../containers/users'; import type { IPQueryTabBodyProps } from './types'; import { UsersTable } from '../../components/users_table'; -import { useQueryToggle } from '../../../common/containers/query_toggle'; +import { useQueryToggle } from '../../../../common/containers/query_toggle'; const UsersTableManage = manageQuery(UsersTable); diff --git a/x-pack/plugins/security_solution/public/network/pages/navigation/utils.ts b/x-pack/plugins/security_solution/public/explore/network/pages/navigation/utils.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/pages/navigation/utils.ts rename to x-pack/plugins/security_solution/public/explore/network/pages/navigation/utils.ts diff --git a/x-pack/plugins/security_solution/public/network/pages/network.test.tsx b/x-pack/plugins/security_solution/public/explore/network/pages/network.test.tsx similarity index 88% rename from x-pack/plugins/security_solution/public/network/pages/network.test.tsx rename to x-pack/plugins/security_solution/public/explore/network/pages/network.test.tsx index c0e116a0d2273..61b279d6ac2f5 100644 --- a/x-pack/plugins/security_solution/public/network/pages/network.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/pages/network.test.tsx @@ -9,37 +9,37 @@ import { mount } from 'enzyme'; import React from 'react'; import { Router } from 'react-router-dom'; import { waitFor } from '@testing-library/react'; -import '../../common/mock/match_media'; +import '../../../common/mock/match_media'; import type { Filter } from '@kbn/es-query'; -import { useSourcererDataView } from '../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../common/containers/sourcerer'; import { TestProviders, mockGlobalState, SUB_PLUGINS_REDUCER, kibanaObservable, createSecuritySolutionStorageMock, -} from '../../common/mock'; -import type { State } from '../../common/store'; -import { createStore } from '../../common/store'; -import { inputsActions } from '../../common/store/inputs'; +} from '../../../common/mock'; +import type { State } from '../../../common/store'; +import { createStore } from '../../../common/store'; +import { inputsActions } from '../../../common/store/inputs'; import { Network } from './network'; import { NetworkRoutes } from './navigation'; import { mockCasesContract } from '@kbn/cases-plugin/public/mocks'; -import { LandingPageComponent } from '../../common/components/landing_page'; -import { InputsModelId } from '../../common/store/inputs/constants'; +import { LandingPageComponent } from '../../../common/components/landing_page'; +import { InputsModelId } from '../../../common/store/inputs/constants'; -jest.mock('../../common/containers/sourcerer'); +jest.mock('../../../common/containers/sourcerer'); // Test will fail because we will to need to mock some core services to make the test work // For now let's forget about SiemSearchBar and QueryBar -jest.mock('../../common/components/search_bar', () => ({ +jest.mock('../../../common/components/search_bar', () => ({ SiemSearchBar: () => null, })); -jest.mock('../../common/components/query_bar', () => ({ +jest.mock('../../../common/components/query_bar', () => ({ QueryBar: () => null, })); -jest.mock('../../common/components/visualization_actions', () => ({ +jest.mock('../../../common/components/visualization_actions', () => ({ VisualizationActions: jest.fn(() =>
), })); @@ -80,8 +80,8 @@ const mockProps = { const mockMapVisibility = jest.fn(); const mockNavigateToApp = jest.fn(); -jest.mock('../../common/lib/kibana', () => { - const original = jest.requireActual('../../common/lib/kibana'); +jest.mock('../../../common/lib/kibana', () => { + const original = jest.requireActual('../../../common/lib/kibana'); return { ...original, diff --git a/x-pack/plugins/security_solution/public/network/pages/network.tsx b/x-pack/plugins/security_solution/public/explore/network/pages/network.tsx similarity index 80% rename from x-pack/plugins/security_solution/public/network/pages/network.tsx rename to x-pack/plugins/security_solution/public/explore/network/pages/network.tsx index c3fff9329788e..206641e8f5494 100644 --- a/x-pack/plugins/security_solution/public/network/pages/network.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/pages/network.tsx @@ -14,27 +14,27 @@ import styled from 'styled-components'; import { isTab } from '@kbn/timelines-plugin/public'; import { getEsQueryConfig } from '@kbn/data-plugin/common'; -import { TableId } from '../../../common/types'; -import { InputsModelId } from '../../common/store/inputs/constants'; -import { SecurityPageName } from '../../app/types'; -import type { UpdateDateRange } from '../../common/components/charts/common'; +import { TableId } from '../../../../common/types'; +import { InputsModelId } from '../../../common/store/inputs/constants'; +import { SecurityPageName } from '../../../app/types'; +import type { UpdateDateRange } from '../../../common/components/charts/common'; import { EmbeddedMap } from '../components/embeddables/embedded_map'; -import { FiltersGlobal } from '../../common/components/filters_global'; -import { HeaderPage } from '../../common/components/header_page'; -import { LastEventTime } from '../../common/components/last_event_time'; -import { SecuritySolutionTabNavigation } from '../../common/components/navigation'; +import { FiltersGlobal } from '../../../common/components/filters_global'; +import { HeaderPage } from '../../../common/components/header_page'; +import { LastEventTime } from '../../../common/components/last_event_time'; +import { SecuritySolutionTabNavigation } from '../../../common/components/navigation'; import { NetworkKpiComponent } from '../components/kpi_network'; -import { SiemSearchBar } from '../../common/components/search_bar'; -import { SecuritySolutionPageWrapper } from '../../common/components/page_wrapper'; -import { useGlobalFullScreen } from '../../common/containers/use_full_screen'; -import { useGlobalTime } from '../../common/containers/use_global_time'; -import { LastEventIndexKey } from '../../../common/search_strategy'; -import { useKibana } from '../../common/lib/kibana'; -import { convertToBuildEsQuery } from '../../common/lib/kuery'; -import { inputsSelectors } from '../../common/store'; -import { setAbsoluteRangeDatePicker } from '../../common/store/inputs/actions'; -import { SpyRoute } from '../../common/utils/route/spy_routes'; +import { SiemSearchBar } from '../../../common/components/search_bar'; +import { SecuritySolutionPageWrapper } from '../../../common/components/page_wrapper'; +import { useGlobalFullScreen } from '../../../common/containers/use_full_screen'; +import { useGlobalTime } from '../../../common/containers/use_global_time'; +import { LastEventIndexKey } from '../../../../common/search_strategy'; +import { useKibana } from '../../../common/lib/kibana'; +import { convertToBuildEsQuery } from '../../../common/lib/kuery'; +import { inputsSelectors } from '../../../common/store'; +import { setAbsoluteRangeDatePicker } from '../../../common/store/inputs/actions'; +import { SpyRoute } from '../../../common/utils/route/spy_routes'; import { Display } from '../../hosts/pages/display'; import { networkModel } from '../store'; import { navTabsNetwork, NetworkRoutes, NetworkRoutesLoading } from './navigation'; @@ -45,14 +45,14 @@ import { onTimelineTabKeyPressed, resetKeyboardFocus, showGlobalFilters, -} from '../../timelines/components/timeline/helpers'; -import { useSourcererDataView } from '../../common/containers/sourcerer'; -import { useDeepEqualSelector, useShallowEqualSelector } from '../../common/hooks/use_selector'; -import { useInvalidFilterQuery } from '../../common/hooks/use_invalid_filter_query'; -import { sourceOrDestinationIpExistsFilter } from '../../common/components/visualization_actions/utils'; -import { LandingPageComponent } from '../../common/components/landing_page'; -import { dataTableSelectors } from '../../common/store/data_table'; -import { tableDefaults } from '../../common/store/data_table/defaults'; +} from '../../../timelines/components/timeline/helpers'; +import { useSourcererDataView } from '../../../common/containers/sourcerer'; +import { useDeepEqualSelector, useShallowEqualSelector } from '../../../common/hooks/use_selector'; +import { useInvalidFilterQuery } from '../../../common/hooks/use_invalid_filter_query'; +import { sourceOrDestinationIpExistsFilter } from '../../../common/components/visualization_actions/utils'; +import { LandingPageComponent } from '../../../common/components/landing_page'; +import { dataTableSelectors } from '../../../common/store/data_table'; +import { tableDefaults } from '../../../common/store/data_table/defaults'; /** * Need a 100% height here to account for the graph/analyze tool, which sets no explicit height parameters, but fills the available space. */ diff --git a/x-pack/plugins/security_solution/public/network/pages/translations.ts b/x-pack/plugins/security_solution/public/explore/network/pages/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/pages/translations.ts rename to x-pack/plugins/security_solution/public/explore/network/pages/translations.ts diff --git a/x-pack/plugins/security_solution/public/network/pages/types.ts b/x-pack/plugins/security_solution/public/explore/network/pages/types.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/pages/types.ts rename to x-pack/plugins/security_solution/public/explore/network/pages/types.ts diff --git a/x-pack/plugins/security_solution/public/network/routes.tsx b/x-pack/plugins/security_solution/public/explore/network/routes.tsx similarity index 73% rename from x-pack/plugins/security_solution/public/network/routes.tsx rename to x-pack/plugins/security_solution/public/explore/network/routes.tsx index 68b1ec4ceee8b..7a5f9fc8dd98f 100644 --- a/x-pack/plugins/security_solution/public/network/routes.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/routes.tsx @@ -9,10 +9,10 @@ import React from 'react'; import { TrackApplicationView } from '@kbn/usage-collection-plugin/public'; import { NetworkContainer } from './pages'; -import type { SecuritySubPluginRoutes } from '../app/types'; -import { SecurityPageName } from '../app/types'; -import { NETWORK_PATH } from '../../common/constants'; -import { PluginTemplateWrapper } from '../common/components/plugin_template_wrapper'; +import type { SecuritySubPluginRoutes } from '../../app/types'; +import { SecurityPageName } from '../../app/types'; +import { NETWORK_PATH } from '../../../common/constants'; +import { PluginTemplateWrapper } from '../../common/components/plugin_template_wrapper'; export const NetworkRoutes = () => ( diff --git a/x-pack/plugins/security_solution/public/network/store/actions.ts b/x-pack/plugins/security_solution/public/explore/network/store/actions.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/store/actions.ts rename to x-pack/plugins/security_solution/public/explore/network/store/actions.ts diff --git a/x-pack/plugins/security_solution/public/network/store/helpers.test.ts b/x-pack/plugins/security_solution/public/explore/network/store/helpers.test.ts similarity index 98% rename from x-pack/plugins/security_solution/public/network/store/helpers.test.ts rename to x-pack/plugins/security_solution/public/explore/network/store/helpers.test.ts index 14d2ca1c05f57..cb347ca72e8f8 100644 --- a/x-pack/plugins/security_solution/public/network/store/helpers.test.ts +++ b/x-pack/plugins/security_solution/public/explore/network/store/helpers.test.ts @@ -12,8 +12,8 @@ import { NetworkTopTablesFields, NetworkTlsFields, NetworkUsersFields, -} from '../../../common/search_strategy'; -import { DEFAULT_TABLE_LIMIT } from '../../common/store/constants'; +} from '../../../../common/search_strategy'; +import { DEFAULT_TABLE_LIMIT } from '../../../common/store/constants'; import type { NetworkModel } from './model'; import { NetworkTableType, NetworkDetailsTableType, NetworkType } from './model'; import { setNetworkQueriesActivePageToZero } from './helpers'; diff --git a/x-pack/plugins/security_solution/public/network/store/helpers.ts b/x-pack/plugins/security_solution/public/explore/network/store/helpers.ts similarity index 97% rename from x-pack/plugins/security_solution/public/network/store/helpers.ts rename to x-pack/plugins/security_solution/public/explore/network/store/helpers.ts index 8fdf6a66d7fae..c900daca51c81 100644 --- a/x-pack/plugins/security_solution/public/network/store/helpers.ts +++ b/x-pack/plugins/security_solution/public/explore/network/store/helpers.ts @@ -7,7 +7,7 @@ import type { NetworkModel, NetworkQueries, NetworkDetailsQueries } from './model'; import { NetworkType, NetworkTableType, NetworkDetailsTableType } from './model'; -import { DEFAULT_TABLE_ACTIVE_PAGE } from '../../common/store/constants'; +import { DEFAULT_TABLE_ACTIVE_PAGE } from '../../../common/store/constants'; export const setNetworkPageQueriesActivePageToZero = (state: NetworkModel): NetworkQueries => ({ ...state.page.queries, diff --git a/x-pack/plugins/security_solution/public/network/store/index.ts b/x-pack/plugins/security_solution/public/explore/network/store/index.ts similarity index 100% rename from x-pack/plugins/security_solution/public/network/store/index.ts rename to x-pack/plugins/security_solution/public/explore/network/store/index.ts diff --git a/x-pack/plugins/security_solution/public/network/store/model.ts b/x-pack/plugins/security_solution/public/explore/network/store/model.ts similarity index 98% rename from x-pack/plugins/security_solution/public/network/store/model.ts rename to x-pack/plugins/security_solution/public/explore/network/store/model.ts index dd3459ac891cd..cdc95bbb99490 100644 --- a/x-pack/plugins/security_solution/public/network/store/model.ts +++ b/x-pack/plugins/security_solution/public/explore/network/store/model.ts @@ -13,7 +13,7 @@ import type { NetworkTlsFields, NetworkUsersFields, SortField, -} from '../../../common/search_strategy'; +} from '../../../../common/search_strategy'; export enum NetworkType { page = 'page', diff --git a/x-pack/plugins/security_solution/public/network/store/reducer.ts b/x-pack/plugins/security_solution/public/explore/network/store/reducer.ts similarity index 98% rename from x-pack/plugins/security_solution/public/network/store/reducer.ts rename to x-pack/plugins/security_solution/public/explore/network/store/reducer.ts index 4b4d2e847ee1c..b55774ef90197 100644 --- a/x-pack/plugins/security_solution/public/network/store/reducer.ts +++ b/x-pack/plugins/security_solution/public/explore/network/store/reducer.ts @@ -14,8 +14,8 @@ import { NetworkTopTablesFields, NetworkTlsFields, NetworkUsersFields, -} from '../../../common/search_strategy'; -import { DEFAULT_TABLE_ACTIVE_PAGE, DEFAULT_TABLE_LIMIT } from '../../common/store/constants'; +} from '../../../../common/search_strategy'; +import { DEFAULT_TABLE_ACTIVE_PAGE, DEFAULT_TABLE_LIMIT } from '../../../common/store/constants'; import { setNetworkDetailsTablesActivePageToZero, diff --git a/x-pack/plugins/security_solution/public/network/store/selectors.ts b/x-pack/plugins/security_solution/public/explore/network/store/selectors.ts similarity index 95% rename from x-pack/plugins/security_solution/public/network/store/selectors.ts rename to x-pack/plugins/security_solution/public/explore/network/store/selectors.ts index 56b3fd8335618..2337428c50a0b 100644 --- a/x-pack/plugins/security_solution/public/network/store/selectors.ts +++ b/x-pack/plugins/security_solution/public/explore/network/store/selectors.ts @@ -8,8 +8,8 @@ import { createSelector } from 'reselect'; import { get } from 'lodash/fp'; -import { FlowTargetSourceDest } from '../../../common/search_strategy/security_solution/network'; -import type { State } from '../../common/store/types'; +import { FlowTargetSourceDest } from '../../../../common/search_strategy/security_solution/network'; +import type { State } from '../../../common/store/types'; import { initialNetworkState } from './reducer'; import type { NetworkDetailsModel, diff --git a/x-pack/plugins/security_solution/public/users/components/all_users/index.test.tsx b/x-pack/plugins/security_solution/public/explore/users/components/all_users/index.test.tsx similarity index 92% rename from x-pack/plugins/security_solution/public/users/components/all_users/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/users/components/all_users/index.test.tsx index 0696dada85693..8b83759e47fb7 100644 --- a/x-pack/plugins/security_solution/public/users/components/all_users/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/components/all_users/index.test.tsx @@ -7,18 +7,18 @@ import React from 'react'; -import '../../../common/mock/match_media'; -import { TestProviders } from '../../../common/mock'; +import '../../../../common/mock/match_media'; +import { TestProviders } from '../../../../common/mock'; import { UsersTable } from '.'; import { usersModel } from '../../store'; -import { Direction, RiskSeverity } from '../../../../common/search_strategy'; -import { UsersFields } from '../../../../common/search_strategy/security_solution/users/common'; +import { Direction, RiskSeverity } from '../../../../../common/search_strategy'; +import { UsersFields } from '../../../../../common/search_strategy/security_solution/users/common'; import { render } from '@testing-library/react'; const mockUseMlCapabilities = jest.fn().mockReturnValue({ isPlatinumOrTrialLicense: false }); -jest.mock('../../../common/components/ml/hooks/use_ml_capabilities', () => ({ +jest.mock('../../../../common/components/ml/hooks/use_ml_capabilities', () => ({ useMlCapabilities: () => mockUseMlCapabilities(), })); diff --git a/x-pack/plugins/security_solution/public/users/components/all_users/index.tsx b/x-pack/plugins/security_solution/public/explore/users/components/all_users/index.tsx similarity index 85% rename from x-pack/plugins/security_solution/public/users/components/all_users/index.tsx rename to x-pack/plugins/security_solution/public/explore/users/components/all_users/index.tsx index d8ad4b168adb4..c720b4393b372 100644 --- a/x-pack/plugins/security_solution/public/users/components/all_users/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/components/all_users/index.tsx @@ -9,27 +9,30 @@ import React, { useCallback, useMemo } from 'react'; import { useDispatch } from 'react-redux'; import { EuiIcon, EuiLink, EuiText, EuiToolTip } from '@elastic/eui'; -import { FormattedRelativePreferenceDate } from '../../../common/components/formatted_date'; -import { UserDetailsLink } from '../../../common/components/links'; -import { getEmptyTagValue, getOrEmptyTagFromValue } from '../../../common/components/empty_value'; +import { FormattedRelativePreferenceDate } from '../../../../common/components/formatted_date'; +import { UserDetailsLink } from '../../../../common/components/links'; +import { + getEmptyTagValue, + getOrEmptyTagFromValue, +} from '../../../../common/components/empty_value'; -import type { Columns, Criteria, ItemsPerRow } from '../../../common/components/paginated_table'; -import { PaginatedTable } from '../../../common/components/paginated_table'; +import type { Columns, Criteria, ItemsPerRow } from '../../../components/paginated_table'; +import { PaginatedTable } from '../../../components/paginated_table'; -import { getRowItemDraggables } from '../../../common/components/tables/helpers'; -import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; +import { getRowItemDraggables } from '../../../../common/components/tables/helpers'; +import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; import * as i18n from './translations'; import { usersActions, usersModel, usersSelectors } from '../../store'; -import type { User } from '../../../../common/search_strategy/security_solution/users/all'; -import type { SortUsersField } from '../../../../common/search_strategy/security_solution/users/common'; -import type { RiskSeverity } from '../../../../common/search_strategy'; -import { RiskScore } from '../../../common/components/severity/common'; -import { useMlCapabilities } from '../../../common/components/ml/hooks/use_ml_capabilities'; +import type { User } from '../../../../../common/search_strategy/security_solution/users/all'; +import type { SortUsersField } from '../../../../../common/search_strategy/security_solution/users/common'; +import type { RiskSeverity } from '../../../../../common/search_strategy'; +import { RiskScore } from '../../../components/risk_score/severity/common'; +import { useMlCapabilities } from '../../../../common/components/ml/hooks/use_ml_capabilities'; import { VIEW_USERS_BY_SEVERITY } from '../user_risk_score_table/translations'; -import { SecurityPageName } from '../../../app/types'; +import { SecurityPageName } from '../../../../app/types'; import { UsersTableType } from '../../store/model'; -import { useNavigateTo } from '../../../common/lib/kibana'; +import { useNavigateTo } from '../../../../common/lib/kibana'; const tableType = usersModel.UsersTableType.allUsers; diff --git a/x-pack/plugins/security_solution/public/users/components/all_users/translations.ts b/x-pack/plugins/security_solution/public/explore/users/components/all_users/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/users/components/all_users/translations.ts rename to x-pack/plugins/security_solution/public/explore/users/components/all_users/translations.ts diff --git a/x-pack/plugins/security_solution/public/users/components/kpi_users/authentications/index.test.tsx b/x-pack/plugins/security_solution/public/explore/users/components/kpi_users/authentications/index.test.tsx similarity index 86% rename from x-pack/plugins/security_solution/public/users/components/kpi_users/authentications/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/users/components/kpi_users/authentications/index.test.tsx index ecce177b1b8c6..0ca07a48d03ca 100644 --- a/x-pack/plugins/security_solution/public/users/components/kpi_users/authentications/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/components/kpi_users/authentications/index.test.tsx @@ -6,26 +6,26 @@ */ import { useUsersKpiAuthentications } from '../../../containers/users/authentications'; -import { useQueryToggle } from '../../../../common/containers/query_toggle'; +import { useQueryToggle } from '../../../../../common/containers/query_toggle'; import { render } from '@testing-library/react'; -import { TestProviders } from '../../../../common/mock'; +import { TestProviders } from '../../../../../common/mock'; import React from 'react'; import { UsersKpiAuthentications } from '.'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; -import { useRefetchByRestartingSession } from '../../../../common/components/page/use_refetch_by_session'; +import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; +import { useRefetchByRestartingSession } from '../../../../../common/components/page/use_refetch_by_session'; import { KpiBaseComponentManage } from '../../../../hosts/components/kpi_hosts/common'; -jest.mock('../../../../common/containers/query_toggle'); +jest.mock('../../../../../common/containers/query_toggle'); jest.mock('../../../containers/users/authentications'); jest.mock('../../../../hosts/components/kpi_hosts/common', () => ({ KpiBaseComponentManage: jest .fn() .mockReturnValue(), })); -jest.mock('../../../../common/hooks/use_experimental_features', () => ({ +jest.mock('../../../../../common/hooks/use_experimental_features', () => ({ useIsExperimentalFeatureEnabled: jest.fn(), })); -jest.mock('../../../../common/components/page/use_refetch_by_session', () => ({ +jest.mock('../../../../../common/components/page/use_refetch_by_session', () => ({ useRefetchByRestartingSession: jest.fn(), })); describe('Authentications KPI', () => { diff --git a/x-pack/plugins/security_solution/public/users/components/kpi_users/authentications/index.tsx b/x-pack/plugins/security_solution/public/explore/users/components/kpi_users/authentications/index.tsx similarity index 78% rename from x-pack/plugins/security_solution/public/users/components/kpi_users/authentications/index.tsx rename to x-pack/plugins/security_solution/public/explore/users/components/kpi_users/authentications/index.tsx index 723606b3ef95f..743d07bfa32f0 100644 --- a/x-pack/plugins/security_solution/public/users/components/kpi_users/authentications/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/components/kpi_users/authentications/index.tsx @@ -7,19 +7,19 @@ import React, { useEffect, useState } from 'react'; -import type { StatItems } from '../../../../common/components/stat_items'; -import { kpiUserAuthenticationsAreaLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_area'; -import { kpiUserAuthenticationsBarLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_bar'; -import { kpiUserAuthenticationsMetricSuccessLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_metric_success'; -import { kpiUserAuthenticationsMetricFailureLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/users/kpi_user_authentication_metric_failure'; +import type { StatItems } from '../../../../components/stat_items'; +import { kpiUserAuthenticationsAreaLensAttributes } from '../../../../../common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_area'; +import { kpiUserAuthenticationsBarLensAttributes } from '../../../../../common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_bar'; +import { kpiUserAuthenticationsMetricSuccessLensAttributes } from '../../../../../common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_metric_success'; +import { kpiUserAuthenticationsMetricFailureLensAttributes } from '../../../../../common/components/visualization_actions/lens_attributes/users/kpi_user_authentication_metric_failure'; import { useUsersKpiAuthentications, ID } from '../../../containers/users/authentications'; import { KpiBaseComponentManage } from '../../../../hosts/components/kpi_hosts/common'; import * as i18n from './translations'; -import { useQueryToggle } from '../../../../common/containers/query_toggle'; +import { useQueryToggle } from '../../../../../common/containers/query_toggle'; import type { UsersKpiProps } from '../types'; -import { InputsModelId } from '../../../../common/store/inputs/constants'; -import { useRefetchByRestartingSession } from '../../../../common/components/page/use_refetch_by_session'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; +import { InputsModelId } from '../../../../../common/store/inputs/constants'; +import { useRefetchByRestartingSession } from '../../../../../common/components/page/use_refetch_by_session'; +import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; enum ChartColors { authenticationsSuccess = '#54B399', diff --git a/x-pack/plugins/security_solution/public/users/components/kpi_users/authentications/translations.ts b/x-pack/plugins/security_solution/public/explore/users/components/kpi_users/authentications/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/users/components/kpi_users/authentications/translations.ts rename to x-pack/plugins/security_solution/public/explore/users/components/kpi_users/authentications/translations.ts diff --git a/x-pack/plugins/security_solution/public/users/components/kpi_users/index.tsx b/x-pack/plugins/security_solution/public/explore/users/components/kpi_users/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/users/components/kpi_users/index.tsx rename to x-pack/plugins/security_solution/public/explore/users/components/kpi_users/index.tsx diff --git a/x-pack/plugins/security_solution/public/users/components/kpi_users/total_users/index.test.tsx b/x-pack/plugins/security_solution/public/explore/users/components/kpi_users/total_users/index.test.tsx similarity index 82% rename from x-pack/plugins/security_solution/public/users/components/kpi_users/total_users/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/users/components/kpi_users/total_users/index.test.tsx index c49fc67c53c83..0adcd5e628761 100644 --- a/x-pack/plugins/security_solution/public/users/components/kpi_users/total_users/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/components/kpi_users/total_users/index.test.tsx @@ -5,27 +5,27 @@ * 2.0. */ -import { useQueryToggle } from '../../../../common/containers/query_toggle'; +import { useQueryToggle } from '../../../../../common/containers/query_toggle'; import { render } from '@testing-library/react'; -import { TestProviders } from '../../../../common/mock'; +import { TestProviders } from '../../../../../common/mock'; import React from 'react'; import { TotalUsersKpi } from '.'; -import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; -import { useRefetchByRestartingSession } from '../../../../common/components/page/use_refetch_by_session'; +import { useSearchStrategy } from '../../../../../common/containers/use_search_strategy'; +import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; +import { useRefetchByRestartingSession } from '../../../../../common/components/page/use_refetch_by_session'; import { KpiBaseComponentManage } from '../../../../hosts/components/kpi_hosts/common'; -jest.mock('../../../../common/containers/query_toggle'); -jest.mock('../../../../common/containers/use_search_strategy'); +jest.mock('../../../../../common/containers/query_toggle'); +jest.mock('../../../../../common/containers/use_search_strategy'); jest.mock('../../../../hosts/components/kpi_hosts/common', () => ({ KpiBaseComponentManage: jest .fn() .mockReturnValue(), })); -jest.mock('../../../../common/hooks/use_experimental_features', () => ({ +jest.mock('../../../../../common/hooks/use_experimental_features', () => ({ useIsExperimentalFeatureEnabled: jest.fn(), })); -jest.mock('../../../../common/components/page/use_refetch_by_session', () => ({ +jest.mock('../../../../../common/components/page/use_refetch_by_session', () => ({ useRefetchByRestartingSession: jest.fn(), })); diff --git a/x-pack/plugins/security_solution/public/users/components/kpi_users/total_users/index.tsx b/x-pack/plugins/security_solution/public/explore/users/components/kpi_users/total_users/index.tsx similarity index 75% rename from x-pack/plugins/security_solution/public/users/components/kpi_users/total_users/index.tsx rename to x-pack/plugins/security_solution/public/explore/users/components/kpi_users/total_users/index.tsx index d6c284d7b9697..930eb25b8a429 100644 --- a/x-pack/plugins/security_solution/public/users/components/kpi_users/total_users/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/components/kpi_users/total_users/index.tsx @@ -7,18 +7,18 @@ import { euiPaletteColorBlind } from '@elastic/eui'; import React, { useEffect, useState } from 'react'; -import { UsersQueries } from '../../../../../common/search_strategy/security_solution/users'; -import type { StatItems } from '../../../../common/components/stat_items'; -import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; +import { UsersQueries } from '../../../../../../common/search_strategy/security_solution/users'; +import type { StatItems } from '../../../../components/stat_items'; +import { useSearchStrategy } from '../../../../../common/containers/use_search_strategy'; import { KpiBaseComponentManage } from '../../../../hosts/components/kpi_hosts/common'; -import { kpiTotalUsersMetricLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/users/kpi_total_users_metric'; -import { kpiTotalUsersAreaLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/users/kpi_total_users_area'; +import { kpiTotalUsersMetricLensAttributes } from '../../../../../common/components/visualization_actions/lens_attributes/users/kpi_total_users_metric'; +import { kpiTotalUsersAreaLensAttributes } from '../../../../../common/components/visualization_actions/lens_attributes/users/kpi_total_users_area'; import * as i18n from './translations'; -import { useQueryToggle } from '../../../../common/containers/query_toggle'; +import { useQueryToggle } from '../../../../../common/containers/query_toggle'; import type { UsersKpiProps } from '../types'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; -import { useRefetchByRestartingSession } from '../../../../common/components/page/use_refetch_by_session'; -import { InputsModelId } from '../../../../common/store/inputs/constants'; +import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; +import { useRefetchByRestartingSession } from '../../../../../common/components/page/use_refetch_by_session'; +import { InputsModelId } from '../../../../../common/store/inputs/constants'; const euiVisColorPalette = euiPaletteColorBlind(); const euiColorVis1 = euiVisColorPalette[1]; diff --git a/x-pack/plugins/security_solution/public/users/components/kpi_users/total_users/translations.ts b/x-pack/plugins/security_solution/public/explore/users/components/kpi_users/total_users/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/users/components/kpi_users/total_users/translations.ts rename to x-pack/plugins/security_solution/public/explore/users/components/kpi_users/total_users/translations.ts diff --git a/x-pack/plugins/security_solution/public/users/components/kpi_users/types.ts b/x-pack/plugins/security_solution/public/explore/users/components/kpi_users/types.ts similarity index 73% rename from x-pack/plugins/security_solution/public/users/components/kpi_users/types.ts rename to x-pack/plugins/security_solution/public/explore/users/components/kpi_users/types.ts index 0c0c3642365ae..d9bf1487877df 100644 --- a/x-pack/plugins/security_solution/public/users/components/kpi_users/types.ts +++ b/x-pack/plugins/security_solution/public/explore/users/components/kpi_users/types.ts @@ -5,8 +5,8 @@ * 2.0. */ -import type { UpdateDateRange } from '../../../common/components/charts/common'; -import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; +import type { UpdateDateRange } from '../../../../common/components/charts/common'; +import type { GlobalTimeArgs } from '../../../../common/containers/use_global_time'; export interface UsersKpiProps { filterQuery?: string; diff --git a/x-pack/plugins/security_solution/public/users/components/user_risk_score_table/columns.test.tsx b/x-pack/plugins/security_solution/public/explore/users/components/user_risk_score_table/columns.test.tsx similarity index 93% rename from x-pack/plugins/security_solution/public/users/components/user_risk_score_table/columns.test.tsx rename to x-pack/plugins/security_solution/public/explore/users/components/user_risk_score_table/columns.test.tsx index 54a90e89e52f5..d28513800f221 100644 --- a/x-pack/plugins/security_solution/public/users/components/user_risk_score_table/columns.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/components/user_risk_score_table/columns.test.tsx @@ -8,8 +8,8 @@ import React from 'react'; import { render } from '@testing-library/react'; import type { UserRiskScoreColumns } from '.'; import { getUserRiskScoreColumns } from './columns'; -import { TestProviders } from '../../../common/mock'; -import { RiskScoreFields } from '../../../../common/search_strategy'; +import { TestProviders } from '../../../../common/mock'; +import { RiskScoreFields } from '../../../../../common/search_strategy'; describe('getUserRiskScoreColumns', () => { const defaultProps = { diff --git a/x-pack/plugins/security_solution/public/users/components/user_risk_score_table/columns.tsx b/x-pack/plugins/security_solution/public/explore/users/components/user_risk_score_table/columns.tsx similarity index 80% rename from x-pack/plugins/security_solution/public/users/components/user_risk_score_table/columns.tsx rename to x-pack/plugins/security_solution/public/explore/users/components/user_risk_score_table/columns.tsx index aaea29472bb1d..5359739dc8609 100644 --- a/x-pack/plugins/security_solution/public/users/components/user_risk_score_table/columns.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/components/user_risk_score_table/columns.tsx @@ -10,19 +10,19 @@ import { EuiIcon, EuiLink, EuiText, EuiToolTip } from '@elastic/eui'; import { DragEffects, DraggableWrapper, -} from '../../../common/components/drag_and_drop/draggable_wrapper'; -import { escapeDataProviderId } from '../../../common/components/drag_and_drop/helpers'; -import { getEmptyTagValue } from '../../../common/components/empty_value'; +} from '../../../../common/components/drag_and_drop/draggable_wrapper'; +import { escapeDataProviderId } from '../../../../common/components/drag_and_drop/helpers'; +import { getEmptyTagValue } from '../../../../common/components/empty_value'; -import { IS_OPERATOR } from '../../../timelines/components/timeline/data_providers/data_provider'; -import { Provider } from '../../../timelines/components/timeline/data_providers/provider'; +import { IS_OPERATOR } from '../../../../timelines/components/timeline/data_providers/data_provider'; +import { Provider } from '../../../../timelines/components/timeline/data_providers/provider'; import type { UserRiskScoreColumns } from '.'; import * as i18n from './translations'; -import { RiskScore } from '../../../common/components/severity/common'; -import type { RiskSeverity } from '../../../../common/search_strategy'; -import { RiskScoreFields } from '../../../../common/search_strategy'; -import { UserDetailsLink } from '../../../common/components/links'; +import { RiskScore } from '../../../components/risk_score/severity/common'; +import type { RiskSeverity } from '../../../../../common/search_strategy'; +import { RiskScoreFields } from '../../../../../common/search_strategy'; +import { UserDetailsLink } from '../../../../common/components/links'; import { UsersTableType } from '../../store/model'; export const getUserRiskScoreColumns = ({ diff --git a/x-pack/plugins/security_solution/public/users/components/user_risk_score_table/index.test.tsx b/x-pack/plugins/security_solution/public/explore/users/components/user_risk_score_table/index.test.tsx similarity index 87% rename from x-pack/plugins/security_solution/public/users/components/user_risk_score_table/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/users/components/user_risk_score_table/index.test.tsx index 34f0116bb055e..2d3cedad6bea1 100644 --- a/x-pack/plugins/security_solution/public/users/components/user_risk_score_table/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/components/user_risk_score_table/index.test.tsx @@ -9,9 +9,9 @@ import { render } from '@testing-library/react'; import { noop } from 'lodash'; import React from 'react'; import { UserRiskScoreTable } from '.'; -import type { UserRiskScore } from '../../../../common/search_strategy'; -import { RiskSeverity } from '../../../../common/search_strategy'; -import { TestProviders } from '../../../common/mock'; +import type { UserRiskScore } from '../../../../../common/search_strategy'; +import { RiskSeverity } from '../../../../../common/search_strategy'; +import { TestProviders } from '../../../../common/mock'; import { UsersType } from '../../store/model'; describe('UserRiskScoreTable', () => { diff --git a/x-pack/plugins/security_solution/public/users/components/user_risk_score_table/index.tsx b/x-pack/plugins/security_solution/public/explore/users/components/user_risk_score_table/index.tsx similarity index 87% rename from x-pack/plugins/security_solution/public/users/components/user_risk_score_table/index.tsx rename to x-pack/plugins/security_solution/public/explore/users/components/user_risk_score_table/index.tsx index 984f737d9f97d..a08e4fc61468a 100644 --- a/x-pack/plugins/security_solution/public/users/components/user_risk_score_table/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/components/user_risk_score_table/index.tsx @@ -9,27 +9,27 @@ import React, { useMemo, useCallback } from 'react'; import { useDispatch } from 'react-redux'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import type { Columns, Criteria, ItemsPerRow } from '../../../common/components/paginated_table'; -import { PaginatedTable } from '../../../common/components/paginated_table'; +import type { Columns, Criteria, ItemsPerRow } from '../../../components/paginated_table'; +import { PaginatedTable } from '../../../components/paginated_table'; import { getUserRiskScoreColumns } from './columns'; import * as i18nUsers from '../../pages/translations'; import * as i18n from './translations'; import { usersModel, usersSelectors, usersActions } from '../../store'; -import type { UserRiskScoreItem } from '../../../../common/search_strategy/security_solution/users/common'; -import type { SeverityCount } from '../../../common/components/severity/types'; -import { SeverityBadges } from '../../../common/components/severity/severity_badges'; -import { SeverityBar } from '../../../common/components/severity/severity_bar'; -import { SeverityFilterGroup } from '../../../common/components/severity/severity_filter_group'; -import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; -import type { State } from '../../../common/store'; +import type { UserRiskScoreItem } from '../../../../../common/search_strategy/security_solution/users/common'; +import type { SeverityCount } from '../../../components/risk_score/severity/types'; +import { SeverityBadges } from '../../../components/risk_score/severity/severity_badges'; +import { SeverityBar } from '../../../components/risk_score/severity/severity_bar'; +import { SeverityFilterGroup } from '../../../components/risk_score/severity/severity_filter_group'; +import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; +import type { State } from '../../../../common/store'; import type { RiskScoreFields, RiskScoreSortField, RiskSeverity, UserRiskScore, -} from '../../../../common/search_strategy'; +} from '../../../../../common/search_strategy'; export const rowItems: ItemsPerRow[] = [ { diff --git a/x-pack/plugins/security_solution/public/users/components/user_risk_score_table/translations.ts b/x-pack/plugins/security_solution/public/explore/users/components/user_risk_score_table/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/users/components/user_risk_score_table/translations.ts rename to x-pack/plugins/security_solution/public/explore/users/components/user_risk_score_table/translations.ts diff --git a/x-pack/plugins/security_solution/public/users/containers/users/authentications/index.test.tsx b/x-pack/plugins/security_solution/public/explore/users/containers/users/authentications/index.test.tsx similarity index 94% rename from x-pack/plugins/security_solution/public/users/containers/users/authentications/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/users/containers/users/authentications/index.test.tsx index 54f816dc02c70..50fcad8301f1e 100644 --- a/x-pack/plugins/security_solution/public/users/containers/users/authentications/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/containers/users/authentications/index.test.tsx @@ -6,7 +6,7 @@ */ import { act, renderHook } from '@testing-library/react-hooks'; -import { TestProviders } from '../../../../common/mock'; +import { TestProviders } from '../../../../../common/mock'; import { useUsersKpiAuthentications } from '.'; describe('kpi users - authentications', () => { diff --git a/x-pack/plugins/security_solution/public/users/containers/users/authentications/index.tsx b/x-pack/plugins/security_solution/public/explore/users/containers/users/authentications/index.tsx similarity index 89% rename from x-pack/plugins/security_solution/public/users/containers/users/authentications/index.tsx rename to x-pack/plugins/security_solution/public/explore/users/containers/users/authentications/index.tsx index e4262fdc0d1ba..8263c03bc4fa6 100644 --- a/x-pack/plugins/security_solution/public/users/containers/users/authentications/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/containers/users/authentications/index.tsx @@ -10,20 +10,20 @@ import { noop } from 'lodash/fp'; import { useCallback, useEffect, useRef, useState } from 'react'; import { Subscription } from 'rxjs'; -import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import type { inputsModel } from '../../../../common/store'; -import { createFilter } from '../../../../common/containers/helpers'; -import { useKibana } from '../../../../common/lib/kibana'; +import { useAppToasts } from '../../../../../common/hooks/use_app_toasts'; +import type { inputsModel } from '../../../../../common/store'; +import { createFilter } from '../../../../../common/containers/helpers'; +import { useKibana } from '../../../../../common/lib/kibana'; import type { UsersKpiAuthenticationsRequestOptions, UsersKpiAuthenticationsStrategyResponse, -} from '../../../../../common/search_strategy'; -import { UsersQueries } from '../../../../../common/search_strategy'; -import type { ESTermQuery } from '../../../../../common/typed_json'; +} from '../../../../../../common/search_strategy'; +import { UsersQueries } from '../../../../../../common/search_strategy'; +import type { ESTermQuery } from '../../../../../../common/typed_json'; import * as i18n from './translations'; -import { getInspectResponse } from '../../../../helpers'; -import type { InspectResponse } from '../../../../types'; +import { getInspectResponse } from '../../../../../helpers'; +import type { InspectResponse } from '../../../../../types'; export const ID = 'usersKpiAuthenticationsQuery'; diff --git a/x-pack/plugins/security_solution/public/users/containers/users/authentications/translations.ts b/x-pack/plugins/security_solution/public/explore/users/containers/users/authentications/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/users/containers/users/authentications/translations.ts rename to x-pack/plugins/security_solution/public/explore/users/containers/users/authentications/translations.ts diff --git a/x-pack/plugins/security_solution/public/users/containers/users/details/index.test.tsx b/x-pack/plugins/security_solution/public/explore/users/containers/users/details/index.test.tsx similarity index 88% rename from x-pack/plugins/security_solution/public/users/containers/users/details/index.test.tsx rename to x-pack/plugins/security_solution/public/explore/users/containers/users/details/index.test.tsx index f6427252f0689..396cf027ebccb 100644 --- a/x-pack/plugins/security_solution/public/users/containers/users/details/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/containers/users/details/index.test.tsx @@ -5,11 +5,11 @@ * 2.0. */ import { act, renderHook } from '@testing-library/react-hooks'; -import { TestProviders } from '../../../../common/mock'; +import { TestProviders } from '../../../../../common/mock'; import { useUserDetails } from '.'; -import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; +import { useSearchStrategy } from '../../../../../common/containers/use_search_strategy'; -jest.mock('../../../../common/containers/use_search_strategy', () => ({ +jest.mock('../../../../../common/containers/use_search_strategy', () => ({ useSearchStrategy: jest.fn(), })); const mockUseSearchStrategy = useSearchStrategy as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/users/containers/users/details/index.tsx b/x-pack/plugins/security_solution/public/explore/users/containers/users/details/index.tsx similarity index 82% rename from x-pack/plugins/security_solution/public/users/containers/users/details/index.tsx rename to x-pack/plugins/security_solution/public/explore/users/containers/users/details/index.tsx index 4f75f02c8108b..7ddd0486a48ba 100644 --- a/x-pack/plugins/security_solution/public/users/containers/users/details/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/containers/users/details/index.tsx @@ -6,12 +6,12 @@ */ import { useEffect, useMemo } from 'react'; -import type { inputsModel } from '../../../../common/store'; +import type { inputsModel } from '../../../../../common/store'; import * as i18n from './translations'; -import type { InspectResponse } from '../../../../types'; -import { UsersQueries } from '../../../../../common/search_strategy/security_solution/users'; -import type { UserItem } from '../../../../../common/search_strategy/security_solution/users/common'; -import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; +import type { InspectResponse } from '../../../../../types'; +import { UsersQueries } from '../../../../../../common/search_strategy/security_solution/users'; +import type { UserItem } from '../../../../../../common/search_strategy/security_solution/users/common'; +import { useSearchStrategy } from '../../../../../common/containers/use_search_strategy'; export const ID = 'usersDetailsQuery'; diff --git a/x-pack/plugins/security_solution/public/users/containers/users/details/translations.ts b/x-pack/plugins/security_solution/public/explore/users/containers/users/details/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/users/containers/users/details/translations.ts rename to x-pack/plugins/security_solution/public/explore/users/containers/users/details/translations.ts diff --git a/x-pack/plugins/security_solution/public/users/index.ts b/x-pack/plugins/security_solution/public/explore/users/index.ts similarity index 91% rename from x-pack/plugins/security_solution/public/users/index.ts rename to x-pack/plugins/security_solution/public/explore/users/index.ts index f567eec8520d5..770cf39102c90 100644 --- a/x-pack/plugins/security_solution/public/users/index.ts +++ b/x-pack/plugins/security_solution/public/explore/users/index.ts @@ -6,7 +6,7 @@ */ import type { Storage } from '@kbn/kibana-utils-plugin/public'; -import type { SecuritySubPluginWithStore } from '../app/types'; +import type { SecuritySubPluginWithStore } from '../../app/types'; import { routes } from './routes'; import type { usersModel } from './store'; import { initialUsersState, usersReducer } from './store'; diff --git a/x-pack/plugins/security_solution/public/users/links.ts b/x-pack/plugins/security_solution/public/explore/users/links.ts similarity index 87% rename from x-pack/plugins/security_solution/public/users/links.ts rename to x-pack/plugins/security_solution/public/explore/users/links.ts index 16b4e5f1f5255..177197dcbd756 100644 --- a/x-pack/plugins/security_solution/public/users/links.ts +++ b/x-pack/plugins/security_solution/public/explore/users/links.ts @@ -6,10 +6,10 @@ */ import { i18n } from '@kbn/i18n'; -import { SecurityPageName, USERS_PATH } from '../../common/constants'; -import { USERS } from '../app/translations'; -import type { LinkItem } from '../common/links/types'; -import userPageImg from '../common/images/users_page.png'; +import { SecurityPageName, USERS_PATH } from '../../../common/constants'; +import { USERS } from '../../app/translations'; +import type { LinkItem } from '../../common/links/types'; +import userPageImg from '../../common/images/users_page.png'; export const links: LinkItem = { id: SecurityPageName.users, diff --git a/x-pack/plugins/security_solution/public/users/pages/constants.ts b/x-pack/plugins/security_solution/public/explore/users/pages/constants.ts similarity index 92% rename from x-pack/plugins/security_solution/public/users/pages/constants.ts rename to x-pack/plugins/security_solution/public/explore/users/pages/constants.ts index c128de47236a4..9d5eb8f10b9f6 100644 --- a/x-pack/plugins/security_solution/public/users/pages/constants.ts +++ b/x-pack/plugins/security_solution/public/explore/users/pages/constants.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { USERS_PATH } from '../../../common/constants'; +import { USERS_PATH } from '../../../../common/constants'; import { UsersTableType } from '../store/model'; export const usersDetailsPagePath = `${USERS_PATH}/name/:detailName`; diff --git a/x-pack/plugins/security_solution/public/users/pages/details/details_tabs.tsx b/x-pack/plugins/security_solution/public/explore/users/pages/details/details_tabs.tsx similarity index 80% rename from x-pack/plugins/security_solution/public/users/pages/details/details_tabs.tsx rename to x-pack/plugins/security_solution/public/explore/users/pages/details/details_tabs.tsx index e7df8a7678084..0049a77df946b 100644 --- a/x-pack/plugins/security_solution/public/users/pages/details/details_tabs.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/pages/details/details_tabs.tsx @@ -9,15 +9,15 @@ import React from 'react'; import { Switch } from 'react-router-dom'; import { Route } from '@kbn/kibana-react-plugin/public'; -import { RiskDetailsTabBody } from '../../../risk_score/components/risk_details_tab_body'; -import { RiskScoreEntity } from '../../../../common/search_strategy'; +import { RiskDetailsTabBody } from '../../../components/risk_score/risk_details_tab_body'; +import { RiskScoreEntity } from '../../../../../common/search_strategy'; import { UsersTableType } from '../../store/model'; -import { AnomaliesUserTable } from '../../../common/components/ml/tables/anomalies_user_table'; +import { AnomaliesUserTable } from '../../../../common/components/ml/tables/anomalies_user_table'; import type { UsersDetailsTabsProps } from './types'; -import { AnomaliesQueryTabBody } from '../../../common/containers/anomalies/anomalies_query_tab_body'; +import { AnomaliesQueryTabBody } from '../../../../common/containers/anomalies/anomalies_query_tab_body'; import { usersDetailsPagePath } from '../constants'; -import { TableId } from '../../../../common/types'; -import { EventsQueryTabBody } from '../../../common/components/events_tab'; +import { TableId } from '../../../../../common/types'; +import { EventsQueryTabBody } from '../../../../common/components/events_tab'; import { AuthenticationsQueryTabBody } from '../navigation'; export const UsersDetailsTabs = React.memo( diff --git a/x-pack/plugins/security_solution/public/users/pages/details/helpers.ts b/x-pack/plugins/security_solution/public/explore/users/pages/details/helpers.ts similarity index 100% rename from x-pack/plugins/security_solution/public/users/pages/details/helpers.ts rename to x-pack/plugins/security_solution/public/explore/users/pages/details/helpers.ts diff --git a/x-pack/plugins/security_solution/public/users/pages/details/index.tsx b/x-pack/plugins/security_solution/public/explore/users/pages/details/index.tsx similarity index 72% rename from x-pack/plugins/security_solution/public/users/pages/details/index.tsx rename to x-pack/plugins/security_solution/public/explore/users/pages/details/index.tsx index e2c6fff56eda4..2171f423647d6 100644 --- a/x-pack/plugins/security_solution/public/users/pages/details/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/pages/details/index.tsx @@ -19,50 +19,53 @@ import { useDispatch } from 'react-redux'; import { getEsQueryConfig } from '@kbn/data-plugin/common'; import type { Filter } from '@kbn/es-query'; import { buildEsQuery } from '@kbn/es-query'; -import { TableId } from '../../../../common/types'; -import { dataTableSelectors } from '../../../common/store/data_table'; -import { AlertsByStatus } from '../../../overview/components/detection_response/alerts_by_status'; -import { useSignalIndex } from '../../../detections/containers/detection_engine/alerts/use_signal_index'; -import { AlertCountByRuleByStatus } from '../../../common/components/alert_count_by_status'; -import { InputsModelId } from '../../../common/store/inputs/constants'; -import { SecurityPageName } from '../../../app/types'; -import { FiltersGlobal } from '../../../common/components/filters_global'; -import { HeaderPage } from '../../../common/components/header_page'; -import { SecuritySolutionTabNavigation } from '../../../common/components/navigation'; -import { SiemSearchBar } from '../../../common/components/search_bar'; -import { SecuritySolutionPageWrapper } from '../../../common/components/page_wrapper'; -import { useGlobalTime } from '../../../common/containers/use_global_time'; -import { useKibana } from '../../../common/lib/kibana'; -import { inputsSelectors } from '../../../common/store'; -import { useAlertsPrivileges } from '../../../detections/containers/detection_engine/alerts/use_alerts_privileges'; +import { TableId } from '../../../../../common/types'; +import { dataTableSelectors } from '../../../../common/store/data_table'; +import { AlertsByStatus } from '../../../../overview/components/detection_response/alerts_by_status'; +import { useSignalIndex } from '../../../../detections/containers/detection_engine/alerts/use_signal_index'; +import { AlertCountByRuleByStatus } from '../../../../common/components/alert_count_by_status'; +import { InputsModelId } from '../../../../common/store/inputs/constants'; +import { SecurityPageName } from '../../../../app/types'; +import { FiltersGlobal } from '../../../../common/components/filters_global'; +import { HeaderPage } from '../../../../common/components/header_page'; +import { SecuritySolutionTabNavigation } from '../../../../common/components/navigation'; +import { SiemSearchBar } from '../../../../common/components/search_bar'; +import { SecuritySolutionPageWrapper } from '../../../../common/components/page_wrapper'; +import { useGlobalTime } from '../../../../common/containers/use_global_time'; +import { useKibana } from '../../../../common/lib/kibana'; +import { inputsSelectors } from '../../../../common/store'; +import { useAlertsPrivileges } from '../../../../detections/containers/detection_engine/alerts/use_alerts_privileges'; import { setUsersDetailsTablesActivePageToZero } from '../../store/actions'; -import { setAbsoluteRangeDatePicker } from '../../../common/store/inputs/actions'; -import { SpyRoute } from '../../../common/utils/route/spy_routes'; +import { setAbsoluteRangeDatePicker } from '../../../../common/store/inputs/actions'; +import { SpyRoute } from '../../../../common/utils/route/spy_routes'; import { UsersDetailsTabs } from './details_tabs'; import { navTabsUsersDetails } from './nav_tabs'; import type { UsersDetailsProps } from './types'; import { type } from './utils'; import { getUsersDetailsPageFilters } from './helpers'; -import { showGlobalFilters } from '../../../timelines/components/timeline/helpers'; -import { useGlobalFullScreen } from '../../../common/containers/use_full_screen'; -import { timelineDefaults } from '../../../timelines/store/timeline/defaults'; -import { useSourcererDataView } from '../../../common/containers/sourcerer'; -import { useDeepEqualSelector, useShallowEqualSelector } from '../../../common/hooks/use_selector'; -import { useInvalidFilterQuery } from '../../../common/hooks/use_invalid_filter_query'; -import { LastEventTime } from '../../../common/components/last_event_time'; -import { LastEventIndexKey } from '../../../../common/search_strategy'; +import { showGlobalFilters } from '../../../../timelines/components/timeline/helpers'; +import { useGlobalFullScreen } from '../../../../common/containers/use_full_screen'; +import { timelineDefaults } from '../../../../timelines/store/timeline/defaults'; +import { useSourcererDataView } from '../../../../common/containers/sourcerer'; +import { + useDeepEqualSelector, + useShallowEqualSelector, +} from '../../../../common/hooks/use_selector'; +import { useInvalidFilterQuery } from '../../../../common/hooks/use_invalid_filter_query'; +import { LastEventTime } from '../../../../common/components/last_event_time'; +import { LastEventIndexKey } from '../../../../../common/search_strategy'; -import { AnomalyTableProvider } from '../../../common/components/ml/anomaly/anomaly_table_provider'; -import { UserOverview } from '../../../overview/components/user_overview'; +import { AnomalyTableProvider } from '../../../../common/components/ml/anomaly/anomaly_table_provider'; +import { UserOverview } from '../../../../overview/components/user_overview'; import { useUserDetails } from '../../containers/users/details'; -import { useQueryInspector } from '../../../common/components/page/manage_query'; -import { scoreIntervalToDateTime } from '../../../common/components/ml/score/score_interval_to_datetime'; -import { getCriteriaFromUsersType } from '../../../common/components/ml/criteria/get_criteria_from_users_type'; +import { useQueryInspector } from '../../../../common/components/page/manage_query'; +import { scoreIntervalToDateTime } from '../../../../common/components/ml/score/score_interval_to_datetime'; +import { getCriteriaFromUsersType } from '../../../../common/components/ml/criteria/get_criteria_from_users_type'; import { UsersType } from '../../store/model'; -import { hasMlUserPermissions } from '../../../../common/machine_learning/has_ml_user_permissions'; -import { useMlCapabilities } from '../../../common/components/ml/hooks/use_ml_capabilities'; -import { LandingPageComponent } from '../../../common/components/landing_page'; +import { hasMlUserPermissions } from '../../../../../common/machine_learning/has_ml_user_permissions'; +import { useMlCapabilities } from '../../../../common/components/ml/hooks/use_ml_capabilities'; +import { LandingPageComponent } from '../../../../common/components/landing_page'; const QUERY_ID = 'UsersDetailsQueryId'; const ES_USER_FIELD = 'user.name'; diff --git a/x-pack/plugins/security_solution/public/users/pages/details/nav_tabs.test.tsx b/x-pack/plugins/security_solution/public/explore/users/pages/details/nav_tabs.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/users/pages/details/nav_tabs.test.tsx rename to x-pack/plugins/security_solution/public/explore/users/pages/details/nav_tabs.test.tsx diff --git a/x-pack/plugins/security_solution/public/users/pages/details/nav_tabs.tsx b/x-pack/plugins/security_solution/public/explore/users/pages/details/nav_tabs.tsx similarity index 93% rename from x-pack/plugins/security_solution/public/users/pages/details/nav_tabs.tsx rename to x-pack/plugins/security_solution/public/explore/users/pages/details/nav_tabs.tsx index 588372272e540..0bcf2d9ecf660 100644 --- a/x-pack/plugins/security_solution/public/users/pages/details/nav_tabs.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/pages/details/nav_tabs.tsx @@ -9,8 +9,8 @@ import { omit } from 'lodash/fp'; import * as i18n from '../translations'; import type { UsersDetailsNavTab } from './types'; import { UsersTableType } from '../../store/model'; -import { USERS_PATH } from '../../../../common/constants'; -import { TECHNICAL_PREVIEW } from '../../../overview/pages/translations'; +import { USERS_PATH } from '../../../../../common/constants'; +import { TECHNICAL_PREVIEW } from '../../../../overview/pages/translations'; const getTabsOnUsersDetailsUrl = (userName: string, tabName: UsersTableType) => `${USERS_PATH}/name/${userName}/${tabName}`; diff --git a/x-pack/plugins/security_solution/public/users/pages/details/types.ts b/x-pack/plugins/security_solution/public/explore/users/pages/details/types.ts similarity index 95% rename from x-pack/plugins/security_solution/public/users/pages/details/types.ts rename to x-pack/plugins/security_solution/public/explore/users/pages/details/types.ts index 139b268132578..002d1339a1898 100644 --- a/x-pack/plugins/security_solution/public/users/pages/details/types.ts +++ b/x-pack/plugins/security_solution/public/explore/users/pages/details/types.ts @@ -10,7 +10,7 @@ import type { ActionCreator } from 'typescript-fsa'; import type { DataViewBase, Filter, Query } from '@kbn/es-query'; import type { UsersQueryProps } from '../types'; -import type { NavTab } from '../../../common/components/navigation/types'; +import type { NavTab } from '../../../../common/components/navigation/types'; import type { UsersDetailsTableType } from '../../store/model'; import type { usersModel } from '../../store'; diff --git a/x-pack/plugins/security_solution/public/users/pages/details/utils.ts b/x-pack/plugins/security_solution/public/explore/users/pages/details/utils.ts similarity index 84% rename from x-pack/plugins/security_solution/public/users/pages/details/utils.ts rename to x-pack/plugins/security_solution/public/explore/users/pages/details/utils.ts index f07978cc38c46..c4ffe7c84e2a8 100644 --- a/x-pack/plugins/security_solution/public/users/pages/details/utils.ts +++ b/x-pack/plugins/security_solution/public/explore/users/pages/details/utils.ts @@ -10,12 +10,12 @@ import { get } from 'lodash/fp'; import type { ChromeBreadcrumb } from '@kbn/core/public'; import { usersModel } from '../../store'; import { UsersTableType } from '../../store/model'; -import { getUsersDetailsUrl } from '../../../common/components/link_to/redirect_to_users'; +import { getUsersDetailsUrl } from '../../../../common/components/link_to/redirect_to_users'; import * as i18n from '../translations'; -import type { UsersRouteSpyState } from '../../../common/utils/route/types'; -import { SecurityPageName } from '../../../app/types'; -import type { GetSecuritySolutionUrl } from '../../../common/components/link_to'; +import type { UsersRouteSpyState } from '../../../../common/utils/route/types'; +import { SecurityPageName } from '../../../../app/types'; +import type { GetSecuritySolutionUrl } from '../../../../common/components/link_to'; export const type = usersModel.UsersType.details; diff --git a/x-pack/plugins/security_solution/public/users/pages/index.tsx b/x-pack/plugins/security_solution/public/explore/users/pages/index.tsx similarity index 97% rename from x-pack/plugins/security_solution/public/users/pages/index.tsx rename to x-pack/plugins/security_solution/public/explore/users/pages/index.tsx index e71ec531bf9c7..fe7afba6e96bc 100644 --- a/x-pack/plugins/security_solution/public/users/pages/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/pages/index.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { Switch, Redirect } from 'react-router-dom'; import { Route } from '@kbn/kibana-react-plugin/public'; -import { USERS_PATH } from '../../../common/constants'; +import { USERS_PATH } from '../../../../common/constants'; import { UsersTableType } from '../store/model'; import { Users } from './users'; import { UsersDetails } from './details'; diff --git a/x-pack/plugins/security_solution/public/users/pages/nav_tabs.test.tsx b/x-pack/plugins/security_solution/public/explore/users/pages/nav_tabs.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/users/pages/nav_tabs.test.tsx rename to x-pack/plugins/security_solution/public/explore/users/pages/nav_tabs.test.tsx diff --git a/x-pack/plugins/security_solution/public/users/pages/nav_tabs.tsx b/x-pack/plugins/security_solution/public/explore/users/pages/nav_tabs.tsx similarity index 93% rename from x-pack/plugins/security_solution/public/users/pages/nav_tabs.tsx rename to x-pack/plugins/security_solution/public/explore/users/pages/nav_tabs.tsx index 801074b797bfb..f1666d851ef4c 100644 --- a/x-pack/plugins/security_solution/public/users/pages/nav_tabs.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/pages/nav_tabs.tsx @@ -9,8 +9,8 @@ import { omit } from 'lodash/fp'; import * as i18n from './translations'; import { UsersTableType } from '../store/model'; import type { UsersNavTab } from './navigation/types'; -import { USERS_PATH } from '../../../common/constants'; -import { TECHNICAL_PREVIEW } from '../../overview/pages/translations'; +import { USERS_PATH } from '../../../../common/constants'; +import { TECHNICAL_PREVIEW } from '../../../overview/pages/translations'; const getTabsOnUsersUrl = (tabName: UsersTableType) => `${USERS_PATH}/${tabName}`; diff --git a/x-pack/plugins/security_solution/public/users/pages/navigation/all_users_query_tab_body.test.tsx b/x-pack/plugins/security_solution/public/explore/users/pages/navigation/all_users_query_tab_body.test.tsx similarity index 82% rename from x-pack/plugins/security_solution/public/users/pages/navigation/all_users_query_tab_body.test.tsx rename to x-pack/plugins/security_solution/public/explore/users/pages/navigation/all_users_query_tab_body.test.tsx index b0147258b178c..6879f65791733 100644 --- a/x-pack/plugins/security_solution/public/users/pages/navigation/all_users_query_tab_body.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/pages/navigation/all_users_query_tab_body.test.tsx @@ -7,19 +7,19 @@ import React from 'react'; import { render } from '@testing-library/react'; -import { TestProviders } from '../../../common/mock'; +import { TestProviders } from '../../../../common/mock'; -import { useQueryToggle } from '../../../common/containers/query_toggle'; +import { useQueryToggle } from '../../../../common/containers/query_toggle'; import { AllUsersQueryTabBody } from './all_users_query_tab_body'; import { UsersType } from '../../store/model'; -jest.mock('../../../common/containers/query_toggle'); -jest.mock('../../../common/lib/kibana'); +jest.mock('../../../../common/containers/query_toggle'); +jest.mock('../../../../common/lib/kibana'); const mockSearch = jest.fn(); -jest.mock('../../../common/containers/use_search_strategy', () => { - const original = jest.requireActual('../../../common/containers/use_search_strategy'); +jest.mock('../../../../common/containers/use_search_strategy', () => { + const original = jest.requireActual('../../../../common/containers/use_search_strategy'); return { ...original, useSearchStrategy: () => ({ diff --git a/x-pack/plugins/security_solution/public/users/pages/navigation/all_users_query_tab_body.tsx b/x-pack/plugins/security_solution/public/explore/users/pages/navigation/all_users_query_tab_body.tsx similarity index 84% rename from x-pack/plugins/security_solution/public/users/pages/navigation/all_users_query_tab_body.tsx rename to x-pack/plugins/security_solution/public/explore/users/pages/navigation/all_users_query_tab_body.tsx index 7c203d5920706..e503684aa500b 100644 --- a/x-pack/plugins/security_solution/public/users/pages/navigation/all_users_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/pages/navigation/all_users_query_tab_body.tsx @@ -10,15 +10,15 @@ import React, { useEffect, useMemo, useState } from 'react'; import type { UsersComponentsQueryProps } from './types'; -import { manageQuery } from '../../../common/components/page/manage_query'; +import { manageQuery } from '../../../../common/components/page/manage_query'; import { UsersTable } from '../../components/all_users'; -import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; -import { UsersQueries } from '../../../../common/search_strategy/security_solution/users'; +import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; +import { UsersQueries } from '../../../../../common/search_strategy/security_solution/users'; import * as i18n from './translations'; -import { generateTablePaginationOptions } from '../../../common/components/paginated_table/helpers'; -import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; +import { generateTablePaginationOptions } from '../../../components/paginated_table/helpers'; +import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; import { usersSelectors } from '../../store'; -import { useQueryToggle } from '../../../common/containers/query_toggle'; +import { useQueryToggle } from '../../../../common/containers/query_toggle'; const UsersTableManage = manageQuery(UsersTable); diff --git a/x-pack/plugins/security_solution/public/users/pages/navigation/authentications_query_tab_body.test.tsx b/x-pack/plugins/security_solution/public/explore/users/pages/navigation/authentications_query_tab_body.test.tsx similarity index 84% rename from x-pack/plugins/security_solution/public/users/pages/navigation/authentications_query_tab_body.test.tsx rename to x-pack/plugins/security_solution/public/explore/users/pages/navigation/authentications_query_tab_body.test.tsx index b7ffb68e2fc2d..5a62bce6b9c3a 100644 --- a/x-pack/plugins/security_solution/public/users/pages/navigation/authentications_query_tab_body.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/pages/navigation/authentications_query_tab_body.test.tsx @@ -7,15 +7,15 @@ import React from 'react'; import { render } from '@testing-library/react'; -import { TestProviders } from '../../../common/mock'; -import { useQueryToggle } from '../../../common/containers/query_toggle'; +import { TestProviders } from '../../../../common/mock'; +import { useQueryToggle } from '../../../../common/containers/query_toggle'; import { AuthenticationsQueryTabBody } from './authentications_query_tab_body'; import { UsersType } from '../../store/model'; -import { useAuthentications } from '../../../common/containers/authentications'; +import { useAuthentications } from '../../../containers/authentications'; -jest.mock('../../../common/containers/authentications'); -jest.mock('../../../common/containers/query_toggle'); -jest.mock('../../../common/lib/kibana'); +jest.mock('../../../containers/authentications'); +jest.mock('../../../../common/containers/query_toggle'); +jest.mock('../../../../common/lib/kibana'); describe('Authentications query tab body', () => { const mockUseAuthentications = useAuthentications as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/users/pages/navigation/authentications_query_tab_body.tsx b/x-pack/plugins/security_solution/public/explore/users/pages/navigation/authentications_query_tab_body.tsx similarity index 80% rename from x-pack/plugins/security_solution/public/users/pages/navigation/authentications_query_tab_body.tsx rename to x-pack/plugins/security_solution/public/explore/users/pages/navigation/authentications_query_tab_body.tsx index 549e69f42f52a..296424b759e9d 100644 --- a/x-pack/plugins/security_solution/public/users/pages/navigation/authentications_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/pages/navigation/authentications_query_tab_body.tsx @@ -6,10 +6,10 @@ */ import React from 'react'; -import { AuthenticationsUserTable } from '../../../common/components/authentication/authentications_user_table'; -import { histogramConfigs } from '../../../common/components/authentication/helpers'; -import type { AuthenticationsUserTableProps } from '../../../common/components/authentication/types'; -import { MatrixHistogram } from '../../../common/components/matrix_histogram'; +import { AuthenticationsUserTable } from '../../../components/authentication/authentications_user_table'; +import { histogramConfigs } from '../../../components/authentication/helpers'; +import type { AuthenticationsUserTableProps } from '../../../components/authentication/types'; +import { MatrixHistogram } from '../../../../common/components/matrix_histogram'; export const ID = 'usersAuthenticationsQuery'; const HISTOGRAM_QUERY_ID = 'usersAuthenticationsHistogramQuery'; diff --git a/x-pack/plugins/security_solution/public/users/pages/navigation/index.ts b/x-pack/plugins/security_solution/public/explore/users/pages/navigation/index.ts similarity index 100% rename from x-pack/plugins/security_solution/public/users/pages/navigation/index.ts rename to x-pack/plugins/security_solution/public/explore/users/pages/navigation/index.ts diff --git a/x-pack/plugins/security_solution/public/users/pages/navigation/translations.ts b/x-pack/plugins/security_solution/public/explore/users/pages/navigation/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/users/pages/navigation/translations.ts rename to x-pack/plugins/security_solution/public/explore/users/pages/navigation/translations.ts diff --git a/x-pack/plugins/security_solution/public/users/pages/navigation/types.ts b/x-pack/plugins/security_solution/public/explore/users/pages/navigation/types.ts similarity index 77% rename from x-pack/plugins/security_solution/public/users/pages/navigation/types.ts rename to x-pack/plugins/security_solution/public/explore/users/pages/navigation/types.ts index 4bc79174beba6..61545928a9baf 100644 --- a/x-pack/plugins/security_solution/public/users/pages/navigation/types.ts +++ b/x-pack/plugins/security_solution/public/explore/users/pages/navigation/types.ts @@ -5,9 +5,9 @@ * 2.0. */ import type { UsersTableType, UsersType } from '../../store/model'; -import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; -import type { ESTermQuery } from '../../../../common/typed_json'; -import type { NavTab } from '../../../common/components/navigation/types'; +import type { GlobalTimeArgs } from '../../../../common/containers/use_global_time'; +import type { ESTermQuery } from '../../../../../common/typed_json'; +import type { NavTab } from '../../../../common/components/navigation/types'; type KeyUsersNavTab = `${UsersTableType}`; diff --git a/x-pack/plugins/security_solution/public/users/pages/navigation/user_risk_score_tab_body.test.tsx b/x-pack/plugins/security_solution/public/explore/users/pages/navigation/user_risk_score_tab_body.test.tsx similarity index 85% rename from x-pack/plugins/security_solution/public/users/pages/navigation/user_risk_score_tab_body.test.tsx rename to x-pack/plugins/security_solution/public/explore/users/pages/navigation/user_risk_score_tab_body.test.tsx index 1cdd39564ac83..78406353fb477 100644 --- a/x-pack/plugins/security_solution/public/users/pages/navigation/user_risk_score_tab_body.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/pages/navigation/user_risk_score_tab_body.test.tsx @@ -7,15 +7,15 @@ import React from 'react'; import { render } from '@testing-library/react'; -import { TestProviders } from '../../../common/mock'; -import { useRiskScore, useRiskScoreKpi } from '../../../risk_score/containers'; -import { useQueryToggle } from '../../../common/containers/query_toggle'; +import { TestProviders } from '../../../../common/mock'; +import { useRiskScore, useRiskScoreKpi } from '../../../containers/risk_score'; +import { useQueryToggle } from '../../../../common/containers/query_toggle'; import { UserRiskScoreQueryTabBody } from './user_risk_score_tab_body'; import { UsersType } from '../../store/model'; -jest.mock('../../../risk_score/containers'); -jest.mock('../../../common/containers/query_toggle'); -jest.mock('../../../common/lib/kibana'); +jest.mock('../../../containers/risk_score'); +jest.mock('../../../../common/containers/query_toggle'); +jest.mock('../../../../common/lib/kibana'); describe('All users query tab body', () => { const mockUseRiskScore = useRiskScore as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/users/pages/navigation/user_risk_score_tab_body.tsx b/x-pack/plugins/security_solution/public/explore/users/pages/navigation/user_risk_score_tab_body.tsx similarity index 86% rename from x-pack/plugins/security_solution/public/users/pages/navigation/user_risk_score_tab_body.tsx rename to x-pack/plugins/security_solution/public/explore/users/pages/navigation/user_risk_score_tab_body.tsx index 043c737be954d..1c8477d4906e5 100644 --- a/x-pack/plugins/security_solution/public/users/pages/navigation/user_risk_score_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/pages/navigation/user_risk_score_tab_body.tsx @@ -8,11 +8,11 @@ import React, { useEffect, useMemo, useState } from 'react'; import { noop } from 'lodash/fp'; -import { EnableRiskScore } from '../../../risk_score/components/enable_risk_score'; +import { EnableRiskScore } from '../../../components/risk_score/enable_risk_score'; import type { UsersComponentsQueryProps } from './types'; -import { manageQuery } from '../../../common/components/page/manage_query'; -import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; -import type { State } from '../../../common/store'; +import { manageQuery } from '../../../../common/components/page/manage_query'; +import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; +import type { State } from '../../../../common/store'; import { UserRiskScoreTable } from '../../components/user_risk_score_table'; import { usersSelectors } from '../../store'; @@ -20,10 +20,10 @@ import { UserRiskScoreQueryId, useRiskScore, useRiskScoreKpi, -} from '../../../risk_score/containers'; -import { useQueryToggle } from '../../../common/containers/query_toggle'; -import { EMPTY_SEVERITY_COUNT, RiskScoreEntity } from '../../../../common/search_strategy'; -import { RiskScoresNoDataDetected } from '../../../risk_score/components/risk_score_onboarding/risk_score_no_data_detected'; +} from '../../../containers/risk_score'; +import { useQueryToggle } from '../../../../common/containers/query_toggle'; +import { EMPTY_SEVERITY_COUNT, RiskScoreEntity } from '../../../../../common/search_strategy'; +import { RiskScoresNoDataDetected } from '../../../components/risk_score/risk_score_onboarding/risk_score_no_data_detected'; const UserRiskScoreTableManage = manageQuery(UserRiskScoreTable); diff --git a/x-pack/plugins/security_solution/public/users/pages/translations.ts b/x-pack/plugins/security_solution/public/explore/users/pages/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/users/pages/translations.ts rename to x-pack/plugins/security_solution/public/explore/users/pages/translations.ts diff --git a/x-pack/plugins/security_solution/public/users/pages/types.ts b/x-pack/plugins/security_solution/public/explore/users/pages/types.ts similarity index 85% rename from x-pack/plugins/security_solution/public/users/pages/types.ts rename to x-pack/plugins/security_solution/public/explore/users/pages/types.ts index e3a55417451c4..b815ef3c87f4b 100644 --- a/x-pack/plugins/security_solution/public/users/pages/types.ts +++ b/x-pack/plugins/security_solution/public/explore/users/pages/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { GlobalTimeArgs } from '../../common/containers/use_global_time'; +import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; import type { usersModel } from '../store'; diff --git a/x-pack/plugins/security_solution/public/users/pages/users.tsx b/x-pack/plugins/security_solution/public/explore/users/pages/users.tsx similarity index 78% rename from x-pack/plugins/security_solution/public/users/pages/users.tsx rename to x-pack/plugins/security_solution/public/explore/users/pages/users.tsx index 7de9f603b0efe..40feb48f4290e 100644 --- a/x-pack/plugins/security_solution/public/users/pages/users.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/pages/users.tsx @@ -14,24 +14,24 @@ import { useParams } from 'react-router-dom'; import type { Filter } from '@kbn/es-query'; import { isTab } from '@kbn/timelines-plugin/public'; import { getEsQueryConfig } from '@kbn/data-plugin/common'; -import { InputsModelId } from '../../common/store/inputs/constants'; -import { SecurityPageName } from '../../app/types'; -import { FiltersGlobal } from '../../common/components/filters_global'; -import { HeaderPage } from '../../common/components/header_page'; -import { SecuritySolutionTabNavigation } from '../../common/components/navigation'; - -import { SiemSearchBar } from '../../common/components/search_bar'; -import { SecuritySolutionPageWrapper } from '../../common/components/page_wrapper'; -import { LastEventTime } from '../../common/components/last_event_time'; -import { useGlobalFullScreen } from '../../common/containers/use_full_screen'; -import { useGlobalTime } from '../../common/containers/use_global_time'; -import { useKibana } from '../../common/lib/kibana'; -import { convertToBuildEsQuery } from '../../common/lib/kuery'; -import type { State } from '../../common/store'; -import { inputsSelectors } from '../../common/store'; -import { setAbsoluteRangeDatePicker } from '../../common/store/inputs/actions'; - -import { SpyRoute } from '../../common/utils/route/spy_routes'; +import { InputsModelId } from '../../../common/store/inputs/constants'; +import { SecurityPageName } from '../../../app/types'; +import { FiltersGlobal } from '../../../common/components/filters_global'; +import { HeaderPage } from '../../../common/components/header_page'; +import { SecuritySolutionTabNavigation } from '../../../common/components/navigation'; + +import { SiemSearchBar } from '../../../common/components/search_bar'; +import { SecuritySolutionPageWrapper } from '../../../common/components/page_wrapper'; +import { LastEventTime } from '../../../common/components/last_event_time'; +import { useGlobalFullScreen } from '../../../common/containers/use_full_screen'; +import { useGlobalTime } from '../../../common/containers/use_global_time'; +import { useKibana } from '../../../common/lib/kibana'; +import { convertToBuildEsQuery } from '../../../common/lib/kuery'; +import type { State } from '../../../common/store'; +import { inputsSelectors } from '../../../common/store'; +import { setAbsoluteRangeDatePicker } from '../../../common/store/inputs/actions'; + +import { SpyRoute } from '../../../common/utils/route/spy_routes'; import { UsersTabs } from './users_tabs'; import { navTabsUsers } from './nav_tabs'; import * as i18n from './translations'; @@ -39,18 +39,18 @@ import { usersModel, usersSelectors } from '../store'; import { onTimelineTabKeyPressed, resetKeyboardFocus, -} from '../../timelines/components/timeline/helpers'; -import { useSourcererDataView } from '../../common/containers/sourcerer'; -import { useDeepEqualSelector } from '../../common/hooks/use_selector'; -import { useInvalidFilterQuery } from '../../common/hooks/use_invalid_filter_query'; +} from '../../../timelines/components/timeline/helpers'; +import { useSourcererDataView } from '../../../common/containers/sourcerer'; +import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; +import { useInvalidFilterQuery } from '../../../common/hooks/use_invalid_filter_query'; import { UsersKpiComponent } from '../components/kpi_users'; -import type { UpdateDateRange } from '../../common/components/charts/common'; -import { LastEventIndexKey, RiskScoreEntity } from '../../../common/search_strategy'; +import type { UpdateDateRange } from '../../../common/components/charts/common'; +import { LastEventIndexKey, RiskScoreEntity } from '../../../../common/search_strategy'; import { generateSeverityFilter } from '../../hosts/store/helpers'; import { UsersTableType } from '../store/model'; -import { hasMlUserPermissions } from '../../../common/machine_learning/has_ml_user_permissions'; -import { useMlCapabilities } from '../../common/components/ml/hooks/use_ml_capabilities'; -import { LandingPageComponent } from '../../common/components/landing_page'; +import { hasMlUserPermissions } from '../../../../common/machine_learning/has_ml_user_permissions'; +import { useMlCapabilities } from '../../../common/components/ml/hooks/use_ml_capabilities'; +import { LandingPageComponent } from '../../../common/components/landing_page'; import { userNameExistsFilter } from './details/helpers'; const ID = 'UsersQueryId'; diff --git a/x-pack/plugins/security_solution/public/users/pages/users_tabs.test.tsx b/x-pack/plugins/security_solution/public/explore/users/pages/users_tabs.test.tsx similarity index 77% rename from x-pack/plugins/security_solution/public/users/pages/users_tabs.test.tsx rename to x-pack/plugins/security_solution/public/explore/users/pages/users_tabs.test.tsx index d16dd6053002e..55c3b3585d8a6 100644 --- a/x-pack/plugins/security_solution/public/users/pages/users_tabs.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/pages/users_tabs.test.tsx @@ -9,27 +9,27 @@ import { mount } from 'enzyme'; import React from 'react'; import { Router } from 'react-router-dom'; -import '../../common/mock/match_media'; -import { TestProviders } from '../../common/mock'; -import { SecuritySolutionTabNavigation } from '../../common/components/navigation'; +import '../../../common/mock/match_media'; +import { TestProviders } from '../../../common/mock'; +import { SecuritySolutionTabNavigation } from '../../../common/components/navigation'; import { Users } from './users'; -import { useSourcererDataView } from '../../common/containers/sourcerer'; +import { useSourcererDataView } from '../../../common/containers/sourcerer'; import { mockCasesContext } from '@kbn/cases-plugin/public/mocks/mock_cases_context'; -import { LandingPageComponent } from '../../common/components/landing_page'; +import { LandingPageComponent } from '../../../common/components/landing_page'; -jest.mock('../../common/containers/sourcerer'); -jest.mock('../../common/components/search_bar', () => ({ +jest.mock('../../../common/containers/sourcerer'); +jest.mock('../../../common/components/search_bar', () => ({ SiemSearchBar: () => null, })); -jest.mock('../../common/components/query_bar', () => ({ +jest.mock('../../../common/components/query_bar', () => ({ QueryBar: () => null, })); -jest.mock('../../common/components/visualization_actions', () => ({ +jest.mock('../../../common/components/visualization_actions', () => ({ VisualizationActions: jest.fn(() =>
), })); const mockNavigateToApp = jest.fn(); -jest.mock('../../common/lib/kibana', () => { - const original = jest.requireActual('../../common/lib/kibana'); +jest.mock('../../../common/lib/kibana', () => { + const original = jest.requireActual('../../../common/lib/kibana'); return { ...original, diff --git a/x-pack/plugins/security_solution/public/users/pages/users_tabs.tsx b/x-pack/plugins/security_solution/public/explore/users/pages/users_tabs.tsx similarity index 84% rename from x-pack/plugins/security_solution/public/users/pages/users_tabs.tsx rename to x-pack/plugins/security_solution/public/explore/users/pages/users_tabs.tsx index 510d6d1fc9c04..df84c8efc11b3 100644 --- a/x-pack/plugins/security_solution/public/users/pages/users_tabs.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/pages/users_tabs.tsx @@ -11,15 +11,15 @@ import { Route } from '@kbn/kibana-react-plugin/public'; import type { UsersTabsProps } from './types'; import { UsersTableType } from '../store/model'; -import { USERS_PATH } from '../../../common/constants'; +import { USERS_PATH } from '../../../../common/constants'; import { AllUsersQueryTabBody, AuthenticationsQueryTabBody } from './navigation'; -import { AnomaliesQueryTabBody } from '../../common/containers/anomalies/anomalies_query_tab_body'; -import { AnomaliesUserTable } from '../../common/components/ml/tables/anomalies_user_table'; +import { AnomaliesQueryTabBody } from '../../../common/containers/anomalies/anomalies_query_tab_body'; +import { AnomaliesUserTable } from '../../../common/components/ml/tables/anomalies_user_table'; import { UserRiskScoreQueryTabBody } from './navigation/user_risk_score_tab_body'; -import { EventsQueryTabBody } from '../../common/components/events_tab'; +import { EventsQueryTabBody } from '../../../common/components/events_tab'; import { userNameExistsFilter } from './details/helpers'; -import { TableId } from '../../../common/types'; +import { TableId } from '../../../../common/types'; export const UsersTabs = memo( ({ deleteQuery, filterQuery, from, indexNames, isInitializing, setQuery, to, type }) => { diff --git a/x-pack/plugins/security_solution/public/users/routes.tsx b/x-pack/plugins/security_solution/public/explore/users/routes.tsx similarity index 73% rename from x-pack/plugins/security_solution/public/users/routes.tsx rename to x-pack/plugins/security_solution/public/explore/users/routes.tsx index aa894b8e6dd83..c5b93618316e4 100644 --- a/x-pack/plugins/security_solution/public/users/routes.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/routes.tsx @@ -9,10 +9,10 @@ import React from 'react'; import { TrackApplicationView } from '@kbn/usage-collection-plugin/public'; import { UsersContainer } from './pages'; -import type { SecuritySubPluginRoutes } from '../app/types'; -import { SecurityPageName } from '../app/types'; -import { USERS_PATH } from '../../common/constants'; -import { PluginTemplateWrapper } from '../common/components/plugin_template_wrapper'; +import type { SecuritySubPluginRoutes } from '../../app/types'; +import { SecurityPageName } from '../../app/types'; +import { USERS_PATH } from '../../../common/constants'; +import { PluginTemplateWrapper } from '../../common/components/plugin_template_wrapper'; export const UsersRoutes = () => ( diff --git a/x-pack/plugins/security_solution/public/users/store/actions.ts b/x-pack/plugins/security_solution/public/explore/users/store/actions.ts similarity index 92% rename from x-pack/plugins/security_solution/public/users/store/actions.ts rename to x-pack/plugins/security_solution/public/explore/users/store/actions.ts index fa47107959293..c06e4fc827439 100644 --- a/x-pack/plugins/security_solution/public/users/store/actions.ts +++ b/x-pack/plugins/security_solution/public/explore/users/store/actions.ts @@ -7,8 +7,8 @@ import actionCreatorFactory from 'typescript-fsa'; import type { usersModel } from '.'; -import type { RiskScoreSortField, RiskSeverity } from '../../../common/search_strategy'; -import type { SortUsersField } from '../../../common/search_strategy/security_solution/users/common'; +import type { RiskScoreSortField, RiskSeverity } from '../../../../common/search_strategy'; +import type { SortUsersField } from '../../../../common/search_strategy/security_solution/users/common'; const actionCreator = actionCreatorFactory('x-pack/security_solution/local/users'); diff --git a/x-pack/plugins/security_solution/public/users/store/helpers.ts b/x-pack/plugins/security_solution/public/explore/users/store/helpers.ts similarity index 88% rename from x-pack/plugins/security_solution/public/users/store/helpers.ts rename to x-pack/plugins/security_solution/public/explore/users/store/helpers.ts index a5785e2c14f7e..54f8524640411 100644 --- a/x-pack/plugins/security_solution/public/users/store/helpers.ts +++ b/x-pack/plugins/security_solution/public/explore/users/store/helpers.ts @@ -7,7 +7,7 @@ import type { UsersModel, UsersQueries } from './model'; import { UsersTableType } from './model'; -import { DEFAULT_TABLE_ACTIVE_PAGE } from '../../common/store/constants'; +import { DEFAULT_TABLE_ACTIVE_PAGE } from '../../../common/store/constants'; export const setUsersPageQueriesActivePageToZero = (state: UsersModel): UsersQueries => ({ ...state.page.queries, diff --git a/x-pack/plugins/security_solution/public/users/store/index.ts b/x-pack/plugins/security_solution/public/explore/users/store/index.ts similarity index 100% rename from x-pack/plugins/security_solution/public/users/store/index.ts rename to x-pack/plugins/security_solution/public/explore/users/store/index.ts diff --git a/x-pack/plugins/security_solution/public/users/store/model.ts b/x-pack/plugins/security_solution/public/explore/users/store/model.ts similarity index 93% rename from x-pack/plugins/security_solution/public/users/store/model.ts rename to x-pack/plugins/security_solution/public/explore/users/store/model.ts index bee5eca0d7198..fca244bbc4665 100644 --- a/x-pack/plugins/security_solution/public/users/store/model.ts +++ b/x-pack/plugins/security_solution/public/explore/users/store/model.ts @@ -5,8 +5,8 @@ * 2.0. */ -import type { RiskScoreSortField, RiskSeverity } from '../../../common/search_strategy'; -import type { SortUsersField } from '../../../common/search_strategy/security_solution/users/common'; +import type { RiskScoreSortField, RiskSeverity } from '../../../../common/search_strategy'; +import type { SortUsersField } from '../../../../common/search_strategy/security_solution/users/common'; export enum UsersType { page = 'page', diff --git a/x-pack/plugins/security_solution/public/users/store/reducer.ts b/x-pack/plugins/security_solution/public/explore/users/store/reducer.ts similarity index 93% rename from x-pack/plugins/security_solution/public/users/store/reducer.ts rename to x-pack/plugins/security_solution/public/explore/users/store/reducer.ts index 79e9511bbd6f0..3577daf4ce547 100644 --- a/x-pack/plugins/security_solution/public/users/store/reducer.ts +++ b/x-pack/plugins/security_solution/public/explore/users/store/reducer.ts @@ -7,7 +7,7 @@ import { reducerWithInitialState } from 'typescript-fsa-reducers'; import { set } from 'lodash/fp'; -import { DEFAULT_TABLE_ACTIVE_PAGE, DEFAULT_TABLE_LIMIT } from '../../common/store/constants'; +import { DEFAULT_TABLE_ACTIVE_PAGE, DEFAULT_TABLE_LIMIT } from '../../../common/store/constants'; import { setUsersTablesActivePageToZero, @@ -21,9 +21,9 @@ import { import { setUsersPageQueriesActivePageToZero } from './helpers'; import type { UsersModel } from './model'; import { UsersTableType } from './model'; -import { Direction } from '../../../common/search_strategy/common'; -import { RiskScoreFields } from '../../../common/search_strategy'; -import { UsersFields } from '../../../common/search_strategy/security_solution/users/common'; +import { Direction } from '../../../../common/search_strategy/common'; +import { RiskScoreFields } from '../../../../common/search_strategy'; +import { UsersFields } from '../../../../common/search_strategy/security_solution/users/common'; export const initialUsersState: UsersModel = { page: { diff --git a/x-pack/plugins/security_solution/public/users/store/selectors.ts b/x-pack/plugins/security_solution/public/explore/users/store/selectors.ts similarity index 96% rename from x-pack/plugins/security_solution/public/users/store/selectors.ts rename to x-pack/plugins/security_solution/public/explore/users/store/selectors.ts index eb69c941fa236..a06d05c526577 100644 --- a/x-pack/plugins/security_solution/public/users/store/selectors.ts +++ b/x-pack/plugins/security_solution/public/explore/users/store/selectors.ts @@ -7,7 +7,7 @@ import { createSelector } from 'reselect'; -import type { State } from '../../common/store/types'; +import type { State } from '../../../common/store/types'; import type { UserDetailsPageModel, UsersPageModel, UsersType } from './model'; import { UsersTableType } from './model'; diff --git a/x-pack/plugins/security_solution/public/landing_pages/links.ts b/x-pack/plugins/security_solution/public/landing_pages/links.ts index 479b6f1843bf5..36553016bd8bf 100644 --- a/x-pack/plugins/security_solution/public/landing_pages/links.ts +++ b/x-pack/plugins/security_solution/public/landing_pages/links.ts @@ -15,9 +15,9 @@ import { import { DASHBOARDS, EXPLORE } from '../app/translations'; import type { LinkItem } from '../common/links/types'; import { overviewLinks, detectionResponseLinks, entityAnalyticsLinks } from '../overview/links'; -import { links as hostsLinks } from '../hosts/links'; -import { links as networkLinks } from '../network/links'; -import { links as usersLinks } from '../users/links'; +import { links as hostsLinks } from '../explore/hosts/links'; +import { links as networkLinks } from '../explore/network/links'; +import { links as usersLinks } from '../explore/users/links'; import { links as kubernetesLinks } from '../kubernetes/links'; import { dashboardLinks as cloudSecurityPostureLinks } from '../cloud_security_posture/links'; diff --git a/x-pack/plugins/security_solution/public/lazy_sub_plugins.tsx b/x-pack/plugins/security_solution/public/lazy_sub_plugins.tsx index c6b8d37a5342d..2615ec90ecda4 100644 --- a/x-pack/plugins/security_solution/public/lazy_sub_plugins.tsx +++ b/x-pack/plugins/security_solution/public/lazy_sub_plugins.tsx @@ -13,9 +13,9 @@ import { Cases } from './cases'; import { Detections } from './detections'; import { Exceptions } from './exceptions'; -import { Hosts } from './hosts'; -import { Users } from './users'; -import { Network } from './network'; +import { Hosts } from './explore/hosts'; +import { Users } from './explore/users'; +import { Network } from './explore/network'; import { Kubernetes } from './kubernetes'; import { Overview } from './overview'; import { Rules } from './rules'; diff --git a/x-pack/plugins/security_solution/public/network/jest.config.js b/x-pack/plugins/security_solution/public/network/jest.config.js deleted file mode 100644 index 98b45b1e5699b..0000000000000 --- a/x-pack/plugins/security_solution/public/network/jest.config.js +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -module.exports = { - preset: '@kbn/test', - rootDir: '../../../../..', - roots: ['/x-pack/plugins/security_solution/public/network'], - coverageDirectory: - '/target/kibana-coverage/jest/x-pack/plugins/security_solution/public/network', - coverageReporters: ['text', 'html'], - collectCoverageFrom: ['/x-pack/plugins/security_solution/public/network/**/*.{ts,tsx}'], - // See: https://github.com/elastic/kibana/issues/117255, the moduleNameMapper creates mocks to avoid memory leaks from kibana core. - moduleNameMapper: { - 'core/server$': '/x-pack/plugins/security_solution/server/__mocks__/core.mock.ts', - 'task_manager/server$': - '/x-pack/plugins/security_solution/server/__mocks__/task_manager.mock.ts', - 'alerting/server$': '/x-pack/plugins/security_solution/server/__mocks__/alert.mock.ts', - 'actions/server$': '/x-pack/plugins/security_solution/server/__mocks__/action.mock.ts', - }, -}; diff --git a/x-pack/plugins/security_solution/public/overview/components/entity_analytics/anomalies/columns.tsx b/x-pack/plugins/security_solution/public/overview/components/entity_analytics/anomalies/columns.tsx index 465072743d1d5..dca980b04f2b8 100644 --- a/x-pack/plugins/security_solution/public/overview/components/entity_analytics/anomalies/columns.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/entity_analytics/anomalies/columns.tsx @@ -16,10 +16,10 @@ import { AnomalyEntity } from '../../../../common/components/ml/anomaly/use_anom import { LinkAnchor, SecuritySolutionLinkAnchor } from '../../../../common/components/links'; import { SecurityPageName } from '../../../../app/types'; -import { usersActions } from '../../../../users/store'; -import { hostsActions } from '../../../../hosts/store'; -import { HostsType } from '../../../../hosts/store/model'; -import { UsersType } from '../../../../users/store/model'; +import { usersActions } from '../../../../explore/users/store'; +import { hostsActions } from '../../../../explore/hosts/store'; +import { HostsType } from '../../../../explore/hosts/store/model'; +import { UsersType } from '../../../../explore/users/store/model'; import type { SecurityJob } from '../../../../common/components/ml_popover/types'; import { isJobFailed, diff --git a/x-pack/plugins/security_solution/public/overview/components/entity_analytics/anomalies/index.tsx b/x-pack/plugins/security_solution/public/overview/components/entity_analytics/anomalies/index.tsx index 96a14f2c63893..9500980477057 100644 --- a/x-pack/plugins/security_solution/public/overview/components/entity_analytics/anomalies/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/entity_analytics/anomalies/index.tsx @@ -29,11 +29,11 @@ import { LinkButton, useGetSecuritySolutionLinkProps, } from '../../../../common/components/links'; -import { HostsTableType } from '../../../../hosts/store/model'; +import { HostsTableType } from '../../../../explore/hosts/store/model'; import { getTabsOnHostsUrl } from '../../../../common/components/link_to/redirect_to_hosts'; import { SecurityPageName } from '../../../../app/types'; import { getTabsOnUsersUrl } from '../../../../common/components/link_to/redirect_to_users'; -import { UsersTableType } from '../../../../users/store/model'; +import { UsersTableType } from '../../../../explore/users/store/model'; import { useKibana } from '../../../../common/lib/kibana'; import { useEnableDataFeed } from '../../../../common/components/ml_popover/hooks/use_enable_data_feed'; import type { SecurityJob } from '../../../../common/components/ml_popover/types'; diff --git a/x-pack/plugins/security_solution/public/overview/components/entity_analytics/common/risk_score_donut_chart.test.tsx b/x-pack/plugins/security_solution/public/overview/components/entity_analytics/common/risk_score_donut_chart.test.tsx index 0a8abe2500e0c..1b93d6545d838 100644 --- a/x-pack/plugins/security_solution/public/overview/components/entity_analytics/common/risk_score_donut_chart.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/entity_analytics/common/risk_score_donut_chart.test.tsx @@ -6,7 +6,7 @@ */ import { RiskSeverity } from '../../../../../common/search_strategy'; -import type { SeverityCount } from '../../../../common/components/severity/types'; +import type { SeverityCount } from '../../../../explore/components/risk_score/severity/types'; import { render } from '@testing-library/react'; import React from 'react'; import { RiskScoreDonutChart } from './risk_score_donut_chart'; diff --git a/x-pack/plugins/security_solution/public/overview/components/entity_analytics/common/risk_score_donut_chart.tsx b/x-pack/plugins/security_solution/public/overview/components/entity_analytics/common/risk_score_donut_chart.tsx index ecd3f31489d6b..8ba0cbd1a9745 100644 --- a/x-pack/plugins/security_solution/public/overview/components/entity_analytics/common/risk_score_donut_chart.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/entity_analytics/common/risk_score_donut_chart.tsx @@ -9,11 +9,11 @@ import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import React from 'react'; import type { ShapeTreeNode } from '@elastic/charts'; import styled from 'styled-components'; -import type { SeverityCount } from '../../../../common/components/severity/types'; +import type { SeverityCount } from '../../../../explore/components/risk_score/severity/types'; import { useRiskDonutChartData } from './use_risk_donut_chart_data'; import type { FillColor } from '../../../../common/components/charts/donutchart'; import { emptyDonutColor } from '../../../../common/components/charts/donutchart_empty'; -import { RISK_SEVERITY_COLOUR } from '../../../../common/components/severity/common'; +import { RISK_SEVERITY_COLOUR } from '../../../../explore/components/risk_score/severity/common'; import { DonutChart } from '../../../../common/components/charts/donutchart'; import { Legend } from '../../../../common/components/charts/legend'; import { ChartLabel } from '../../detection_response/alerts_by_status/chart_label'; diff --git a/x-pack/plugins/security_solution/public/overview/components/entity_analytics/common/use_risk_donut_chart_data.test.ts b/x-pack/plugins/security_solution/public/overview/components/entity_analytics/common/use_risk_donut_chart_data.test.ts index a0dc687c3f15b..2a7af3c2a28aa 100644 --- a/x-pack/plugins/security_solution/public/overview/components/entity_analytics/common/use_risk_donut_chart_data.test.ts +++ b/x-pack/plugins/security_solution/public/overview/components/entity_analytics/common/use_risk_donut_chart_data.test.ts @@ -8,7 +8,7 @@ import { renderHook } from '@testing-library/react-hooks'; import { RiskSeverity } from '../../../../../common/search_strategy'; import { useRiskDonutChartData } from './use_risk_donut_chart_data'; -import type { SeverityCount } from '../../../../common/components/severity/types'; +import type { SeverityCount } from '../../../../explore/components/risk_score/severity/types'; describe('useRiskDonutChartData', () => { it('returns the total', () => { diff --git a/x-pack/plugins/security_solution/public/overview/components/entity_analytics/common/use_risk_donut_chart_data.ts b/x-pack/plugins/security_solution/public/overview/components/entity_analytics/common/use_risk_donut_chart_data.ts index 64b850201c0fa..6ba4ad7c03d1b 100644 --- a/x-pack/plugins/security_solution/public/overview/components/entity_analytics/common/use_risk_donut_chart_data.ts +++ b/x-pack/plugins/security_solution/public/overview/components/entity_analytics/common/use_risk_donut_chart_data.ts @@ -7,9 +7,9 @@ import { sum } from 'lodash/fp'; import { useMemo } from 'react'; import type { LegendItem } from '../../../../common/components/charts/legend_item'; -import type { SeverityCount } from '../../../../common/components/severity/types'; +import type { SeverityCount } from '../../../../explore/components/risk_score/severity/types'; import type { DonutChartProps } from '../../../../common/components/charts/donutchart'; -import { RISK_SEVERITY_COLOUR } from '../../../../common/components/severity/common'; +import { RISK_SEVERITY_COLOUR } from '../../../../explore/components/risk_score/severity/common'; import type { RiskSeverity } from '../../../../../common/search_strategy'; const legendField = 'kibana.alert.severity'; diff --git a/x-pack/plugins/security_solution/public/overview/components/entity_analytics/header/index.test.tsx b/x-pack/plugins/security_solution/public/overview/components/entity_analytics/header/index.test.tsx index 64a7e1503e82e..62820ee2c0de9 100644 --- a/x-pack/plugins/security_solution/public/overview/components/entity_analytics/header/index.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/entity_analytics/header/index.test.tsx @@ -9,12 +9,12 @@ import { act, fireEvent, render, waitFor } from '@testing-library/react'; import React from 'react'; import { EntityAnalyticsHeader } from '.'; import { Direction, RiskScoreFields, RiskSeverity } from '../../../../../common/search_strategy'; -import type { SeverityCount } from '../../../../common/components/severity/types'; +import type { SeverityCount } from '../../../../explore/components/risk_score/severity/types'; import { TestProviders } from '../../../../common/mock'; -import { hostsActions } from '../../../../hosts/store'; -import { HostsType } from '../../../../hosts/store/model'; -import { usersActions } from '../../../../users/store'; -import { UsersTableType } from '../../../../users/store/model'; +import { hostsActions } from '../../../../explore/hosts/store'; +import { HostsType } from '../../../../explore/hosts/store/model'; +import { usersActions } from '../../../../explore/users/store'; +import { UsersTableType } from '../../../../explore/users/store/model'; const mockSeverityCount: SeverityCount = { [RiskSeverity.low]: 1, @@ -28,7 +28,7 @@ jest.mock('../../../../common/components/ml/hooks/use_ml_capabilities', () => ({ useMlCapabilities: () => ({ isPlatinumOrTrialLicense: true, capabilities: {} }), })); -jest.mock('../../../../risk_score/containers', () => { +jest.mock('../../../../explore/containers/risk_score', () => { return { useRiskScoreKpi: () => ({ severityCount: mockSeverityCount }), }; diff --git a/x-pack/plugins/security_solution/public/overview/components/entity_analytics/header/index.tsx b/x-pack/plugins/security_solution/public/overview/components/entity_analytics/header/index.tsx index 1bf08749f980d..28e5c696d1f52 100644 --- a/x-pack/plugins/security_solution/public/overview/components/entity_analytics/header/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/entity_analytics/header/index.tsx @@ -9,7 +9,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiPanel, EuiTitle, EuiLink } from '@elastic import styled from 'styled-components'; import { useDispatch } from 'react-redux'; import { sumBy } from 'lodash/fp'; -import { useRiskScoreKpi } from '../../../../risk_score/containers'; +import { useRiskScoreKpi } from '../../../../explore/containers/risk_score'; import { LinkAnchor, useGetSecuritySolutionLinkProps } from '../../../../common/components/links'; import { Direction, @@ -20,11 +20,11 @@ import { import * as i18n from './translations'; import { getTabsOnHostsUrl } from '../../../../common/components/link_to/redirect_to_hosts'; import { SecurityPageName } from '../../../../app/types'; -import { HostsTableType, HostsType } from '../../../../hosts/store/model'; -import { hostsActions } from '../../../../hosts/store'; -import { usersActions } from '../../../../users/store'; +import { HostsTableType, HostsType } from '../../../../explore/hosts/store/model'; +import { hostsActions } from '../../../../explore/hosts/store'; +import { usersActions } from '../../../../explore/users/store'; import { getTabsOnUsersUrl } from '../../../../common/components/link_to/redirect_to_users'; -import { UsersTableType } from '../../../../users/store/model'; +import { UsersTableType } from '../../../../explore/users/store/model'; import { useNotableAnomaliesSearch } from '../../../../common/components/ml/anomaly/use_anomalies_search'; import { useGlobalTime } from '../../../../common/containers/use_global_time'; import { useMlCapabilities } from '../../../../common/components/ml/hooks/use_ml_capabilities'; diff --git a/x-pack/plugins/security_solution/public/overview/components/entity_analytics/risk_score/columns.tsx b/x-pack/plugins/security_solution/public/overview/components/entity_analytics/risk_score/columns.tsx index 3b3a361e23daf..87b5ce32dee5c 100644 --- a/x-pack/plugins/security_solution/public/overview/components/entity_analytics/risk_score/columns.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/entity_analytics/risk_score/columns.tsx @@ -9,11 +9,11 @@ import React from 'react'; import type { EuiBasicTableColumn } from '@elastic/eui'; import { EuiLink, EuiIcon, EuiToolTip } from '@elastic/eui'; import { get } from 'lodash/fp'; -import { UsersTableType } from '../../../../users/store/model'; +import { UsersTableType } from '../../../../explore/users/store/model'; import { getEmptyTagValue } from '../../../../common/components/empty_value'; import { HostDetailsLink, UserDetailsLink } from '../../../../common/components/links'; -import { HostsTableType } from '../../../../hosts/store/model'; -import { RiskScore } from '../../../../common/components/severity/common'; +import { HostsTableType } from '../../../../explore/hosts/store/model'; +import { RiskScore } from '../../../../explore/components/risk_score/severity/common'; import type { HostRiskScore, RiskSeverity, diff --git a/x-pack/plugins/security_solution/public/overview/components/entity_analytics/risk_score/index.test.tsx b/x-pack/plugins/security_solution/public/overview/components/entity_analytics/risk_score/index.test.tsx index eb6120088247b..054eb87daf992 100644 --- a/x-pack/plugins/security_solution/public/overview/components/entity_analytics/risk_score/index.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/entity_analytics/risk_score/index.test.tsx @@ -11,8 +11,8 @@ import { TestProviders } from '../../../../common/mock'; import { EntityAnalyticsRiskScores } from '.'; import type { UserRiskScore } from '../../../../../common/search_strategy'; import { RiskScoreEntity, RiskSeverity } from '../../../../../common/search_strategy'; -import type { SeverityCount } from '../../../../common/components/severity/types'; -import { useRiskScore, useRiskScoreKpi } from '../../../../risk_score/containers'; +import type { SeverityCount } from '../../../../explore/components/risk_score/severity/types'; +import { useRiskScore, useRiskScoreKpi } from '../../../../explore/containers/risk_score'; import { openAlertsFilter } from '../../detection_response/utils'; const mockSeverityCount: SeverityCount = { @@ -41,7 +41,7 @@ const defaultProps = { }; const mockUseRiskScore = useRiskScore as jest.Mock; const mockUseRiskScoreKpi = useRiskScoreKpi as jest.Mock; -jest.mock('../../../../risk_score/containers'); +jest.mock('../../../../explore/containers/risk_score'); const mockOpenTimelineWithFilters = jest.fn(); jest.mock('../../detection_response/hooks/use_navigate_to_timeline', () => { diff --git a/x-pack/plugins/security_solution/public/overview/components/entity_analytics/risk_score/index.tsx b/x-pack/plugins/security_solution/public/overview/components/entity_analytics/risk_score/index.tsx index 5e2b8992a22d9..a8bf0cd70be8e 100644 --- a/x-pack/plugins/security_solution/public/overview/components/entity_analytics/risk_score/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/entity_analytics/risk_score/index.tsx @@ -8,38 +8,38 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { EuiButtonEmpty, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { useDispatch } from 'react-redux'; -import { EnableRiskScore } from '../../../../risk_score/components/enable_risk_score'; +import { EnableRiskScore } from '../../../../explore/components/risk_score/enable_risk_score'; import { getTabsOnUsersUrl } from '../../../../common/components/link_to/redirect_to_users'; -import { UsersTableType } from '../../../../users/store/model'; -import { SeverityFilterGroup } from '../../../../common/components/severity/severity_filter_group'; +import { UsersTableType } from '../../../../explore/users/store/model'; +import { SeverityFilterGroup } from '../../../../explore/components/risk_score/severity/severity_filter_group'; import { LinkButton, useGetSecuritySolutionLinkProps } from '../../../../common/components/links'; import { getTabsOnHostsUrl } from '../../../../common/components/link_to/redirect_to_hosts'; -import { HostsTableType, HostsType } from '../../../../hosts/store/model'; +import { HostsTableType, HostsType } from '../../../../explore/hosts/store/model'; import { getRiskScoreColumns } from './columns'; import { LastUpdatedAt } from '../../../../common/components/last_updated_at'; import { HeaderSection } from '../../../../common/components/header_section'; -import { useRiskScore, useRiskScoreKpi } from '../../../../risk_score/containers'; +import { useRiskScore, useRiskScoreKpi } from '../../../../explore/containers/risk_score'; import type { RiskSeverity } from '../../../../../common/search_strategy'; import { EMPTY_SEVERITY_COUNT, RiskScoreEntity } from '../../../../../common/search_strategy'; import { SecurityPageName } from '../../../../app/types'; import * as i18n from './translations'; -import { generateSeverityFilter } from '../../../../hosts/store/helpers'; +import { generateSeverityFilter } from '../../../../explore/hosts/store/helpers'; import { useQueryInspector } from '../../../../common/components/page/manage_query'; import { useGlobalTime } from '../../../../common/containers/use_global_time'; import { InspectButtonContainer } from '../../../../common/components/inspect'; import { useQueryToggle } from '../../../../common/containers/query_toggle'; -import { hostsActions } from '../../../../hosts/store'; +import { hostsActions } from '../../../../explore/hosts/store'; import { RiskScoreDonutChart } from '../common/risk_score_donut_chart'; import { StyledBasicTable } from '../common/styled_basic_table'; import { RISKY_HOSTS_DOC_LINK, RISKY_USERS_DOC_LINK } from '../../../../../common/constants'; -import { RiskScoreHeaderTitle } from '../../../../risk_score/components/risk_score_onboarding/risk_score_header_title'; -import { RiskScoresNoDataDetected } from '../../../../risk_score/components/risk_score_onboarding/risk_score_no_data_detected'; +import { RiskScoreHeaderTitle } from '../../../../explore/components/risk_score/risk_score_onboarding/risk_score_header_title'; +import { RiskScoresNoDataDetected } from '../../../../explore/components/risk_score/risk_score_onboarding/risk_score_no_data_detected'; import { useRefetchQueries } from '../../../../common/hooks/use_refetch_queries'; import { Loader } from '../../../../common/components/loader'; import { Panel } from '../../../../common/components/panel'; import * as commonI18n from '../common/translations'; -import { usersActions } from '../../../../users/store'; +import { usersActions } from '../../../../explore/users/store'; import { useNavigateToTimeline } from '../../detection_response/hooks/use_navigate_to_timeline'; import type { TimeRange } from '../../../../common/store/inputs/model'; import { openAlertsFilter } from '../../detection_response/utils'; diff --git a/x-pack/plugins/security_solution/public/overview/components/entity_analytics/risk_score/translations.ts b/x-pack/plugins/security_solution/public/overview/components/entity_analytics/risk_score/translations.ts index d9d32ea1f04d2..c4f9ea993bb5b 100644 --- a/x-pack/plugins/security_solution/public/overview/components/entity_analytics/risk_score/translations.ts +++ b/x-pack/plugins/security_solution/public/overview/components/entity_analytics/risk_score/translations.ts @@ -6,9 +6,9 @@ */ import { i18n } from '@kbn/i18n'; -import { getRiskEntityTranslation } from '../../../../risk_score/components/translations'; +import { getRiskEntityTranslation } from '../../../../explore/components/risk_score/translations'; import type { RiskScoreEntity } from '../../../../../common/search_strategy'; -export * from '../../../../risk_score/components/translations'; +export * from '../../../../explore/components/risk_score/translations'; export const ENTITY_RISK_TOOLTIP = (riskEntity: RiskScoreEntity) => i18n.translate('xpack.securitySolution.entityAnalytics.riskDashboard.riskToolTip', { diff --git a/x-pack/plugins/security_solution/public/overview/components/events_by_dataset/index.tsx b/x-pack/plugins/security_solution/public/overview/components/events_by_dataset/index.tsx index d61b92e05e927..381b36c20e0c6 100644 --- a/x-pack/plugins/security_solution/public/overview/components/events_by_dataset/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/events_by_dataset/index.tsx @@ -28,7 +28,7 @@ import { eventsStackByOptions, eventsHistogramConfig, } from '../../../common/components/events_tab/histogram_configurations'; -import { HostsTableType } from '../../../hosts/store/model'; +import { HostsTableType } from '../../../explore/hosts/store/model'; import type { InputsModelId } from '../../../common/store/inputs/constants'; import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; diff --git a/x-pack/plugins/security_solution/public/overview/components/host_overview/index.test.tsx b/x-pack/plugins/security_solution/public/overview/components/host_overview/index.test.tsx index 2e0c5c93ed63c..29799ebcbb813 100644 --- a/x-pack/plugins/security_solution/public/overview/components/host_overview/index.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/host_overview/index.test.tsx @@ -14,7 +14,7 @@ import { TestProviders } from '../../../common/mock'; import { HostOverview } from '.'; import { mockData } from './mock'; import { mockAnomalies } from '../../../common/components/ml/mock'; -import { useRiskScore } from '../../../risk_score/containers/all'; +import { useRiskScore } from '../../../explore/containers/risk_score/all'; const defaultProps = { data: undefined, @@ -25,7 +25,7 @@ const defaultProps = { loading: true, }; -jest.mock('../../../risk_score/containers/all'); +jest.mock('../../../explore/containers/risk_score/all'); const mockUseRiskScore = useRiskScore as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/overview/components/host_overview/index.tsx b/x-pack/plugins/security_solution/public/overview/components/host_overview/index.tsx index 89aa7a67f57d2..404561263fe53 100644 --- a/x-pack/plugins/security_solution/public/overview/components/host_overview/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/host_overview/index.tsx @@ -36,9 +36,9 @@ import { DescriptionListStyled, OverviewWrapper } from '../../../common/componen import * as i18n from './translations'; import { EndpointOverview } from './endpoint_overview'; import { OverviewDescriptionList } from '../../../common/components/overview_description_list'; -import { useRiskScore } from '../../../risk_score/containers'; -import { RiskScore } from '../../../common/components/severity/common'; -import { RiskScoreHeaderTitle } from '../../../risk_score/components/risk_score_onboarding/risk_score_header_title'; +import { useRiskScore } from '../../../explore/containers/risk_score'; +import { RiskScore } from '../../../explore/components/risk_score/severity/common'; +import { RiskScoreHeaderTitle } from '../../../explore/components/risk_score/risk_score_onboarding/risk_score_header_title'; interface HostSummaryProps { contextID?: string; // used to provide unique draggable context when viewing in the side panel diff --git a/x-pack/plugins/security_solution/public/overview/components/user_overview/index.test.tsx b/x-pack/plugins/security_solution/public/overview/components/user_overview/index.test.tsx index 8c54a2847d938..5eff09be5fd15 100644 --- a/x-pack/plugins/security_solution/public/overview/components/user_overview/index.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/user_overview/index.test.tsx @@ -12,7 +12,7 @@ import '../../../common/mock/match_media'; import { TestProviders } from '../../../common/mock'; import { mockAnomalies } from '../../../common/components/ml/mock'; -import { useRiskScore } from '../../../risk_score/containers/all'; +import { useRiskScore } from '../../../explore/containers/risk_score/all'; import type { UserSummaryProps } from '.'; import { UserOverview } from '.'; @@ -25,7 +25,7 @@ const defaultProps = { loading: false, }; -jest.mock('../../../risk_score/containers/all'); +jest.mock('../../../explore/containers/risk_score/all'); const mockRiskScore = useRiskScore as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/overview/components/user_overview/index.tsx b/x-pack/plugins/security_solution/public/overview/components/user_overview/index.tsx index 5967c71691756..d3f80bd9fa041 100644 --- a/x-pack/plugins/security_solution/public/overview/components/user_overview/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/user_overview/index.tsx @@ -33,10 +33,10 @@ import { DescriptionListStyled, OverviewWrapper } from '../../../common/componen import * as i18n from './translations'; import { OverviewDescriptionList } from '../../../common/components/overview_description_list'; -import { useRiskScore } from '../../../risk_score/containers'; -import { RiskScore } from '../../../common/components/severity/common'; +import { useRiskScore } from '../../../explore/containers/risk_score'; +import { RiskScore } from '../../../explore/components/risk_score/severity/common'; import type { UserItem } from '../../../../common/search_strategy/security_solution/users/common'; -import { RiskScoreHeaderTitle } from '../../../risk_score/components/risk_score_onboarding/risk_score_header_title'; +import { RiskScoreHeaderTitle } from '../../../explore/components/risk_score/risk_score_onboarding/risk_score_header_title'; export interface UserSummaryProps { contextID?: string; // used to provide unique draggable context when viewing in the side panel diff --git a/x-pack/plugins/security_solution/public/overview/pages/overview.test.tsx b/x-pack/plugins/security_solution/public/overview/pages/overview.test.tsx index 0233390362297..8f6f0e7ce11f6 100644 --- a/x-pack/plugins/security_solution/public/overview/pages/overview.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/pages/overview.test.tsx @@ -24,7 +24,7 @@ import { useCtiDashboardLinks } from '../containers/overview_cti_links'; import { useIsExperimentalFeatureEnabled } from '../../common/hooks/use_experimental_features'; import { initialUserPrivilegesState } from '../../common/components/user_privileges/user_privileges_context'; import type { EndpointPrivileges } from '../../../common/endpoint/types'; -import { useRiskScore } from '../../risk_score/containers'; +import { useRiskScore } from '../../explore/containers/risk_score'; import { mockCasesContract } from '@kbn/cases-plugin/public/mocks'; import { LandingPageComponent } from '../../common/components/landing_page'; @@ -98,7 +98,7 @@ jest.mock('../containers/overview_cti_links/use_all_ti_data_sources'); const useAllTiDataSourcesMock = useAllTiDataSources as jest.Mock; useAllTiDataSourcesMock.mockReturnValue(mockTiDataSources); -jest.mock('../../risk_score/containers'); +jest.mock('../../explore/containers/risk_score'); const useRiskScoreMock = useRiskScore as jest.Mock; useRiskScoreMock.mockReturnValue({ loading: false, data: [], isModuleEnabled: false }); diff --git a/x-pack/plugins/security_solution/public/risk_score/jest.config.js b/x-pack/plugins/security_solution/public/risk_score/jest.config.js deleted file mode 100644 index d279b47287ffa..0000000000000 --- a/x-pack/plugins/security_solution/public/risk_score/jest.config.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -module.exports = { - preset: '@kbn/test', - rootDir: '../../../../..', - roots: ['/x-pack/plugins/security_solution/public/risk_score'], - coverageDirectory: - '/target/kibana-coverage/jest/x-pack/plugins/security_solution/public/risk_score', - coverageReporters: ['text', 'html'], - collectCoverageFrom: [ - '/x-pack/plugins/security_solution/public/risk_score/**/*.{ts,tsx}', - ], - // See: https://github.com/elastic/kibana/issues/117255, the moduleNameMapper creates mocks to avoid memory leaks from kibana core. - moduleNameMapper: { - 'core/server$': '/x-pack/plugins/security_solution/server/__mocks__/core.mock.ts', - 'task_manager/server$': - '/x-pack/plugins/security_solution/server/__mocks__/task_manager.mock.ts', - 'alerting/server$': '/x-pack/plugins/security_solution/server/__mocks__/alert.mock.ts', - 'actions/server$': '/x-pack/plugins/security_solution/server/__mocks__/action.mock.ts', - }, -}; diff --git a/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.test.tsx index 03717b0722cfe..d5089b34dd06f 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.test.tsx @@ -25,7 +25,7 @@ import { DefaultFieldRendererOverflow, MoreContainer, } from './field_renderers'; -import { mockData } from '../../../network/components/details/mock'; +import { mockData } from '../../../explore/network/components/details/mock'; import type { AutonomousSystem } from '../../../../common/search_strategy'; import { FlowTarget } from '../../../../common/search_strategy'; import type { HostEcs } from '../../../../common/ecs/host'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.tsx b/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.tsx index a3e1b9ffe186a..6b6afc8fec727 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.tsx @@ -24,7 +24,7 @@ import { defaultToEmptyTag, getEmptyTagValue } from '../../../common/components/ import { FormattedRelativePreferenceDate } from '../../../common/components/formatted_date'; import { HostDetailsLink, ReputationLink, WhoIsLink } from '../../../common/components/links'; import { Spacer } from '../../../common/components/page'; -import * as i18n from '../../../network/components/details/translations'; +import * as i18n from '../../../explore/network/components/details/translations'; import type { QueryOperator } from '../../../../common/types'; import { IS_OPERATOR } from '../../../../common/types'; import { DraggableWrapper } from '../../../common/components/drag_and_drop/draggable_wrapper'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/netflow/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/netflow/index.test.tsx index 48dd8c9ddfd87..4e2286789da36 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/netflow/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/netflow/index.test.tsx @@ -18,12 +18,15 @@ import { } from '../certificate_fingerprint'; import { EVENT_DURATION_FIELD_NAME } from '../duration'; import { ID_FIELD_NAME } from '../../../common/components/event_details/event_id'; -import { DESTINATION_IP_FIELD_NAME, SOURCE_IP_FIELD_NAME } from '../../../network/components/ip'; +import { + DESTINATION_IP_FIELD_NAME, + SOURCE_IP_FIELD_NAME, +} from '../../../explore/network/components/ip'; import { JA3_HASH_FIELD_NAME } from '../ja3_fingerprint'; import { DESTINATION_PORT_FIELD_NAME, SOURCE_PORT_FIELD_NAME, -} from '../../../network/components/port/helpers'; +} from '../../../explore/network/components/port/helpers'; import { DESTINATION_GEO_CITY_NAME_FIELD_NAME, DESTINATION_GEO_CONTINENT_NAME_FIELD_NAME, @@ -35,13 +38,13 @@ import { SOURCE_GEO_COUNTRY_ISO_CODE_FIELD_NAME, SOURCE_GEO_COUNTRY_NAME_FIELD_NAME, SOURCE_GEO_REGION_NAME_FIELD_NAME, -} from '../../../network/components/source_destination/geo_fields'; +} from '../../../explore/network/components/source_destination/geo_fields'; import { DESTINATION_BYTES_FIELD_NAME, DESTINATION_PACKETS_FIELD_NAME, SOURCE_BYTES_FIELD_NAME, SOURCE_PACKETS_FIELD_NAME, -} from '../../../network/components/source_destination/source_destination_arrows'; +} from '../../../explore/network/components/source_destination/source_destination_arrows'; import * as i18n from '../timeline/body/renderers/translations'; import { Netflow } from '.'; @@ -57,7 +60,7 @@ import { NETWORK_PACKETS_FIELD_NAME, NETWORK_PROTOCOL_FIELD_NAME, NETWORK_TRANSPORT_FIELD_NAME, -} from '../../../network/components/source_destination/field_names'; +} from '../../../explore/network/components/source_destination/field_names'; import { getMockNetflowData } from '../../../common/mock/netflow'; jest.mock('../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/timelines/components/netflow/netflow_columns/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/netflow/netflow_columns/index.tsx index b07731b3cc225..a784a81f63e52 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/netflow/netflow_columns/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/netflow/netflow_columns/index.tsx @@ -9,7 +9,7 @@ import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import React from 'react'; import styled from 'styled-components'; -import { SourceDestination } from '../../../../network/components/source_destination'; +import { SourceDestination } from '../../../../explore/network/components/source_destination'; import { DurationEventStartEnd } from './duration_event_start_end'; import type { NetflowColumnsProps } from './types'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.test.tsx index 3de54109b6d8e..6df9ca799ea64 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.test.tsx @@ -94,7 +94,7 @@ jest.mock( } ); jest.mock('../../../../detections/components/alerts_table/actions'); -jest.mock('../../../../risk_score/containers', () => { +jest.mock('../../../../explore/containers/risk_score', () => { return { useRiskScore: jest.fn().mockReturnValue({ loading: true, diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/host_details/expandable_host.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/host_details/expandable_host.tsx index 3cb8033f5b533..a653358da61d3 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/host_details/expandable_host.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/host_details/expandable_host.tsx @@ -20,7 +20,7 @@ import type { HostItem } from '../../../../../common/search_strategy'; import { AnomalyTableProvider } from '../../../../common/components/ml/anomaly/anomaly_table_provider'; import { hostToCriteria } from '../../../../common/components/ml/criteria/host_to_criteria'; import { scoreIntervalToDateTime } from '../../../../common/components/ml/score/score_interval_to_datetime'; -import { useHostDetails, ID } from '../../../../hosts/containers/hosts/details'; +import { useHostDetails, ID } from '../../../../explore/hosts/containers/hosts/details'; interface ExpandableHostProps { hostName: string; diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/network_details/expandable_network.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/network_details/expandable_network.tsx index 8841a53f43d69..33801fd70d36f 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/network_details/expandable_network.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/network_details/expandable_network.tsx @@ -15,7 +15,7 @@ import { InputsModelId } from '../../../../common/store/inputs/constants'; import { useInvalidFilterQuery } from '../../../../common/hooks/use_invalid_filter_query'; import type { FlowTargetSourceDest } from '../../../../../common/search_strategy'; import { NetworkDetailsLink } from '../../../../common/components/links'; -import { IpOverview } from '../../../../network/components/details'; +import { IpOverview } from '../../../../explore/network/components/details'; import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; import { useGlobalTime } from '../../../../common/containers/use_global_time'; import { networkToCriteria } from '../../../../common/components/ml/criteria/network_to_criteria'; @@ -25,8 +25,8 @@ import { convertToBuildEsQuery } from '../../../../common/lib/kuery'; import { inputsSelectors } from '../../../../common/store'; import { setAbsoluteRangeDatePicker } from '../../../../common/store/inputs/actions'; import { useSourcererDataView } from '../../../../common/containers/sourcerer'; -import { useNetworkDetails } from '../../../../network/containers/details'; -import { networkModel } from '../../../../network/store'; +import { useNetworkDetails } from '../../../../explore/network/containers/details'; +import { networkModel } from '../../../../explore/network/store'; import { useAnomaliesTableData } from '../../../../common/components/ml/anomaly/use_anomalies_table_data'; import { LandingCards } from '../../../../common/components/landing_cards'; import { useInstalledSecurityJobsIds } from '../../../../common/components/ml/hooks/use_installed_security_jobs'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/user_details/expandable_user.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/user_details/expandable_user.tsx index 449fd5b115ad8..1de3f840dad3d 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/user_details/expandable_user.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/user_details/expandable_user.tsx @@ -13,14 +13,14 @@ import { useDispatch } from 'react-redux'; import { InputsModelId } from '../../../../common/store/inputs/constants'; import { UserDetailsLink } from '../../../../common/components/links'; import { UserOverview } from '../../../../overview/components/user_overview'; -import { useUserDetails } from '../../../../users/containers/users/details'; +import { useUserDetails } from '../../../../explore/users/containers/users/details'; import { useGlobalTime } from '../../../../common/containers/use_global_time'; import { useSourcererDataView } from '../../../../common/containers/sourcerer'; import { setAbsoluteRangeDatePicker } from '../../../../common/store/inputs/actions'; import { getCriteriaFromUsersType } from '../../../../common/components/ml/criteria/get_criteria_from_users_type'; import { scoreIntervalToDateTime } from '../../../../common/components/ml/score/score_interval_to_datetime'; import { AnomalyTableProvider } from '../../../../common/components/ml/anomaly/anomaly_table_provider'; -import { UsersType } from '../../../../users/store/model'; +import { UsersType } from '../../../../explore/users/store/model'; export const QUERY_ID = 'usersDetailsQuery'; export interface ExpandableUserProps { diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx index 6f8311522f018..1fe2a6b658791 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx @@ -19,8 +19,8 @@ import { Duration, EVENT_DURATION_FIELD_NAME } from '../../../duration'; import { getOrEmptyTagFromValue } from '../../../../../common/components/empty_value'; import { FormattedDate } from '../../../../../common/components/formatted_date'; import { FormattedIp } from '../../../formatted_ip'; -import { Port } from '../../../../../network/components/port'; -import { PORT_NAMES } from '../../../../../network/components/port/helpers'; +import { Port } from '../../../../../explore/network/components/port'; +import { PORT_NAMES } from '../../../../../explore/network/components/port/helpers'; import { TruncatableText } from '../../../../../common/components/truncatable_text'; import { DATE_FIELD_TYPE, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow.tsx index d03a5cde8c384..c332f82a3b1c2 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow.tsx @@ -19,7 +19,7 @@ import { ID_FIELD_NAME } from '../../../../../common/components/event_details/ev import { DESTINATION_IP_FIELD_NAME, SOURCE_IP_FIELD_NAME, -} from '../../../../../network/components/ip'; +} from '../../../../../explore/network/components/ip'; import { JA3_HASH_FIELD_NAME } from '../../../ja3_fingerprint'; import { Netflow } from '../../../netflow'; import { @@ -29,7 +29,7 @@ import { import { DESTINATION_PORT_FIELD_NAME, SOURCE_PORT_FIELD_NAME, -} from '../../../../../network/components/port/helpers'; +} from '../../../../../explore/network/components/port/helpers'; import { DESTINATION_GEO_CITY_NAME_FIELD_NAME, DESTINATION_GEO_CONTINENT_NAME_FIELD_NAME, @@ -41,13 +41,13 @@ import { SOURCE_GEO_COUNTRY_ISO_CODE_FIELD_NAME, SOURCE_GEO_COUNTRY_NAME_FIELD_NAME, SOURCE_GEO_REGION_NAME_FIELD_NAME, -} from '../../../../../network/components/source_destination/geo_fields'; +} from '../../../../../explore/network/components/source_destination/geo_fields'; import { DESTINATION_BYTES_FIELD_NAME, DESTINATION_PACKETS_FIELD_NAME, SOURCE_BYTES_FIELD_NAME, SOURCE_PACKETS_FIELD_NAME, -} from '../../../../../network/components/source_destination/source_destination_arrows'; +} from '../../../../../explore/network/components/source_destination/source_destination_arrows'; import { NETWORK_BYTES_FIELD_NAME, NETWORK_COMMUNITY_ID_FIELD_NAME, @@ -55,7 +55,7 @@ import { NETWORK_PACKETS_FIELD_NAME, NETWORK_PROTOCOL_FIELD_NAME, NETWORK_TRANSPORT_FIELD_NAME, -} from '../../../../../network/components/source_destination/field_names'; +} from '../../../../../explore/network/components/source_destination/field_names'; interface NetflowRendererProps { data: Ecs; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/netflow_row_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/netflow_row_renderer.tsx index a04cad6b53790..d957bbc015e07 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/netflow_row_renderer.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/netflow_row_renderer.tsx @@ -21,7 +21,7 @@ import { ID_FIELD_NAME } from '../../../../../../common/components/event_details import { DESTINATION_IP_FIELD_NAME, SOURCE_IP_FIELD_NAME, -} from '../../../../../../network/components/ip'; +} from '../../../../../../explore/network/components/ip'; import { JA3_HASH_FIELD_NAME } from '../../../../ja3_fingerprint'; import { Netflow } from '../../../../netflow'; import { @@ -35,7 +35,7 @@ import { import { DESTINATION_PORT_FIELD_NAME, SOURCE_PORT_FIELD_NAME, -} from '../../../../../../network/components/port/helpers'; +} from '../../../../../../explore/network/components/port/helpers'; import { NETWORK_BYTES_FIELD_NAME, NETWORK_COMMUNITY_ID_FIELD_NAME, @@ -43,7 +43,7 @@ import { NETWORK_PACKETS_FIELD_NAME, NETWORK_PROTOCOL_FIELD_NAME, NETWORK_TRANSPORT_FIELD_NAME, -} from '../../../../../../network/components/source_destination/field_names'; +} from '../../../../../../explore/network/components/source_destination/field_names'; import { DESTINATION_GEO_CITY_NAME_FIELD_NAME, DESTINATION_GEO_CONTINENT_NAME_FIELD_NAME, @@ -55,13 +55,13 @@ import { SOURCE_GEO_COUNTRY_ISO_CODE_FIELD_NAME, SOURCE_GEO_COUNTRY_NAME_FIELD_NAME, SOURCE_GEO_REGION_NAME_FIELD_NAME, -} from '../../../../../../network/components/source_destination/geo_fields'; +} from '../../../../../../explore/network/components/source_destination/geo_fields'; import { DESTINATION_BYTES_FIELD_NAME, DESTINATION_PACKETS_FIELD_NAME, SOURCE_BYTES_FIELD_NAME, SOURCE_PACKETS_FIELD_NAME, -} from '../../../../../../network/components/source_destination/source_destination_arrows'; +} from '../../../../../../explore/network/components/source_destination/source_destination_arrows'; import { RowRendererContainer } from '../row_renderer'; const Details = styled.div` diff --git a/x-pack/plugins/security_solution/public/types.ts b/x-pack/plugins/security_solution/public/types.ts index f64e7b7382b38..b0accbb8fe4b1 100644 --- a/x-pack/plugins/security_solution/public/types.ts +++ b/x-pack/plugins/security_solution/public/types.ts @@ -47,9 +47,9 @@ import type { Inspect } from '../common/search_strategy'; import type { Detections } from './detections'; import type { Cases } from './cases'; import type { Exceptions } from './exceptions'; -import type { Hosts } from './hosts'; -import type { Users } from './users'; -import type { Network } from './network'; +import type { Hosts } from './explore/hosts'; +import type { Users } from './explore/users'; +import type { Network } from './explore/network'; import type { Kubernetes } from './kubernetes'; import type { Overview } from './overview'; import type { Rules } from './rules'; diff --git a/x-pack/plugins/security_solution/public/users/jest.config.js b/x-pack/plugins/security_solution/public/users/jest.config.js deleted file mode 100644 index 563491dd5befe..0000000000000 --- a/x-pack/plugins/security_solution/public/users/jest.config.js +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -module.exports = { - preset: '@kbn/test', - rootDir: '../../../../..', - roots: ['/x-pack/plugins/security_solution/public/users'], - coverageDirectory: - '/target/kibana-coverage/jest/x-pack/plugins/security_solution/public/users', - coverageReporters: ['text', 'html'], - collectCoverageFrom: ['/x-pack/plugins/security_solution/public/users/**/*.{ts,tsx}'], - // See: https://github.com/elastic/kibana/issues/117255, the moduleNameMapper creates mocks to avoid memory leaks from kibana core. - moduleNameMapper: { - 'core/server$': '/x-pack/plugins/security_solution/server/__mocks__/core.mock.ts', - 'task_manager/server$': - '/x-pack/plugins/security_solution/server/__mocks__/task_manager.mock.ts', - 'alerting/server$': '/x-pack/plugins/security_solution/server/__mocks__/alert.mock.ts', - 'actions/server$': '/x-pack/plugins/security_solution/server/__mocks__/action.mock.ts', - }, -}; From 6a615005054e9e39ddd909cc9302d0992d0f6eeb Mon Sep 17 00:00:00 2001 From: Luke Elmers Date: Tue, 13 Dec 2022 12:27:34 -0700 Subject: [PATCH 2/3] Adds link to Nov 2022 contributors newsletter. (#147394) --- nav-kibana-dev.docnav.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nav-kibana-dev.docnav.json b/nav-kibana-dev.docnav.json index 4c8bcb3cd3192..05a1b8e95d78c 100644 --- a/nav-kibana-dev.docnav.json +++ b/nav-kibana-dev.docnav.json @@ -175,6 +175,9 @@ { "label": "Contributors Newsletters", "items": [ + { + "id": "kibNovember2022ContributorNewsletter" + }, { "id": "kibOctober2022ContributorNewsletter" }, From bb269f5b7e4f38af5a1c4cc3092198a7abf3c820 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cau=C3=AA=20Marcondes?= <55978943+cauemarcondes@users.noreply.github.com> Date: Tue, 13 Dec 2022 16:00:51 -0500 Subject: [PATCH 3/3] [APM][Waterfall] Reduce number of fields and lazy load flyouts (#147254) Related to: https://github.com/elastic/kibana/issues/146538 This PR improved these items: 1. Reduce the number of fields needed to create the waterfall tree. 2. Make the `Span Flyout` lazy load data based on span id, trace id, parent Id. 3. Make the `Transaction Flyout` lazy load data based on transaction id and trace id. By lazy loading the Span/Transaction Flyout, I eliminated many fields. Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../critical_path/get_critical_path.test.ts | 11 +- .../__snapshots__/es_fields.test.ts.snap | 51 + x-pack/plugins/apm/common/es_fields/apm.ts | 12 +- .../plugins/apm/common/waterfall/typings.ts | 88 + .../distribution/index.test.tsx | 22 +- .../use_waterfall_fetcher.ts | 21 +- .../waterfall_with_summary/index.tsx | 13 +- .../maybe_view_trace_link.tsx | 9 +- .../transaction_tabs.tsx | 2 +- .../marks/get_error_marks.ts | 4 +- .../waterfall_container/waterfall/index.tsx | 4 +- .../waterfall/span_flyout/index.tsx | 317 +- .../span_flyout/span_flyout.stories.tsx | 369 +- .../waterfall/transaction_flyout/index.tsx | 136 +- .../transaction_flyout.stories.tsx | 210 +- .../waterfall/waterfall_flyout.tsx | 16 +- .../waterfall_helpers.test.ts.snap | 2852 -------- .../waterfall_helpers.test.ts | 114 +- .../waterfall_helpers/waterfall_helpers.ts | 121 +- .../waterfall_container.stories.data.ts | 5873 ----------------- .../waterfall_container.stories.tsx | 145 +- .../waterfall_container.test.tsx | 4 +- .../discover_links.integration.test.tsx | 11 +- .../discover_links/discover_span_link.tsx | 11 +- .../metadata_table/span_metadata/index.tsx | 9 +- .../transaction_metadata/index.tsx | 9 +- .../routes/span_links/get_linked_children.ts | 2 +- .../traces/__snapshots__/queries.test.ts.snap | 11 + .../server/routes/traces/get_trace_items.ts | 98 +- .../plugins/apm/server/routes/traces/route.ts | 87 +- .../routes/transactions/get_span/index.ts | 56 + .../tests/feature_controls.spec.ts | 2 +- .../tests/span_links/span_links.spec.ts | 61 +- .../tests/traces/find_traces.spec.ts | 36 +- .../tests/traces/span_details.spec.ts | 115 + .../tests/traces/trace_by_id.spec.ts | 35 +- .../tests/traces/transaction_details.spec.ts | 106 + 37 files changed, 1354 insertions(+), 9689 deletions(-) create mode 100644 x-pack/plugins/apm/common/waterfall/typings.ts delete mode 100644 x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall_container.stories.data.ts create mode 100644 x-pack/plugins/apm/server/routes/transactions/get_span/index.ts create mode 100644 x-pack/test/apm_api_integration/tests/traces/span_details.spec.ts create mode 100644 x-pack/test/apm_api_integration/tests/traces/transaction_details.spec.ts diff --git a/x-pack/plugins/apm/common/critical_path/get_critical_path.test.ts b/x-pack/plugins/apm/common/critical_path/get_critical_path.test.ts index 38d1b0a3da1ca..066fc1c6fae41 100644 --- a/x-pack/plugins/apm/common/critical_path/get_critical_path.test.ts +++ b/x-pack/plugins/apm/common/critical_path/get_critical_path.test.ts @@ -12,17 +12,18 @@ import { getCriticalPath } from './get_critical_path'; describe('getCriticalPath', () => { function getCriticalPathFromEvents(events: ApmFields[]) { - const waterfall = getWaterfall( - { + const entryTransaction = dedot(events[0]!, {}) as Transaction; + const waterfall = getWaterfall({ + traceItems: { traceDocs: events.map( (event) => dedot(event, {}) as Transaction | Span ), errorDocs: [], exceedsMax: false, - linkedChildrenOfSpanCountBySpanId: {}, + spanLinksCountById: {}, }, - events[0]['transaction.id']! - ); + entryTransaction, + }); return { waterfall, diff --git a/x-pack/plugins/apm/common/es_fields/__snapshots__/es_fields.test.ts.snap b/x-pack/plugins/apm/common/es_fields/__snapshots__/es_fields.test.ts.snap index efe6189109b49..80cee93aba10f 100644 --- a/x-pack/plugins/apm/common/es_fields/__snapshots__/es_fields.test.ts.snap +++ b/x-pack/plugins/apm/common/es_fields/__snapshots__/es_fields.test.ts.snap @@ -11,6 +11,8 @@ exports[`Error AGENT_NAME 1`] = `"java"`; exports[`Error AGENT_VERSION 1`] = `"agent version"`; +exports[`Error CHILD_ID 1`] = `undefined`; + exports[`Error CLIENT_GEO_COUNTRY_ISO_CODE 1`] = `undefined`; exports[`Error CLOUD 1`] = ` @@ -55,6 +57,17 @@ exports[`Error ERROR_EXC_MESSAGE 1`] = `undefined`; exports[`Error ERROR_EXC_TYPE 1`] = `undefined`; +exports[`Error ERROR_EXCEPTION 1`] = ` +Array [ + Object { + "handled": false, + "message": "sonic boom", + "module": "errors", + "type": "errorString", + }, +] +`; + exports[`Error ERROR_GROUP_ID 1`] = `"grouping key"`; exports[`Error ERROR_ID 1`] = `"error id"`; @@ -199,6 +212,12 @@ exports[`Error SERVICE_VERSION 1`] = `undefined`; exports[`Error SPAN_ACTION 1`] = `undefined`; +exports[`Error SPAN_COMPOSITE_COMPRESSION_STRATEGY 1`] = `undefined`; + +exports[`Error SPAN_COMPOSITE_COUNT 1`] = `undefined`; + +exports[`Error SPAN_COMPOSITE_SUM 1`] = `undefined`; + exports[`Error SPAN_DESTINATION_SERVICE_RESOURCE 1`] = `undefined`; exports[`Error SPAN_DESTINATION_SERVICE_RESPONSE_TIME_COUNT 1`] = `undefined`; @@ -221,10 +240,14 @@ exports[`Error SPAN_SELF_TIME_SUM 1`] = `undefined`; exports[`Error SPAN_SUBTYPE 1`] = `undefined`; +exports[`Error SPAN_SYNC 1`] = `undefined`; + exports[`Error SPAN_TYPE 1`] = `undefined`; exports[`Error TIER 1`] = `undefined`; +exports[`Error TIMESTAMP 1`] = `1337`; + exports[`Error TRACE_ID 1`] = `"trace id"`; exports[`Error TRANSACTION_DURATION 1`] = `undefined`; @@ -270,6 +293,8 @@ exports[`Span AGENT_NAME 1`] = `"java"`; exports[`Span AGENT_VERSION 1`] = `"agent version"`; +exports[`Span CHILD_ID 1`] = `undefined`; + exports[`Span CLIENT_GEO_COUNTRY_ISO_CODE 1`] = `undefined`; exports[`Span CLOUD 1`] = ` @@ -314,6 +339,8 @@ exports[`Span ERROR_EXC_MESSAGE 1`] = `undefined`; exports[`Span ERROR_EXC_TYPE 1`] = `undefined`; +exports[`Span ERROR_EXCEPTION 1`] = `undefined`; + exports[`Span ERROR_GROUP_ID 1`] = `undefined`; exports[`Span ERROR_ID 1`] = `undefined`; @@ -450,6 +477,12 @@ exports[`Span SERVICE_VERSION 1`] = `undefined`; exports[`Span SPAN_ACTION 1`] = `"my action"`; +exports[`Span SPAN_COMPOSITE_COMPRESSION_STRATEGY 1`] = `undefined`; + +exports[`Span SPAN_COMPOSITE_COUNT 1`] = `undefined`; + +exports[`Span SPAN_COMPOSITE_SUM 1`] = `undefined`; + exports[`Span SPAN_DESTINATION_SERVICE_RESOURCE 1`] = `undefined`; exports[`Span SPAN_DESTINATION_SERVICE_RESPONSE_TIME_COUNT 1`] = `undefined`; @@ -472,10 +505,14 @@ exports[`Span SPAN_SELF_TIME_SUM 1`] = `undefined`; exports[`Span SPAN_SUBTYPE 1`] = `"my subtype"`; +exports[`Span SPAN_SYNC 1`] = `false`; + exports[`Span SPAN_TYPE 1`] = `"span type"`; exports[`Span TIER 1`] = `undefined`; +exports[`Span TIMESTAMP 1`] = `1337`; + exports[`Span TRACE_ID 1`] = `"trace id"`; exports[`Span TRANSACTION_DURATION 1`] = `undefined`; @@ -521,6 +558,8 @@ exports[`Transaction AGENT_NAME 1`] = `"java"`; exports[`Transaction AGENT_VERSION 1`] = `"agent version"`; +exports[`Transaction CHILD_ID 1`] = `undefined`; + exports[`Transaction CLIENT_GEO_COUNTRY_ISO_CODE 1`] = `undefined`; exports[`Transaction CLOUD 1`] = ` @@ -569,6 +608,8 @@ exports[`Transaction ERROR_EXC_MESSAGE 1`] = `undefined`; exports[`Transaction ERROR_EXC_TYPE 1`] = `undefined`; +exports[`Transaction ERROR_EXCEPTION 1`] = `undefined`; + exports[`Transaction ERROR_GROUP_ID 1`] = `undefined`; exports[`Transaction ERROR_ID 1`] = `undefined`; @@ -719,6 +760,12 @@ exports[`Transaction SERVICE_VERSION 1`] = `undefined`; exports[`Transaction SPAN_ACTION 1`] = `undefined`; +exports[`Transaction SPAN_COMPOSITE_COMPRESSION_STRATEGY 1`] = `undefined`; + +exports[`Transaction SPAN_COMPOSITE_COUNT 1`] = `undefined`; + +exports[`Transaction SPAN_COMPOSITE_SUM 1`] = `undefined`; + exports[`Transaction SPAN_DESTINATION_SERVICE_RESOURCE 1`] = `undefined`; exports[`Transaction SPAN_DESTINATION_SERVICE_RESPONSE_TIME_COUNT 1`] = `undefined`; @@ -741,10 +788,14 @@ exports[`Transaction SPAN_SELF_TIME_SUM 1`] = `undefined`; exports[`Transaction SPAN_SUBTYPE 1`] = `undefined`; +exports[`Transaction SPAN_SYNC 1`] = `undefined`; + exports[`Transaction SPAN_TYPE 1`] = `undefined`; exports[`Transaction TIER 1`] = `undefined`; +exports[`Transaction TIMESTAMP 1`] = `1337`; + exports[`Transaction TRACE_ID 1`] = `"trace id"`; exports[`Transaction TRANSACTION_DURATION 1`] = `1337`; diff --git a/x-pack/plugins/apm/common/es_fields/apm.ts b/x-pack/plugins/apm/common/es_fields/apm.ts index 8d1bf4dd9d44e..f7e15dc292aa8 100644 --- a/x-pack/plugins/apm/common/es_fields/apm.ts +++ b/x-pack/plugins/apm/common/es_fields/apm.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - +export const TIMESTAMP = 'timestamp.us'; export const AGENT = 'agent'; export const AGENT_NAME = 'agent.name'; export const AGENT_VERSION = 'agent.version'; @@ -81,6 +81,13 @@ export const SPAN_LINKS = 'span.links'; export const SPAN_LINKS_TRACE_ID = 'span.links.trace.id'; export const SPAN_LINKS_SPAN_ID = 'span.links.span.id'; +export const SPAN_COMPOSITE_COUNT = 'span.composite.count'; +export const SPAN_COMPOSITE_SUM = 'span.composite.sum.us'; +export const SPAN_COMPOSITE_COMPRESSION_STRATEGY = + 'span.composite.compression_strategy'; + +export const SPAN_SYNC = 'span.sync'; + // Parent ID for a transaction or span export const PARENT_ID = 'parent.id'; @@ -89,6 +96,7 @@ export const ERROR_GROUP_ID = 'error.grouping_key'; export const ERROR_CULPRIT = 'error.culprit'; export const ERROR_LOG_LEVEL = 'error.log.level'; export const ERROR_LOG_MESSAGE = 'error.log.message'; +export const ERROR_EXCEPTION = 'error.exception'; export const ERROR_EXC_MESSAGE = 'error.exception.message'; // only to be used in es queries, since error.exception is now an array export const ERROR_EXC_HANDLED = 'error.exception.handled'; // only to be used in es queries, since error.exception is now an array export const ERROR_EXC_TYPE = 'error.exception.type'; @@ -151,3 +159,5 @@ export const INDEX = '_index'; // Mobile export const NETWORK_CONNECTION_TYPE = 'network.connection.type'; export const DEVICE_MODEL_NAME = 'device.model.name'; + +export const CHILD_ID = 'child.id'; diff --git a/x-pack/plugins/apm/common/waterfall/typings.ts b/x-pack/plugins/apm/common/waterfall/typings.ts new file mode 100644 index 0000000000000..49f282473e9dd --- /dev/null +++ b/x-pack/plugins/apm/common/waterfall/typings.ts @@ -0,0 +1,88 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { Exception } from '../../typings/es_schemas/raw/error_raw'; +import { EventOutcome } from '../../typings/es_schemas/raw/fields/event_outcome'; +import { SpanLink } from '../../typings/es_schemas/raw/fields/span_links'; +import { TimestampUs } from '../../typings/es_schemas/raw/fields/timestamp_us'; +import { AgentName } from '../../typings/es_schemas/ui/fields/agent'; + +export interface WaterfallTransaction { + timestamp: TimestampUs; + trace: { id: string }; + service: { + name: string; + environment?: string; + }; + agent: { name: AgentName }; + event?: { outcome?: EventOutcome }; + parent?: { id?: string }; + processor: { event: 'transaction' }; + transaction: { + duration: { us: number }; + id: string; + name: string; + type: string; + result?: string; + }; + faas?: { + coldstart?: boolean; + }; + span?: { + links?: SpanLink[]; + }; +} + +export interface WaterfallSpan { + timestamp: TimestampUs; + trace: { id: string }; + service: { + name: string; + environment?: string; + }; + agent: { name: AgentName }; + event?: { outcome?: EventOutcome }; + parent?: { id?: string }; + processor: { event: 'span' }; + span: { + id: string; + type: string; + subtype?: string; + action?: string; + name: string; + composite?: { + count: number; + sum: { us: number }; + compression_strategy: string; + }; + sync?: boolean; + duration: { us: number }; + links?: SpanLink[]; + }; + transaction?: { + id: string; + }; + child?: { id: string[] }; +} + +export interface WaterfallError { + timestamp: TimestampUs; + trace?: { id: string }; + transaction?: { id: string }; + parent?: { id: string }; + error: { + id: string; + log?: { + message: string; + }; + exception?: Exception[]; + grouping_key: string; + }; + service: { + name: string; + }; +} diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/distribution/index.test.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/distribution/index.test.tsx index 29232fd144972..d0d441743621c 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/distribution/index.test.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/distribution/index.test.tsx @@ -78,7 +78,7 @@ describe('transaction_details/distribution', () => { describe('TransactionDistribution', () => { it('shows loading indicator when the service is running and returned no results yet', async () => { jest.spyOn(useFetcherModule, 'useFetcher').mockImplementation(() => ({ - data: {}, + data: undefined, refetch: () => {}, status: useFetcherModule.FETCH_STATUS.LOADING, })); @@ -104,11 +104,21 @@ describe('transaction_details/distribution', () => { }); it("doesn't show loading indicator when the service isn't running", async () => { - jest.spyOn(useFetcherModule, 'useFetcher').mockImplementation(() => ({ - data: { percentileThresholdValue: 1234, overallHistogram: [] }, - refetch: () => {}, - status: useFetcherModule.FETCH_STATUS.SUCCESS, - })); + jest + .spyOn(useFetcherModule, 'useFetcher') + .mockImplementationOnce(() => ({ + data: { + traceItems: {}, + entryTransaction: {}, + }, + refetch: () => {}, + status: useFetcherModule.FETCH_STATUS.SUCCESS, + })) + .mockImplementationOnce(() => ({ + data: { percentileThresholdValue: 1234, overallHistogram: [] }, + refetch: () => {}, + status: useFetcherModule.FETCH_STATUS.SUCCESS, + })); render( diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/use_waterfall_fetcher.ts b/x-pack/plugins/apm/public/components/app/transaction_details/use_waterfall_fetcher.ts index 890f5c98cb6fc..7bc854092f958 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/use_waterfall_fetcher.ts +++ b/x-pack/plugins/apm/public/components/app/transaction_details/use_waterfall_fetcher.ts @@ -11,10 +11,13 @@ import { APIReturnType } from '../../../services/rest/create_call_apm_api'; import { getWaterfall } from './waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/waterfall_helpers'; const INITIAL_DATA: APIReturnType<'GET /internal/apm/traces/{traceId}'> = { - errorDocs: [], - traceDocs: [], - exceedsMax: false, - linkedChildrenOfSpanCountBySpanId: {}, + traceItems: { + errorDocs: [], + traceDocs: [], + exceedsMax: false, + spanLinksCountById: {}, + }, + entryTransaction: undefined, }; export type WaterfallFetchResult = ReturnType; @@ -35,25 +38,23 @@ export function useWaterfallFetcher({ error, } = useFetcher( (callApmApi) => { - if (traceId && start && end) { + if (traceId && start && end && transactionId) { return callApmApi('GET /internal/apm/traces/{traceId}', { params: { path: { traceId }, query: { start, end, + entryTransactionId: transactionId, }, }, }); } }, - [traceId, start, end] + [traceId, start, end, transactionId] ); - const waterfall = useMemo( - () => getWaterfall(data, transactionId), - [data, transactionId] - ); + const waterfall = useMemo(() => getWaterfall(data), [data]); return { waterfall, status, error }; } diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/index.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/index.tsx index 508540d9e5ce3..6c08013d8f57a 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/index.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/index.tsx @@ -84,9 +84,9 @@ export function WaterfallWithSummary({ : 0 : sampleActivePage; - const { entryWaterfallTransaction } = waterfallFetchResult.waterfall; + const { entryTransaction } = waterfallFetchResult.waterfall; - if (!entryWaterfallTransaction && traceSamples?.length === 0 && isSucceded) { + if (!entryTransaction && traceSamples?.length === 0 && isSucceded) { return ( ({ ); } - const entryTransaction = entryWaterfallTransaction?.doc; - return ( @@ -158,12 +156,9 @@ export function WaterfallWithSummary({ ) : ( diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/maybe_view_trace_link.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/maybe_view_trace_link.tsx index 40b1944605b58..10d7dadba4609 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/maybe_view_trace_link.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/maybe_view_trace_link.tsx @@ -65,9 +65,9 @@ export function MaybeViewTraceLink({ return ; } - const { rootTransaction } = waterfall; + const { rootWaterfallTransaction } = waterfall; // the traceroot cannot be found, so we cannot link to it - if (!rootTransaction) { + if (!rootWaterfallTransaction) { return ( ; + return ; } function LogsTabContent({ transaction }: { transaction: Transaction }) { diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_error_marks.ts b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_error_marks.ts index 25baf42572d06..2e932c6e27632 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_error_marks.ts +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_error_marks.ts @@ -6,13 +6,13 @@ */ import { isEmpty } from 'lodash'; -import { ErrorRaw } from '../../../../../../../typings/es_schemas/raw/error_raw'; import { IWaterfallError } from '../waterfall/waterfall_helpers/waterfall_helpers'; import { Mark } from '.'; +import { WaterfallError } from '../../../../../../../common/waterfall/typings'; export interface ErrorMark extends Mark { type: 'errorMark'; - error: ErrorRaw; + error: WaterfallError; serviceColor: string; } diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/index.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/index.tsx index d117cb2d982c1..16cd08dbc01b7 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/index.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/index.tsx @@ -67,7 +67,7 @@ export function Waterfall({ const { duration } = waterfall; - const agentMarks = getAgentMarks(waterfall.entryWaterfallTransaction?.doc); + const agentMarks = getAgentMarks(waterfall.entryTransaction); const errorMarks = getErrorMarks(waterfall.errorItems); // Calculate the left margin relative to the deepest level, or 100px, whichever @@ -82,7 +82,7 @@ export function Waterfall({ return ( - {waterfall.apiResponse.exceedsMax && ( + {waterfall.exceedsMax && ( void; spanLinksCount: SpanLinksCount; + onClose: () => void; } +const INITIAL_DATA = { + span: undefined, + parentTransaction: undefined, +}; + export function SpanFlyout({ - span, - parentTransaction, + spanId, + parentTransactionId, + traceId, totalDuration, onClose, spanLinksCount, }: Props) { - if (!span) { - return null; - } + const { data = INITIAL_DATA, status } = useFetcher( + (callApmApi) => { + return callApmApi('GET /internal/apm/traces/{traceId}/spans/{spanId}', { + params: { path: { traceId, spanId }, query: { parentTransactionId } }, + }); + }, + [traceId, spanId, parentTransactionId] + ); - const stackframes = span.span.stacktrace; - const codeLanguage = parentTransaction?.service.language?.name; - const spanDb = span.span.db; - const spanTypes = getSpanTypes(span); - const spanHttpStatusCode = - span.http?.response?.status_code || span.span?.http?.response?.status_code; - const spanHttpUrl = span.url?.original || span.span?.http?.url?.original; - const spanHttpMethod = span.http?.request?.method || span.span?.http?.method; + const { span, parentTransaction } = data; - const spanLinksTabContent = getSpanLinksTabContent({ - spanLinksCount, - traceId: span.trace.id, - spanId: span.span.id, - processorEvent: ProcessorEvent.span, - }); + const isLoading = isPending(status); return ( @@ -129,25 +131,23 @@ export function SpanFlyout({

{i18n.translate( 'xpack.apm.transactionDetails.spanFlyout.spanDetailsTitle', - { - defaultMessage: 'Span details', - } + { defaultMessage: 'Span details' } )}

- - - {i18n.translate( - 'xpack.apm.transactionDetails.spanFlyout.viewSpanInDiscoverButtonLabel', - { - defaultMessage: 'View span in Discover', - } - )} - - + {span && ( + + + {i18n.translate( + 'xpack.apm.transactionDetails.spanFlyout.viewSpanInDiscoverButtonLabel', + { defaultMessage: 'View span in Discover' } + )} + + + )}
- {span.span.composite && ( + {span?.span.composite && ( @@ -164,113 +164,154 @@ export function SpanFlyout({ )} - - - , - <> - - {span.span.composite && ( - - )} - , - - {spanHttpUrl && ( - - )} - - {spanTypes.spanType} - - {spanTypes.spanSubtype && ( - - {spanTypes.spanSubtype} - + {isLoading && } + {span && ( + + )} + + + + ); +} + +function SpanFlyoutBody({ + span, + parentTransaction, + totalDuration, + spanLinksCount, +}: { + span: Span; + parentTransaction?: Transaction; + totalDuration?: number; + spanLinksCount: SpanLinksCount; +}) { + const stackframes = span.span.stacktrace; + const codeLanguage = parentTransaction?.service.language?.name; + const spanDb = span.span.db; + const spanTypes = getSpanTypes(span); + const spanHttpStatusCode = + span.http?.response?.status_code || span.span?.http?.response?.status_code; + const spanHttpUrl = span.url?.original || span.span?.http?.url?.original; + const spanHttpMethod = span.http?.request?.method || span.span?.http?.method; + + const spanLinksTabContent = getSpanLinksTabContent({ + spanLinksCount, + traceId: span.trace.id, + spanId: span.span.id, + processorEvent: ProcessorEvent.span, + }); + return ( + <> + + + , + <> + + {span.span.composite && ( + + )} + , + + {spanHttpUrl && ( + + )} + + {spanTypes.spanType} + + {spanTypes.spanSubtype && ( + - {spanTypes.spanAction} - + > + {spanTypes.spanSubtype} + + )} + {spanTypes.spanAction && ( + + {spanTypes.spanAction} + + )} - + - - , - ]} - /> - - - + , + ]} + /> + + + - - - - ), - }, - ...(!isEmpty(stackframes) - ? [ + defaultMessage: 'Metadata', + } + ), + content: ( + + + + + ), + }, + ...(!isEmpty(stackframes) + ? [ + { + id: 'stack-trace', + name: i18n.translate( + 'xpack.apm.transactionDetails.spanFlyout.stackTraceTabLabel', { - id: 'stack-trace', - name: i18n.translate( - 'xpack.apm.transactionDetails.spanFlyout.stackTraceTabLabel', - { - defaultMessage: 'Stack Trace', - } - ), - content: ( - - - - - ), - }, - ] - : []), - ...(spanLinksTabContent ? [spanLinksTabContent] : []), - ]} - /> - - - + defaultMessage: 'Stack Trace', + } + ), + content: ( + + + + + ), + }, + ] + : []), + ...(spanLinksTabContent ? [spanLinksTabContent] : []), + ]} + /> + ); } diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/span_flyout.stories.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/span_flyout.stories.tsx index ceb0c7d9d1cf5..a6731812d33a6 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/span_flyout.stories.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/span_flyout.stories.tsx @@ -4,21 +4,88 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - +import { apm, dedot } from '@kbn/apm-synthtrace'; +import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { Story } from '@storybook/react'; import React, { ComponentProps, ComponentType } from 'react'; import { SpanFlyout } from '.'; +import { Span } from '../../../../../../../../typings/es_schemas/ui/span'; +import { Transaction } from '../../../../../../../../typings/es_schemas/ui/transaction'; +import { ApmPluginContextValue } from '../../../../../../../context/apm_plugin/apm_plugin_context'; import { MockApmPluginStorybook } from '../../../../../../../context/apm_plugin/mock_apm_plugin_storybook'; +import { APIReturnType } from '../../../../../../../services/rest/create_call_apm_api'; type Args = ComponentProps; +type SpanDetailsApiReturnType = + APIReturnType<'GET /internal/apm/traces/{traceId}/spans/{spanId}'>; + +function generateData() { + const serviceName = 'synth-apple'; + const instanceJava = apm + .service({ + name: serviceName, + environment: 'production', + agentName: 'java', + }) + .instance('instance-b'); + const events = instanceJava + .transaction({ transactionName: 'GET /apple 🍏' }) + .timestamp(1) + .duration(1000) + .failure() + .errors( + instanceJava + .error({ message: '[ResponseError] index_not_found_exception' }) + .timestamp(50) + ) + .children( + instanceJava + .span({ + spanName: 'get_green_apple_🍏', + spanType: 'db', + spanSubtype: 'elasticsearch', + }) + .timestamp(50) + .duration(900) + .success() + ) + .serialize(); + const spanEvent = events.find( + (event) => event['processor.event'] === ProcessorEvent.span + )!; + + const parentTransaction = events.find( + (event) => event['transaction.id'] === spanEvent['parent.id'] + )!; + return { events, spanEvent, parentTransaction }; +} + +const data = generateData(); export default { title: 'app/TransactionDetails/waterfall/SpanFlyout', component: SpanFlyout, decorators: [ (StoryComponent: ComponentType) => { + const coreMock = { + http: { + get: async (): Promise => { + return { + span: dedot(data.spanEvent, {}) as Span, + parentTransaction: dedot( + data.parentTransaction, + {} + ) as Transaction, + }; + }, + }, + }; + return ( - + ); @@ -26,292 +93,14 @@ export default { ], }; -export const TransactionSpan: Story = (args) => { - return ; -}; -TransactionSpan.args = { - totalDuration: 7589, - span: { - parent: { - id: '969fe48e33f4e13c', - }, - agent: { - name: 'ruby', - version: '4.2.0', - }, - processor: { - name: 'transaction', - event: 'span', - }, - observer: { - hostname: 'apm-apm-server-59fb846665-mjb2l', - id: '1e6ecda2-1347-4800-b5d1-6d9eb3805d1d', - ephemeral_id: 'd810d578-a7fe-4c7d-8897-b502db141800', - type: 'apm-server', - version: '8.0.0', - version_major: 8, - }, - trace: { - id: '1d63e25e7345627176e172ae690f9462', - }, - '@timestamp': '2021-07-28T02:24:31.803Z', - service: { - environment: 'production', - name: 'opbeans-ruby', - }, - transaction: { - id: '969fe48e33f4e13c', - }, - timestamp: { - us: 1627439071803773, - }, - span: { - duration: { - us: 5613, - }, - subtype: 'controller', - name: 'Api::CustomersController#index', - action: 'action', - id: 'dda84b0e3632fbb1', - type: 'app', - }, - }, - parentTransaction: { - container: { - id: '399a87146c0036592f6ee78553324b10c00757e024143913c97993384751e15e', - }, - kubernetes: { - pod: { - uid: 'dab8ed46-bab6-427c-ba79-6518cc17b60e', - }, - }, - process: { - args: ['-C', 'config/puma.rb'], - pid: 41, - title: '/usr/local/bundle/bin/puma', - }, - agent: { - name: 'ruby', - version: '4.2.0', - }, - processor: { - name: 'transaction', - event: 'transaction', - }, - url: { - domain: '10.43.242.237', - full: 'http://10.43.242.237:3000/api/customers', - }, - labels: { - company: 'opbeans', - }, - cloud: { - availability_zone: 'europe-west1-c', - instance: { - name: 'gke-edge-oblt-gcp-edge-oblt-gcp-pool-b6b9e929-92m2', - id: '4295368814211072338', - }, - provider: 'gcp', - machine: { - type: 'projects/8560181848/machineTypes/n1-standard-4', - }, - project: { - name: 'elastic-observability', - id: '8560181848', - }, - region: 'europe-west1', - }, - observer: { - hostname: 'apm-apm-server-59fb846665-k7grs', - id: 'fcd83d41-d48c-4c84-8aa0-6bb9d4fe374d', - type: 'apm-server', - ephemeral_id: 'e325639d-aac5-4b94-a02d-19836ccdc17f', - version: '8.0.0', - version_major: 8, - }, - trace: { - id: '1d63e25e7345627176e172ae690f9462', - }, - '@timestamp': '2021-07-28T02:24:31.802Z', - ecs: { - version: '1.10.0', - }, - service: { - node: { - name: '399a87146c0036592f6ee78553324b10c00757e024143913c97993384751e15e', - }, - environment: 'production', - framework: { - name: 'Ruby on Rails', - version: '6.1.4', - }, - name: 'opbeans-ruby', - runtime: { - name: 'ruby', - version: '2.7.3', - }, - language: { - name: 'ruby', - version: '2.7.3', - }, - version: '2021-07-27 03:47:02', - }, - host: { - os: { - platform: 'linux', - }, - ip: '10.40.0.249', - architecture: 'x86_64', - }, - http: { - request: { - headers: { - Accept: ['*/*'], - Version: ['HTTP/1.1'], - 'User-Agent': ['Python/3.7 aiohttp/3.3.2'], - Host: ['10.43.242.237:3000'], - 'Accept-Encoding': ['gzip, deflate'], - }, - method: 'GET', - 'body.original': '[SKIPPED]', - socket: { - encrypted: false, - }, - env: { - ORIGINAL_FULLPATH: '/api/customers', - GATEWAY_INTERFACE: 'CGI/1.2', - SERVER_PORT: '3000', - SERVER_PROTOCOL: 'HTTP/1.1', - REQUEST_URI: '/api/customers', - REMOTE_ADDR: '10.40.3.37', - ORIGINAL_SCRIPT_NAME: '', - SERVER_SOFTWARE: 'puma 5.3.2 Sweetnighter', - QUERY_STRING: '', - ROUTES_9220_SCRIPT_NAME: '', - SCRIPT_NAME: '', - REQUEST_METHOD: 'GET', - REQUEST_PATH: '/api/customers', - SERVER_NAME: '10.43.242.237', - PATH_INFO: '/api/customers', - }, - }, - response: { - headers: { - 'X-Frame-Options': ['SAMEORIGIN'], - 'Referrer-Policy': ['strict-origin-when-cross-origin'], - Etag: ['W/"5eb0bc6061d718b6394c1a21d1fbc1fd"'], - 'Cache-Control': ['max-age=0, private, must-revalidate'], - 'X-Request-Id': ['db52f681-e7c2-4f44-b995-e17aa8ba8346'], - 'X-Content-Type-Options': ['nosniff'], - 'X-Runtime': ['0.007023'], - 'X-Xss-Protection': ['1; mode=block'], - 'X-Download-Options': ['noopen'], - Vary: ['Accept'], - 'X-Permitted-Cross-Domain-Policies': ['none'], - 'Content-Type': ['application/json; charset=utf-8'], - }, - status_code: 200, - finished: true, - headers_sent: true, - }, - version: '1.1', - }, - user: { - id: '3229', - }, - user_agent: { - original: 'Python/3.7 aiohttp/3.3.2', - name: 'Python aiohttp', - device: { - name: 'Other', - }, - version: '3.3.2', - }, - transaction: { - duration: { - us: 7589, - }, - result: 'HTTP 2xx', - name: 'Api::CustomersController#index', - span_count: { - dropped: 0, - started: 2, - }, - id: '969fe48e33f4e13c', - type: 'request', - sampled: true, - }, - timestamp: { - us: 1627439071802242, - }, - }, - spanLinksCount: { - linkedChildren: 0, - linkedParents: 0, - }, -}; - -export const DatabaseSpan: Story = (args) => { - return ; -}; -DatabaseSpan.args = { - totalDuration: 7589, - span: { - parent: { - id: 'dda84b0e3632fbb1', - }, - agent: { - name: 'ruby', - version: '4.2.0', - }, - processor: { - name: 'transaction', - event: 'span', - }, - observer: { - hostname: 'apm-apm-server-59fb846665-mjb2l', - id: '1e6ecda2-1347-4800-b5d1-6d9eb3805d1d', - type: 'apm-server', - ephemeral_id: 'd810d578-a7fe-4c7d-8897-b502db141800', - version: '8.0.0', - version_major: 8, - }, - trace: { - id: '1d63e25e7345627176e172ae690f9462', - }, - '@timestamp': '2021-07-28T02:24:31.805Z', - service: { - environment: 'production', - name: 'opbeans-ruby', - }, - transaction: { - id: '969fe48e33f4e13c', - }, - span: { - duration: { - us: 1234, - }, - subtype: 'postgresql', - destination: { - service: { - resource: 'postgresql', - }, - }, - name: 'SELECT FROM customers', - action: 'sql', - id: 'da4c078e1bc72004', - type: 'db', - db: { - statement: 'SELECT "customers".* FROM "customers"', - type: 'sql', - }, - }, - timestamp: { - us: 1627439071805402, - }, - }, - spanLinksCount: { - linkedChildren: 0, - linkedParents: 0, - }, +export const TransactionSpan: Story = () => { + return ( + {}} + /> + ); }; diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/transaction_flyout/index.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/transaction_flyout/index.tsx index b2b5539851a7e..cf3f5652b24a4 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/transaction_flyout/index.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/transaction_flyout/index.tsx @@ -11,6 +11,7 @@ import { EuiFlyoutBody, EuiFlyoutHeader, EuiHorizontalRule, + EuiLoadingContent, EuiPortal, EuiSpacer, EuiTabbedContent, @@ -20,6 +21,7 @@ import { i18n } from '@kbn/i18n'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import React from 'react'; import { Transaction } from '../../../../../../../../typings/es_schemas/ui/transaction'; +import { useFetcher, isPending } from '../../../../../../../hooks/use_fetcher'; import { TransactionMetadata } from '../../../../../../shared/metadata_table/transaction_metadata'; import { getSpanLinksTabContent } from '../../../../../../shared/span_links/span_links_tab_content'; import { TransactionSummary } from '../../../../../../shared/summary/transaction_summary'; @@ -30,30 +32,33 @@ import { SpanLinksCount } from '../waterfall_helpers/waterfall_helpers'; import { DroppedSpansWarning } from './dropped_spans_warning'; interface Props { + transactionId: string; + traceId: string; onClose: () => void; - transaction?: Transaction; errorCount?: number; rootTransactionDuration?: number; spanLinksCount: SpanLinksCount; } export function TransactionFlyout({ - transaction: transactionDoc, + transactionId, + traceId, onClose, errorCount = 0, rootTransactionDuration, spanLinksCount, }: Props) { - if (!transactionDoc) { - return null; - } + const { data: transaction, status } = useFetcher( + (callApmApi) => { + return callApmApi( + 'GET /internal/apm/traces/{traceId}/transactions/{transactionId}', + { params: { path: { traceId, transactionId } } } + ); + }, + [traceId, transactionId] + ); - const spanLinksTabContent = getSpanLinksTabContent({ - spanLinksCount, - traceId: transactionDoc.trace.id, - spanId: transactionDoc.transaction.id, - processorEvent: ProcessorEvent.transaction, - }); + const isLoading = isPending(status); return ( @@ -73,47 +78,84 @@ export function TransactionFlyout({ - - - + {transaction && ( + + + + )} - - - - - - - - - - ), - }, - ...(spanLinksTabContent ? [spanLinksTabContent] : []), - ]} - /> + {isLoading && } + {transaction && ( + + )} ); } + +function TransactionFlyoutBody({ + transaction, + errorCount, + rootTransactionDuration, + spanLinksCount, +}: { + transaction: Transaction; + errorCount: number; + rootTransactionDuration?: number; + spanLinksCount: SpanLinksCount; +}) { + const spanLinksTabContent = getSpanLinksTabContent({ + spanLinksCount, + traceId: transaction.trace.id, + spanId: transaction.transaction.id, + processorEvent: ProcessorEvent.transaction, + }); + + return ( + <> + + + + + + + + + + ), + }, + ...(spanLinksTabContent ? [spanLinksTabContent] : []), + ]} + /> + + ); +} diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/transaction_flyout/transaction_flyout.stories.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/transaction_flyout/transaction_flyout.stories.tsx index 6e3075069841a..0641600daf5b6 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/transaction_flyout/transaction_flyout.stories.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/transaction_flyout/transaction_flyout.stories.tsx @@ -4,21 +4,72 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - +import { apm, dedot } from '@kbn/apm-synthtrace'; import { Story } from '@storybook/react'; import React, { ComponentProps, ComponentType } from 'react'; import { TransactionFlyout } from '.'; +import { Transaction } from '../../../../../../../../typings/es_schemas/ui/transaction'; +import { ApmPluginContextValue } from '../../../../../../../context/apm_plugin/apm_plugin_context'; import { MockApmPluginStorybook } from '../../../../../../../context/apm_plugin/mock_apm_plugin_storybook'; +import { APIReturnType } from '../../../../../../../services/rest/create_call_apm_api'; type Args = ComponentProps; +type TransactionDetailsApiReturnType = + APIReturnType<'GET /internal/apm/traces/{traceId}/transactions/{transactionId}'>; + +function generateData() { + const serviceName = 'synth-apple'; + const instanceJava = apm + .service({ + name: serviceName, + environment: 'production', + agentName: 'java', + }) + .instance('instance-b'); + const events = instanceJava + .transaction({ transactionName: 'GET /apple 🍏' }) + .timestamp(1) + .duration(1000) + .failure() + .errors( + instanceJava + .error({ message: '[ResponseError] index_not_found_exception' }) + .timestamp(50) + ) + .children( + instanceJava + .span({ + spanName: 'get_green_apple_🍏', + spanType: 'db', + spanSubtype: 'elasticsearch', + }) + .timestamp(50) + .duration(900) + .success() + ) + .serialize(); + return { events, transactionEvent: events[0] }; +} + +const data = generateData(); export default { title: 'app/TransactionDetails/waterfall/TransactionFlyout', component: TransactionFlyout, decorators: [ (StoryComponent: ComponentType) => { + const coreMock = { + http: { + get: async (): Promise => { + return dedot(data.transactionEvent, {}) as Transaction; + }, + }, + }; return ( - + ); @@ -26,150 +77,13 @@ export default { ], }; -export const Example: Story = (args) => { - return ; -}; -Example.args = { - transaction: { - container: { - id: '4810e1f4da909044f1f6f56be41a542dc59784948f059769d6a590952deca405', - }, - kubernetes: { - pod: { - uid: 'c44f58b9-d1fa-4341-a40a-4fdcac0ec4d0', - name: 'opbeans-java-6995b65cc9-gtwzd', - }, - }, - agent: { - name: 'java', - ephemeral_id: '12f7e44a-8b1d-467b-afe0-46b9a1c60535', - version: '1.25.1-SNAPSHOT.UNKNOWN', - }, - process: { - pid: 8, - title: '/opt/java/openjdk/bin/java', - ppid: 1, - }, - processor: { - name: 'transaction', - event: 'transaction', - }, - url: { - domain: '10.43.242.237', - full: 'http://10.43.242.237:3000/api/orders', - }, - cloud: { - availability_zone: 'europe-west1-c', - instance: { - name: 'gke-edge-oblt-gcp-edge-oblt-gcp-pool-b6b9e929-92m2', - id: '4295368814211072338', - }, - provider: 'gcp', - machine: { - type: 'n1-standard-4', - }, - project: { - name: 'elastic-observability', - id: '8560181848', - }, - region: 'europe-west1', - }, - observer: { - hostname: 'apm-apm-server-57659d6b4c-zvspw', - id: 'ab52d330-8ad1-4eb2-b692-92b8fa2ddcce', - type: 'apm-server', - ephemeral_id: 'aeb9add4-1ee1-4194-bbea-989de999c44a', - version: '8.0.0', - version_major: 8, - }, - trace: { - id: 'b80358b455b1075670cbc5fe57aa6d64', - }, - '@timestamp': '2021-07-28T17:34:04.335Z', - ecs: { - version: '1.10.0', - }, - service: { - node: { - name: '4810e1f4da909044f1f6f56be41a542dc59784948f059769d6a590952deca405', - }, - environment: 'production', - framework: { - name: 'Servlet API', - }, - name: 'opbeans-java', - runtime: { - name: 'Java', - version: '11.0.11', - }, - language: { - name: 'Java', - version: '11.0.11', - }, - version: '2021-07-28 03:47:59', - }, - host: { - os: { - platform: 'Linux', - }, - ip: '10.40.0.104', - architecture: 'amd64', - }, - http: { - request: { - headers: { - Accept: ['*/*'], - 'User-Agent': ['Python/3.7 aiohttp/3.3.2'], - Host: ['10.43.242.237:3000'], - 'Accept-Encoding': ['gzip, deflate'], - }, - method: 'GET', - socket: { - encrypted: false, - remote_address: '10.40.2.215', - }, - }, - response: { - headers: { - 'Transfer-Encoding': ['chunked'], - Date: ['Wed, 28 Jul 2021 17:34:04 GMT'], - 'Content-Type': ['application/json;charset=ISO-8859-1'], - }, - status_code: 200, - finished: true, - headers_sent: true, - }, - version: '1.1', - }, - transaction: { - duration: { - us: 23961, - }, - result: 'HTTP 2xx', - name: 'DispatcherServlet#doGet', - id: 'ade1f180d840845c', - span_count: { - dropped: 0, - started: 1, - }, - type: 'request', - sampled: true, - }, - user_agent: { - original: 'Python/3.7 aiohttp/3.3.2', - name: 'Python aiohttp', - device: { - name: 'Other', - }, - version: '3.3.2', - }, - timestamp: { - us: 1627493644335001, - }, - }, - rootTransactionDuration: 23961, - spanLinksCount: { - linkedChildren: 0, - linkedParents: 0, - }, +export const Example: Story = () => { + return ( + {}} + transactionId={data.transactionEvent['transaction.id']!} + traceId={data.transactionEvent['trace.id']!} + spanLinksCount={{ linkedChildren: 0, linkedParents: 0 }} + /> + ); }; diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_flyout.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_flyout.tsx index bd0ab44e0e208..db8460f23a6cf 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_flyout.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_flyout.tsx @@ -34,16 +34,17 @@ export function WaterfallFlyout({ switch (currentItem.docType) { case 'span': - const parentTransaction = + const parentTransactionId = currentItem.parent?.docType === 'transaction' - ? currentItem.parent?.doc + ? currentItem.parentId : undefined; return ( toggleFlyout({ history })} spanLinksCount={currentItem.spanLinksCount} /> @@ -51,11 +52,10 @@ export function WaterfallFlyout({ case 'transaction': return ( toggleFlyout({ history })} - rootTransactionDuration={ - waterfall.rootTransaction?.transaction.duration.us - } + rootTransactionDuration={waterfall.rootWaterfallTransaction?.duration} errorCount={waterfall.getErrorCount(currentItem.id)} spanLinksCount={currentItem.spanLinksCount} /> diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/__snapshots__/waterfall_helpers.test.ts.snap b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/__snapshots__/waterfall_helpers.test.ts.snap index ad296743c6031..d1bb2e73e62f9 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/__snapshots__/waterfall_helpers.test.ts.snap +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/__snapshots__/waterfall_helpers.test.ts.snap @@ -1,2857 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`waterfall_helpers getWaterfall should return full waterfall 1`] = ` -Object { - "childrenByParentId": Object { - "mySpanIdA": Array [ - Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "mySpanIdA", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "span": Object { - "duration": Object { - "us": 481, - }, - "id": "mySpanIdB", - "name": "SELECT FROM products", - }, - "timestamp": Object { - "us": 1549324795825633, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId2", - }, - }, - "docType": "span", - "duration": 481, - "id": "mySpanIdB", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": undefined, - }, - "offset": 41627, - "parent": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "myTransactionId2", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "span": Object { - "duration": Object { - "us": 6161, - }, - "id": "mySpanIdA", - "name": "Api::ProductsController#index", - }, - "timestamp": Object { - "us": 1549324795824504, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId2", - }, - }, - "docType": "span", - "duration": 6161, - "id": "mySpanIdA", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": undefined, - }, - "offset": 40498, - "parent": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "mySpanIdD", - }, - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "timestamp": Object { - "us": 1549324795823304, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 8634, - }, - "id": "myTransactionId2", - "marks": Object { - "agent": Object { - "domComplete": 383, - "domInteractive": 382, - "timeToFirstByte": 14, - }, - }, - "name": "Api::ProductsController#index", - }, - }, - "docType": "transaction", - "duration": 8634, - "id": "myTransactionId2", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": "", - }, - "offset": 39298, - "parent": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "myTransactionId1", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-node", - }, - "span": Object { - "duration": Object { - "us": 47557, - }, - "id": "mySpanIdD", - "name": "GET opbeans-ruby:3000/api/products", - }, - "timestamp": Object { - "us": 1549324795785760, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId1", - }, - }, - "docType": "span", - "duration": 47557, - "id": "mySpanIdD", - "legendValues": Object { - "serviceName": "opbeans-node", - "spanType": undefined, - }, - "offset": 1754, - "parent": Object { - "color": "", - "doc": Object { - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-node", - }, - "timestamp": Object { - "us": 1549324795784006, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 49660, - }, - "id": "myTransactionId1", - "name": "GET /api", - }, - }, - "docType": "transaction", - "duration": 49660, - "id": "myTransactionId1", - "legendValues": Object { - "serviceName": "opbeans-node", - "spanType": "", - }, - "offset": 0, - "parent": undefined, - "parentId": undefined, - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "myTransactionId1", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "mySpanIdD", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "myTransactionId2", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "mySpanIdA", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "mySpanIdA", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "span": Object { - "duration": Object { - "us": 532, - }, - "id": "mySpanIdC", - "name": "SELECT FROM product", - }, - "timestamp": Object { - "us": 1549324795827905, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId2", - }, - }, - "docType": "span", - "duration": 532, - "id": "mySpanIdC", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": undefined, - }, - "offset": 43899, - "parent": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "myTransactionId2", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "span": Object { - "duration": Object { - "us": 6161, - }, - "id": "mySpanIdA", - "name": "Api::ProductsController#index", - }, - "timestamp": Object { - "us": 1549324795824504, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId2", - }, - }, - "docType": "span", - "duration": 6161, - "id": "mySpanIdA", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": undefined, - }, - "offset": 40498, - "parent": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "mySpanIdD", - }, - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "timestamp": Object { - "us": 1549324795823304, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 8634, - }, - "id": "myTransactionId2", - "marks": Object { - "agent": Object { - "domComplete": 383, - "domInteractive": 382, - "timeToFirstByte": 14, - }, - }, - "name": "Api::ProductsController#index", - }, - }, - "docType": "transaction", - "duration": 8634, - "id": "myTransactionId2", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": "", - }, - "offset": 39298, - "parent": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "myTransactionId1", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-node", - }, - "span": Object { - "duration": Object { - "us": 47557, - }, - "id": "mySpanIdD", - "name": "GET opbeans-ruby:3000/api/products", - }, - "timestamp": Object { - "us": 1549324795785760, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId1", - }, - }, - "docType": "span", - "duration": 47557, - "id": "mySpanIdD", - "legendValues": Object { - "serviceName": "opbeans-node", - "spanType": undefined, - }, - "offset": 1754, - "parent": Object { - "color": "", - "doc": Object { - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-node", - }, - "timestamp": Object { - "us": 1549324795784006, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 49660, - }, - "id": "myTransactionId1", - "name": "GET /api", - }, - }, - "docType": "transaction", - "duration": 49660, - "id": "myTransactionId1", - "legendValues": Object { - "serviceName": "opbeans-node", - "spanType": "", - }, - "offset": 0, - "parent": undefined, - "parentId": undefined, - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "myTransactionId1", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "mySpanIdD", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "myTransactionId2", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "mySpanIdA", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - ], - "mySpanIdD": Array [ - Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "mySpanIdD", - }, - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "timestamp": Object { - "us": 1549324795823304, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 8634, - }, - "id": "myTransactionId2", - "marks": Object { - "agent": Object { - "domComplete": 383, - "domInteractive": 382, - "timeToFirstByte": 14, - }, - }, - "name": "Api::ProductsController#index", - }, - }, - "docType": "transaction", - "duration": 8634, - "id": "myTransactionId2", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": "", - }, - "offset": 39298, - "parent": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "myTransactionId1", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-node", - }, - "span": Object { - "duration": Object { - "us": 47557, - }, - "id": "mySpanIdD", - "name": "GET opbeans-ruby:3000/api/products", - }, - "timestamp": Object { - "us": 1549324795785760, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId1", - }, - }, - "docType": "span", - "duration": 47557, - "id": "mySpanIdD", - "legendValues": Object { - "serviceName": "opbeans-node", - "spanType": undefined, - }, - "offset": 1754, - "parent": Object { - "color": "", - "doc": Object { - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-node", - }, - "timestamp": Object { - "us": 1549324795784006, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 49660, - }, - "id": "myTransactionId1", - "name": "GET /api", - }, - }, - "docType": "transaction", - "duration": 49660, - "id": "myTransactionId1", - "legendValues": Object { - "serviceName": "opbeans-node", - "spanType": "", - }, - "offset": 0, - "parent": undefined, - "parentId": undefined, - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "myTransactionId1", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "mySpanIdD", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - ], - "myTransactionId1": Array [ - Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "myTransactionId1", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-node", - }, - "span": Object { - "duration": Object { - "us": 47557, - }, - "id": "mySpanIdD", - "name": "GET opbeans-ruby:3000/api/products", - }, - "timestamp": Object { - "us": 1549324795785760, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId1", - }, - }, - "docType": "span", - "duration": 47557, - "id": "mySpanIdD", - "legendValues": Object { - "serviceName": "opbeans-node", - "spanType": undefined, - }, - "offset": 1754, - "parent": Object { - "color": "", - "doc": Object { - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-node", - }, - "timestamp": Object { - "us": 1549324795784006, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 49660, - }, - "id": "myTransactionId1", - "name": "GET /api", - }, - }, - "docType": "transaction", - "duration": 49660, - "id": "myTransactionId1", - "legendValues": Object { - "serviceName": "opbeans-node", - "spanType": "", - }, - "offset": 0, - "parent": undefined, - "parentId": undefined, - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "myTransactionId1", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - ], - "myTransactionId2": Array [ - Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "myTransactionId2", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "span": Object { - "duration": Object { - "us": 6161, - }, - "id": "mySpanIdA", - "name": "Api::ProductsController#index", - }, - "timestamp": Object { - "us": 1549324795824504, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId2", - }, - }, - "docType": "span", - "duration": 6161, - "id": "mySpanIdA", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": undefined, - }, - "offset": 40498, - "parent": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "mySpanIdD", - }, - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "timestamp": Object { - "us": 1549324795823304, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 8634, - }, - "id": "myTransactionId2", - "marks": Object { - "agent": Object { - "domComplete": 383, - "domInteractive": 382, - "timeToFirstByte": 14, - }, - }, - "name": "Api::ProductsController#index", - }, - }, - "docType": "transaction", - "duration": 8634, - "id": "myTransactionId2", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": "", - }, - "offset": 39298, - "parent": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "myTransactionId1", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-node", - }, - "span": Object { - "duration": Object { - "us": 47557, - }, - "id": "mySpanIdD", - "name": "GET opbeans-ruby:3000/api/products", - }, - "timestamp": Object { - "us": 1549324795785760, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId1", - }, - }, - "docType": "span", - "duration": 47557, - "id": "mySpanIdD", - "legendValues": Object { - "serviceName": "opbeans-node", - "spanType": undefined, - }, - "offset": 1754, - "parent": Object { - "color": "", - "doc": Object { - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-node", - }, - "timestamp": Object { - "us": 1549324795784006, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 49660, - }, - "id": "myTransactionId1", - "name": "GET /api", - }, - }, - "docType": "transaction", - "duration": 49660, - "id": "myTransactionId1", - "legendValues": Object { - "serviceName": "opbeans-node", - "spanType": "", - }, - "offset": 0, - "parent": undefined, - "parentId": undefined, - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "myTransactionId1", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "mySpanIdD", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "myTransactionId2", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - ], - "root": Array [ - Object { - "color": "", - "doc": Object { - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-node", - }, - "timestamp": Object { - "us": 1549324795784006, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 49660, - }, - "id": "myTransactionId1", - "name": "GET /api", - }, - }, - "docType": "transaction", - "duration": 49660, - "id": "myTransactionId1", - "legendValues": Object { - "serviceName": "opbeans-node", - "spanType": "", - }, - "offset": 0, - "parent": undefined, - "parentId": undefined, - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - ], - }, - "duration": 49660, - "entryWaterfallTransaction": Object { - "color": "", - "doc": Object { - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-node", - }, - "timestamp": Object { - "us": 1549324795784006, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 49660, - }, - "id": "myTransactionId1", - "name": "GET /api", - }, - }, - "docType": "transaction", - "duration": 49660, - "id": "myTransactionId1", - "legendValues": Object { - "serviceName": "opbeans-node", - "spanType": "", - }, - "offset": 0, - "parent": undefined, - "parentId": undefined, - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "errorItems": Array [ - Object { - "color": "", - "doc": Object { - "agent": Object { - "name": "ruby", - "version": "2", - }, - "error": Object { - "grouping_key": "errorGroupingKey1", - "id": "error1", - "log": Object { - "message": "error message", - }, - }, - "parent": Object { - "id": "myTransactionId1", - }, - "processor": Object { - "event": "error", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "timestamp": Object { - "us": 1549324795810000, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId1", - }, - }, - "docType": "error", - "id": "error1", - "offset": 25994, - "parent": Object { - "color": "", - "doc": Object { - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-node", - }, - "timestamp": Object { - "us": 1549324795784006, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 49660, - }, - "id": "myTransactionId1", - "name": "GET /api", - }, - }, - "docType": "transaction", - "duration": 49660, - "id": "myTransactionId1", - "legendValues": Object { - "serviceName": "opbeans-node", - "spanType": "", - }, - "offset": 0, - "parent": undefined, - "parentId": undefined, - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "myTransactionId1", - "skew": 0, - }, - ], - "getErrorCount": [Function], - "items": Array [ - Object { - "color": "", - "doc": Object { - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-node", - }, - "timestamp": Object { - "us": 1549324795784006, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 49660, - }, - "id": "myTransactionId1", - "name": "GET /api", - }, - }, - "docType": "transaction", - "duration": 49660, - "id": "myTransactionId1", - "legendValues": Object { - "serviceName": "opbeans-node", - "spanType": "", - }, - "offset": 0, - "parent": undefined, - "parentId": undefined, - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "myTransactionId1", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-node", - }, - "span": Object { - "duration": Object { - "us": 47557, - }, - "id": "mySpanIdD", - "name": "GET opbeans-ruby:3000/api/products", - }, - "timestamp": Object { - "us": 1549324795785760, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId1", - }, - }, - "docType": "span", - "duration": 47557, - "id": "mySpanIdD", - "legendValues": Object { - "serviceName": "opbeans-node", - "spanType": undefined, - }, - "offset": 1754, - "parent": Object { - "color": "", - "doc": Object { - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-node", - }, - "timestamp": Object { - "us": 1549324795784006, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 49660, - }, - "id": "myTransactionId1", - "name": "GET /api", - }, - }, - "docType": "transaction", - "duration": 49660, - "id": "myTransactionId1", - "legendValues": Object { - "serviceName": "opbeans-node", - "spanType": "", - }, - "offset": 0, - "parent": undefined, - "parentId": undefined, - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "myTransactionId1", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "mySpanIdD", - }, - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "timestamp": Object { - "us": 1549324795823304, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 8634, - }, - "id": "myTransactionId2", - "marks": Object { - "agent": Object { - "domComplete": 383, - "domInteractive": 382, - "timeToFirstByte": 14, - }, - }, - "name": "Api::ProductsController#index", - }, - }, - "docType": "transaction", - "duration": 8634, - "id": "myTransactionId2", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": "", - }, - "offset": 39298, - "parent": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "myTransactionId1", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-node", - }, - "span": Object { - "duration": Object { - "us": 47557, - }, - "id": "mySpanIdD", - "name": "GET opbeans-ruby:3000/api/products", - }, - "timestamp": Object { - "us": 1549324795785760, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId1", - }, - }, - "docType": "span", - "duration": 47557, - "id": "mySpanIdD", - "legendValues": Object { - "serviceName": "opbeans-node", - "spanType": undefined, - }, - "offset": 1754, - "parent": Object { - "color": "", - "doc": Object { - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-node", - }, - "timestamp": Object { - "us": 1549324795784006, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 49660, - }, - "id": "myTransactionId1", - "name": "GET /api", - }, - }, - "docType": "transaction", - "duration": 49660, - "id": "myTransactionId1", - "legendValues": Object { - "serviceName": "opbeans-node", - "spanType": "", - }, - "offset": 0, - "parent": undefined, - "parentId": undefined, - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "myTransactionId1", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "mySpanIdD", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "myTransactionId2", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "span": Object { - "duration": Object { - "us": 6161, - }, - "id": "mySpanIdA", - "name": "Api::ProductsController#index", - }, - "timestamp": Object { - "us": 1549324795824504, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId2", - }, - }, - "docType": "span", - "duration": 6161, - "id": "mySpanIdA", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": undefined, - }, - "offset": 40498, - "parent": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "mySpanIdD", - }, - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "timestamp": Object { - "us": 1549324795823304, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 8634, - }, - "id": "myTransactionId2", - "marks": Object { - "agent": Object { - "domComplete": 383, - "domInteractive": 382, - "timeToFirstByte": 14, - }, - }, - "name": "Api::ProductsController#index", - }, - }, - "docType": "transaction", - "duration": 8634, - "id": "myTransactionId2", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": "", - }, - "offset": 39298, - "parent": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "myTransactionId1", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-node", - }, - "span": Object { - "duration": Object { - "us": 47557, - }, - "id": "mySpanIdD", - "name": "GET opbeans-ruby:3000/api/products", - }, - "timestamp": Object { - "us": 1549324795785760, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId1", - }, - }, - "docType": "span", - "duration": 47557, - "id": "mySpanIdD", - "legendValues": Object { - "serviceName": "opbeans-node", - "spanType": undefined, - }, - "offset": 1754, - "parent": Object { - "color": "", - "doc": Object { - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-node", - }, - "timestamp": Object { - "us": 1549324795784006, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 49660, - }, - "id": "myTransactionId1", - "name": "GET /api", - }, - }, - "docType": "transaction", - "duration": 49660, - "id": "myTransactionId1", - "legendValues": Object { - "serviceName": "opbeans-node", - "spanType": "", - }, - "offset": 0, - "parent": undefined, - "parentId": undefined, - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "myTransactionId1", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "mySpanIdD", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "myTransactionId2", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "mySpanIdA", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "span": Object { - "duration": Object { - "us": 481, - }, - "id": "mySpanIdB", - "name": "SELECT FROM products", - }, - "timestamp": Object { - "us": 1549324795825633, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId2", - }, - }, - "docType": "span", - "duration": 481, - "id": "mySpanIdB", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": undefined, - }, - "offset": 41627, - "parent": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "myTransactionId2", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "span": Object { - "duration": Object { - "us": 6161, - }, - "id": "mySpanIdA", - "name": "Api::ProductsController#index", - }, - "timestamp": Object { - "us": 1549324795824504, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId2", - }, - }, - "docType": "span", - "duration": 6161, - "id": "mySpanIdA", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": undefined, - }, - "offset": 40498, - "parent": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "mySpanIdD", - }, - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "timestamp": Object { - "us": 1549324795823304, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 8634, - }, - "id": "myTransactionId2", - "marks": Object { - "agent": Object { - "domComplete": 383, - "domInteractive": 382, - "timeToFirstByte": 14, - }, - }, - "name": "Api::ProductsController#index", - }, - }, - "docType": "transaction", - "duration": 8634, - "id": "myTransactionId2", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": "", - }, - "offset": 39298, - "parent": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "myTransactionId1", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-node", - }, - "span": Object { - "duration": Object { - "us": 47557, - }, - "id": "mySpanIdD", - "name": "GET opbeans-ruby:3000/api/products", - }, - "timestamp": Object { - "us": 1549324795785760, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId1", - }, - }, - "docType": "span", - "duration": 47557, - "id": "mySpanIdD", - "legendValues": Object { - "serviceName": "opbeans-node", - "spanType": undefined, - }, - "offset": 1754, - "parent": Object { - "color": "", - "doc": Object { - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-node", - }, - "timestamp": Object { - "us": 1549324795784006, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 49660, - }, - "id": "myTransactionId1", - "name": "GET /api", - }, - }, - "docType": "transaction", - "duration": 49660, - "id": "myTransactionId1", - "legendValues": Object { - "serviceName": "opbeans-node", - "spanType": "", - }, - "offset": 0, - "parent": undefined, - "parentId": undefined, - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "myTransactionId1", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "mySpanIdD", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "myTransactionId2", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "mySpanIdA", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "mySpanIdA", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "span": Object { - "duration": Object { - "us": 532, - }, - "id": "mySpanIdC", - "name": "SELECT FROM product", - }, - "timestamp": Object { - "us": 1549324795827905, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId2", - }, - }, - "docType": "span", - "duration": 532, - "id": "mySpanIdC", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": undefined, - }, - "offset": 43899, - "parent": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "myTransactionId2", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "span": Object { - "duration": Object { - "us": 6161, - }, - "id": "mySpanIdA", - "name": "Api::ProductsController#index", - }, - "timestamp": Object { - "us": 1549324795824504, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId2", - }, - }, - "docType": "span", - "duration": 6161, - "id": "mySpanIdA", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": undefined, - }, - "offset": 40498, - "parent": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "mySpanIdD", - }, - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "timestamp": Object { - "us": 1549324795823304, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 8634, - }, - "id": "myTransactionId2", - "marks": Object { - "agent": Object { - "domComplete": 383, - "domInteractive": 382, - "timeToFirstByte": 14, - }, - }, - "name": "Api::ProductsController#index", - }, - }, - "docType": "transaction", - "duration": 8634, - "id": "myTransactionId2", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": "", - }, - "offset": 39298, - "parent": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "myTransactionId1", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-node", - }, - "span": Object { - "duration": Object { - "us": 47557, - }, - "id": "mySpanIdD", - "name": "GET opbeans-ruby:3000/api/products", - }, - "timestamp": Object { - "us": 1549324795785760, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId1", - }, - }, - "docType": "span", - "duration": 47557, - "id": "mySpanIdD", - "legendValues": Object { - "serviceName": "opbeans-node", - "spanType": undefined, - }, - "offset": 1754, - "parent": Object { - "color": "", - "doc": Object { - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-node", - }, - "timestamp": Object { - "us": 1549324795784006, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 49660, - }, - "id": "myTransactionId1", - "name": "GET /api", - }, - }, - "docType": "transaction", - "duration": 49660, - "id": "myTransactionId1", - "legendValues": Object { - "serviceName": "opbeans-node", - "spanType": "", - }, - "offset": 0, - "parent": undefined, - "parentId": undefined, - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "myTransactionId1", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "mySpanIdD", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "myTransactionId2", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "mySpanIdA", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - ], - "legends": Array [ - Object { - "color": "#54B399", - "type": "serviceName", - "value": "opbeans-node", - }, - Object { - "color": "#6092C0", - "type": "serviceName", - "value": "opbeans-ruby", - }, - Object { - "color": "#54B399", - "type": "spanType", - "value": "", - }, - Object { - "color": "#6092C0", - "type": "spanType", - "value": undefined, - }, - ], - "rootTransaction": Object { - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-node", - }, - "timestamp": Object { - "us": 1549324795784006, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 49660, - }, - "id": "myTransactionId1", - "name": "GET /api", - }, - }, -} -`; - -exports[`waterfall_helpers getWaterfall should return partial waterfall 1`] = ` -Object { - "childrenByParentId": Object { - "mySpanIdA": Array [ - Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "mySpanIdA", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "span": Object { - "duration": Object { - "us": 481, - }, - "id": "mySpanIdB", - "name": "SELECT FROM products", - }, - "timestamp": Object { - "us": 1549324795825633, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId2", - }, - }, - "docType": "span", - "duration": 481, - "id": "mySpanIdB", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": undefined, - }, - "offset": 2329, - "parent": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "myTransactionId2", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "span": Object { - "duration": Object { - "us": 6161, - }, - "id": "mySpanIdA", - "name": "Api::ProductsController#index", - }, - "timestamp": Object { - "us": 1549324795824504, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId2", - }, - }, - "docType": "span", - "duration": 6161, - "id": "mySpanIdA", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": undefined, - }, - "offset": 1200, - "parent": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "mySpanIdD", - }, - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "timestamp": Object { - "us": 1549324795823304, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 8634, - }, - "id": "myTransactionId2", - "marks": Object { - "agent": Object { - "domComplete": 383, - "domInteractive": 382, - "timeToFirstByte": 14, - }, - }, - "name": "Api::ProductsController#index", - }, - }, - "docType": "transaction", - "duration": 8634, - "id": "myTransactionId2", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": "", - }, - "offset": 0, - "parent": undefined, - "parentId": "mySpanIdD", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "myTransactionId2", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "mySpanIdA", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "mySpanIdA", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "span": Object { - "duration": Object { - "us": 532, - }, - "id": "mySpanIdC", - "name": "SELECT FROM product", - }, - "timestamp": Object { - "us": 1549324795827905, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId2", - }, - }, - "docType": "span", - "duration": 532, - "id": "mySpanIdC", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": undefined, - }, - "offset": 4601, - "parent": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "myTransactionId2", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "span": Object { - "duration": Object { - "us": 6161, - }, - "id": "mySpanIdA", - "name": "Api::ProductsController#index", - }, - "timestamp": Object { - "us": 1549324795824504, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId2", - }, - }, - "docType": "span", - "duration": 6161, - "id": "mySpanIdA", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": undefined, - }, - "offset": 1200, - "parent": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "mySpanIdD", - }, - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "timestamp": Object { - "us": 1549324795823304, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 8634, - }, - "id": "myTransactionId2", - "marks": Object { - "agent": Object { - "domComplete": 383, - "domInteractive": 382, - "timeToFirstByte": 14, - }, - }, - "name": "Api::ProductsController#index", - }, - }, - "docType": "transaction", - "duration": 8634, - "id": "myTransactionId2", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": "", - }, - "offset": 0, - "parent": undefined, - "parentId": "mySpanIdD", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "myTransactionId2", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "mySpanIdA", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - ], - "mySpanIdD": Array [ - Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "mySpanIdD", - }, - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "timestamp": Object { - "us": 1549324795823304, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 8634, - }, - "id": "myTransactionId2", - "marks": Object { - "agent": Object { - "domComplete": 383, - "domInteractive": 382, - "timeToFirstByte": 14, - }, - }, - "name": "Api::ProductsController#index", - }, - }, - "docType": "transaction", - "duration": 8634, - "id": "myTransactionId2", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": "", - }, - "offset": 0, - "parent": undefined, - "parentId": "mySpanIdD", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - ], - "myTransactionId2": Array [ - Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "myTransactionId2", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "span": Object { - "duration": Object { - "us": 6161, - }, - "id": "mySpanIdA", - "name": "Api::ProductsController#index", - }, - "timestamp": Object { - "us": 1549324795824504, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId2", - }, - }, - "docType": "span", - "duration": 6161, - "id": "mySpanIdA", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": undefined, - }, - "offset": 1200, - "parent": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "mySpanIdD", - }, - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "timestamp": Object { - "us": 1549324795823304, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 8634, - }, - "id": "myTransactionId2", - "marks": Object { - "agent": Object { - "domComplete": 383, - "domInteractive": 382, - "timeToFirstByte": 14, - }, - }, - "name": "Api::ProductsController#index", - }, - }, - "docType": "transaction", - "duration": 8634, - "id": "myTransactionId2", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": "", - }, - "offset": 0, - "parent": undefined, - "parentId": "mySpanIdD", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "myTransactionId2", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - ], - }, - "duration": 8634, - "entryWaterfallTransaction": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "mySpanIdD", - }, - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "timestamp": Object { - "us": 1549324795823304, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 8634, - }, - "id": "myTransactionId2", - "marks": Object { - "agent": Object { - "domComplete": 383, - "domInteractive": 382, - "timeToFirstByte": 14, - }, - }, - "name": "Api::ProductsController#index", - }, - }, - "docType": "transaction", - "duration": 8634, - "id": "myTransactionId2", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": "", - }, - "offset": 0, - "parent": undefined, - "parentId": "mySpanIdD", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "errorItems": Array [], - "getErrorCount": [Function], - "items": Array [ - Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "mySpanIdD", - }, - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "timestamp": Object { - "us": 1549324795823304, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 8634, - }, - "id": "myTransactionId2", - "marks": Object { - "agent": Object { - "domComplete": 383, - "domInteractive": 382, - "timeToFirstByte": 14, - }, - }, - "name": "Api::ProductsController#index", - }, - }, - "docType": "transaction", - "duration": 8634, - "id": "myTransactionId2", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": "", - }, - "offset": 0, - "parent": undefined, - "parentId": "mySpanIdD", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "myTransactionId2", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "span": Object { - "duration": Object { - "us": 6161, - }, - "id": "mySpanIdA", - "name": "Api::ProductsController#index", - }, - "timestamp": Object { - "us": 1549324795824504, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId2", - }, - }, - "docType": "span", - "duration": 6161, - "id": "mySpanIdA", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": undefined, - }, - "offset": 1200, - "parent": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "mySpanIdD", - }, - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "timestamp": Object { - "us": 1549324795823304, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 8634, - }, - "id": "myTransactionId2", - "marks": Object { - "agent": Object { - "domComplete": 383, - "domInteractive": 382, - "timeToFirstByte": 14, - }, - }, - "name": "Api::ProductsController#index", - }, - }, - "docType": "transaction", - "duration": 8634, - "id": "myTransactionId2", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": "", - }, - "offset": 0, - "parent": undefined, - "parentId": "mySpanIdD", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "myTransactionId2", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "mySpanIdA", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "span": Object { - "duration": Object { - "us": 481, - }, - "id": "mySpanIdB", - "name": "SELECT FROM products", - }, - "timestamp": Object { - "us": 1549324795825633, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId2", - }, - }, - "docType": "span", - "duration": 481, - "id": "mySpanIdB", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": undefined, - }, - "offset": 2329, - "parent": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "myTransactionId2", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "span": Object { - "duration": Object { - "us": 6161, - }, - "id": "mySpanIdA", - "name": "Api::ProductsController#index", - }, - "timestamp": Object { - "us": 1549324795824504, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId2", - }, - }, - "docType": "span", - "duration": 6161, - "id": "mySpanIdA", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": undefined, - }, - "offset": 1200, - "parent": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "mySpanIdD", - }, - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "timestamp": Object { - "us": 1549324795823304, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 8634, - }, - "id": "myTransactionId2", - "marks": Object { - "agent": Object { - "domComplete": 383, - "domInteractive": 382, - "timeToFirstByte": 14, - }, - }, - "name": "Api::ProductsController#index", - }, - }, - "docType": "transaction", - "duration": 8634, - "id": "myTransactionId2", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": "", - }, - "offset": 0, - "parent": undefined, - "parentId": "mySpanIdD", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "myTransactionId2", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "mySpanIdA", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "mySpanIdA", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "span": Object { - "duration": Object { - "us": 532, - }, - "id": "mySpanIdC", - "name": "SELECT FROM product", - }, - "timestamp": Object { - "us": 1549324795827905, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId2", - }, - }, - "docType": "span", - "duration": 532, - "id": "mySpanIdC", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": undefined, - }, - "offset": 4601, - "parent": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "myTransactionId2", - }, - "processor": Object { - "event": "span", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "span": Object { - "duration": Object { - "us": 6161, - }, - "id": "mySpanIdA", - "name": "Api::ProductsController#index", - }, - "timestamp": Object { - "us": 1549324795824504, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "id": "myTransactionId2", - }, - }, - "docType": "span", - "duration": 6161, - "id": "mySpanIdA", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": undefined, - }, - "offset": 1200, - "parent": Object { - "color": "", - "doc": Object { - "parent": Object { - "id": "mySpanIdD", - }, - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-ruby", - }, - "timestamp": Object { - "us": 1549324795823304, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 8634, - }, - "id": "myTransactionId2", - "marks": Object { - "agent": Object { - "domComplete": 383, - "domInteractive": 382, - "timeToFirstByte": 14, - }, - }, - "name": "Api::ProductsController#index", - }, - }, - "docType": "transaction", - "duration": 8634, - "id": "myTransactionId2", - "legendValues": Object { - "serviceName": "opbeans-ruby", - "spanType": "", - }, - "offset": 0, - "parent": undefined, - "parentId": "mySpanIdD", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "myTransactionId2", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - "parentId": "mySpanIdA", - "skew": 0, - "spanLinksCount": Object { - "linkedChildren": 0, - "linkedParents": 0, - }, - }, - ], - "legends": Array [ - Object { - "color": "#54B399", - "type": "serviceName", - "value": "opbeans-ruby", - }, - Object { - "color": "#54B399", - "type": "spanType", - "value": "", - }, - Object { - "color": "#6092C0", - "type": "spanType", - "value": undefined, - }, - ], - "rootTransaction": Object { - "processor": Object { - "event": "transaction", - }, - "service": Object { - "name": "opbeans-node", - }, - "timestamp": Object { - "us": 1549324795784006, - }, - "trace": Object { - "id": "myTraceId", - }, - "transaction": Object { - "duration": Object { - "us": 49660, - }, - "id": "myTransactionId1", - "name": "GET /api", - }, - }, -} -`; - exports[`waterfall_helpers getWaterfallItems should handle cyclic references 1`] = ` Array [ Object { diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/waterfall_helpers.test.ts b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/waterfall_helpers.test.ts index 1aa38688c1549..c30b0e5260cb8 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/waterfall_helpers.test.ts +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/waterfall_helpers.test.ts @@ -18,6 +18,10 @@ import { IWaterfallSpanOrTransaction, } from './waterfall_helpers'; import { APMError } from '../../../../../../../../typings/es_schemas/ui/apm_error'; +import { + WaterfallSpan, + WaterfallTransaction, +} from '../../../../../../../../common/waterfall/typings'; describe('waterfall_helpers', () => { describe('getWaterfall', () => { @@ -128,42 +132,67 @@ describe('waterfall_helpers', () => { ]; it('should return full waterfall', () => { - const entryTransactionId = 'myTransactionId1'; const apiResp = { - traceDocs: hits, - errorDocs, - exceedsMax: false, - linkedChildrenOfSpanCountBySpanId: {}, + traceItems: { + traceDocs: hits, + errorDocs, + exceedsMax: false, + spanLinksCountById: {}, + }, + entryTransaction: { + processor: { event: 'transaction' }, + trace: { id: 'myTraceId' }, + service: { name: 'opbeans-node' }, + transaction: { + duration: { us: 49660 }, + name: 'GET /api', + id: 'myTransactionId1', + }, + timestamp: { us: 1549324795784006 }, + } as Transaction, }; - const waterfall = getWaterfall(apiResp, entryTransactionId); - const { apiResponse, ...waterfallRest } = waterfall; + const waterfall = getWaterfall(apiResp); expect(waterfall.items.length).toBe(6); expect(waterfall.items[0].id).toBe('myTransactionId1'); expect(waterfall.errorItems.length).toBe(1); expect(waterfall.getErrorCount('myTransactionId1')).toEqual(1); - expect(waterfallRest).toMatchSnapshot(); - expect(apiResponse).toEqual(apiResp); }); it('should return partial waterfall', () => { - const entryTransactionId = 'myTransactionId2'; const apiResp = { - traceDocs: hits, - errorDocs, - exceedsMax: false, - linkedChildrenOfSpanCountBySpanId: {}, + traceItems: { + traceDocs: hits, + errorDocs, + exceedsMax: false, + spanLinksCountById: {}, + }, + entryTransaction: { + parent: { id: 'mySpanIdD' }, + processor: { event: 'transaction' }, + trace: { id: 'myTraceId' }, + service: { name: 'opbeans-ruby' }, + transaction: { + duration: { us: 8634 }, + name: 'Api::ProductsController#index', + id: 'myTransactionId2', + marks: { + agent: { + domInteractive: 382, + domComplete: 383, + timeToFirstByte: 14, + }, + }, + }, + timestamp: { us: 1549324795823304 }, + } as unknown as Transaction, }; - const waterfall = getWaterfall(apiResp, entryTransactionId); - - const { apiResponse, ...waterfallRest } = waterfall; + const waterfall = getWaterfall(apiResp); expect(waterfall.items.length).toBe(4); expect(waterfall.items[0].id).toBe('myTransactionId2'); expect(waterfall.errorItems.length).toBe(0); expect(waterfall.getErrorCount('myTransactionId2')).toEqual(0); - expect(waterfallRest).toMatchSnapshot(); - expect(apiResponse).toEqual(apiResp); }); it('should reparent spans', () => { const traceItems = [ @@ -232,16 +261,25 @@ describe('waterfall_helpers', () => { timestamp: { us: 1549324795785760 }, } as Span, ]; - const entryTransactionId = 'myTransactionId1'; - const waterfall = getWaterfall( - { + const waterfall = getWaterfall({ + traceItems: { traceDocs: traceItems, errorDocs: [], exceedsMax: false, - linkedChildrenOfSpanCountBySpanId: {}, + spanLinksCountById: {}, }, - entryTransactionId - ); + entryTransaction: { + processor: { event: 'transaction' }, + trace: { id: 'myTraceId' }, + service: { name: 'opbeans-node' }, + transaction: { + duration: { us: 49660 }, + name: 'GET /api', + id: 'myTransactionId1', + }, + timestamp: { us: 1549324795784006 }, + } as Transaction, + }); const getIdAndParentId = (item: IWaterfallItem) => ({ id: item.id, parentId: item.parent?.id, @@ -339,16 +377,26 @@ describe('waterfall_helpers', () => { timestamp: { us: 1549324795785760 }, } as Span, ]; - const entryTransactionId = 'myTransactionId1'; - const waterfall = getWaterfall( - { + + const waterfall = getWaterfall({ + traceItems: { traceDocs: traceItems, errorDocs: [], exceedsMax: false, - linkedChildrenOfSpanCountBySpanId: {}, + spanLinksCountById: {}, }, - entryTransactionId - ); + entryTransaction: { + processor: { event: 'transaction' }, + trace: { id: 'myTraceId' }, + service: { name: 'opbeans-node' }, + transaction: { + duration: { us: 49660 }, + name: 'GET /api', + id: 'myTransactionId1', + }, + timestamp: { us: 1549324795784006 }, + } as Transaction, + }); const getIdAndParentId = (item: IWaterfallItem) => ({ id: item.id, parentId: item.parent?.id, @@ -527,7 +575,7 @@ describe('waterfall_helpers', () => { doc: { transaction: { id: 'a' }, timestamp: { us: 10 }, - } as unknown as Transaction, + } as unknown as WaterfallTransaction, } as IWaterfallSpanOrTransaction, { docType: 'span', @@ -539,7 +587,7 @@ describe('waterfall_helpers', () => { }, parent: { id: 'a' }, timestamp: { us: 20 }, - } as unknown as Span, + } as unknown as WaterfallSpan, } as IWaterfallSpanOrTransaction, ]; const childrenByParentId = groupBy(items, (hit) => diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/waterfall_helpers.ts b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/waterfall_helpers.ts index e787f02aae4f8..2ec9ff86f50d4 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/waterfall_helpers.ts +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/waterfall_helpers.ts @@ -9,16 +9,15 @@ import { euiPaletteColorBlind } from '@elastic/eui'; import { first, flatten, groupBy, isEmpty, sortBy, uniq } from 'lodash'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import type { APIReturnType } from '../../../../../../../services/rest/create_call_apm_api'; -import type { APMError } from '../../../../../../../../typings/es_schemas/ui/apm_error'; -import type { Span } from '../../../../../../../../typings/es_schemas/ui/span'; import type { Transaction } from '../../../../../../../../typings/es_schemas/ui/transaction'; +import { + WaterfallError, + WaterfallSpan, + WaterfallTransaction, +} from '../../../../../../../../common/waterfall/typings'; type TraceAPIResponse = APIReturnType<'GET /internal/apm/traces/{traceId}'>; -interface IWaterfallGroup { - [key: string]: IWaterfallSpanOrTransaction[]; -} - const ROOT_ID = 'root'; export interface SpanLinksCount { @@ -32,8 +31,9 @@ export enum WaterfallLegendType { } export interface IWaterfall { + entryTransaction?: Transaction; entryWaterfallTransaction?: IWaterfallTransaction; - rootTransaction?: Transaction; + rootWaterfallTransaction?: IWaterfallTransaction; /** * Latency in us @@ -44,17 +44,8 @@ export interface IWaterfall { getErrorCount: (parentId: string) => number; legends: IWaterfallLegend[]; errorItems: IWaterfallError[]; - apiResponse: TraceAPIResponse; -} - -interface IWaterfallSpanItemBase - extends IWaterfallItemBase { - /** - * Latency in us - */ - duration: number; - legendValues: Record; - spanLinksCount: SpanLinksCount; + exceedsMax: boolean; + totalErrorsCount: number; } interface IWaterfallItemBase { @@ -72,22 +63,30 @@ interface IWaterfallItemBase { * skew from timestamp in us */ skew: number; + /** + * Latency in us + */ + duration: number; + legendValues: Record; + spanLinksCount: SpanLinksCount; } -export type IWaterfallError = IWaterfallItemBase; +export type IWaterfallError = Omit< + IWaterfallItemBase, + 'duration' | 'legendValues' | 'spanLinksCount' +>; -export type IWaterfallTransaction = IWaterfallSpanItemBase< - Transaction, +export type IWaterfallTransaction = IWaterfallItemBase< + WaterfallTransaction, 'transaction' >; -export type IWaterfallSpan = IWaterfallSpanItemBase; +export type IWaterfallSpan = IWaterfallItemBase; export type IWaterfallSpanOrTransaction = | IWaterfallTransaction | IWaterfallSpan; -// export type IWaterfallItem = IWaterfallSpanOrTransaction | IWaterfallError; export type IWaterfallItem = IWaterfallSpanOrTransaction; export interface IWaterfallLegend { @@ -96,19 +95,21 @@ export interface IWaterfallLegend { color: string; } -function getLegendValues(transactionOrSpan: Transaction | Span) { +function getLegendValues( + transactionOrSpan: WaterfallTransaction | WaterfallSpan +) { return { [WaterfallLegendType.ServiceName]: transactionOrSpan.service.name, [WaterfallLegendType.SpanType]: transactionOrSpan.processor.event === ProcessorEvent.span - ? (transactionOrSpan as Span).span.subtype || - (transactionOrSpan as Span).span.type + ? (transactionOrSpan as WaterfallSpan).span.subtype || + (transactionOrSpan as WaterfallSpan).span.type : '', }; } function getTransactionItem( - transaction: Transaction, + transaction: WaterfallTransaction, linkedChildrenCount: number = 0 ): IWaterfallTransaction { return { @@ -129,7 +130,7 @@ function getTransactionItem( } function getSpanItem( - span: Span, + span: WaterfallSpan, linkedChildrenCount: number = 0 ): IWaterfallSpan { return { @@ -150,7 +151,7 @@ function getSpanItem( } function getErrorItem( - error: APMError, + error: WaterfallError, items: IWaterfallItem[], entryWaterfallTransaction?: IWaterfallTransaction ): IWaterfallError { @@ -206,7 +207,7 @@ export function getClockSkew( } export function getOrderedWaterfallItems( - childrenByParentId: IWaterfallGroup, + childrenByParentId: Record, entryWaterfallTransaction?: IWaterfallTransaction ) { if (!entryWaterfallTransaction) { @@ -244,10 +245,12 @@ export function getOrderedWaterfallItems( return getSortedChildren(entryWaterfallTransaction); } -function getRootTransaction(childrenByParentId: IWaterfallGroup) { +function getRootWaterfallTransaction( + childrenByParentId: Record +) { const item = first(childrenByParentId.root); if (item && item.docType === 'transaction') { - return item.doc; + return item; } } @@ -288,24 +291,21 @@ const getWaterfallDuration = (waterfallItems: IWaterfallItem[]) => ); const getWaterfallItems = ( - items: TraceAPIResponse['traceDocs'], - linkedChildrenOfSpanCountBySpanId: TraceAPIResponse['linkedChildrenOfSpanCountBySpanId'] + items: Array, + spanLinksCountById: TraceAPIResponse['traceItems']['spanLinksCountById'] ) => items.map((item) => { - const docType: 'span' | 'transaction' = item.processor.event; + const docType = item.processor.event; switch (docType) { case 'span': { - const span = item as Span; - return getSpanItem( - span, - linkedChildrenOfSpanCountBySpanId[span.span.id] - ); + const span = item as WaterfallSpan; + return getSpanItem(span, spanLinksCountById[span.span.id]); } case 'transaction': - const transaction = item as Transaction; + const transaction = item as WaterfallTransaction; return getTransactionItem( transaction, - linkedChildrenOfSpanCountBySpanId[transaction.transaction.id] + spanLinksCountById[transaction.transaction.id] ); } }); @@ -367,7 +367,7 @@ function isInEntryTransaction( } function getWaterfallErrors( - errorDocs: TraceAPIResponse['errorDocs'], + errorDocs: TraceAPIResponse['traceItems']['errorDocs'], items: IWaterfallItem[], entryWaterfallTransaction?: IWaterfallTransaction ) { @@ -397,7 +397,9 @@ function getWaterfallErrors( /* { 'parentId': 2 } */ -function getErrorCountByParentId(errorDocs: TraceAPIResponse['errorDocs']) { +function getErrorCountByParentId( + errorDocs: TraceAPIResponse['traceItems']['errorDocs'] +) { return errorDocs.reduce>((acc, doc) => { const parentId = doc.parent?.id; @@ -411,27 +413,26 @@ function getErrorCountByParentId(errorDocs: TraceAPIResponse['errorDocs']) { }, {}); } -export function getWaterfall( - apiResponse: TraceAPIResponse, - entryTransactionId?: Transaction['transaction']['id'] -): IWaterfall { - if (isEmpty(apiResponse.traceDocs) || !entryTransactionId) { +export function getWaterfall(apiResponse: TraceAPIResponse): IWaterfall { + const { traceItems, entryTransaction } = apiResponse; + if (isEmpty(traceItems.traceDocs) || !entryTransaction) { return { - apiResponse, duration: 0, items: [], legends: [], errorItems: [], childrenByParentId: {}, getErrorCount: () => 0, + exceedsMax: false, + totalErrorsCount: 0, }; } - const errorCountByParentId = getErrorCountByParentId(apiResponse.errorDocs); + const errorCountByParentId = getErrorCountByParentId(traceItems.errorDocs); const waterfallItems: IWaterfallSpanOrTransaction[] = getWaterfallItems( - apiResponse.traceDocs, - apiResponse.linkedChildrenOfSpanCountBySpanId + traceItems.traceDocs, + traceItems.spanLinksCountById ); const childrenByParentId = getChildrenGroupedByParentId( @@ -439,7 +440,7 @@ export function getWaterfall( ); const entryWaterfallTransaction = getEntryWaterfallTransaction( - entryTransactionId, + entryTransaction.transaction.id, waterfallItems ); @@ -448,24 +449,28 @@ export function getWaterfall( entryWaterfallTransaction ); const errorItems = getWaterfallErrors( - apiResponse.errorDocs, + traceItems.errorDocs, items, entryWaterfallTransaction ); - const rootTransaction = getRootTransaction(childrenByParentId); + const rootWaterfallTransaction = + getRootWaterfallTransaction(childrenByParentId); + const duration = getWaterfallDuration(items); const legends = getLegends(items); return { - apiResponse, entryWaterfallTransaction, - rootTransaction, + rootWaterfallTransaction, + entryTransaction, duration, items, legends, errorItems, childrenByParentId: getChildrenGroupedByParentId(items), getErrorCount: (parentId: string) => errorCountByParentId[parentId] ?? 0, + exceedsMax: traceItems.exceedsMax, + totalErrorsCount: traceItems.errorDocs.length, }; } diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall_container.stories.data.ts b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall_container.stories.data.ts deleted file mode 100644 index 9ac9497a33d6a..0000000000000 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall_container.stories.data.ts +++ /dev/null @@ -1,5873 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import type { Location } from 'history'; -import type { ApmUrlParams } from '../../../../../context/url_params_context/types'; -import { APIReturnType } from '../../../../../services/rest/create_call_apm_api'; - -export const location = { - pathname: '/services/opbeans-go/transactions/view', - search: - '?rangeFrom=now-24h&rangeTo=now&refreshPaused=true&refreshInterval=0&kuery=service.name%253A%2520%2522opbeans-java%2522%2520or%2520service.name%2520%253A%2520%2522opbeans-go%2522&traceId=513d33fafe99bbe6134749310c9b5322&transactionId=975c8d5bfd1dd20b&transactionName=GET%20%2Fapi%2Forders&transactionType=request', - hash: '', -} as Location; - -type TraceAPIResponse = APIReturnType<'GET /internal/apm/traces/{traceId}'>; - -export const urlParams = { - start: '2020-03-22T15:16:38.742Z', - end: '2020-03-23T15:16:38.742Z', - rangeFrom: 'now-24h', - rangeTo: 'now', - refreshPaused: true, - refreshInterval: 0, - page: 0, - transactionId: '975c8d5bfd1dd20b', - traceId: '513d33fafe99bbe6134749310c9b5322', - transactionName: 'GET /api/orders', - transactionType: 'request', - processorEvent: 'transaction', - serviceName: 'opbeans-go', -} as ApmUrlParams; - -export const simpleTrace = { - traceDocs: [ - { - container: { - id: '4cf84d094553201997ddb7fea344b7c6ef18dcb8233eba39278946ee8449794e', - }, - process: { - pid: 6, - title: '/usr/lib/jvm/java-10-openjdk-amd64/bin/java', - ppid: 1, - }, - agent: { - name: 'java', - ephemeral_id: '99ce8403-5875-4945-b074-d37dc10563eb', - version: '1.14.1-SNAPSHOT', - }, - internal: { - sampler: { - value: 46, - }, - }, - source: { - ip: '172.19.0.13', - }, - processor: { - name: 'transaction', - event: 'transaction', - }, - url: { - path: '/api/orders', - scheme: 'http', - port: 3000, - domain: '172.19.0.9', - full: 'http://172.19.0.9:3000/api/orders', - }, - observer: { - hostname: 'f37f48d8b60b', - id: 'd8522e1f-be8e-43c2-b290-ac6b6c0f171e', - ephemeral_id: '6ed88f14-170e-478d-a4f5-ea5e7f4b16b9', - type: 'apm-server', - version: '8.0.0', - version_major: 8, - }, - trace: { - id: '513d33fafe99bbe6134749310c9b5322', - }, - '@timestamp': '2020-03-23T15:04:28.785Z', - ecs: { - version: '1.4.0', - }, - service: { - node: { - name: '4cf84d094553201997ddb7fea344b7c6ef18dcb8233eba39278946ee8449794e', - }, - environment: 'production', - name: 'opbeans-java', - runtime: { - name: 'Java', - version: '10.0.2', - }, - language: { - name: 'Java', - version: '10.0.2', - }, - version: 'None', - }, - host: { - hostname: '4cf84d094553', - os: { - platform: 'Linux', - }, - ip: '172.19.0.9', - name: '4cf84d094553', - architecture: 'amd64', - }, - http: { - request: { - headers: { - Accept: ['*/*'], - 'User-Agent': ['Python/3.7 aiohttp/3.3.2'], - Host: ['172.19.0.9:3000'], - 'Accept-Encoding': ['gzip, deflate'], - }, - method: 'get', - socket: { - encrypted: false, - remote_address: '172.19.0.13', - }, - body: { - original: '[REDACTED]', - }, - }, - response: { - headers: { - 'Transfer-Encoding': ['chunked'], - Date: ['Mon, 23 Mar 2020 15:04:28 GMT'], - 'Content-Type': ['application/json;charset=ISO-8859-1'], - }, - status_code: 200, - finished: true, - headers_sent: true, - }, - version: '1.1', - }, - client: { - ip: '172.19.0.13', - }, - transaction: { - duration: { - us: 18842, - }, - result: 'HTTP 2xx', - name: 'DispatcherServlet#doGet', - id: '49809ad3c26adf74', - span_count: { - dropped: 0, - started: 1, - }, - type: 'request', - sampled: true, - }, - user_agent: { - original: 'Python/3.7 aiohttp/3.3.2', - name: 'Other', - device: { - name: 'Other', - }, - }, - timestamp: { - us: 1584975868785000, - }, - }, - { - parent: { - id: 'fc107f7b556eb49b', - }, - agent: { - name: 'go', - version: '1.7.2', - }, - processor: { - name: 'transaction', - event: 'transaction', - }, - url: { - path: '/api/orders', - scheme: 'http', - port: 3000, - domain: 'opbeans-go', - full: 'http://opbeans-go:3000/api/orders', - }, - trace: { - id: '513d33fafe99bbe6134749310c9b5322', - }, - '@timestamp': '2020-03-23T15:04:28.787Z', - service: { - node: { - name: 'e948a08b8f5efe99b5da01f50da48c7d8aee3bbf4701f3da85ebe760c2ffef29', - }, - environment: 'production', - framework: { - name: 'gin', - version: 'v1.4.0', - }, - name: 'opbeans-go', - runtime: { - name: 'gc', - version: 'go1.14.1', - }, - language: { - name: 'go', - version: 'go1.14.1', - }, - version: 'None', - }, - transaction: { - duration: { - us: 16597, - }, - result: 'HTTP 2xx', - name: 'GET /api/orders', - id: '975c8d5bfd1dd20b', - span_count: { - dropped: 0, - started: 1, - }, - type: 'request', - sampled: true, - }, - timestamp: { - us: 1584975868787052, - }, - faas: { - coldstart: true, - }, - }, - { - parent: { - id: 'daae24d83c269918', - }, - agent: { - name: 'python', - version: '5.5.2', - }, - trace: { - id: '513d33fafe99bbe6134749310c9b5322', - }, - timestamp: { - us: 1584975868788603, - }, - processor: { - name: 'transaction', - event: 'transaction', - }, - url: { - path: '/api/orders', - scheme: 'http', - port: 3000, - domain: 'opbeans-go', - full: 'http://opbeans-go:3000/api/orders', - }, - '@timestamp': '2020-03-23T15:04:28.788Z', - service: { - node: { - name: 'a636915f1f6eec81ab44342b13a3ea9597ef03a24391e4e55f34ae2e20b30f51', - }, - environment: 'production', - framework: { - name: 'django', - version: '2.1.13', - }, - name: 'opbeans-python', - runtime: { - name: 'CPython', - version: '3.6.10', - }, - language: { - name: 'python', - version: '3.6.10', - }, - version: 'None', - }, - transaction: { - result: 'HTTP 2xx', - duration: { - us: 14648, - }, - name: 'GET opbeans.views.orders', - span_count: { - dropped: 0, - started: 1, - }, - id: '6fb0ff7365b87298', - type: 'request', - sampled: true, - }, - }, - { - container: { - id: '4cf84d094553201997ddb7fea344b7c6ef18dcb8233eba39278946ee8449794e', - }, - parent: { - id: '49809ad3c26adf74', - }, - process: { - pid: 6, - title: '/usr/lib/jvm/java-10-openjdk-amd64/bin/java', - ppid: 1, - }, - agent: { - name: 'java', - ephemeral_id: '99ce8403-5875-4945-b074-d37dc10563eb', - version: '1.14.1-SNAPSHOT', - }, - internal: { - sampler: { - value: 44, - }, - }, - destination: { - address: 'opbeans-go', - port: 3000, - }, - processor: { - name: 'transaction', - event: 'span', - }, - observer: { - hostname: 'f37f48d8b60b', - id: 'd8522e1f-be8e-43c2-b290-ac6b6c0f171e', - type: 'apm-server', - ephemeral_id: '6ed88f14-170e-478d-a4f5-ea5e7f4b16b9', - version: '8.0.0', - version_major: 8, - }, - trace: { - id: '513d33fafe99bbe6134749310c9b5322', - }, - '@timestamp': '2020-03-23T15:04:28.785Z', - ecs: { - version: '1.4.0', - }, - service: { - node: { - name: '4cf84d094553201997ddb7fea344b7c6ef18dcb8233eba39278946ee8449794e', - }, - environment: 'production', - name: 'opbeans-java', - runtime: { - name: 'Java', - version: '10.0.2', - }, - language: { - name: 'Java', - version: '10.0.2', - }, - version: 'None', - }, - host: { - hostname: '4cf84d094553', - os: { - platform: 'Linux', - }, - ip: '172.19.0.9', - name: '4cf84d094553', - architecture: 'amd64', - }, - connection: { - hash: "{service.environment:'production'}/{service.name:'opbeans-java'}/{span.subtype:'http'}/{destination.address:'opbeans-go'}/{span.type:'external'}", - }, - transaction: { - id: '49809ad3c26adf74', - }, - timestamp: { - us: 1584975868785273, - }, - span: { - duration: { - us: 17530, - }, - subtype: 'http', - name: 'GET opbeans-go', - destination: { - service: { - resource: 'opbeans-go:3000', - name: 'http://opbeans-go:3000', - type: 'external', - }, - }, - http: { - response: { - status_code: 200, - }, - url: { - original: 'http://opbeans-go:3000/api/orders', - }, - }, - id: 'fc107f7b556eb49b', - type: 'external', - }, - }, - { - parent: { - id: '975c8d5bfd1dd20b', - }, - agent: { - name: 'go', - version: '1.7.2', - }, - processor: { - name: 'transaction', - event: 'span', - }, - trace: { - id: '513d33fafe99bbe6134749310c9b5322', - }, - '@timestamp': '2020-03-23T15:04:28.787Z', - service: { - node: { - name: 'e948a08b8f5efe99b5da01f50da48c7d8aee3bbf4701f3da85ebe760c2ffef29', - }, - environment: 'production', - name: 'opbeans-go', - runtime: { - name: 'gc', - version: 'go1.14.1', - }, - language: { - name: 'go', - version: 'go1.14.1', - }, - version: 'None', - }, - transaction: { - id: '975c8d5bfd1dd20b', - }, - timestamp: { - us: 1584975868787174, - }, - span: { - duration: { - us: 16250, - }, - subtype: 'http', - destination: { - service: { - resource: 'opbeans-python:3000', - name: 'http://opbeans-python:3000', - type: 'external', - }, - }, - name: 'GET opbeans-python:3000', - http: { - response: { - status_code: 200, - }, - url: { - original: 'http://opbeans-python:3000/api/orders', - }, - }, - id: 'daae24d83c269918', - type: 'external', - }, - }, - { - container: { - id: 'a636915f1f6eec81ab44342b13a3ea9597ef03a24391e4e55f34ae2e20b30f51', - }, - parent: { - id: '6fb0ff7365b87298', - }, - agent: { - name: 'python', - version: '5.5.2', - }, - processor: { - name: 'transaction', - event: 'span', - }, - trace: { - id: '513d33fafe99bbe6134749310c9b5322', - }, - '@timestamp': '2020-03-23T15:04:28.790Z', - service: { - node: { - name: 'a636915f1f6eec81ab44342b13a3ea9597ef03a24391e4e55f34ae2e20b30f51', - }, - environment: 'production', - framework: { - name: 'django', - version: '2.1.13', - }, - name: 'opbeans-python', - runtime: { - name: 'CPython', - version: '3.6.10', - }, - language: { - name: 'python', - version: '3.6.10', - }, - version: 'None', - }, - transaction: { - id: '6fb0ff7365b87298', - }, - timestamp: { - us: 1584975868790080, - }, - span: { - duration: { - us: 2519, - }, - subtype: 'postgresql', - name: 'SELECT FROM opbeans_order', - destination: { - service: { - resource: 'postgresql', - name: 'postgresql', - type: 'db', - }, - }, - action: 'query', - id: 'c9407abb4d08ead1', - type: 'db', - sync: true, - db: { - statement: - 'SELECT "opbeans_order"."id", "opbeans_order"."customer_id", "opbeans_customer"."full_name", "opbeans_order"."created_at" FROM "opbeans_order" INNER JOIN "opbeans_customer" ON ("opbeans_order"."customer_id" = "opbeans_customer"."id") LIMIT 1000', - type: 'sql', - }, - }, - }, - ], - exceedsMax: false, - errorDocs: [], - linkedChildrenOfSpanCountBySpanId: {}, -} as TraceAPIResponse; - -export const manyChildrenWithSameLength = { - exceedsMax: false, - traceDocs: [ - { - container: { - id: '46721e28e45ec1926798491069d8585865b031b4eaa9800e35d06fef6be5e170', - }, - kubernetes: { - pod: { - uid: '900f3cac-eb7c-4308-9376-f644f173c3ee', - }, - }, - process: { - args: ['-C', 'config/puma.rb'], - pid: 38, - title: '/usr/local/bundle/bin/puma', - }, - agent: { - name: 'ruby', - version: '4.3.0', - }, - processor: { - name: 'transaction', - event: 'transaction', - }, - url: { - path: '/api/products/3', - scheme: 'http', - port: 3000, - domain: '10.15.245.224', - full: 'http://10.15.245.224:3000/api/products/3', - }, - cloud: { - availability_zone: 'us-central1-c', - instance: { - name: 'gke-dev-oblt-dev-oblt-pool-18e89389-qntq', - id: '5278603844673466232', - }, - provider: 'gcp', - machine: { - type: 'projects/8560181848/machineTypes/n1-standard-4', - }, - project: { - name: 'elastic-observability', - id: '8560181848', - }, - region: 'us-central1', - }, - observer: { - hostname: 'apm-apm-server-65d9d8dd68-zvs6p', - id: '69a7066f-46d2-42c4-a4cc-8400f60bf2b5', - ephemeral_id: '0ab88569-c301-40e9-8e78-cac7c1dac2bc', - type: 'apm-server', - version: '7.16.0', - version_major: 7, - }, - trace: { - id: 'd5e80ae688f1fef91533f02dd2bdc769', - }, - '@timestamp': '2021-10-19T13:57:02.536Z', - ecs: { - version: '1.11.0', - }, - service: { - node: { - name: '46721e28e45ec1926798491069d8585865b031b4eaa9800e35d06fef6be5e170', - }, - environment: 'production', - framework: { - name: 'Ruby on Rails', - version: '6.1.4.1', - }, - name: 'opbeans-ruby', - runtime: { - name: 'ruby', - version: '2.7.3', - }, - language: { - name: 'ruby', - version: '2.7.3', - }, - version: '2021-10-14 17:49:53', - }, - host: { - os: { - platform: 'linux', - }, - ip: '10.12.0.22', - architecture: 'x86_64', - }, - http: { - request: { - headers: { - Accept: ['*/*'], - Version: ['HTTP/1.1'], - 'User-Agent': ['Python/3.7 aiohttp/3.3.2'], - Host: ['10.15.245.224:3000'], - 'Accept-Encoding': ['gzip, deflate'], - }, - method: 'GET', - env: { - GATEWAY_INTERFACE: 'CGI/1.2', - ORIGINAL_FULLPATH: '/api/products/3', - SERVER_PORT: '3000', - SERVER_PROTOCOL: 'HTTP/1.1', - REMOTE_ADDR: '10.12.6.45', - REQUEST_URI: '/api/products/3', - ORIGINAL_SCRIPT_NAME: '', - SERVER_SOFTWARE: 'puma 5.5.0 Zawgyi', - QUERY_STRING: '', - SCRIPT_NAME: '', - REQUEST_METHOD: 'GET', - SERVER_NAME: '10.15.245.224', - REQUEST_PATH: '/api/products/3', - PATH_INFO: '/api/products/3', - ROUTES_9240_SCRIPT_NAME: '', - }, - body: { - original: '[SKIPPED]', - }, - }, - response: { - headers: { - 'Content-Type': ['application/json;charset=UTF-8'], - }, - status_code: 500, - finished: true, - headers_sent: true, - }, - version: '1.1', - }, - event: { - ingested: '2021-10-19T13:57:12.417144879Z', - outcome: 'failure', - }, - transaction: { - duration: { - us: 13359, - }, - result: 'HTTP 5xx', - name: 'Rack', - span_count: { - dropped: 0, - started: 1, - }, - id: '9a7f717439921d39', - type: 'request', - sampled: true, - }, - user_agent: { - original: 'Python/3.7 aiohttp/3.3.2', - name: 'Python aiohttp', - device: { - name: 'Other', - type: 'Other', - }, - version: '3.3.2', - }, - timestamp: { - us: 1634651822536408, - }, - }, - { - container: { - id: 'e7b69f99cb7523bedea6d7c97b684cf4b7ff458d0cba1efb1ac843300b3bf3c7', - }, - kubernetes: { - pod: { - uid: 'c5169b50-f3b3-4693-8e4b-150fca17c333', - name: 'opbeans-go-5d795ddf6b-rhlvf', - }, - }, - parent: { - id: '4eeaa6dfbfd047cd', - }, - agent: { - name: 'go', - version: '1.14.0', - }, - source: { - ip: '10.12.0.22', - }, - cloud: { - availability_zone: 'us-central1-c', - instance: { - name: 'gke-dev-oblt-dev-oblt-pool-18e89389-qntq', - id: '5278603844673466232', - }, - provider: 'gcp', - machine: { - type: 'n1-standard-4', - }, - project: { - name: 'elastic-observability', - id: '8560181848', - }, - region: 'us-central1', - }, - observer: { - hostname: 'apm-apm-server-65d9d8dd68-lmf6c', - id: '7eedab18-1171-4a1b-a590-975e13fd103a', - type: 'apm-server', - ephemeral_id: '90034868-48e6-418c-8ab4-6616b403bca7', - version: '7.16.0', - version_major: 7, - }, - trace: { - id: 'd5e80ae688f1fef91533f02dd2bdc769', - }, - ecs: { - version: '1.11.0', - }, - host: { - os: { - platform: 'linux', - }, - ip: '10.12.0.14', - architecture: 'amd64', - }, - client: { - ip: '10.12.0.22', - }, - event: { - ingested: '2021-10-19T13:57:05.413190788Z', - outcome: 'failure', - }, - user_agent: { - original: 'http.rb/5.0.2', - name: 'Other', - device: { - name: 'Generic Feature Phone', - type: 'Other', - }, - }, - timestamp: { - us: 1634651822536408, - }, - process: { - args: [ - '/opbeans-go', - '-log-level=debug', - '-log-json', - '-listen=:3000', - '-frontend=/opbeans-frontend', - '-db=postgres:', - '-cache=redis://redis-master:6379', - ], - pid: 1, - title: 'opbeans-go', - ppid: 0, - }, - processor: { - name: 'transaction', - event: 'transaction', - }, - url: { - path: '/api/products/3', - scheme: 'http', - port: 3000, - domain: 'opbeans', - full: 'http://opbeans:3000/api/products/3', - }, - '@timestamp': '2021-10-19T13:57:02.536Z', - service: { - node: { - name: 'e7b69f99cb7523bedea6d7c97b684cf4b7ff458d0cba1efb1ac843300b3bf3c7', - }, - environment: 'testing', - framework: { - name: 'gin', - version: 'v1.7.3', - }, - name: 'opbeans-go', - runtime: { - name: 'gc', - version: 'go1.17.2', - }, - language: { - name: 'go', - version: 'go1.17.2', - }, - version: '2021-10-14 17:49:50', - }, - http: { - request: { - headers: { - Connection: ['close'], - 'User-Agent': ['http.rb/5.0.2'], - 'Elastic-Apm-Traceparent': [ - '00-d5e80ae688f1fef91533f02dd2bdc769-4eeaa6dfbfd047cd-01', - ], - Tracestate: ['es=s:1.0'], - Traceparent: [ - '00-d5e80ae688f1fef91533f02dd2bdc769-4eeaa6dfbfd047cd-01', - ], - }, - method: 'GET', - }, - response: { - headers: { - Date: ['Tue, 19 Oct 2021 13:57:02 GMT'], - 'Content-Type': ['application/json;charset=UTF-8'], - }, - status_code: 500, - }, - version: '1.1', - }, - transaction: { - result: 'HTTP 5xx', - duration: { - us: 13359, - }, - name: 'GET /api/products/:id', - id: '9f50f43e924d0b46', - span_count: { - dropped: 0, - started: 3, - }, - type: 'request', - sampled: true, - }, - }, - { - container: { - id: '015d1127421e2c3d42a0fb031fc75e989813f58973143b6c7e33dca6ccc6f31b', - }, - parent: { - id: '8d099ab4fcec4ab9', - }, - kubernetes: { - pod: { - uid: '459a6abf-198e-4107-b4dd-b0ae826755ab', - name: 'opbeans-go-nsn-69b89c4598-xsvgh', - }, - }, - agent: { - name: 'go', - version: '1.14.0', - }, - source: { - ip: '10.12.0.14', - }, - cloud: { - availability_zone: 'us-central1-c', - instance: { - name: 'gke-dev-oblt-dev-oblt-pool-18e89389-qntq', - id: '5278603844673466232', - }, - provider: 'gcp', - machine: { - type: 'n1-standard-4', - }, - project: { - name: 'elastic-observability', - id: '8560181848', - }, - region: 'us-central1', - }, - observer: { - hostname: 'apm-apm-server-65d9d8dd68-zvs6p', - id: '69a7066f-46d2-42c4-a4cc-8400f60bf2b5', - ephemeral_id: '0ab88569-c301-40e9-8e78-cac7c1dac2bc', - type: 'apm-server', - version: '7.16.0', - version_major: 7, - }, - trace: { - id: 'd5e80ae688f1fef91533f02dd2bdc769', - }, - ecs: { - version: '1.11.0', - }, - host: { - os: { - platform: 'linux', - }, - ip: '10.12.0.13', - architecture: 'amd64', - }, - client: { - ip: '10.12.0.22', - }, - event: { - ingested: '2021-10-19T13:57:08.267103644Z', - outcome: 'failure', - }, - user_agent: { - original: 'http.rb/5.0.2', - name: 'Other', - device: { - name: 'Generic Feature Phone', - type: 'Other', - }, - }, - timestamp: { - us: 1634651822536408, - }, - process: { - args: [ - '/opbeans-go', - '-log-level=debug', - '-log-json', - '-listen=:3000', - '-frontend=/opbeans-frontend', - '-db=postgres:', - '-cache=redis://redis-master:6379', - ], - pid: 1, - title: 'opbeans-go', - ppid: 0, - }, - processor: { - name: 'transaction', - event: 'transaction', - }, - url: { - path: '/api/products/3', - scheme: 'http', - port: 3000, - domain: 'opbeans', - full: 'http://opbeans:3000/api/products/3', - }, - '@timestamp': '2021-10-19T13:57:02.536Z', - service: { - node: { - name: '015d1127421e2c3d42a0fb031fc75e989813f58973143b6c7e33dca6ccc6f31b', - }, - environment: 'testing', - framework: { - name: 'gin', - version: 'v1.7.3', - }, - name: 'opbeans-go', - runtime: { - name: 'gc', - version: 'go1.17.2', - }, - language: { - name: 'go', - version: 'go1.17.2', - }, - version: '2021-10-14 17:49:50', - }, - http: { - request: { - headers: { - 'User-Agent': ['http.rb/5.0.2'], - 'X-Forwarded-For': ['10.12.0.22'], - 'Accept-Encoding': ['gzip'], - 'Elastic-Apm-Traceparent': [ - '00-d5e80ae688f1fef91533f02dd2bdc769-8d099ab4fcec4ab9-01', - ], - Tracestate: ['es=s:1.0'], - Traceparent: [ - '00-d5e80ae688f1fef91533f02dd2bdc769-8d099ab4fcec4ab9-01', - ], - }, - method: 'GET', - }, - response: { - headers: { - Date: ['Tue, 19 Oct 2021 13:57:02 GMT'], - 'Content-Type': ['application/json;charset=UTF-8'], - }, - status_code: 500, - }, - version: '1.1', - }, - transaction: { - result: 'HTTP 5xx', - duration: { - us: 13359, - }, - name: 'GET /api/products/:id', - span_count: { - dropped: 0, - started: 3, - }, - id: 'b7801be83bcdc972', - type: 'request', - sampled: true, - }, - }, - { - container: { - id: '59036ecb70908dfec4e03edc477f6875d08677871b4af0db3144373802d00cb1', - }, - kubernetes: { - pod: { - uid: '878bab2a-1309-44ae-a0e2-c98a0b187da1', - name: 'opbeans-java-5f45d77dd8-h8bnb', - }, - }, - parent: { - id: '35e3637e26919055', - }, - agent: { - name: 'java', - ephemeral_id: '75e36588-9adb-4bb0-bfee-a333b1c57e67', - version: 'unknown', - }, - source: { - ip: '10.12.0.13', - }, - cloud: { - availability_zone: 'us-central1-c', - instance: { - name: 'gke-dev-oblt-dev-oblt-pool-18e89389-qntq', - id: '5278603844673466232', - }, - provider: 'gcp', - machine: { - type: 'n1-standard-4', - }, - project: { - name: 'elastic-observability', - id: '8560181848', - }, - region: 'us-central1', - }, - observer: { - hostname: 'apm-apm-server-65d9d8dd68-lmf6c', - id: '7eedab18-1171-4a1b-a590-975e13fd103a', - ephemeral_id: '90034868-48e6-418c-8ab4-6616b403bca7', - type: 'apm-server', - version: '7.16.0', - version_major: 7, - }, - trace: { - id: 'd5e80ae688f1fef91533f02dd2bdc769', - }, - ecs: { - version: '1.11.0', - }, - host: { - os: { - platform: 'Linux', - }, - ip: '10.12.0.15', - architecture: 'amd64', - }, - client: { - ip: '10.12.0.22', - }, - event: { - ingested: '2021-10-19T13:57:10.382829210Z', - outcome: 'failure', - }, - user_agent: { - original: 'http.rb/5.0.2', - name: 'Other', - device: { - name: 'Generic Feature Phone', - type: 'Other', - }, - }, - timestamp: { - us: 1634651822536408, - }, - process: { - pid: 7, - title: '/opt/java/openjdk/bin/java', - ppid: 1, - }, - processor: { - name: 'transaction', - event: 'transaction', - }, - url: { - path: '/api/products/3', - scheme: 'http', - port: 3000, - domain: 'opbeans', - full: 'http://opbeans:3000/api/products/3', - }, - '@timestamp': '2021-10-19T13:57:02.536Z', - service: { - node: { - name: '59036ecb70908dfec4e03edc477f6875d08677871b4af0db3144373802d00cb1', - }, - environment: 'production', - framework: { - name: 'Spring Web MVC', - version: '5.0.6.RELEASE', - }, - name: 'opbeans-java', - runtime: { - name: 'Java', - version: '11.0.11', - }, - language: { - name: 'Java', - version: '11.0.11', - }, - version: '2021-10-14 17:49:52', - }, - http: { - request: { - headers: { - 'User-Agent': ['http.rb/5.0.2'], - 'X-Forwarded-For': ['10.12.0.22, 10.12.0.14'], - Host: ['opbeans:3000'], - 'Accept-Encoding': ['gzip'], - 'Elastic-Apm-Traceparent': [ - '00-d5e80ae688f1fef91533f02dd2bdc769-35e3637e26919055-01', - ], - Tracestate: ['es=s:1.0'], - Traceparent: [ - '00-d5e80ae688f1fef91533f02dd2bdc769-35e3637e26919055-01', - ], - }, - method: 'GET', - }, - response: { - status_code: 500, - finished: true, - headers_sent: true, - }, - version: '1.1', - }, - transaction: { - duration: { - us: 13359, - }, - result: 'HTTP 5xx', - name: 'APIRestController#product', - id: '2c30263c4ad8fe8b', - span_count: { - dropped: 0, - started: 3, - }, - type: 'request', - sampled: true, - }, - }, - { - parent: { - id: '9a7f717439921d39', - }, - agent: { - name: 'ruby', - version: '4.3.0', - }, - destination: { - address: 'opbeans', - port: 3000, - }, - cloud: { - availability_zone: 'us-central1-c', - instance: { - name: 'gke-dev-oblt-dev-oblt-pool-18e89389-qntq', - id: '5278603844673466232', - }, - provider: 'gcp', - machine: { - type: 'projects/8560181848/machineTypes/n1-standard-4', - }, - project: { - name: 'elastic-observability', - id: '8560181848', - }, - region: 'us-central1', - }, - observer: { - hostname: 'apm-apm-server-65d9d8dd68-lmf6c', - id: '7eedab18-1171-4a1b-a590-975e13fd103a', - ephemeral_id: '90034868-48e6-418c-8ab4-6616b403bca7', - type: 'apm-server', - version: '7.16.0', - version_major: 7, - }, - trace: { - id: 'd5e80ae688f1fef91533f02dd2bdc769', - }, - ecs: { - version: '1.11.0', - }, - event: { - outcome: 'failure', - }, - timestamp: { - us: 1634651822536408, - }, - processor: { - name: 'transaction', - event: 'span', - }, - url: { - original: 'http://opbeans:3000/api/products/3', - }, - '@timestamp': '2021-10-19T13:57:02.536Z', - service: { - environment: 'production', - name: 'opbeans-ruby', - }, - http: { - request: { - method: 'GET', - }, - response: { - status_code: 500, - }, - }, - transaction: { - id: '9a7f717439921d39', - }, - span: { - duration: { - us: 13359, - }, - stacktrace: [ - { - exclude_from_grouping: false, - library_frame: true, - filename: 'elastic_apm.rb', - abs_path: - '/usr/local/bundle/gems/elastic-apm-4.3.0/lib/elastic_apm.rb', - line: { - number: 235, - }, - function: 'tap', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'elastic_apm.rb', - abs_path: - '/usr/local/bundle/gems/elastic-apm-4.3.0/lib/elastic_apm.rb', - line: { - number: 235, - }, - function: 'start_span', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'elastic_apm.rb', - abs_path: - '/usr/local/bundle/gems/elastic-apm-4.3.0/lib/elastic_apm.rb', - line: { - number: 287, - }, - function: 'with_span', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'elastic_apm/spies/http.rb', - abs_path: - '/usr/local/bundle/gems/elastic-apm-4.3.0/lib/elastic_apm/spies/http.rb', - line: { - number: 45, - }, - function: 'perform', - }, - { - library_frame: true, - exclude_from_grouping: false, - abs_path: '/usr/local/bundle/gems/http-5.0.2/lib/http/client.rb', - filename: 'http/client.rb', - line: { - number: 31, - }, - function: 'request', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'http/chainable.rb', - abs_path: '/usr/local/bundle/gems/http-5.0.2/lib/http/chainable.rb', - line: { - number: 75, - }, - function: 'request', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'http/chainable.rb', - abs_path: '/usr/local/bundle/gems/http-5.0.2/lib/http/chainable.rb', - line: { - number: 20, - }, - function: 'get', - }, - { - exclude_from_grouping: false, - filename: 'opbeans_shuffle.rb', - abs_path: '/app/lib/opbeans_shuffle.rb', - line: { - number: 23, - context: ' resp = HTTP.get("#{lucky_winner}#{path}")\n', - }, - function: 'block in call', - context: { - pre: ['\n', ' Timeout.timeout(15) do\n'], - post: ['\n', ' [\n'], - }, - }, - { - exclude_from_grouping: false, - library_frame: true, - filename: 'timeout.rb', - abs_path: '/usr/local/lib/ruby/2.7.0/timeout.rb', - line: { - number: 95, - }, - function: 'block in timeout', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'timeout.rb', - abs_path: '/usr/local/lib/ruby/2.7.0/timeout.rb', - line: { - number: 33, - }, - function: 'block in catch', - }, - { - library_frame: true, - exclude_from_grouping: false, - abs_path: '/usr/local/lib/ruby/2.7.0/timeout.rb', - filename: 'timeout.rb', - line: { - number: 33, - }, - function: 'catch', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'timeout.rb', - abs_path: '/usr/local/lib/ruby/2.7.0/timeout.rb', - line: { - number: 33, - }, - function: 'catch', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'timeout.rb', - abs_path: '/usr/local/lib/ruby/2.7.0/timeout.rb', - line: { - number: 110, - }, - function: 'timeout', - }, - { - exclude_from_grouping: false, - filename: 'opbeans_shuffle.rb', - abs_path: '/app/lib/opbeans_shuffle.rb', - line: { - number: 22, - context: ' Timeout.timeout(15) do\n', - }, - function: 'call', - context: { - pre: [' end\n', '\n'], - post: [ - ' resp = HTTP.get("#{lucky_winner}#{path}")\n', - '\n', - ], - }, - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'elastic_apm/middleware.rb', - abs_path: - '/usr/local/bundle/gems/elastic-apm-4.3.0/lib/elastic_apm/middleware.rb', - line: { - number: 36, - }, - function: 'call', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'rails/engine.rb', - abs_path: - '/usr/local/bundle/gems/railties-6.1.4.1/lib/rails/engine.rb', - line: { - number: 539, - }, - function: 'call', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'puma/configuration.rb', - abs_path: - '/usr/local/bundle/gems/puma-5.5.0/lib/puma/configuration.rb', - line: { - number: 249, - }, - function: 'call', - }, - { - library_frame: true, - exclude_from_grouping: false, - abs_path: '/usr/local/bundle/gems/puma-5.5.0/lib/puma/request.rb', - filename: 'puma/request.rb', - line: { - number: 77, - }, - function: 'block in handle_request', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'puma/thread_pool.rb', - abs_path: - '/usr/local/bundle/gems/puma-5.5.0/lib/puma/thread_pool.rb', - line: { - number: 340, - }, - function: 'with_force_shutdown', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'puma/request.rb', - abs_path: '/usr/local/bundle/gems/puma-5.5.0/lib/puma/request.rb', - line: { - number: 76, - }, - function: 'handle_request', - }, - { - exclude_from_grouping: false, - library_frame: true, - filename: 'puma/server.rb', - abs_path: '/usr/local/bundle/gems/puma-5.5.0/lib/puma/server.rb', - line: { - number: 447, - }, - function: 'process_client', - }, - { - exclude_from_grouping: false, - library_frame: true, - filename: 'puma/thread_pool.rb', - abs_path: - '/usr/local/bundle/gems/puma-5.5.0/lib/puma/thread_pool.rb', - line: { - number: 147, - }, - function: 'block in spawn_thread', - }, - ], - subtype: 'http', - destination: { - service: { - resource: 'opbeans:3000', - name: 'http', - type: 'external', - }, - }, - name: 'GET opbeans', - http: { - method: 'GET', - response: { - status_code: 500, - }, - }, - 'http.url.original': 'http://opbeans:3000/api/products/3', - id: '4eeaa6dfbfd047cd', - type: 'external', - }, - }, - { - parent: { - id: '9f50f43e924d0b46', - }, - agent: { - name: 'go', - version: '1.14.0', - }, - destination: { - address: 'opbeans', - port: 3000, - }, - cloud: { - availability_zone: 'us-central1-c', - instance: { - name: 'gke-dev-oblt-dev-oblt-pool-18e89389-qntq', - id: '5278603844673466232', - }, - provider: 'gcp', - machine: { - type: 'n1-standard-4', - }, - project: { - name: 'elastic-observability', - id: '8560181848', - }, - region: 'us-central1', - }, - observer: { - hostname: 'apm-apm-server-65d9d8dd68-lmf6c', - id: '7eedab18-1171-4a1b-a590-975e13fd103a', - ephemeral_id: '90034868-48e6-418c-8ab4-6616b403bca7', - type: 'apm-server', - version: '7.16.0', - version_major: 7, - }, - trace: { - id: 'd5e80ae688f1fef91533f02dd2bdc769', - }, - ecs: { - version: '1.11.0', - }, - event: { - outcome: 'failure', - }, - timestamp: { - us: 1634651822536408, - }, - processor: { - name: 'transaction', - event: 'span', - }, - url: { - original: 'http://opbeans:3000/api/products/3', - }, - '@timestamp': '2021-10-19T13:57:02.536Z', - service: { - environment: 'testing', - name: 'opbeans-go', - }, - http: { - response: { - status_code: 500, - }, - }, - transaction: { - id: '9f50f43e924d0b46', - }, - span: { - duration: { - us: 13359, - }, - stacktrace: [ - { - exclude_from_grouping: false, - library_frame: true, - filename: 'span.go', - abs_path: '/go/pkg/mod/go.elastic.co/apm@v1.14.0/span.go', - line: { - number: 334, - }, - module: 'go.elastic.co/apm', - function: '(*Span).End', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'client.go', - abs_path: - '/go/pkg/mod/go.elastic.co/apm/module/apmhttp@v1.14.0/client.go', - line: { - number: 198, - }, - module: 'go.elastic.co/apm/module/apmhttp', - function: '(*responseBody).endSpan', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'client.go', - abs_path: - '/go/pkg/mod/go.elastic.co/apm/module/apmhttp@v1.14.0/client.go', - line: { - number: 187, - }, - function: '(*responseBody).Read', - module: 'go.elastic.co/apm/module/apmhttp', - }, - { - exclude_from_grouping: false, - library_frame: true, - filename: 'reverseproxy.go', - abs_path: '/usr/local/go/src/net/http/httputil/reverseproxy.go', - line: { - number: 461, - }, - module: 'net/http/httputil', - function: '(*ReverseProxy).copyBuffer', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'reverseproxy.go', - abs_path: '/usr/local/go/src/net/http/httputil/reverseproxy.go', - line: { - number: 449, - }, - module: 'net/http/httputil', - function: '(*ReverseProxy).copyResponse', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'reverseproxy.go', - abs_path: '/usr/local/go/src/net/http/httputil/reverseproxy.go', - line: { - number: 338, - }, - module: 'net/http/httputil', - function: '(*ReverseProxy).ServeHTTP', - }, - { - exclude_from_grouping: false, - filename: 'main.go', - abs_path: '/src/opbeans-go/main.go', - line: { - number: 196, - }, - module: 'main', - function: 'Main.func2', - }, - { - library_frame: true, - exclude_from_grouping: false, - abs_path: '/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/context.go', - filename: 'context.go', - line: { - number: 165, - }, - module: 'github.com/gin-gonic/gin', - function: '(*Context).Next', - }, - { - exclude_from_grouping: false, - filename: 'main.go', - abs_path: '/src/opbeans-go/main.go', - line: { - number: 174, - }, - module: 'main', - function: 'Main.func1', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'context.go', - abs_path: '/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/context.go', - line: { - number: 165, - }, - module: 'github.com/gin-gonic/gin', - function: '(*Context).Next', - }, - { - exclude_from_grouping: false, - filename: 'logger.go', - abs_path: '/src/opbeans-go/logger.go', - line: { - number: 36, - }, - module: 'main', - function: 'logrusMiddleware', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'context.go', - abs_path: '/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/context.go', - line: { - number: 165, - }, - module: 'github.com/gin-gonic/gin', - function: '(*Context).Next', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'middleware.go', - abs_path: - '/go/pkg/mod/go.elastic.co/apm/module/apmgin@v1.14.0/middleware.go', - line: { - number: 98, - }, - module: 'go.elastic.co/apm/module/apmgin', - function: '(*middleware).handle', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'context.go', - abs_path: '/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/context.go', - line: { - number: 165, - }, - module: 'github.com/gin-gonic/gin', - function: '(*Context).Next', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'cache.go', - abs_path: - '/go/pkg/mod/github.com/gin-contrib/cache@v1.1.0/cache.go', - line: { - number: 128, - }, - module: 'github.com/gin-contrib/cache', - function: 'Cache.func1', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'context.go', - abs_path: '/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/context.go', - line: { - number: 165, - }, - module: 'github.com/gin-gonic/gin', - function: '(*Context).Next', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'gin.go', - abs_path: '/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/gin.go', - line: { - number: 489, - }, - function: '(*Engine).handleHTTPRequest', - module: 'github.com/gin-gonic/gin', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'gin.go', - abs_path: '/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/gin.go', - line: { - number: 445, - }, - function: '(*Engine).ServeHTTP', - module: 'github.com/gin-gonic/gin', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'server.go', - abs_path: '/usr/local/go/src/net/http/server.go', - line: { - number: 2878, - }, - module: 'net/http', - function: 'serverHandler.ServeHTTP', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'server.go', - abs_path: '/usr/local/go/src/net/http/server.go', - line: { - number: 1929, - }, - module: 'net/http', - function: '(*conn).serve', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'asm_amd64.s', - abs_path: '/usr/local/go/src/runtime/asm_amd64.s', - line: { - number: 1581, - }, - module: 'runtime', - function: 'goexit', - }, - ], - subtype: 'http', - name: 'GET opbeans:3000', - destination: { - service: { - resource: 'opbeans:3000', - name: 'http://opbeans:3000', - type: 'external', - }, - }, - http: { - response: { - status_code: 500, - }, - }, - 'http.url.original': 'http://opbeans:3000/api/products/3', - id: '8d099ab4fcec4ab9', - type: 'external', - }, - }, - { - parent: { - id: '86c43ac014573747', - }, - agent: { - name: 'go', - version: '1.14.0', - }, - processor: { - name: 'transaction', - event: 'span', - }, - cloud: { - availability_zone: 'us-central1-c', - instance: { - name: 'gke-dev-oblt-dev-oblt-pool-18e89389-qntq', - id: '5278603844673466232', - }, - provider: 'gcp', - machine: { - type: 'n1-standard-4', - }, - project: { - name: 'elastic-observability', - id: '8560181848', - }, - region: 'us-central1', - }, - observer: { - hostname: 'apm-apm-server-65d9d8dd68-lmf6c', - id: '7eedab18-1171-4a1b-a590-975e13fd103a', - type: 'apm-server', - ephemeral_id: '90034868-48e6-418c-8ab4-6616b403bca7', - version: '7.16.0', - version_major: 7, - }, - trace: { - id: 'd5e80ae688f1fef91533f02dd2bdc769', - }, - '@timestamp': '2021-10-19T13:57:02.539Z', - ecs: { - version: '1.11.0', - }, - service: { - environment: 'testing', - name: 'opbeans-go', - }, - event: { - outcome: 'unknown', - }, - transaction: { - id: '9f50f43e924d0b46', - }, - span: { - duration: { - us: 13359, - }, - stacktrace: [ - { - exclude_from_grouping: false, - library_frame: true, - filename: 'span.go', - abs_path: '/go/pkg/mod/go.elastic.co/apm@v1.14.0/span.go', - line: { - number: 334, - }, - module: 'go.elastic.co/apm', - function: '(*Span).End', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'clienttrace.go', - abs_path: - '/go/pkg/mod/go.elastic.co/apm/module/apmhttp@v1.14.0/clienttrace.go', - line: { - number: 130, - }, - module: 'go.elastic.co/apm/module/apmhttp', - function: 'withClientTrace.func8', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'transport.go', - abs_path: '/usr/local/go/src/net/http/transport.go', - line: { - number: 2272, - }, - function: '(*persistConn).readResponse', - module: 'net/http', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'transport.go', - abs_path: '/usr/local/go/src/net/http/transport.go', - line: { - number: 2102, - }, - function: '(*persistConn).readLoop', - module: 'net/http', - }, - { - exclude_from_grouping: false, - library_frame: true, - filename: 'asm_amd64.s', - abs_path: '/usr/local/go/src/runtime/asm_amd64.s', - line: { - number: 1581, - }, - module: 'runtime', - function: 'goexit', - }, - ], - subtype: 'http', - name: 'Request', - action: 'request', - id: '997cdcc26a60d0ad', - type: 'external', - }, - timestamp: { - us: 1634651822536408, - }, - }, - { - parent: { - id: 'b7801be83bcdc972', - }, - agent: { - name: 'go', - version: '1.14.0', - }, - destination: { - address: 'opbeans', - port: 3000, - }, - cloud: { - availability_zone: 'us-central1-c', - instance: { - name: 'gke-dev-oblt-dev-oblt-pool-18e89389-qntq', - id: '5278603844673466232', - }, - provider: 'gcp', - machine: { - type: 'n1-standard-4', - }, - project: { - name: 'elastic-observability', - id: '8560181848', - }, - region: 'us-central1', - }, - observer: { - hostname: 'apm-apm-server-65d9d8dd68-zvs6p', - id: '69a7066f-46d2-42c4-a4cc-8400f60bf2b5', - ephemeral_id: '0ab88569-c301-40e9-8e78-cac7c1dac2bc', - type: 'apm-server', - version: '7.16.0', - version_major: 7, - }, - trace: { - id: 'd5e80ae688f1fef91533f02dd2bdc769', - }, - ecs: { - version: '1.11.0', - }, - event: { - outcome: 'failure', - }, - timestamp: { - us: 1634651822536408, - }, - processor: { - name: 'transaction', - event: 'span', - }, - url: { - original: 'http://opbeans:3000/api/products/3', - }, - '@timestamp': '2021-10-19T13:57:02.539Z', - service: { - environment: 'testing', - name: 'opbeans-go', - }, - http: { - response: { - status_code: 500, - }, - }, - transaction: { - id: 'b7801be83bcdc972', - }, - span: { - duration: { - us: 13359, - }, - stacktrace: [ - { - library_frame: true, - exclude_from_grouping: false, - filename: 'span.go', - abs_path: '/go/pkg/mod/go.elastic.co/apm@v1.14.0/span.go', - line: { - number: 334, - }, - module: 'go.elastic.co/apm', - function: '(*Span).End', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'client.go', - abs_path: - '/go/pkg/mod/go.elastic.co/apm/module/apmhttp@v1.14.0/client.go', - line: { - number: 198, - }, - module: 'go.elastic.co/apm/module/apmhttp', - function: '(*responseBody).endSpan', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'client.go', - abs_path: - '/go/pkg/mod/go.elastic.co/apm/module/apmhttp@v1.14.0/client.go', - line: { - number: 187, - }, - module: 'go.elastic.co/apm/module/apmhttp', - function: '(*responseBody).Read', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'reverseproxy.go', - abs_path: '/usr/local/go/src/net/http/httputil/reverseproxy.go', - line: { - number: 461, - }, - module: 'net/http/httputil', - function: '(*ReverseProxy).copyBuffer', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'reverseproxy.go', - abs_path: '/usr/local/go/src/net/http/httputil/reverseproxy.go', - line: { - number: 449, - }, - module: 'net/http/httputil', - function: '(*ReverseProxy).copyResponse', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'reverseproxy.go', - abs_path: '/usr/local/go/src/net/http/httputil/reverseproxy.go', - line: { - number: 338, - }, - module: 'net/http/httputil', - function: '(*ReverseProxy).ServeHTTP', - }, - { - exclude_from_grouping: false, - filename: 'main.go', - abs_path: '/src/opbeans-go/main.go', - line: { - number: 196, - }, - module: 'main', - function: 'Main.func2', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'context.go', - abs_path: '/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/context.go', - line: { - number: 165, - }, - module: 'github.com/gin-gonic/gin', - function: '(*Context).Next', - }, - { - exclude_from_grouping: false, - filename: 'main.go', - abs_path: '/src/opbeans-go/main.go', - line: { - number: 174, - }, - module: 'main', - function: 'Main.func1', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'context.go', - abs_path: '/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/context.go', - line: { - number: 165, - }, - module: 'github.com/gin-gonic/gin', - function: '(*Context).Next', - }, - { - exclude_from_grouping: false, - filename: 'logger.go', - abs_path: '/src/opbeans-go/logger.go', - line: { - number: 36, - }, - module: 'main', - function: 'logrusMiddleware', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'context.go', - abs_path: '/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/context.go', - line: { - number: 165, - }, - module: 'github.com/gin-gonic/gin', - function: '(*Context).Next', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'middleware.go', - abs_path: - '/go/pkg/mod/go.elastic.co/apm/module/apmgin@v1.14.0/middleware.go', - line: { - number: 98, - }, - function: '(*middleware).handle', - module: 'go.elastic.co/apm/module/apmgin', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'context.go', - abs_path: '/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/context.go', - line: { - number: 165, - }, - module: 'github.com/gin-gonic/gin', - function: '(*Context).Next', - }, - { - library_frame: true, - exclude_from_grouping: false, - abs_path: - '/go/pkg/mod/github.com/gin-contrib/cache@v1.1.0/cache.go', - filename: 'cache.go', - line: { - number: 128, - }, - module: 'github.com/gin-contrib/cache', - function: 'Cache.func1', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'context.go', - abs_path: '/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/context.go', - line: { - number: 165, - }, - function: '(*Context).Next', - module: 'github.com/gin-gonic/gin', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'gin.go', - abs_path: '/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/gin.go', - line: { - number: 489, - }, - module: 'github.com/gin-gonic/gin', - function: '(*Engine).handleHTTPRequest', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'gin.go', - abs_path: '/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/gin.go', - line: { - number: 445, - }, - module: 'github.com/gin-gonic/gin', - function: '(*Engine).ServeHTTP', - }, - { - library_frame: true, - exclude_from_grouping: false, - abs_path: '/usr/local/go/src/net/http/server.go', - filename: 'server.go', - line: { - number: 2878, - }, - module: 'net/http', - function: 'serverHandler.ServeHTTP', - }, - { - library_frame: true, - exclude_from_grouping: false, - abs_path: '/usr/local/go/src/net/http/server.go', - filename: 'server.go', - line: { - number: 1929, - }, - module: 'net/http', - function: '(*conn).serve', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'asm_amd64.s', - abs_path: '/usr/local/go/src/runtime/asm_amd64.s', - line: { - number: 1581, - }, - module: 'runtime', - function: 'goexit', - }, - ], - subtype: 'http', - name: 'GET opbeans:3000', - destination: { - service: { - resource: 'opbeans:3000', - name: 'http://opbeans:3000', - type: 'external', - }, - }, - http: { - response: { - status_code: 500, - }, - }, - 'http.url.original': 'http://opbeans:3000/api/products/3', - id: '35e3637e26919055', - type: 'external', - }, - }, - { - parent: { - id: '84749ec73b1268b3', - }, - agent: { - name: 'go', - version: '1.14.0', - }, - processor: { - name: 'transaction', - event: 'span', - }, - cloud: { - availability_zone: 'us-central1-c', - instance: { - name: 'gke-dev-oblt-dev-oblt-pool-18e89389-qntq', - id: '5278603844673466232', - }, - provider: 'gcp', - machine: { - type: 'n1-standard-4', - }, - project: { - name: 'elastic-observability', - id: '8560181848', - }, - region: 'us-central1', - }, - observer: { - hostname: 'apm-apm-server-65d9d8dd68-zvs6p', - id: '69a7066f-46d2-42c4-a4cc-8400f60bf2b5', - type: 'apm-server', - ephemeral_id: '0ab88569-c301-40e9-8e78-cac7c1dac2bc', - version: '7.16.0', - version_major: 7, - }, - trace: { - id: 'd5e80ae688f1fef91533f02dd2bdc769', - }, - '@timestamp': '2021-10-19T13:57:02.539Z', - ecs: { - version: '1.11.0', - }, - service: { - environment: 'testing', - name: 'opbeans-go', - }, - event: { - outcome: 'unknown', - }, - transaction: { - id: 'b7801be83bcdc972', - }, - span: { - duration: { - us: 13359, - }, - stacktrace: [ - { - library_frame: true, - exclude_from_grouping: false, - filename: 'span.go', - abs_path: '/go/pkg/mod/go.elastic.co/apm@v1.14.0/span.go', - line: { - number: 334, - }, - module: 'go.elastic.co/apm', - function: '(*Span).End', - }, - { - exclude_from_grouping: false, - library_frame: true, - filename: 'clienttrace.go', - abs_path: - '/go/pkg/mod/go.elastic.co/apm/module/apmhttp@v1.14.0/clienttrace.go', - line: { - number: 130, - }, - module: 'go.elastic.co/apm/module/apmhttp', - function: 'withClientTrace.func8', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'transport.go', - abs_path: '/usr/local/go/src/net/http/transport.go', - line: { - number: 2272, - }, - module: 'net/http', - function: '(*persistConn).readResponse', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'transport.go', - abs_path: '/usr/local/go/src/net/http/transport.go', - line: { - number: 2102, - }, - module: 'net/http', - function: '(*persistConn).readLoop', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'asm_amd64.s', - abs_path: '/usr/local/go/src/runtime/asm_amd64.s', - line: { - number: 1581, - }, - module: 'runtime', - function: 'goexit', - }, - ], - subtype: 'http', - name: 'Request', - action: 'request', - id: 'a9b4d44c3d699cbb', - type: 'external', - }, - timestamp: { - us: 1634651822536408, - }, - }, - { - parent: { - id: '2c30263c4ad8fe8b', - }, - agent: { - name: 'java', - ephemeral_id: '75e36588-9adb-4bb0-bfee-a333b1c57e67', - version: 'unknown', - }, - processor: { - name: 'transaction', - event: 'span', - }, - labels: { - productId: '3', - }, - cloud: { - availability_zone: 'us-central1-c', - instance: { - name: 'gke-dev-oblt-dev-oblt-pool-18e89389-qntq', - id: '5278603844673466232', - }, - provider: 'gcp', - machine: { - type: 'n1-standard-4', - }, - project: { - name: 'elastic-observability', - id: '8560181848', - }, - region: 'us-central1', - }, - observer: { - hostname: 'apm-apm-server-65d9d8dd68-lmf6c', - id: '7eedab18-1171-4a1b-a590-975e13fd103a', - ephemeral_id: '90034868-48e6-418c-8ab4-6616b403bca7', - type: 'apm-server', - version: '7.16.0', - version_major: 7, - }, - trace: { - id: 'd5e80ae688f1fef91533f02dd2bdc769', - }, - '@timestamp': '2021-10-19T13:57:02.540Z', - ecs: { - version: '1.11.0', - }, - service: { - environment: 'production', - name: 'opbeans-java', - }, - event: { - outcome: 'success', - }, - transaction: { - id: '2c30263c4ad8fe8b', - }, - span: { - duration: { - us: 13359, - }, - name: 'OpenTracing product span', - id: 'd22c1e48b2489017', - type: 'custom', - }, - timestamp: { - us: 1634651822536408, - }, - }, - { - parent: { - id: 'd22c1e48b2489017', - }, - agent: { - name: 'java', - ephemeral_id: '75e36588-9adb-4bb0-bfee-a333b1c57e67', - version: 'unknown', - }, - destination: { - address: 'db-postgresql', - port: 5432, - }, - processor: { - name: 'transaction', - event: 'span', - }, - cloud: { - availability_zone: 'us-central1-c', - instance: { - name: 'gke-dev-oblt-dev-oblt-pool-18e89389-qntq', - id: '5278603844673466232', - }, - provider: 'gcp', - machine: { - type: 'n1-standard-4', - }, - project: { - name: 'elastic-observability', - id: '8560181848', - }, - region: 'us-central1', - }, - observer: { - hostname: 'apm-apm-server-65d9d8dd68-lmf6c', - id: '7eedab18-1171-4a1b-a590-975e13fd103a', - type: 'apm-server', - ephemeral_id: '90034868-48e6-418c-8ab4-6616b403bca7', - version: '7.16.0', - version_major: 7, - }, - trace: { - id: 'd5e80ae688f1fef91533f02dd2bdc769', - }, - '@timestamp': '2021-10-19T13:57:02.542Z', - ecs: { - version: '1.11.0', - }, - service: { - environment: 'production', - name: 'opbeans-java', - }, - event: { - outcome: 'success', - }, - transaction: { - id: '2c30263c4ad8fe8b', - }, - timestamp: { - us: 1634651822536408, - }, - span: { - duration: { - us: 13359, - }, - subtype: 'postgresql', - destination: { - service: { - resource: 'postgresql', - }, - }, - name: 'SELECT FROM products', - action: 'query', - id: '3851260ca4365f9e', - type: 'db', - db: { - instance: 'opbeans-java', - statement: - 'select product0_.id as col_0_0_, product0_.sku as col_1_0_, product0_.name as col_2_0_, product0_.description as col_3_0_, product0_.cost as col_4_0_, product0_.selling_price as col_5_0_, product0_.stock as col_6_0_, producttyp1_.id as col_7_0_, producttyp1_.name as col_8_0_, (select sum(orderline2_.amount) from order_lines orderline2_ where orderline2_.product_id=product0_.id) as col_9_0_ from products product0_ left outer join product_types producttyp1_ on product0_.type_id=producttyp1_.id where product0_.id=?', - type: 'sql', - user: { - name: 'elastic', - }, - }, - }, - }, - { - parent: { - id: '3851260ca4365f9e', - }, - agent: { - name: 'java', - ephemeral_id: '75e36588-9adb-4bb0-bfee-a333b1c57e67', - version: 'unknown', - }, - destination: { - address: 'db-postgresql', - port: 5432, - }, - processor: { - name: 'transaction', - event: 'span', - }, - cloud: { - availability_zone: 'us-central1-c', - instance: { - name: 'gke-dev-oblt-dev-oblt-pool-18e89389-qntq', - id: '5278603844673466232', - }, - provider: 'gcp', - machine: { - type: 'n1-standard-4', - }, - project: { - name: 'elastic-observability', - id: '8560181848', - }, - region: 'us-central1', - }, - observer: { - hostname: 'apm-apm-server-65d9d8dd68-lmf6c', - id: '7eedab18-1171-4a1b-a590-975e13fd103a', - type: 'apm-server', - ephemeral_id: '90034868-48e6-418c-8ab4-6616b403bca7', - version: '7.16.0', - version_major: 7, - }, - trace: { - id: 'd5e80ae688f1fef91533f02dd2bdc769', - }, - '@timestamp': '2021-10-19T13:57:02.541Z', - ecs: { - version: '1.11.0', - }, - service: { - environment: 'production', - name: 'opbeans-java', - }, - event: { - outcome: 'success', - }, - transaction: { - id: '2c30263c4ad8fe8b', - }, - span: { - duration: { - us: 13359, - }, - subtype: 'postgresql', - destination: { - service: { - resource: 'postgresql', - }, - }, - name: 'empty query', - action: 'query', - id: '86c43ac014573747', - type: 'db', - db: { - rows_affected: 0, - instance: 'opbeans-java', - statement: '(empty query)', - type: 'sql', - user: { - name: 'elastic', - }, - }, - }, - timestamp: { - us: 1634651822536408, - }, - }, - { - parent: { - id: '997cdcc26a60d0ad', - }, - agent: { - name: 'go', - version: '1.14.0', - }, - processor: { - name: 'transaction', - event: 'span', - }, - cloud: { - availability_zone: 'us-central1-c', - instance: { - name: 'gke-dev-oblt-dev-oblt-pool-18e89389-qntq', - id: '5278603844673466232', - }, - provider: 'gcp', - machine: { - type: 'n1-standard-4', - }, - project: { - name: 'elastic-observability', - id: '8560181848', - }, - region: 'us-central1', - }, - observer: { - hostname: 'apm-apm-server-65d9d8dd68-lmf6c', - id: '7eedab18-1171-4a1b-a590-975e13fd103a', - type: 'apm-server', - ephemeral_id: '90034868-48e6-418c-8ab4-6616b403bca7', - version: '7.16.0', - version_major: 7, - }, - trace: { - id: 'd5e80ae688f1fef91533f02dd2bdc769', - }, - '@timestamp': '2021-10-19T13:57:02.548Z', - ecs: { - version: '1.11.0', - }, - service: { - environment: 'testing', - name: 'opbeans-go', - }, - event: { - outcome: 'unknown', - }, - transaction: { - id: '9f50f43e924d0b46', - }, - timestamp: { - us: 1634651822536408, - }, - span: { - duration: { - us: 13359, - }, - subtype: 'http', - name: 'Response', - action: 'response', - id: '84749ec73b1268b3', - type: 'external', - }, - }, - { - parent: { - id: 'a9b4d44c3d699cbb', - }, - agent: { - name: 'go', - version: '1.14.0', - }, - processor: { - name: 'transaction', - event: 'span', - }, - cloud: { - availability_zone: 'us-central1-c', - instance: { - name: 'gke-dev-oblt-dev-oblt-pool-18e89389-qntq', - id: '5278603844673466232', - }, - provider: 'gcp', - machine: { - type: 'n1-standard-4', - }, - project: { - name: 'elastic-observability', - id: '8560181848', - }, - region: 'us-central1', - }, - observer: { - hostname: 'apm-apm-server-65d9d8dd68-zvs6p', - id: '69a7066f-46d2-42c4-a4cc-8400f60bf2b5', - type: 'apm-server', - ephemeral_id: '0ab88569-c301-40e9-8e78-cac7c1dac2bc', - version: '7.16.0', - version_major: 7, - }, - trace: { - id: 'd5e80ae688f1fef91533f02dd2bdc769', - }, - '@timestamp': '2021-10-19T13:57:02.547Z', - ecs: { - version: '1.11.0', - }, - service: { - environment: 'testing', - name: 'opbeans-go', - }, - event: { - outcome: 'unknown', - }, - transaction: { - id: 'b7801be83bcdc972', - }, - span: { - duration: { - us: 13359, - }, - subtype: 'http', - name: 'Response', - action: 'response', - id: '04991f3b9d3696c5', - type: 'external', - }, - timestamp: { - us: 1634651822536408, - }, - }, - ], - errorDocs: [ - { - container: { - id: '59036ecb70908dfec4e03edc477f6875d08677871b4af0db3144373802d00cb1', - }, - kubernetes: { - pod: { - uid: '878bab2a-1309-44ae-a0e2-c98a0b187da1', - name: 'opbeans-java-5f45d77dd8-h8bnb', - }, - }, - parent: { - id: '2c30263c4ad8fe8b', - }, - agent: { - name: 'java', - ephemeral_id: '75e36588-9adb-4bb0-bfee-a333b1c57e67', - version: 'unknown', - }, - source: { - ip: '10.12.0.13', - }, - error: { - exception: [ - { - stacktrace: [ - { - exclude_from_grouping: false, - library_frame: true, - filename: 'AbstractMessageConverterMethodProcessor.java', - classname: - 'org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor', - line: { - number: 226, - }, - module: 'org.springframework.web.servlet.mvc.method.annotation', - function: 'writeWithMessageConverters', - }, - { - exclude_from_grouping: false, - library_frame: true, - filename: 'RequestResponseBodyMethodProcessor.java', - classname: - 'org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor', - line: { - number: 180, - }, - module: 'org.springframework.web.servlet.mvc.method.annotation', - function: 'handleReturnValue', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'HandlerMethodReturnValueHandlerComposite.java', - classname: - 'org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite', - line: { - number: 82, - }, - module: 'org.springframework.web.method.support', - function: 'handleReturnValue', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'ServletInvocableHandlerMethod.java', - classname: - 'org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod', - line: { - number: 119, - }, - module: 'org.springframework.web.servlet.mvc.method.annotation', - function: 'invokeAndHandle', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'RequestMappingHandlerAdapter.java', - classname: - 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter', - line: { - number: 877, - }, - function: 'invokeHandlerMethod', - module: 'org.springframework.web.servlet.mvc.method.annotation', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'RequestMappingHandlerAdapter.java', - classname: - 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter', - line: { - number: 783, - }, - module: 'org.springframework.web.servlet.mvc.method.annotation', - function: 'handleInternal', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'AbstractHandlerMethodAdapter.java', - classname: - 'org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter', - line: { - number: 87, - }, - module: 'org.springframework.web.servlet.mvc.method', - function: 'handle', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'DispatcherServlet.java', - classname: 'org.springframework.web.servlet.DispatcherServlet', - line: { - number: 991, - }, - function: 'doDispatch', - module: 'org.springframework.web.servlet', - }, - { - exclude_from_grouping: false, - library_frame: true, - filename: 'DispatcherServlet.java', - classname: 'org.springframework.web.servlet.DispatcherServlet', - line: { - number: 925, - }, - module: 'org.springframework.web.servlet', - function: 'doService', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'FrameworkServlet.java', - classname: 'org.springframework.web.servlet.FrameworkServlet', - line: { - number: 974, - }, - module: 'org.springframework.web.servlet', - function: 'processRequest', - }, - { - exclude_from_grouping: false, - library_frame: true, - filename: 'FrameworkServlet.java', - classname: 'org.springframework.web.servlet.FrameworkServlet', - line: { - number: 866, - }, - module: 'org.springframework.web.servlet', - function: 'doGet', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'HttpServlet.java', - classname: 'javax.servlet.http.HttpServlet', - line: { - number: 635, - }, - module: 'javax.servlet.http', - function: 'service', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'FrameworkServlet.java', - classname: 'org.springframework.web.servlet.FrameworkServlet', - line: { - number: 851, - }, - function: 'service', - module: 'org.springframework.web.servlet', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'HttpServlet.java', - classname: 'javax.servlet.http.HttpServlet', - line: { - number: 742, - }, - module: 'javax.servlet.http', - function: 'service', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'ApplicationFilterChain.java', - classname: 'org.apache.catalina.core.ApplicationFilterChain', - line: { - number: 231, - }, - module: 'org.apache.catalina.core', - function: 'internalDoFilter', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'ApplicationFilterChain.java', - classname: 'org.apache.catalina.core.ApplicationFilterChain', - line: { - number: 166, - }, - module: 'org.apache.catalina.core', - function: 'doFilter', - }, - { - exclude_from_grouping: false, - library_frame: true, - filename: 'WsFilter.java', - classname: 'org.apache.tomcat.websocket.server.WsFilter', - line: { - number: 52, - }, - module: 'org.apache.tomcat.websocket.server', - function: 'doFilter', - }, - { - exclude_from_grouping: false, - library_frame: true, - filename: 'ApplicationFilterChain.java', - classname: 'org.apache.catalina.core.ApplicationFilterChain', - line: { - number: 193, - }, - module: 'org.apache.catalina.core', - function: 'internalDoFilter', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'ApplicationFilterChain.java', - classname: 'org.apache.catalina.core.ApplicationFilterChain', - line: { - number: 166, - }, - module: 'org.apache.catalina.core', - function: 'doFilter', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'RequestContextFilter.java', - classname: - 'org.springframework.web.filter.RequestContextFilter', - line: { - number: 99, - }, - function: 'doFilterInternal', - module: 'org.springframework.web.filter', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'OncePerRequestFilter.java', - classname: - 'org.springframework.web.filter.OncePerRequestFilter', - line: { - number: 107, - }, - module: 'org.springframework.web.filter', - function: 'doFilter', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'ApplicationFilterChain.java', - classname: 'org.apache.catalina.core.ApplicationFilterChain', - line: { - number: 193, - }, - module: 'org.apache.catalina.core', - function: 'internalDoFilter', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'ApplicationFilterChain.java', - classname: 'org.apache.catalina.core.ApplicationFilterChain', - line: { - number: 166, - }, - module: 'org.apache.catalina.core', - function: 'doFilter', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'HttpPutFormContentFilter.java', - classname: - 'org.springframework.web.filter.HttpPutFormContentFilter', - line: { - number: 109, - }, - function: 'doFilterInternal', - module: 'org.springframework.web.filter', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'OncePerRequestFilter.java', - classname: - 'org.springframework.web.filter.OncePerRequestFilter', - line: { - number: 107, - }, - module: 'org.springframework.web.filter', - function: 'doFilter', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'ApplicationFilterChain.java', - classname: 'org.apache.catalina.core.ApplicationFilterChain', - line: { - number: 193, - }, - module: 'org.apache.catalina.core', - function: 'internalDoFilter', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'ApplicationFilterChain.java', - classname: 'org.apache.catalina.core.ApplicationFilterChain', - line: { - number: 166, - }, - module: 'org.apache.catalina.core', - function: 'doFilter', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'HiddenHttpMethodFilter.java', - classname: - 'org.springframework.web.filter.HiddenHttpMethodFilter', - line: { - number: 81, - }, - function: 'doFilterInternal', - module: 'org.springframework.web.filter', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'OncePerRequestFilter.java', - classname: - 'org.springframework.web.filter.OncePerRequestFilter', - line: { - number: 107, - }, - module: 'org.springframework.web.filter', - function: 'doFilter', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'ApplicationFilterChain.java', - classname: 'org.apache.catalina.core.ApplicationFilterChain', - line: { - number: 193, - }, - module: 'org.apache.catalina.core', - function: 'internalDoFilter', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'ApplicationFilterChain.java', - classname: 'org.apache.catalina.core.ApplicationFilterChain', - line: { - number: 166, - }, - module: 'org.apache.catalina.core', - function: 'doFilter', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'CharacterEncodingFilter.java', - classname: - 'org.springframework.web.filter.CharacterEncodingFilter', - line: { - number: 200, - }, - module: 'org.springframework.web.filter', - function: 'doFilterInternal', - }, - { - exclude_from_grouping: false, - library_frame: true, - filename: 'OncePerRequestFilter.java', - classname: - 'org.springframework.web.filter.OncePerRequestFilter', - line: { - number: 107, - }, - module: 'org.springframework.web.filter', - function: 'doFilter', - }, - { - exclude_from_grouping: false, - library_frame: true, - filename: 'ApplicationFilterChain.java', - classname: 'org.apache.catalina.core.ApplicationFilterChain', - line: { - number: 193, - }, - module: 'org.apache.catalina.core', - function: 'internalDoFilter', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'ApplicationFilterChain.java', - classname: 'org.apache.catalina.core.ApplicationFilterChain', - line: { - number: 166, - }, - module: 'org.apache.catalina.core', - function: 'doFilter', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'StandardWrapperValve.java', - classname: 'org.apache.catalina.core.StandardWrapperValve', - line: { - number: 198, - }, - module: 'org.apache.catalina.core', - function: 'invoke', - }, - { - exclude_from_grouping: false, - library_frame: true, - filename: 'StandardContextValve.java', - classname: 'org.apache.catalina.core.StandardContextValve', - line: { - number: 96, - }, - module: 'org.apache.catalina.core', - function: 'invoke', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'AuthenticatorBase.java', - classname: - 'org.apache.catalina.authenticator.AuthenticatorBase', - line: { - number: 496, - }, - module: 'org.apache.catalina.authenticator', - function: 'invoke', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'StandardHostValve.java', - classname: 'org.apache.catalina.core.StandardHostValve', - line: { - number: 140, - }, - module: 'org.apache.catalina.core', - function: 'invoke', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'ErrorReportValve.java', - classname: 'org.apache.catalina.valves.ErrorReportValve', - line: { - number: 81, - }, - module: 'org.apache.catalina.valves', - function: 'invoke', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'StandardEngineValve.java', - classname: 'org.apache.catalina.core.StandardEngineValve', - line: { - number: 87, - }, - module: 'org.apache.catalina.core', - function: 'invoke', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'CoyoteAdapter.java', - classname: 'org.apache.catalina.connector.CoyoteAdapter', - line: { - number: 342, - }, - module: 'org.apache.catalina.connector', - function: 'service', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'Http11Processor.java', - classname: 'org.apache.coyote.http11.Http11Processor', - line: { - number: 803, - }, - module: 'org.apache.coyote.http11', - function: 'service', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'AbstractProcessorLight.java', - classname: 'org.apache.coyote.AbstractProcessorLight', - line: { - number: 66, - }, - module: 'org.apache.coyote', - function: 'process', - }, - { - exclude_from_grouping: false, - library_frame: true, - filename: 'AbstractProtocol.java', - classname: - 'org.apache.coyote.AbstractProtocol$ConnectionHandler', - line: { - number: 790, - }, - module: 'org.apache.coyote', - function: 'process', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'NioEndpoint.java', - classname: - 'org.apache.tomcat.util.net.NioEndpoint$SocketProcessor', - line: { - number: 1468, - }, - module: 'org.apache.tomcat.util.net', - function: 'doRun', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'SocketProcessorBase.java', - classname: 'org.apache.tomcat.util.net.SocketProcessorBase', - line: { - number: 49, - }, - module: 'org.apache.tomcat.util.net', - function: 'run', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'TaskThread.java', - classname: - 'org.apache.tomcat.util.threads.TaskThread$WrappingRunnable', - line: { - number: 61, - }, - module: 'org.apache.tomcat.util.threads', - function: 'run', - }, - ], - message: - 'No converter found for return value of type: class com.sun.proxy.$Proxy158', - type: 'org.springframework.http.converter.HttpMessageNotWritableException', - }, - ], - id: '128f8ecf47bc8a800269ee6e5ac90008', - grouping_key: 'cc9272d7511c88a533ac41cc3e2ce54b', - grouping_name: - 'No converter found for return value of type: class com.sun.proxy.$Proxy158', - }, - cloud: { - availability_zone: 'us-central1-c', - instance: { - name: 'gke-dev-oblt-dev-oblt-pool-18e89389-qntq', - id: '5278603844673466232', - }, - provider: 'gcp', - machine: { - type: 'n1-standard-4', - }, - project: { - name: 'elastic-observability', - id: '8560181848', - }, - region: 'us-central1', - }, - observer: { - hostname: 'apm-apm-server-65d9d8dd68-lmf6c', - id: '7eedab18-1171-4a1b-a590-975e13fd103a', - ephemeral_id: '90034868-48e6-418c-8ab4-6616b403bca7', - type: 'apm-server', - version: '7.16.0', - version_major: 7, - }, - trace: { - id: 'd5e80ae688f1fef91533f02dd2bdc769', - }, - ecs: { - version: '1.11.0', - }, - host: { - os: { - platform: 'Linux', - }, - ip: '10.12.0.15', - architecture: 'amd64', - }, - client: { - ip: '10.12.0.22', - }, - event: { - ingested: '2021-10-19T13:57:10.382394342Z', - }, - user_agent: { - original: 'http.rb/5.0.2', - name: 'Other', - device: { - name: 'Generic Feature Phone', - type: 'Other', - }, - }, - timestamp: { - us: 1634651822536408, - }, - process: { - pid: 7, - title: '/opt/java/openjdk/bin/java', - ppid: 1, - }, - message: - 'No converter found for return value of type: class com.sun.proxy.$Proxy158', - processor: { - name: 'error', - event: 'error', - }, - url: { - path: '/api/products/3', - scheme: 'http', - port: 3000, - domain: 'opbeans', - full: 'http://opbeans:3000/api/products/3', - }, - '@timestamp': '2021-10-19T13:57:02.546Z', - service: { - node: { - name: '59036ecb70908dfec4e03edc477f6875d08677871b4af0db3144373802d00cb1', - }, - environment: 'production', - name: 'opbeans-java', - runtime: { - name: 'Java', - version: '11.0.11', - }, - language: { - name: 'Java', - version: '11.0.11', - }, - version: '2021-10-14 17:49:52', - }, - http: { - request: { - headers: { - 'User-Agent': ['http.rb/5.0.2'], - 'X-Forwarded-For': ['10.12.0.22, 10.12.0.14'], - Host: ['opbeans:3000'], - 'Accept-Encoding': ['gzip'], - 'Elastic-Apm-Traceparent': [ - '00-d5e80ae688f1fef91533f02dd2bdc769-35e3637e26919055-01', - ], - Tracestate: ['es=s:1.0'], - Traceparent: [ - '00-d5e80ae688f1fef91533f02dd2bdc769-35e3637e26919055-01', - ], - }, - method: 'GET', - }, - response: { - status_code: 500, - finished: true, - headers_sent: true, - }, - version: '1.1', - }, - transaction: { - id: '2c30263c4ad8fe8b', - type: 'request', - sampled: true, - }, - }, - { - container: { - id: 'e7b69f99cb7523bedea6d7c97b684cf4b7ff458d0cba1efb1ac843300b3bf3c7', - }, - kubernetes: { - pod: { - uid: 'c5169b50-f3b3-4693-8e4b-150fca17c333', - name: 'opbeans-go-5d795ddf6b-rhlvf', - }, - }, - parent: { - id: '9f50f43e924d0b46', - }, - agent: { - name: 'go', - version: '1.14.0', - }, - process: { - args: [ - '/opbeans-go', - '-log-level=debug', - '-log-json', - '-listen=:3000', - '-frontend=/opbeans-frontend', - '-db=postgres:', - '-cache=redis://redis-master:6379', - ], - pid: 1, - title: 'opbeans-go', - ppid: 0, - }, - error: { - culprit: 'logrusMiddleware', - log: { - stacktrace: [ - { - library_frame: true, - exclude_from_grouping: false, - filename: 'hook.go', - abs_path: - '/go/pkg/mod/go.elastic.co/apm/module/apmlogrus@v1.14.0/hook.go', - line: { - number: 102, - }, - module: 'go.elastic.co/apm/module/apmlogrus', - function: '(*Hook).Fire', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'hooks.go', - abs_path: - '/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/hooks.go', - line: { - number: 28, - }, - module: 'github.com/sirupsen/logrus', - function: 'LevelHooks.Fire', - }, - { - library_frame: true, - exclude_from_grouping: false, - abs_path: - '/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/entry.go', - filename: 'entry.go', - line: { - number: 272, - }, - module: 'github.com/sirupsen/logrus', - function: '(*Entry).fireHooks', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'entry.go', - abs_path: - '/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/entry.go', - line: { - number: 241, - }, - module: 'github.com/sirupsen/logrus', - function: '(*Entry).log', - }, - { - exclude_from_grouping: false, - library_frame: true, - filename: 'entry.go', - abs_path: - '/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/entry.go', - line: { - number: 293, - }, - module: 'github.com/sirupsen/logrus', - function: '(*Entry).Log', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'entry.go', - abs_path: - '/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/entry.go', - line: { - number: 338, - }, - module: 'github.com/sirupsen/logrus', - function: '(*Entry).Logf', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'entry.go', - abs_path: - '/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/entry.go', - line: { - number: 367, - }, - function: '(*Entry).Errorf', - module: 'github.com/sirupsen/logrus', - }, - { - exclude_from_grouping: false, - filename: 'logger.go', - abs_path: '/src/opbeans-go/logger.go', - line: { - number: 56, - }, - module: 'main', - function: 'logrusMiddleware', - }, - { - library_frame: true, - exclude_from_grouping: false, - abs_path: - '/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/context.go', - filename: 'context.go', - line: { - number: 165, - }, - module: 'github.com/gin-gonic/gin', - function: '(*Context).Next', - }, - { - library_frame: true, - exclude_from_grouping: false, - abs_path: - '/go/pkg/mod/go.elastic.co/apm/module/apmgin@v1.14.0/middleware.go', - filename: 'middleware.go', - line: { - number: 98, - }, - module: 'go.elastic.co/apm/module/apmgin', - function: '(*middleware).handle', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'context.go', - abs_path: - '/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/context.go', - line: { - number: 165, - }, - function: '(*Context).Next', - module: 'github.com/gin-gonic/gin', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'cache.go', - abs_path: - '/go/pkg/mod/github.com/gin-contrib/cache@v1.1.0/cache.go', - line: { - number: 128, - }, - module: 'github.com/gin-contrib/cache', - function: 'Cache.func1', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'context.go', - abs_path: - '/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/context.go', - line: { - number: 165, - }, - module: 'github.com/gin-gonic/gin', - function: '(*Context).Next', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'gin.go', - abs_path: '/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/gin.go', - line: { - number: 489, - }, - module: 'github.com/gin-gonic/gin', - function: '(*Engine).handleHTTPRequest', - }, - { - library_frame: true, - exclude_from_grouping: false, - abs_path: '/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/gin.go', - filename: 'gin.go', - line: { - number: 445, - }, - module: 'github.com/gin-gonic/gin', - function: '(*Engine).ServeHTTP', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'server.go', - abs_path: '/usr/local/go/src/net/http/server.go', - line: { - number: 2878, - }, - module: 'net/http', - function: 'serverHandler.ServeHTTP', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'server.go', - abs_path: '/usr/local/go/src/net/http/server.go', - line: { - number: 1929, - }, - module: 'net/http', - function: '(*conn).serve', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'asm_amd64.s', - abs_path: '/usr/local/go/src/runtime/asm_amd64.s', - line: { - number: 1581, - }, - module: 'runtime', - function: 'goexit', - }, - ], - level: 'error', - message: 'GET /api/products/3 (500)', - }, - id: '1660f82c1340f415e9a31b47565300ee', - grouping_key: '7a640436a9be648fd708703d1ac84650', - grouping_name: 'GET /api/products/3 (500)', - }, - message: 'GET /api/products/3 (500)', - processor: { - name: 'error', - event: 'error', - }, - cloud: { - availability_zone: 'us-central1-c', - instance: { - name: 'gke-dev-oblt-dev-oblt-pool-18e89389-qntq', - id: '5278603844673466232', - }, - provider: 'gcp', - machine: { - type: 'n1-standard-4', - }, - project: { - name: 'elastic-observability', - id: '8560181848', - }, - region: 'us-central1', - }, - observer: { - hostname: 'apm-apm-server-65d9d8dd68-lmf6c', - id: '7eedab18-1171-4a1b-a590-975e13fd103a', - ephemeral_id: '90034868-48e6-418c-8ab4-6616b403bca7', - type: 'apm-server', - version: '7.16.0', - version_major: 7, - }, - trace: { - id: 'd5e80ae688f1fef91533f02dd2bdc769', - }, - '@timestamp': '2021-10-19T13:57:02.539Z', - ecs: { - version: '1.11.0', - }, - service: { - node: { - name: 'e7b69f99cb7523bedea6d7c97b684cf4b7ff458d0cba1efb1ac843300b3bf3c7', - }, - environment: 'testing', - name: 'opbeans-go', - runtime: { - name: 'gc', - version: 'go1.17.2', - }, - language: { - name: 'go', - version: 'go1.17.2', - }, - version: '2021-10-14 17:49:50', - }, - host: { - os: { - platform: 'linux', - }, - ip: '10.12.0.14', - architecture: 'amd64', - }, - event: { - ingested: '2021-10-19T13:57:05.412811279Z', - }, - transaction: { - id: '9f50f43e924d0b46', - }, - timestamp: { - us: 1634651822536408, - }, - }, - { - container: { - id: '015d1127421e2c3d42a0fb031fc75e989813f58973143b6c7e33dca6ccc6f31b', - }, - kubernetes: { - pod: { - uid: '459a6abf-198e-4107-b4dd-b0ae826755ab', - name: 'opbeans-go-nsn-69b89c4598-xsvgh', - }, - }, - parent: { - id: 'b7801be83bcdc972', - }, - process: { - args: [ - '/opbeans-go', - '-log-level=debug', - '-log-json', - '-listen=:3000', - '-frontend=/opbeans-frontend', - '-db=postgres:', - '-cache=redis://redis-master:6379', - ], - pid: 1, - title: 'opbeans-go', - ppid: 0, - }, - agent: { - name: 'go', - version: '1.14.0', - }, - message: 'GET /api/products/3 (500)', - error: { - culprit: 'logrusMiddleware', - log: { - stacktrace: [ - { - library_frame: true, - exclude_from_grouping: false, - filename: 'hook.go', - abs_path: - '/go/pkg/mod/go.elastic.co/apm/module/apmlogrus@v1.14.0/hook.go', - line: { - number: 102, - }, - module: 'go.elastic.co/apm/module/apmlogrus', - function: '(*Hook).Fire', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'hooks.go', - abs_path: - '/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/hooks.go', - line: { - number: 28, - }, - function: 'LevelHooks.Fire', - module: 'github.com/sirupsen/logrus', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'entry.go', - abs_path: - '/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/entry.go', - line: { - number: 272, - }, - module: 'github.com/sirupsen/logrus', - function: '(*Entry).fireHooks', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'entry.go', - abs_path: - '/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/entry.go', - line: { - number: 241, - }, - module: 'github.com/sirupsen/logrus', - function: '(*Entry).log', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'entry.go', - abs_path: - '/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/entry.go', - line: { - number: 293, - }, - function: '(*Entry).Log', - module: 'github.com/sirupsen/logrus', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'entry.go', - abs_path: - '/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/entry.go', - line: { - number: 338, - }, - module: 'github.com/sirupsen/logrus', - function: '(*Entry).Logf', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'entry.go', - abs_path: - '/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/entry.go', - line: { - number: 367, - }, - module: 'github.com/sirupsen/logrus', - function: '(*Entry).Errorf', - }, - { - exclude_from_grouping: false, - filename: 'logger.go', - abs_path: '/src/opbeans-go/logger.go', - line: { - number: 56, - }, - module: 'main', - function: 'logrusMiddleware', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'context.go', - abs_path: - '/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/context.go', - line: { - number: 165, - }, - module: 'github.com/gin-gonic/gin', - function: '(*Context).Next', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'middleware.go', - abs_path: - '/go/pkg/mod/go.elastic.co/apm/module/apmgin@v1.14.0/middleware.go', - line: { - number: 98, - }, - module: 'go.elastic.co/apm/module/apmgin', - function: '(*middleware).handle', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'context.go', - abs_path: - '/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/context.go', - line: { - number: 165, - }, - module: 'github.com/gin-gonic/gin', - function: '(*Context).Next', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'cache.go', - abs_path: - '/go/pkg/mod/github.com/gin-contrib/cache@v1.1.0/cache.go', - line: { - number: 128, - }, - module: 'github.com/gin-contrib/cache', - function: 'Cache.func1', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'context.go', - abs_path: - '/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/context.go', - line: { - number: 165, - }, - module: 'github.com/gin-gonic/gin', - function: '(*Context).Next', - }, - { - library_frame: true, - exclude_from_grouping: false, - abs_path: '/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/gin.go', - filename: 'gin.go', - line: { - number: 489, - }, - module: 'github.com/gin-gonic/gin', - function: '(*Engine).handleHTTPRequest', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'gin.go', - abs_path: '/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/gin.go', - line: { - number: 445, - }, - module: 'github.com/gin-gonic/gin', - function: '(*Engine).ServeHTTP', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'server.go', - abs_path: '/usr/local/go/src/net/http/server.go', - line: { - number: 2878, - }, - module: 'net/http', - function: 'serverHandler.ServeHTTP', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'server.go', - abs_path: '/usr/local/go/src/net/http/server.go', - line: { - number: 1929, - }, - module: 'net/http', - function: '(*conn).serve', - }, - { - library_frame: true, - exclude_from_grouping: false, - filename: 'asm_amd64.s', - abs_path: '/usr/local/go/src/runtime/asm_amd64.s', - line: { - number: 1581, - }, - function: 'goexit', - module: 'runtime', - }, - ], - level: 'error', - message: 'GET /api/products/3 (500)', - }, - id: '7a265a869ad88851591e0e9734aa4a70', - grouping_key: '7a640436a9be648fd708703d1ac84650', - grouping_name: 'GET /api/products/3 (500)', - }, - processor: { - name: 'error', - event: 'error', - }, - cloud: { - availability_zone: 'us-central1-c', - instance: { - name: 'gke-dev-oblt-dev-oblt-pool-18e89389-qntq', - id: '5278603844673466232', - }, - provider: 'gcp', - machine: { - type: 'n1-standard-4', - }, - project: { - name: 'elastic-observability', - id: '8560181848', - }, - region: 'us-central1', - }, - observer: { - hostname: 'apm-apm-server-65d9d8dd68-zvs6p', - id: '69a7066f-46d2-42c4-a4cc-8400f60bf2b5', - ephemeral_id: '0ab88569-c301-40e9-8e78-cac7c1dac2bc', - type: 'apm-server', - version: '7.16.0', - version_major: 7, - }, - trace: { - id: 'd5e80ae688f1fef91533f02dd2bdc769', - }, - '@timestamp': '2021-10-19T13:57:02.539Z', - ecs: { - version: '1.11.0', - }, - service: { - node: { - name: '015d1127421e2c3d42a0fb031fc75e989813f58973143b6c7e33dca6ccc6f31b', - }, - environment: 'testing', - name: 'opbeans-go', - runtime: { - name: 'gc', - version: 'go1.17.2', - }, - language: { - name: 'go', - version: 'go1.17.2', - }, - version: '2021-10-14 17:49:50', - }, - host: { - os: { - platform: 'linux', - }, - ip: '10.12.0.13', - architecture: 'amd64', - }, - event: { - ingested: '2021-10-19T13:57:08.266888578Z', - }, - transaction: { - id: 'b7801be83bcdc972', - }, - timestamp: { - us: 1634651822536408, - }, - }, - ], - linkedChildrenOfSpanCountBySpanId: {}, -} as TraceAPIResponse; - -export const traceWithErrors = { - traceDocs: [ - { - container: { - id: '4cf84d094553201997ddb7fea344b7c6ef18dcb8233eba39278946ee8449794e', - }, - process: { - pid: 6, - title: '/usr/lib/jvm/java-10-openjdk-amd64/bin/java', - ppid: 1, - }, - agent: { - name: 'java', - ephemeral_id: '99ce8403-5875-4945-b074-d37dc10563eb', - version: '1.14.1-SNAPSHOT', - }, - internal: { - sampler: { - value: 46, - }, - }, - source: { - ip: '172.19.0.13', - }, - processor: { - name: 'transaction', - event: 'transaction', - }, - url: { - path: '/api/orders', - scheme: 'http', - port: 3000, - domain: '172.19.0.9', - full: 'http://172.19.0.9:3000/api/orders', - }, - observer: { - hostname: 'f37f48d8b60b', - id: 'd8522e1f-be8e-43c2-b290-ac6b6c0f171e', - ephemeral_id: '6ed88f14-170e-478d-a4f5-ea5e7f4b16b9', - type: 'apm-server', - version: '8.0.0', - version_major: 8, - }, - trace: { - id: '513d33fafe99bbe6134749310c9b5322', - }, - '@timestamp': '2020-03-23T15:04:28.785Z', - ecs: { - version: '1.4.0', - }, - service: { - node: { - name: '4cf84d094553201997ddb7fea344b7c6ef18dcb8233eba39278946ee8449794e', - }, - environment: 'production', - name: 'opbeans-java', - runtime: { - name: 'Java', - version: '10.0.2', - }, - language: { - name: 'Java', - version: '10.0.2', - }, - version: 'None', - }, - host: { - hostname: '4cf84d094553', - os: { - platform: 'Linux', - }, - ip: '172.19.0.9', - name: '4cf84d094553', - architecture: 'amd64', - }, - http: { - request: { - headers: { - Accept: ['*/*'], - 'User-Agent': ['Python/3.7 aiohttp/3.3.2'], - Host: ['172.19.0.9:3000'], - 'Accept-Encoding': ['gzip, deflate'], - }, - method: 'get', - socket: { - encrypted: false, - remote_address: '172.19.0.13', - }, - body: { - original: '[REDACTED]', - }, - }, - response: { - headers: { - 'Transfer-Encoding': ['chunked'], - Date: ['Mon, 23 Mar 2020 15:04:28 GMT'], - 'Content-Type': ['application/json;charset=ISO-8859-1'], - }, - status_code: 200, - finished: true, - headers_sent: true, - }, - version: '1.1', - }, - client: { - ip: '172.19.0.13', - }, - transaction: { - duration: { - us: 18842, - }, - result: 'HTTP 2xx', - name: 'DispatcherServlet#doGet', - id: '49809ad3c26adf74', - span_count: { - dropped: 0, - started: 1, - }, - type: 'request', - sampled: true, - }, - user_agent: { - original: 'Python/3.7 aiohttp/3.3.2', - name: 'Other', - device: { - name: 'Other', - }, - }, - timestamp: { - us: 1584975868785000, - }, - }, - { - parent: { - id: 'fc107f7b556eb49b', - }, - agent: { - name: 'go', - version: '1.7.2', - }, - processor: { - name: 'transaction', - event: 'transaction', - }, - url: { - path: '/api/orders', - scheme: 'http', - port: 3000, - domain: 'opbeans-go', - full: 'http://opbeans-go:3000/api/orders', - }, - trace: { - id: '513d33fafe99bbe6134749310c9b5322', - }, - '@timestamp': '2020-03-23T15:04:28.787Z', - service: { - node: { - name: 'e948a08b8f5efe99b5da01f50da48c7d8aee3bbf4701f3da85ebe760c2ffef29', - }, - environment: 'production', - framework: { - name: 'gin', - version: 'v1.4.0', - }, - name: 'opbeans-go', - runtime: { - name: 'gc', - version: 'go1.14.1', - }, - language: { - name: 'go', - version: 'go1.14.1', - }, - version: 'None', - }, - transaction: { - duration: { - us: 16597, - }, - result: 'HTTP 2xx', - name: 'GET /api/orders', - id: '975c8d5bfd1dd20b', - span_count: { - dropped: 0, - started: 1, - }, - type: 'request', - sampled: true, - }, - timestamp: { - us: 1584975868787052, - }, - }, - { - parent: { - id: 'daae24d83c269918', - }, - agent: { - name: 'python', - version: '5.5.2', - }, - trace: { - id: '513d33fafe99bbe6134749310c9b5322', - }, - timestamp: { - us: 1584975868788603, - }, - processor: { - name: 'transaction', - event: 'transaction', - }, - url: { - path: '/api/orders', - scheme: 'http', - port: 3000, - domain: 'opbeans-go', - full: 'http://opbeans-go:3000/api/orders', - }, - '@timestamp': '2020-03-23T15:04:28.788Z', - service: { - node: { - name: 'a636915f1f6eec81ab44342b13a3ea9597ef03a24391e4e55f34ae2e20b30f51', - }, - environment: 'production', - framework: { - name: 'django', - version: '2.1.13', - }, - name: 'opbeans-python', - runtime: { - name: 'CPython', - version: '3.6.10', - }, - language: { - name: 'python', - version: '3.6.10', - }, - version: 'None', - }, - transaction: { - result: 'HTTP 2xx', - duration: { - us: 14648, - }, - name: 'GET opbeans.views.orders', - span_count: { - dropped: 0, - started: 1, - }, - id: '6fb0ff7365b87298', - type: 'request', - sampled: true, - }, - }, - { - container: { - id: '4cf84d094553201997ddb7fea344b7c6ef18dcb8233eba39278946ee8449794e', - }, - parent: { - id: '49809ad3c26adf74', - }, - process: { - pid: 6, - title: '/usr/lib/jvm/java-10-openjdk-amd64/bin/java', - ppid: 1, - }, - agent: { - name: 'java', - ephemeral_id: '99ce8403-5875-4945-b074-d37dc10563eb', - version: '1.14.1-SNAPSHOT', - }, - internal: { - sampler: { - value: 44, - }, - }, - destination: { - address: 'opbeans-go', - port: 3000, - }, - processor: { - name: 'transaction', - event: 'span', - }, - observer: { - hostname: 'f37f48d8b60b', - id: 'd8522e1f-be8e-43c2-b290-ac6b6c0f171e', - type: 'apm-server', - ephemeral_id: '6ed88f14-170e-478d-a4f5-ea5e7f4b16b9', - version: '8.0.0', - version_major: 8, - }, - trace: { - id: '513d33fafe99bbe6134749310c9b5322', - }, - '@timestamp': '2020-03-23T15:04:28.785Z', - ecs: { - version: '1.4.0', - }, - service: { - node: { - name: '4cf84d094553201997ddb7fea344b7c6ef18dcb8233eba39278946ee8449794e', - }, - environment: 'production', - name: 'opbeans-java', - runtime: { - name: 'Java', - version: '10.0.2', - }, - language: { - name: 'Java', - version: '10.0.2', - }, - version: 'None', - }, - host: { - hostname: '4cf84d094553', - os: { - platform: 'Linux', - }, - ip: '172.19.0.9', - name: '4cf84d094553', - architecture: 'amd64', - }, - connection: { - hash: "{service.environment:'production'}/{service.name:'opbeans-java'}/{span.subtype:'http'}/{destination.address:'opbeans-go'}/{span.type:'external'}", - }, - transaction: { - id: '49809ad3c26adf74', - }, - timestamp: { - us: 1584975868785273, - }, - span: { - duration: { - us: 17530, - }, - subtype: 'http', - name: 'GET opbeans-go', - destination: { - service: { - resource: 'opbeans-go:3000', - name: 'http://opbeans-go:3000', - type: 'external', - }, - }, - http: { - response: { - status_code: 200, - }, - url: { - original: 'http://opbeans-go:3000/api/orders', - }, - }, - id: 'fc107f7b556eb49b', - type: 'external', - }, - }, - { - parent: { - id: '975c8d5bfd1dd20b', - }, - agent: { - name: 'go', - version: '1.7.2', - }, - processor: { - name: 'transaction', - event: 'span', - }, - trace: { - id: '513d33fafe99bbe6134749310c9b5322', - }, - '@timestamp': '2020-03-23T15:04:28.787Z', - service: { - node: { - name: 'e948a08b8f5efe99b5da01f50da48c7d8aee3bbf4701f3da85ebe760c2ffef29', - }, - environment: 'production', - name: 'opbeans-go', - runtime: { - name: 'gc', - version: 'go1.14.1', - }, - language: { - name: 'go', - version: 'go1.14.1', - }, - version: 'None', - }, - transaction: { - id: '975c8d5bfd1dd20b', - }, - timestamp: { - us: 1584975868787174, - }, - span: { - duration: { - us: 16250, - }, - subtype: 'http', - destination: { - service: { - resource: 'opbeans-python:3000', - name: 'http://opbeans-python:3000', - type: 'external', - }, - }, - name: 'GET opbeans-python:3000', - http: { - response: { - status_code: 200, - }, - url: { - original: 'http://opbeans-python:3000/api/orders', - }, - }, - id: 'daae24d83c269918', - type: 'external', - }, - }, - { - container: { - id: 'a636915f1f6eec81ab44342b13a3ea9597ef03a24391e4e55f34ae2e20b30f51', - }, - parent: { - id: '6fb0ff7365b87298', - }, - agent: { - name: 'python', - version: '5.5.2', - }, - processor: { - name: 'transaction', - event: 'span', - }, - trace: { - id: '513d33fafe99bbe6134749310c9b5322', - }, - '@timestamp': '2020-03-23T15:04:28.790Z', - service: { - node: { - name: 'a636915f1f6eec81ab44342b13a3ea9597ef03a24391e4e55f34ae2e20b30f51', - }, - environment: 'production', - framework: { - name: 'django', - version: '2.1.13', - }, - name: 'opbeans-python', - runtime: { - name: 'CPython', - version: '3.6.10', - }, - language: { - name: 'python', - version: '3.6.10', - }, - version: 'None', - }, - transaction: { - id: '6fb0ff7365b87298', - }, - timestamp: { - us: 1584975868790080, - }, - span: { - duration: { - us: 2519, - }, - subtype: 'postgresql', - name: 'SELECT "n"."id", "n"."address", "n"."city", "n"."company_name", "n"."country", "n"."email", "n"."full_name", "n"."postal_code" FROM "customers" AS "n" WHERE "n"."id" = @__id_0 LIMIT 1', - destination: { - service: { - resource: 'postgresql', - name: 'postgresql', - type: 'db', - }, - }, - action: 'query', - id: 'c9407abb4d08ead1', - type: 'db', - sync: true, - db: { - statement: - 'SELECT "n"."id", "n"."address", "n"."city", "n"."company_name", "n"."country", "n"."email", "n"."full_name", "n"."postal_code" FROM "customers" AS "n" WHERE "n"."id" = @__id_0 LIMIT 1', - type: 'sql', - }, - }, - }, - ], - exceedsMax: false, - errorDocs: [ - { - parent: { - id: '975c8d5bfd1dd20b', - }, - agent: { - name: 'go', - version: '1.7.2', - }, - error: { - culprit: 'logrusMiddleware', - log: { - level: 'error', - message: 'GET //api/products (502)', - }, - id: '1f3cb98206b5c54225cb7c8908a658da', - grouping_key: '4dba2ff58fe6c036a5dee2ce411e512a', - }, - processor: { - name: 'error', - event: 'error', - }, - trace: { - id: '513d33fafe99bbe6134749310c9b5322', - }, - '@timestamp': '2020-03-23T16:04:28.787Z', - service: { - node: { - name: 'e948a08b8f5efe99b5da01f50da48c7d8aee3bbf4701f3da85ebe760c2ffef29', - }, - environment: 'production', - name: 'opbeans-go', - runtime: { - name: 'gc', - version: 'go1.14.1', - }, - language: { - name: 'go', - version: 'go1.14.1', - }, - version: 'None', - }, - transaction: { - id: '975c8d5bfd1dd20b', - sampled: false, - }, - timestamp: { - us: 1584975868787052, - }, - }, - { - parent: { - id: '6fb0ff7365b87298', - }, - agent: { - name: 'python', - version: '5.5.2', - }, - error: { - culprit: 'logrusMiddleware', - log: { - level: 'error', - message: 'GET //api/products (502)', - }, - id: '1f3cb98206b5c54225cb7c8908a658d2', - grouping_key: '4dba2ff58fe6c036a5dee2ce411e512a', - }, - processor: { - name: 'error', - event: 'error', - }, - trace: { - id: '513d33fafe99bbe6134749310c9b5322', - }, - '@timestamp': '2020-03-23T16:04:28.790Z', - service: { - node: { - name: 'e948a08b8f5efe99b5da01f50da48c7d8aee3bbf4701f3da85ebe760c2ffef29', - }, - environment: 'production', - name: 'opbeans-python', - runtime: { - name: 'gc', - version: 'go1.14.1', - }, - version: 'None', - }, - transaction: { - id: '6fb0ff7365b87298', - sampled: false, - }, - timestamp: { - us: 1584975868790000, - }, - }, - ], - linkedChildrenOfSpanCountBySpanId: {}, -} as unknown as TraceAPIResponse; - -export const traceChildStartBeforeParent = { - traceDocs: [ - { - container: { - id: '4cf84d094553201997ddb7fea344b7c6ef18dcb8233eba39278946ee8449794e', - }, - process: { - pid: 6, - title: '/usr/lib/jvm/java-10-openjdk-amd64/bin/java', - ppid: 1, - }, - agent: { - name: 'java', - ephemeral_id: '99ce8403-5875-4945-b074-d37dc10563eb', - version: '1.14.1-SNAPSHOT', - }, - internal: { - sampler: { - value: 46, - }, - }, - source: { - ip: '172.19.0.13', - }, - processor: { - name: 'transaction', - event: 'transaction', - }, - url: { - path: '/api/orders', - scheme: 'http', - port: 3000, - domain: '172.19.0.9', - full: 'http://172.19.0.9:3000/api/orders', - }, - observer: { - hostname: 'f37f48d8b60b', - id: 'd8522e1f-be8e-43c2-b290-ac6b6c0f171e', - ephemeral_id: '6ed88f14-170e-478d-a4f5-ea5e7f4b16b9', - type: 'apm-server', - version: '8.0.0', - version_major: 8, - }, - trace: { - id: '513d33fafe99bbe6134749310c9b5322', - }, - '@timestamp': '2020-03-23T15:04:28.785Z', - ecs: { - version: '1.4.0', - }, - service: { - node: { - name: '4cf84d094553201997ddb7fea344b7c6ef18dcb8233eba39278946ee8449794e', - }, - environment: 'production', - name: 'opbeans-java', - runtime: { - name: 'Java', - version: '10.0.2', - }, - language: { - name: 'Java', - version: '10.0.2', - }, - version: 'None', - }, - host: { - hostname: '4cf84d094553', - os: { - platform: 'Linux', - }, - ip: '172.19.0.9', - name: '4cf84d094553', - architecture: 'amd64', - }, - http: { - request: { - headers: { - Accept: ['*/*'], - 'User-Agent': ['Python/3.7 aiohttp/3.3.2'], - Host: ['172.19.0.9:3000'], - 'Accept-Encoding': ['gzip, deflate'], - }, - method: 'get', - socket: { - encrypted: false, - remote_address: '172.19.0.13', - }, - body: { - original: '[REDACTED]', - }, - }, - response: { - headers: { - 'Transfer-Encoding': ['chunked'], - Date: ['Mon, 23 Mar 2020 15:04:28 GMT'], - 'Content-Type': ['application/json;charset=ISO-8859-1'], - }, - status_code: 200, - finished: true, - headers_sent: true, - }, - version: '1.1', - }, - client: { - ip: '172.19.0.13', - }, - transaction: { - duration: { - us: 18842, - }, - result: 'HTTP 2xx', - name: 'DispatcherServlet#doGet', - id: '49809ad3c26adf74', - span_count: { - dropped: 0, - started: 1, - }, - type: 'request', - sampled: true, - }, - user_agent: { - original: 'Python/3.7 aiohttp/3.3.2', - name: 'Other', - device: { - name: 'Other', - }, - }, - timestamp: { - us: 1584975868785000, - }, - }, - { - parent: { - id: 'fc107f7b556eb49b', - }, - agent: { - name: 'go', - version: '1.7.2', - }, - processor: { - name: 'transaction', - event: 'transaction', - }, - url: { - path: '/api/orders', - scheme: 'http', - port: 3000, - domain: 'opbeans-go', - full: 'http://opbeans-go:3000/api/orders', - }, - trace: { - id: '513d33fafe99bbe6134749310c9b5322', - }, - '@timestamp': '2020-03-23T15:04:28.787Z', - service: { - node: { - name: 'e948a08b8f5efe99b5da01f50da48c7d8aee3bbf4701f3da85ebe760c2ffef29', - }, - environment: 'production', - framework: { - name: 'gin', - version: 'v1.4.0', - }, - name: 'opbeans-go', - runtime: { - name: 'gc', - version: 'go1.14.1', - }, - language: { - name: 'go', - version: 'go1.14.1', - }, - version: 'None', - }, - transaction: { - duration: { - us: 16597, - }, - result: 'HTTP 2xx', - name: 'GET /api/orders', - id: '975c8d5bfd1dd20b', - span_count: { - dropped: 0, - started: 1, - }, - type: 'request', - sampled: true, - }, - timestamp: { - us: 1584975868787052, - }, - }, - { - parent: { - id: 'daae24d83c269918', - }, - agent: { - name: 'python', - version: '5.5.2', - }, - trace: { - id: '513d33fafe99bbe6134749310c9b5322', - }, - timestamp: { - us: 1584975868780000, - }, - processor: { - name: 'transaction', - event: 'transaction', - }, - url: { - path: '/api/orders', - scheme: 'http', - port: 3000, - domain: 'opbeans-go', - full: 'http://opbeans-go:3000/api/orders', - }, - '@timestamp': '2020-03-23T15:04:28.788Z', - service: { - node: { - name: 'a636915f1f6eec81ab44342b13a3ea9597ef03a24391e4e55f34ae2e20b30f51', - }, - environment: 'production', - framework: { - name: 'django', - version: '2.1.13', - }, - name: 'opbeans-python', - runtime: { - name: 'CPython', - version: '3.6.10', - }, - language: { - name: 'python', - version: '3.6.10', - }, - version: 'None', - }, - transaction: { - result: 'HTTP 2xx', - duration: { - us: 1464, - }, - name: 'I started before my parent 😰', - span_count: { - dropped: 0, - started: 1, - }, - id: '6fb0ff7365b87298', - type: 'request', - sampled: true, - }, - }, - { - container: { - id: '4cf84d094553201997ddb7fea344b7c6ef18dcb8233eba39278946ee8449794e', - }, - parent: { - id: '49809ad3c26adf74', - }, - process: { - pid: 6, - title: '/usr/lib/jvm/java-10-openjdk-amd64/bin/java', - ppid: 1, - }, - agent: { - name: 'java', - ephemeral_id: '99ce8403-5875-4945-b074-d37dc10563eb', - version: '1.14.1-SNAPSHOT', - }, - internal: { - sampler: { - value: 44, - }, - }, - destination: { - address: 'opbeans-go', - port: 3000, - }, - processor: { - name: 'transaction', - event: 'span', - }, - observer: { - hostname: 'f37f48d8b60b', - id: 'd8522e1f-be8e-43c2-b290-ac6b6c0f171e', - type: 'apm-server', - ephemeral_id: '6ed88f14-170e-478d-a4f5-ea5e7f4b16b9', - version: '8.0.0', - version_major: 8, - }, - trace: { - id: '513d33fafe99bbe6134749310c9b5322', - }, - '@timestamp': '2020-03-23T15:04:28.785Z', - ecs: { - version: '1.4.0', - }, - service: { - node: { - name: '4cf84d094553201997ddb7fea344b7c6ef18dcb8233eba39278946ee8449794e', - }, - environment: 'production', - name: 'opbeans-java', - runtime: { - name: 'Java', - version: '10.0.2', - }, - language: { - name: 'Java', - version: '10.0.2', - }, - version: 'None', - }, - host: { - hostname: '4cf84d094553', - os: { - platform: 'Linux', - }, - ip: '172.19.0.9', - name: '4cf84d094553', - architecture: 'amd64', - }, - connection: { - hash: "{service.environment:'production'}/{service.name:'opbeans-java'}/{span.subtype:'http'}/{destination.address:'opbeans-go'}/{span.type:'external'}", - }, - transaction: { - id: '49809ad3c26adf74', - }, - timestamp: { - us: 1584975868785273, - }, - span: { - duration: { - us: 17530, - }, - subtype: 'http', - name: 'GET opbeans-go', - destination: { - service: { - resource: 'opbeans-go:3000', - name: 'http://opbeans-go:3000', - type: 'external', - }, - }, - http: { - response: { - status_code: 200, - }, - url: { - original: 'http://opbeans-go:3000/api/orders', - }, - }, - id: 'fc107f7b556eb49b', - type: 'external', - }, - }, - { - parent: { - id: '975c8d5bfd1dd20b', - }, - agent: { - name: 'go', - version: '1.7.2', - }, - processor: { - name: 'transaction', - event: 'span', - }, - trace: { - id: '513d33fafe99bbe6134749310c9b5322', - }, - '@timestamp': '2020-03-23T15:04:28.787Z', - service: { - node: { - name: 'e948a08b8f5efe99b5da01f50da48c7d8aee3bbf4701f3da85ebe760c2ffef29', - }, - environment: 'production', - name: 'opbeans-go', - runtime: { - name: 'gc', - version: 'go1.14.1', - }, - language: { - name: 'go', - version: 'go1.14.1', - }, - version: 'None', - }, - transaction: { - id: '975c8d5bfd1dd20b', - }, - timestamp: { - us: 1584975868787174, - }, - span: { - duration: { - us: 16250, - }, - subtype: 'http', - destination: { - service: { - resource: 'opbeans-python:3000', - name: 'http://opbeans-python:3000', - type: 'external', - }, - }, - name: 'I am his 👇🏻 parent 😡', - http: { - response: { - status_code: 200, - }, - url: { - original: 'http://opbeans-python:3000/api/orders', - }, - }, - id: 'daae24d83c269918', - type: 'external', - }, - }, - { - container: { - id: 'a636915f1f6eec81ab44342b13a3ea9597ef03a24391e4e55f34ae2e20b30f51', - }, - parent: { - id: '6fb0ff7365b87298', - }, - agent: { - name: 'python', - version: '5.5.2', - }, - processor: { - name: 'transaction', - event: 'span', - }, - trace: { - id: '513d33fafe99bbe6134749310c9b5322', - }, - '@timestamp': '2020-03-23T15:04:28.790Z', - service: { - node: { - name: 'a636915f1f6eec81ab44342b13a3ea9597ef03a24391e4e55f34ae2e20b30f51', - }, - environment: 'production', - framework: { - name: 'django', - version: '2.1.13', - }, - name: 'opbeans-python', - runtime: { - name: 'CPython', - version: '3.6.10', - }, - language: { - name: 'python', - version: '3.6.10', - }, - version: 'None', - }, - transaction: { - id: '6fb0ff7365b87298', - }, - timestamp: { - us: 1584975868781000, - }, - span: { - duration: { - us: 2519, - }, - subtype: 'postgresql', - name: 'I am using my parents skew 😇', - destination: { - service: { - resource: 'postgresql', - name: 'postgresql', - type: 'db', - }, - }, - action: 'query', - id: 'c9407abb4d08ead1', - type: 'db', - sync: true, - db: { - statement: - 'SELECT "opbeans_order"."id", "opbeans_order"."customer_id", "opbeans_customer"."full_name", "opbeans_order"."created_at" FROM "opbeans_order" INNER JOIN "opbeans_customer" ON ("opbeans_order"."customer_id" = "opbeans_customer"."id") LIMIT 1000', - type: 'sql', - }, - }, - }, - ], - exceedsMax: false, - errorDocs: [], - linkedChildrenOfSpanCountBySpanId: {}, -} as TraceAPIResponse; - -export const inferredSpans = { - traceDocs: [ - { - container: { - id: 'fc2ae281f56fb84728bc9b5e6c17f3d13bbb7f4efd461158558e5c38e655abad', - }, - agent: { - name: 'java', - ephemeral_id: '1cb5c830-c677-4b13-b340-ab1502f527c3', - version: '1.15.1-SNAPSHOT', - }, - process: { - pid: 6, - title: '/opt/java/openjdk/bin/java', - ppid: 1, - }, - source: { - ip: '172.18.0.8', - }, - processor: { - name: 'transaction', - event: 'transaction', - }, - url: { - path: '/api/products/2', - scheme: 'http', - port: 3000, - domain: '172.18.0.7', - full: 'http://172.18.0.7:3000/api/products/2', - }, - observer: { - hostname: '7189f754b5a3', - id: 'f32d8d9f-a9f9-4355-8370-548dfd8024dc', - ephemeral_id: 'bff20764-0195-4f78-aa84-d799fc47b954', - type: 'apm-server', - version: '8.0.0', - version_major: 8, - }, - trace: { - id: '3b0dc77f3754e5bcb9da0e4c15e0db97', - }, - '@timestamp': '2020-04-09T11:36:00.786Z', - ecs: { - version: '1.5.0', - }, - service: { - node: { - name: 'fc2ae281f56fb84728bc9b5e6c17f3d13bbb7f4efd461158558e5c38e655abad', - }, - environment: 'production', - name: 'opbeans-java', - runtime: { - name: 'Java', - version: '11.0.6', - }, - language: { - name: 'Java', - version: '11.0.6', - }, - version: 'None', - }, - host: { - hostname: 'fc2ae281f56f', - os: { - platform: 'Linux', - }, - ip: '172.18.0.7', - name: 'fc2ae281f56f', - architecture: 'amd64', - }, - client: { - ip: '172.18.0.8', - }, - http: { - request: { - headers: { - Accept: ['*/*'], - 'User-Agent': ['Python/3.7 aiohttp/3.3.2'], - Host: ['172.18.0.7:3000'], - 'Accept-Encoding': ['gzip, deflate'], - }, - method: 'get', - socket: { - encrypted: false, - remote_address: '172.18.0.8', - }, - }, - response: { - headers: { - 'Transfer-Encoding': ['chunked'], - Date: ['Thu, 09 Apr 2020 11:36:01 GMT'], - 'Content-Type': ['application/json;charset=UTF-8'], - }, - status_code: 200, - finished: true, - headers_sent: true, - }, - version: '1.1', - }, - user_agent: { - original: 'Python/3.7 aiohttp/3.3.2', - name: 'Other', - device: { - name: 'Other', - }, - }, - transaction: { - duration: { - us: 237537, - }, - result: 'HTTP 2xx', - name: 'APIRestController#product', - span_count: { - dropped: 0, - started: 3, - }, - id: 'f2387d37260d00bd', - type: 'request', - sampled: true, - }, - timestamp: { - us: 1586432160786001, - }, - }, - { - container: { - id: 'fc2ae281f56fb84728bc9b5e6c17f3d13bbb7f4efd461158558e5c38e655abad', - }, - parent: { - id: 'f2387d37260d00bd', - }, - agent: { - name: 'java', - ephemeral_id: '1cb5c830-c677-4b13-b340-ab1502f527c3', - version: '1.15.1-SNAPSHOT', - }, - process: { - pid: 6, - title: '/opt/java/openjdk/bin/java', - ppid: 1, - }, - processor: { - name: 'transaction', - event: 'span', - }, - observer: { - hostname: '7189f754b5a3', - id: 'f32d8d9f-a9f9-4355-8370-548dfd8024dc', - ephemeral_id: 'bff20764-0195-4f78-aa84-d799fc47b954', - type: 'apm-server', - version: '8.0.0', - version_major: 8, - }, - trace: { - id: '3b0dc77f3754e5bcb9da0e4c15e0db97', - }, - '@timestamp': '2020-04-09T11:36:00.810Z', - ecs: { - version: '1.5.0', - }, - service: { - node: { - name: 'fc2ae281f56fb84728bc9b5e6c17f3d13bbb7f4efd461158558e5c38e655abad', - }, - environment: 'production', - name: 'opbeans-java', - runtime: { - name: 'Java', - version: '11.0.6', - }, - language: { - name: 'Java', - version: '11.0.6', - }, - version: 'None', - }, - host: { - hostname: 'fc2ae281f56f', - os: { - platform: 'Linux', - }, - ip: '172.18.0.7', - name: 'fc2ae281f56f', - architecture: 'amd64', - }, - transaction: { - id: 'f2387d37260d00bd', - }, - span: { - duration: { - us: 204574, - }, - subtype: 'inferred', - name: 'ServletInvocableHandlerMethod#invokeAndHandle', - id: 'a5df600bd7bd5e38', - type: 'app', - }, - timestamp: { - us: 1586432160810441, - }, - }, - { - container: { - id: 'fc2ae281f56fb84728bc9b5e6c17f3d13bbb7f4efd461158558e5c38e655abad', - }, - parent: { - id: 'a5df600bd7bd5e38', - }, - agent: { - name: 'java', - ephemeral_id: '1cb5c830-c677-4b13-b340-ab1502f527c3', - version: '1.15.1-SNAPSHOT', - }, - process: { - pid: 6, - title: '/opt/java/openjdk/bin/java', - ppid: 1, - }, - processor: { - name: 'transaction', - event: 'span', - }, - observer: { - hostname: '7189f754b5a3', - id: 'f32d8d9f-a9f9-4355-8370-548dfd8024dc', - type: 'apm-server', - ephemeral_id: 'bff20764-0195-4f78-aa84-d799fc47b954', - version: '8.0.0', - version_major: 8, - }, - trace: { - id: '3b0dc77f3754e5bcb9da0e4c15e0db97', - }, - '@timestamp': '2020-04-09T11:36:00.810Z', - ecs: { - version: '1.5.0', - }, - service: { - node: { - name: 'fc2ae281f56fb84728bc9b5e6c17f3d13bbb7f4efd461158558e5c38e655abad', - }, - environment: 'production', - name: 'opbeans-java', - runtime: { - name: 'Java', - version: '11.0.6', - }, - language: { - name: 'Java', - version: '11.0.6', - }, - version: 'None', - }, - host: { - hostname: 'fc2ae281f56f', - os: { - platform: 'Linux', - }, - ip: '172.18.0.7', - name: 'fc2ae281f56f', - architecture: 'amd64', - }, - transaction: { - id: 'f2387d37260d00bd', - }, - timestamp: { - us: 1586432160810441, - }, - span: { - duration: { - us: 102993, - }, - stacktrace: [ - { - library_frame: true, - exclude_from_grouping: false, - filename: 'InvocableHandlerMethod.java', - line: { - number: -1, - }, - function: 'doInvoke', - }, - { - exclude_from_grouping: false, - library_frame: true, - filename: 'InvocableHandlerMethod.java', - line: { - number: -1, - }, - function: 'invokeForRequest', - }, - ], - subtype: 'inferred', - name: 'APIRestController#product', - id: '808dc34fc41ce522', - type: 'app', - }, - }, - { - container: { - id: 'fc2ae281f56fb84728bc9b5e6c17f3d13bbb7f4efd461158558e5c38e655abad', - }, - parent: { - id: 'f2387d37260d00bd', - }, - agent: { - name: 'java', - ephemeral_id: '1cb5c830-c677-4b13-b340-ab1502f527c3', - version: '1.15.1-SNAPSHOT', - }, - process: { - pid: 6, - title: '/opt/java/openjdk/bin/java', - ppid: 1, - }, - processor: { - name: 'transaction', - event: 'span', - }, - labels: { - productId: '2', - }, - observer: { - hostname: '7189f754b5a3', - id: 'f32d8d9f-a9f9-4355-8370-548dfd8024dc', - ephemeral_id: 'bff20764-0195-4f78-aa84-d799fc47b954', - type: 'apm-server', - version: '8.0.0', - version_major: 8, - }, - trace: { - id: '3b0dc77f3754e5bcb9da0e4c15e0db97', - }, - '@timestamp': '2020-04-09T11:36:00.832Z', - ecs: { - version: '1.5.0', - }, - service: { - node: { - name: 'fc2ae281f56fb84728bc9b5e6c17f3d13bbb7f4efd461158558e5c38e655abad', - }, - environment: 'production', - name: 'opbeans-java', - runtime: { - name: 'Java', - version: '11.0.6', - }, - language: { - name: 'Java', - version: '11.0.6', - }, - version: 'None', - }, - host: { - hostname: 'fc2ae281f56f', - os: { - platform: 'Linux', - }, - ip: '172.18.0.7', - name: 'fc2ae281f56f', - architecture: 'amd64', - }, - transaction: { - id: 'f2387d37260d00bd', - }, - timestamp: { - us: 1586432160832300, - }, - span: { - duration: { - us: 99295, - }, - name: 'OpenTracing product span', - id: '41226ae63af4f235', - type: 'unknown', - }, - child: { id: ['8d80de06aa11a6fc'] }, - }, - { - container: { - id: 'fc2ae281f56fb84728bc9b5e6c17f3d13bbb7f4efd461158558e5c38e655abad', - }, - parent: { - id: '808dc34fc41ce522', - }, - process: { - pid: 6, - title: '/opt/java/openjdk/bin/java', - ppid: 1, - }, - agent: { - name: 'java', - ephemeral_id: '1cb5c830-c677-4b13-b340-ab1502f527c3', - version: '1.15.1-SNAPSHOT', - }, - processor: { - name: 'transaction', - event: 'span', - }, - observer: { - hostname: '7189f754b5a3', - id: 'f32d8d9f-a9f9-4355-8370-548dfd8024dc', - ephemeral_id: 'bff20764-0195-4f78-aa84-d799fc47b954', - type: 'apm-server', - version: '8.0.0', - version_major: 8, - }, - trace: { - id: '3b0dc77f3754e5bcb9da0e4c15e0db97', - }, - '@timestamp': '2020-04-09T11:36:00.859Z', - ecs: { - version: '1.5.0', - }, - service: { - node: { - name: 'fc2ae281f56fb84728bc9b5e6c17f3d13bbb7f4efd461158558e5c38e655abad', - }, - environment: 'production', - name: 'opbeans-java', - runtime: { - name: 'Java', - version: '11.0.6', - }, - language: { - name: 'Java', - version: '11.0.6', - }, - version: 'None', - }, - host: { - hostname: 'fc2ae281f56f', - os: { - platform: 'Linux', - }, - ip: '172.18.0.7', - name: 'fc2ae281f56f', - architecture: 'amd64', - }, - transaction: { - id: 'f2387d37260d00bd', - }, - timestamp: { - us: 1586432160859600, - }, - span: { - duration: { - us: 53835, - }, - subtype: 'inferred', - name: 'Loader#executeQueryStatement', - id: '8d80de06aa11a6fc', - type: 'app', - }, - }, - { - container: { - id: 'fc2ae281f56fb84728bc9b5e6c17f3d13bbb7f4efd461158558e5c38e655abad', - }, - parent: { - id: '41226ae63af4f235', - }, - agent: { - name: 'java', - ephemeral_id: '1cb5c830-c677-4b13-b340-ab1502f527c3', - version: '1.15.1-SNAPSHOT', - }, - process: { - pid: 6, - title: '/opt/java/openjdk/bin/java', - ppid: 1, - }, - destination: { - address: 'postgres', - port: 5432, - }, - processor: { - name: 'transaction', - event: 'span', - }, - observer: { - hostname: '7189f754b5a3', - id: 'f32d8d9f-a9f9-4355-8370-548dfd8024dc', - ephemeral_id: 'bff20764-0195-4f78-aa84-d799fc47b954', - type: 'apm-server', - version: '8.0.0', - version_major: 8, - }, - trace: { - id: '3b0dc77f3754e5bcb9da0e4c15e0db97', - }, - '@timestamp': '2020-04-09T11:36:00.903Z', - ecs: { - version: '1.5.0', - }, - service: { - node: { - name: 'fc2ae281f56fb84728bc9b5e6c17f3d13bbb7f4efd461158558e5c38e655abad', - }, - environment: 'production', - name: 'opbeans-java', - runtime: { - name: 'Java', - version: '11.0.6', - }, - language: { - name: 'Java', - version: '11.0.6', - }, - version: 'None', - }, - host: { - hostname: 'fc2ae281f56f', - os: { - platform: 'Linux', - }, - ip: '172.18.0.7', - name: 'fc2ae281f56f', - architecture: 'amd64', - }, - transaction: { - id: 'f2387d37260d00bd', - }, - timestamp: { - us: 1586432160903236, - }, - span: { - duration: { - us: 10211, - }, - subtype: 'postgresql', - destination: { - service: { - resource: 'postgresql', - name: 'postgresql', - type: 'db', - }, - }, - name: 'SELECT FROM products', - action: 'query', - id: '3708d5623658182f', - type: 'db', - db: { - statement: - 'select product0_.id as col_0_0_, product0_.sku as col_1_0_, product0_.name as col_2_0_, product0_.description as col_3_0_, product0_.cost as col_4_0_, product0_.selling_price as col_5_0_, product0_.stock as col_6_0_, producttyp1_.id as col_7_0_, producttyp1_.name as col_8_0_, (select sum(orderline2_.amount) from order_lines orderline2_ where orderline2_.product_id=product0_.id) as col_9_0_ from products product0_ left outer join product_types producttyp1_ on product0_.type_id=producttyp1_.id where product0_.id=?', - type: 'sql', - user: { - name: 'postgres', - }, - }, - }, - }, - { - container: { - id: 'fc2ae281f56fb84728bc9b5e6c17f3d13bbb7f4efd461158558e5c38e655abad', - }, - parent: { - id: '41226ae63af4f235', - }, - process: { - pid: 6, - title: '/opt/java/openjdk/bin/java', - ppid: 1, - }, - agent: { - name: 'java', - ephemeral_id: '1cb5c830-c677-4b13-b340-ab1502f527c3', - version: '1.15.1-SNAPSHOT', - }, - destination: { - address: 'postgres', - port: 5432, - }, - processor: { - name: 'transaction', - event: 'span', - }, - observer: { - hostname: '7189f754b5a3', - id: 'f32d8d9f-a9f9-4355-8370-548dfd8024dc', - ephemeral_id: 'bff20764-0195-4f78-aa84-d799fc47b954', - type: 'apm-server', - version: '8.0.0', - version_major: 8, - }, - trace: { - id: '3b0dc77f3754e5bcb9da0e4c15e0db97', - }, - '@timestamp': '2020-04-09T11:36:00.859Z', - ecs: { - version: '1.5.0', - }, - service: { - node: { - name: 'fc2ae281f56fb84728bc9b5e6c17f3d13bbb7f4efd461158558e5c38e655abad', - }, - environment: 'production', - name: 'opbeans-java', - runtime: { - name: 'Java', - version: '11.0.6', - }, - language: { - name: 'Java', - version: '11.0.6', - }, - version: 'None', - }, - host: { - hostname: 'fc2ae281f56f', - os: { - platform: 'Linux', - }, - ip: '172.18.0.7', - name: 'fc2ae281f56f', - architecture: 'amd64', - }, - transaction: { - id: 'f2387d37260d00bd', - }, - timestamp: { - us: 1586432160859508, - }, - span: { - duration: { - us: 4503, - }, - subtype: 'postgresql', - destination: { - service: { - resource: 'postgresql', - name: 'postgresql', - type: 'db', - }, - }, - name: 'empty query', - action: 'query', - id: '9871cfd612368932', - type: 'db', - db: { - rows_affected: 0, - statement: '(empty query)', - type: 'sql', - user: { - name: 'postgres', - }, - }, - }, - }, - ], - exceedsMax: false, - errorDocs: [], - linkedChildrenOfSpanCountBySpanId: {}, -} as TraceAPIResponse; diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall_container.stories.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall_container.stories.tsx index ba1d1dec65023..d351535bbd1a9 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall_container.stories.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall_container.stories.tsx @@ -4,19 +4,19 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - +import { apm, dedot } from '@kbn/apm-synthtrace'; +import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { Meta, Story } from '@storybook/react'; -import React, { ComponentProps } from 'react'; import { noop } from 'lodash'; +import React, { ComponentProps } from 'react'; import { WaterfallContainer } from '.'; -import { getWaterfall } from './waterfall/waterfall_helpers/waterfall_helpers'; import { - inferredSpans, - manyChildrenWithSameLength, - simpleTrace, - traceChildStartBeforeParent, - traceWithErrors, -} from './waterfall_container.stories.data'; + WaterfallError, + WaterfallSpan, + WaterfallTransaction, +} from '../../../../../../common/waterfall/typings'; +import { Transaction } from '../../../../../../typings/es_schemas/ui/transaction'; +import { getWaterfall } from './waterfall/waterfall_helpers/waterfall_helpers'; import { MockApmPluginStorybook } from '../../../../../context/apm_plugin/mock_apm_plugin_storybook'; type Args = ComponentProps; @@ -34,97 +34,64 @@ const stories: Meta = { }; export default stories; -export const Example: Story = ({ - serviceName, - waterfallItemId, - waterfall, -}) => { - return ( - - ); -}; -Example.args = { - waterfall: getWaterfall(simpleTrace, '975c8d5bfd1dd20b'), -}; +export const Example: Story = () => { + const serviceName = 'synth-apple'; + const instanceJava = apm + .service({ + name: serviceName, + environment: 'production', + agentName: 'java', + }) + .instance('instance-b'); + const events = instanceJava + .transaction({ transactionName: 'GET /apple 🍏' }) + .timestamp(1) + .duration(1000) + .failure() + .errors( + instanceJava + .error({ message: '[ResponseError] index_not_found_exception' }) + .timestamp(50) + ) + .children( + instanceJava + .span({ + spanName: 'get_green_apple_🍏', + spanType: 'db', + spanSubtype: 'elasticsearch', + }) + .timestamp(50) + .duration(900) + .success() + ) + .serialize(); -export const WithErrors: Story = ({ - serviceName, - waterfallItemId, - waterfall, -}) => { - return ( - - ); -}; -WithErrors.args = { - waterfall: getWaterfall(traceWithErrors, '975c8d5bfd1dd20b'), -}; + // Only one error is created in the above scenario + const errorEventId = events.findIndex((doc) => { + return doc['processor.event'] === ProcessorEvent.error; + }); -export const ChildStartsBeforeParent: Story = ({ - serviceName, - waterfallItemId, - waterfall, -}) => { - return ( - - ); -}; -ChildStartsBeforeParent.args = { - waterfall: getWaterfall(traceChildStartBeforeParent, '975c8d5bfd1dd20b'), -}; + const errorDocs = events.splice(errorEventId, 1); -export const InferredSpans: Story = ({ - serviceName, - waterfallItemId, - waterfall, -}) => { - return ( - + const traceDocs = events.map( + (event) => dedot(event, {}) as WaterfallTransaction | WaterfallSpan ); -}; -InferredSpans.args = { - waterfall: getWaterfall(inferredSpans, 'f2387d37260d00bd'), -}; + const traceItems = { + exceedsMax: false, + traceDocs, + errorDocs: errorDocs.map((error) => dedot(error, {}) as WaterfallError), + spanLinksCountById: {}, + }; + + const entryTransaction = dedot(traceDocs[0]!, {}) as Transaction; + const waterfall = getWaterfall({ traceItems, entryTransaction }); -export const ManyChildrenWithSameLength: Story = ({ - serviceName, - waterfallItemId, - waterfall, -}) => { return ( ); }; -ManyChildrenWithSameLength.args = { - waterfall: getWaterfall(manyChildrenWithSameLength, '9a7f717439921d39'), -}; diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall_container.test.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall_container.test.tsx index bac6ec41cf420..af27e4572a78a 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall_container.test.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall_container.test.tsx @@ -31,8 +31,8 @@ describe('WaterfallContainer', () => { it('expands and contracts the accordion', () => { const { getAllByRole } = render(); const buttons = getAllByRole('button'); - const parentItem = buttons[2]; - const childItem = buttons[3]; + const parentItem = buttons[1]; + const childItem = buttons[2]; parentItem.click(); diff --git a/x-pack/plugins/apm/public/components/shared/links/discover_links/discover_links.integration.test.tsx b/x-pack/plugins/apm/public/components/shared/links/discover_links/discover_links.integration.test.tsx index c55a87f2a2482..dfd14e3a172b9 100644 --- a/x-pack/plugins/apm/public/components/shared/links/discover_links/discover_links.integration.test.tsx +++ b/x-pack/plugins/apm/public/components/shared/links/discover_links/discover_links.integration.test.tsx @@ -46,10 +46,13 @@ describe('DiscoverLinks', () => { }, } as Span; - const href = await getRenderedHref(() => , { - search: - '?rangeFrom=now/w&rangeTo=now&refreshPaused=true&refreshInterval=0', - } as Location); + const href = await getRenderedHref( + () => , + { + search: + '?rangeFrom=now/w&rangeTo=now&refreshPaused=true&refreshInterval=0', + } as Location + ); expect(href).toMatchInlineSnapshot( `"/basepath/app/discover#/?_g=(refreshInterval:(pause:!t,value:0),time:(from:now/w,to:now))&_a=(index:apm_static_index_pattern_id,interval:auto,query:(language:kuery,query:'span.id:\\"test-span-id\\"'))"` diff --git a/x-pack/plugins/apm/public/components/shared/links/discover_links/discover_span_link.tsx b/x-pack/plugins/apm/public/components/shared/links/discover_links/discover_span_link.tsx index c8bcc29a15a98..189353cea7403 100644 --- a/x-pack/plugins/apm/public/components/shared/links/discover_links/discover_span_link.tsx +++ b/x-pack/plugins/apm/public/components/shared/links/discover_links/discover_span_link.tsx @@ -7,11 +7,10 @@ import React, { ReactNode } from 'react'; import { SPAN_ID } from '../../../../../common/es_fields/apm'; -import { Span } from '../../../../../typings/es_schemas/ui/span'; import { DiscoverLink } from './discover_link'; -function getDiscoverQuery(span: Span) { - const query = `${SPAN_ID}:"${span.span.id}"`; +function getDiscoverQuery(spanId: string) { + const query = `${SPAN_ID}:"${spanId}"`; return { _a: { interval: 'auto', @@ -24,11 +23,11 @@ function getDiscoverQuery(span: Span) { } export function DiscoverSpanLink({ - span, + spanId, children, }: { - readonly span: Span; + readonly spanId: string; children?: ReactNode; }) { - return ; + return ; } diff --git a/x-pack/plugins/apm/public/components/shared/metadata_table/span_metadata/index.tsx b/x-pack/plugins/apm/public/components/shared/metadata_table/span_metadata/index.tsx index 6b00d20b060e0..d55bf82743d1d 100644 --- a/x-pack/plugins/apm/public/components/shared/metadata_table/span_metadata/index.tsx +++ b/x-pack/plugins/apm/public/components/shared/metadata_table/span_metadata/index.tsx @@ -7,16 +7,15 @@ import React, { useMemo } from 'react'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { Span } from '../../../../../typings/es_schemas/ui/span'; import { getSectionsFromFields } from '../helper'; import { MetadataTable } from '..'; import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; interface Props { - span: Span; + spanId: string; } -export function SpanMetadata({ span }: Props) { +export function SpanMetadata({ spanId }: Props) { const { data: spanEvent, status } = useFetcher( (callApmApi) => { return callApmApi( @@ -25,13 +24,13 @@ export function SpanMetadata({ span }: Props) { params: { path: { processorEvent: ProcessorEvent.span, - id: span.span.id, + id: spanId, }, }, } ); }, - [span.span.id] + [spanId] ); const sections = useMemo( diff --git a/x-pack/plugins/apm/public/components/shared/metadata_table/transaction_metadata/index.tsx b/x-pack/plugins/apm/public/components/shared/metadata_table/transaction_metadata/index.tsx index d24ac369e050d..38352c6c7a318 100644 --- a/x-pack/plugins/apm/public/components/shared/metadata_table/transaction_metadata/index.tsx +++ b/x-pack/plugins/apm/public/components/shared/metadata_table/transaction_metadata/index.tsx @@ -7,16 +7,15 @@ import React, { useMemo } from 'react'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { Transaction } from '../../../../../typings/es_schemas/ui/transaction'; import { getSectionsFromFields } from '../helper'; import { MetadataTable } from '..'; import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; interface Props { - transaction: Transaction; + transactionId: string; } -export function TransactionMetadata({ transaction }: Props) { +export function TransactionMetadata({ transactionId }: Props) { const { data: transactionEvent, status } = useFetcher( (callApmApi) => { return callApmApi( @@ -25,13 +24,13 @@ export function TransactionMetadata({ transaction }: Props) { params: { path: { processorEvent: ProcessorEvent.transaction, - id: transaction.transaction.id, + id: transactionId, }, }, } ); }, - [transaction.transaction.id] + [transactionId] ); const sections = useMemo( diff --git a/x-pack/plugins/apm/server/routes/span_links/get_linked_children.ts b/x-pack/plugins/apm/server/routes/span_links/get_linked_children.ts index 4c8b6a8994abd..466b50d3d38e1 100644 --- a/x-pack/plugins/apm/server/routes/span_links/get_linked_children.ts +++ b/x-pack/plugins/apm/server/routes/span_links/get_linked_children.ts @@ -79,7 +79,7 @@ function getSpanId(source: TransactionRaw | SpanRaw) { : (source as TransactionRaw).transaction?.id; } -export async function getLinkedChildrenCountBySpanId({ +export async function getSpanLinksCountById({ traceId, apmEventClient, start, diff --git a/x-pack/plugins/apm/server/routes/traces/__snapshots__/queries.test.ts.snap b/x-pack/plugins/apm/server/routes/traces/__snapshots__/queries.test.ts.snap index 691922fb66463..a490aec44a366 100644 --- a/x-pack/plugins/apm/server/routes/traces/__snapshots__/queries.test.ts.snap +++ b/x-pack/plugins/apm/server/routes/traces/__snapshots__/queries.test.ts.snap @@ -8,6 +8,17 @@ Object { ], }, "body": Object { + "_source": Array [ + "timestamp.us", + "trace.id", + "transaction.id", + "parent.id", + "service.name", + "error.id", + "error.log.message", + "error.exception", + "error.grouping_key", + ], "query": Object { "bool": Object { "filter": Array [ diff --git a/x-pack/plugins/apm/server/routes/traces/get_trace_items.ts b/x-pack/plugins/apm/server/routes/traces/get_trace_items.ts index 31e0d5c292fce..cc431de8a34c9 100644 --- a/x-pack/plugins/apm/server/routes/traces/get_trace_items.ts +++ b/x-pack/plugins/apm/server/routes/traces/get_trace_items.ts @@ -9,18 +9,56 @@ import { QueryDslQueryContainer, Sort, } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { rangeQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; +import { rangeQuery } from '@kbn/observability-plugin/server'; +import { APMConfig } from '../..'; import { + AGENT_NAME, + CHILD_ID, + ERROR_EXCEPTION, + ERROR_GROUP_ID, + ERROR_ID, ERROR_LOG_LEVEL, + ERROR_LOG_MESSAGE, + EVENT_OUTCOME, + FAAS_COLDSTART, PARENT_ID, + PROCESSOR_EVENT, + SERVICE_ENVIRONMENT, + SERVICE_NAME, + SPAN_ACTION, + SPAN_COMPOSITE_COMPRESSION_STRATEGY, + SPAN_COMPOSITE_COUNT, + SPAN_COMPOSITE_SUM, SPAN_DURATION, + SPAN_ID, + SPAN_LINKS, + SPAN_NAME, + SPAN_SUBTYPE, + SPAN_SYNC, + SPAN_TYPE, + TIMESTAMP, TRACE_ID, TRANSACTION_DURATION, + TRANSACTION_ID, + TRANSACTION_NAME, + TRANSACTION_RESULT, + TRANSACTION_TYPE, } from '../../../common/es_fields/apm'; -import { getLinkedChildrenCountBySpanId } from '../span_links/get_linked_children'; +import { + WaterfallError, + WaterfallSpan, + WaterfallTransaction, +} from '../../../common/waterfall/typings'; import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; -import { APMConfig } from '../..'; +import { getSpanLinksCountById } from '../span_links/get_linked_children'; + +export interface TraceItems { + exceedsMax: boolean; + traceDocs: Array; + errorDocs: WaterfallError[]; + spanLinksCountById: Record; +} export async function getTraceItems( traceId: string, @@ -28,7 +66,7 @@ export async function getTraceItems( apmEventClient: APMEventClient, start: number, end: number -) { +): Promise { const maxTraceItems = config.ui.maxTraceItems; const excludedLogLevels = ['debug', 'info', 'warning']; @@ -39,6 +77,17 @@ export async function getTraceItems( body: { track_total_hits: false, size: maxTraceItems, + _source: [ + TIMESTAMP, + TRACE_ID, + TRANSACTION_ID, + PARENT_ID, + SERVICE_NAME, + ERROR_ID, + ERROR_LOG_MESSAGE, + ERROR_EXCEPTION, + ERROR_GROUP_ID, + ], query: { bool: { filter: [ @@ -58,6 +107,34 @@ export async function getTraceItems( body: { track_total_hits: maxTraceItems + 1, size: maxTraceItems, + _source: [ + TIMESTAMP, + TRACE_ID, + PARENT_ID, + SERVICE_NAME, + SERVICE_ENVIRONMENT, + AGENT_NAME, + EVENT_OUTCOME, + PROCESSOR_EVENT, + TRANSACTION_DURATION, + TRANSACTION_ID, + TRANSACTION_NAME, + TRANSACTION_TYPE, + TRANSACTION_RESULT, + FAAS_COLDSTART, + SPAN_ID, + SPAN_TYPE, + SPAN_SUBTYPE, + SPAN_ACTION, + SPAN_NAME, + SPAN_DURATION, + SPAN_LINKS, + SPAN_COMPOSITE_COUNT, + SPAN_COMPOSITE_COMPRESSION_STRATEGY, + SPAN_COMPOSITE_SUM, + SPAN_SYNC, + CHILD_ID, + ], query: { bool: { filter: [ @@ -77,12 +154,11 @@ export async function getTraceItems( }, }); - const [errorResponse, traceResponse, linkedChildrenOfSpanCountBySpanId] = - await Promise.all([ - errorResponsePromise, - traceResponsePromise, - getLinkedChildrenCountBySpanId({ traceId, apmEventClient, start, end }), - ]); + const [errorResponse, traceResponse, spanLinksCountById] = await Promise.all([ + errorResponsePromise, + traceResponsePromise, + getSpanLinksCountById({ traceId, apmEventClient, start, end }), + ]); const exceedsMax = traceResponse.hits.total.value > maxTraceItems; const traceDocs = traceResponse.hits.hits.map((hit) => hit._source); @@ -92,6 +168,6 @@ export async function getTraceItems( exceedsMax, traceDocs, errorDocs, - linkedChildrenOfSpanCountBySpanId, + spanLinksCountById, }; } diff --git a/x-pack/plugins/apm/server/routes/traces/route.ts b/x-pack/plugins/apm/server/routes/traces/route.ts index 39ac9e2b354a0..ab7b6a69c18df 100644 --- a/x-pack/plugins/apm/server/routes/traces/route.ts +++ b/x-pack/plugins/apm/server/routes/traces/route.ts @@ -19,7 +19,7 @@ import { import { getTransaction } from '../transactions/get_transaction'; import { getRootTransactionByTraceId } from '../transactions/get_transaction_by_trace'; import { getTopTracesPrimaryStats } from './get_top_traces_primary_stats'; -import { getTraceItems } from './get_trace_items'; +import { getTraceItems, TraceItems } from './get_trace_items'; import { getTraceSamplesByQuery } from './get_trace_samples_by_query'; import { getRandomSampler } from '../../lib/helpers/get_random_sampler'; import { getApmEventClient } from '../../lib/helpers/get_apm_event_client'; @@ -27,6 +27,7 @@ import { CriticalPathResponse, getAggregatedCriticalPath, } from './get_aggregated_critical_path'; +import { getSpan } from '../transactions/get_span'; const tracesRoute = createApmServerRoute({ endpoint: 'GET /internal/apm/traces', @@ -88,27 +89,31 @@ const tracesByIdRoute = createApmServerRoute({ path: t.type({ traceId: t.string, }), - query: rangeRt, + query: t.intersection([rangeRt, t.type({ entryTransactionId: t.string })]), }), options: { tags: ['access:apm'] }, handler: async ( resources ): Promise<{ - exceedsMax: boolean; - traceDocs: Array< - | import('./../../../typings/es_schemas/ui/transaction').Transaction - | import('./../../../typings/es_schemas/ui/span').Span - >; - errorDocs: Array< - import('./../../../typings/es_schemas/ui/apm_error').APMError - >; - linkedChildrenOfSpanCountBySpanId: Record; + traceItems: TraceItems; + entryTransaction?: import('./../../../typings/es_schemas/ui/transaction').Transaction; }> => { const apmEventClient = await getApmEventClient(resources); const { params, config } = resources; const { traceId } = params.path; - const { start, end } = params.query; - return getTraceItems(traceId, config, apmEventClient, start, end); + const { start, end, entryTransactionId } = params.query; + const [traceItems, entryTransaction] = await Promise.all([ + getTraceItems(traceId, config, apmEventClient, start, end), + getTransaction({ + transactionId: entryTransactionId, + traceId, + apmEventClient, + }), + ]); + return { + traceItems, + entryTransaction, + }; }, }); @@ -232,6 +237,60 @@ const aggregatedCriticalPathRoute = createApmServerRoute({ }, }); +const transactionFromTraceByIdRoute = createApmServerRoute({ + endpoint: 'GET /internal/apm/traces/{traceId}/transactions/{transactionId}', + params: t.type({ + path: t.type({ + traceId: t.string, + transactionId: t.string, + }), + }), + options: { tags: ['access:apm'] }, + handler: async ( + resources + ): Promise< + import('./../../../typings/es_schemas/ui/transaction').Transaction + > => { + const { params } = resources; + const { transactionId, traceId } = params.path; + const apmEventClient = await getApmEventClient(resources); + return await getTransaction({ + transactionId, + traceId, + apmEventClient, + }); + }, +}); + +const spanFromTraceByIdRoute = createApmServerRoute({ + endpoint: 'GET /internal/apm/traces/{traceId}/spans/{spanId}', + params: t.type({ + path: t.type({ + traceId: t.string, + spanId: t.string, + }), + query: t.union([t.partial({ parentTransactionId: t.string }), t.undefined]), + }), + options: { tags: ['access:apm'] }, + handler: async ( + resources + ): Promise<{ + span?: import('./../../../typings/es_schemas/ui/span').Span; + parentTransaction?: import('./../../../typings/es_schemas/ui/transaction').Transaction; + }> => { + const { params } = resources; + const { spanId, traceId } = params.path; + const { parentTransactionId } = params.query; + const apmEventClient = await getApmEventClient(resources); + return await getSpan({ + spanId, + parentTransactionId, + traceId, + apmEventClient, + }); + }, +}); + export const traceRouteRepository = { ...tracesByIdRoute, ...tracesRoute, @@ -239,4 +298,6 @@ export const traceRouteRepository = { ...transactionByIdRoute, ...findTracesRoute, ...aggregatedCriticalPathRoute, + ...transactionFromTraceByIdRoute, + ...spanFromTraceByIdRoute, }; diff --git a/x-pack/plugins/apm/server/routes/transactions/get_span/index.ts b/x-pack/plugins/apm/server/routes/transactions/get_span/index.ts new file mode 100644 index 0000000000000..5d46bb9a02fd1 --- /dev/null +++ b/x-pack/plugins/apm/server/routes/transactions/get_span/index.ts @@ -0,0 +1,56 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { termQuery } from '@kbn/observability-plugin/server'; +import { ProcessorEvent } from '@kbn/observability-plugin/common'; +import { SPAN_ID, TRACE_ID } from '../../../../common/es_fields/apm'; +import { asMutableArray } from '../../../../common/utils/as_mutable_array'; +import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import { getTransaction } from '../get_transaction'; +import { Span } from '../../../../typings/es_schemas/ui/span'; +import { Transaction } from '../../../../typings/es_schemas/ui/transaction'; + +export async function getSpan({ + spanId, + traceId, + parentTransactionId, + apmEventClient, +}: { + spanId: string; + traceId: string; + parentTransactionId?: string; + apmEventClient: APMEventClient; +}): Promise<{ span?: Span; parentTransaction?: Transaction }> { + const [spanResp, parentTransaction] = await Promise.all([ + apmEventClient.search('get_span', { + apm: { + events: [ProcessorEvent.span], + }, + body: { + track_total_hits: false, + size: 1, + query: { + bool: { + filter: asMutableArray([ + { term: { [SPAN_ID]: spanId } }, + ...termQuery(TRACE_ID, traceId), + ]), + }, + }, + }, + }), + parentTransactionId + ? getTransaction({ + apmEventClient, + transactionId: parentTransactionId, + traceId, + }) + : undefined, + ]); + + return { span: spanResp.hits.hits[0]?._source, parentTransaction }; +} diff --git a/x-pack/test/apm_api_integration/tests/feature_controls.spec.ts b/x-pack/test/apm_api_integration/tests/feature_controls.spec.ts index 24267660397ea..3d1961c3f8cbf 100644 --- a/x-pack/test/apm_api_integration/tests/feature_controls.spec.ts +++ b/x-pack/test/apm_api_integration/tests/feature_controls.spec.ts @@ -129,7 +129,7 @@ export default function featureControlsTests({ getService }: FtrProviderContext) }, { req: { - url: `/internal/apm/traces/foo?start=${start}&end=${end}`, + url: `/internal/apm/traces/foo?start=${start}&end=${end}&entryTransactionId=foo`, }, expectForbidden: expect403, expectResponse: expect200, diff --git a/x-pack/test/apm_api_integration/tests/span_links/span_links.spec.ts b/x-pack/test/apm_api_integration/tests/span_links/span_links.spec.ts index 09ca2f454f1e6..6d34522c92c3a 100644 --- a/x-pack/test/apm_api_integration/tests/span_links/span_links.spec.ts +++ b/x-pack/test/apm_api_integration/tests/span_links/span_links.spec.ts @@ -38,7 +38,13 @@ export default function ApiTest({ getService }: FtrProviderContext) { after(() => synthtraceEsClient.clean()); describe('Span links count on traces', () => { - async function fetchTraces({ traceId }: { traceId: string }) { + async function fetchTraces({ + traceId, + entryTransactionId, + }: { + traceId: string; + entryTransactionId: string; + }) { return await apmApiClient.readUser({ endpoint: `GET /internal/apm/traces/{traceId}`, params: { @@ -46,6 +52,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { query: { start: new Date(start).toISOString(), end: new Date(end).toISOString(), + entryTransactionId, }, }, }); @@ -54,32 +61,38 @@ export default function ApiTest({ getService }: FtrProviderContext) { describe('producer-internal-only trace', () => { let traces: Awaited>['body']; before(async () => { - const tracesResponse = await fetchTraces({ traceId: ids.producerInternalOnly.traceId }); + const tracesResponse = await fetchTraces({ + traceId: ids.producerInternalOnly.traceId, + entryTransactionId: ids.producerInternalOnly.transactionAId, + }); traces = tracesResponse.body; }); it('contains two children link on Span A', () => { - expect(Object.values(traces.linkedChildrenOfSpanCountBySpanId).length).to.equal(1); - expect( - traces.linkedChildrenOfSpanCountBySpanId[ids.producerInternalOnly.spanAId] - ).to.equal(2); + expect(Object.values(traces.traceItems.spanLinksCountById).length).to.equal(1); + expect(traces.traceItems.spanLinksCountById[ids.producerInternalOnly.spanAId]).to.equal( + 2 + ); }); }); describe('producer-external-only trace', () => { let traces: Awaited>['body']; before(async () => { - const tracesResponse = await fetchTraces({ traceId: ids.producerExternalOnly.traceId }); + const tracesResponse = await fetchTraces({ + traceId: ids.producerExternalOnly.traceId, + entryTransactionId: ids.producerExternalOnly.transactionBId, + }); traces = tracesResponse.body; }); it('contains two children link on Span B', () => { - expect(Object.values(traces.linkedChildrenOfSpanCountBySpanId).length).to.equal(2); - expect( - traces.linkedChildrenOfSpanCountBySpanId[ids.producerExternalOnly.spanBId] - ).to.equal(1); + expect(Object.values(traces.traceItems.spanLinksCountById).length).to.equal(2); + expect(traces.traceItems.spanLinksCountById[ids.producerExternalOnly.spanBId]).to.equal( + 1 + ); expect( - traces.linkedChildrenOfSpanCountBySpanId[ids.producerExternalOnly.transactionBId] + traces.traceItems.spanLinksCountById[ids.producerExternalOnly.transactionBId] ).to.equal(1); }); }); @@ -87,34 +100,38 @@ export default function ApiTest({ getService }: FtrProviderContext) { describe('producer-consumer trace', () => { let traces: Awaited>['body']; before(async () => { - const tracesResponse = await fetchTraces({ traceId: ids.producerConsumer.traceId }); + const tracesResponse = await fetchTraces({ + traceId: ids.producerConsumer.traceId, + entryTransactionId: ids.producerConsumer.transactionCId, + }); traces = tracesResponse.body; }); it('contains one children link on transaction C and two on span C', () => { - expect(Object.values(traces.linkedChildrenOfSpanCountBySpanId).length).to.equal(2); + expect(Object.values(traces.traceItems.spanLinksCountById).length).to.equal(2); expect( - traces.linkedChildrenOfSpanCountBySpanId[ids.producerConsumer.transactionCId] + traces.traceItems.spanLinksCountById[ids.producerConsumer.transactionCId] ).to.equal(1); - expect(traces.linkedChildrenOfSpanCountBySpanId[ids.producerConsumer.spanCId]).to.equal( - 1 - ); + expect(traces.traceItems.spanLinksCountById[ids.producerConsumer.spanCId]).to.equal(1); }); }); describe('consumer-multiple trace', () => { let traces: Awaited>['body']; before(async () => { - const tracesResponse = await fetchTraces({ traceId: ids.producerMultiple.traceId }); + const tracesResponse = await fetchTraces({ + traceId: ids.producerMultiple.traceId, + entryTransactionId: ids.producerMultiple.transactionDId, + }); traces = tracesResponse.body; }); it('contains no children', () => { - expect(Object.values(traces.linkedChildrenOfSpanCountBySpanId).length).to.equal(0); + expect(Object.values(traces.traceItems.spanLinksCountById).length).to.equal(0); expect( - traces.linkedChildrenOfSpanCountBySpanId[ids.producerMultiple.transactionDId] + traces.traceItems.spanLinksCountById[ids.producerMultiple.transactionDId] ).to.equal(undefined); - expect(traces.linkedChildrenOfSpanCountBySpanId[ids.producerMultiple.spanEId]).to.equal( + expect(traces.traceItems.spanLinksCountById[ids.producerMultiple.spanEId]).to.equal( undefined ); }); diff --git a/x-pack/test/apm_api_integration/tests/traces/find_traces.spec.ts b/x-pack/test/apm_api_integration/tests/traces/find_traces.spec.ts index 93416c7243f2d..9dbdb9b747e2e 100644 --- a/x-pack/test/apm_api_integration/tests/traces/find_traces.spec.ts +++ b/x-pack/test/apm_api_integration/tests/traces/find_traces.spec.ts @@ -58,7 +58,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { } return Promise.all( - traceSamples.map(async ({ traceId }) => { + traceSamples.map(async ({ traceId, transactionId }) => { const response = await apmApiClient.readUser({ endpoint: `GET /internal/apm/traces/{traceId}`, params: { @@ -66,10 +66,11 @@ export default function ApiTest({ getService }: FtrProviderContext) { query: { start: new Date(start).toISOString(), end: new Date(endWithOffset).toISOString(), + entryTransactionId: transactionId, }, }, }); - return response.body.traceDocs; + return response.body.traceItems.traceDocs; }) ); } @@ -257,37 +258,6 @@ export default function ApiTest({ getService }: FtrProviderContext) { expect(mapped).to.eql([['java', 'python', 'node']]); }); - - it('returns the correct trace samples for exit spans', async () => { - const { - body: { traceSamples }, - } = await fetchTraceSamples({ - query: `sequence by trace.id - [ transaction where service.name == "python" ] - [ span where span.destination.service.resource == "redis" ]`, - type: TraceSearchType.eql, - environment: 'ENVIRONMENT_ALL', - }); - - const traces = await fetchTraces(traceSamples); - - expect(traces.length).to.eql(1); - - const mapped = traces.map((traceDocs) => { - return sortBy(traceDocs, '@timestamp') - .filter( - (doc) => doc.processor.event === 'transaction' || doc.processor.event === 'span' - ) - .map((doc) => { - if (doc.span && 'destination' in doc.span) { - return doc.span.destination!.service.resource; - } - return doc.service.name; - }); - }); - - expect(mapped).to.eql([['python', 'redis']]); - }); }); after(() => synthtraceEsClient.clean()); diff --git a/x-pack/test/apm_api_integration/tests/traces/span_details.spec.ts b/x-pack/test/apm_api_integration/tests/traces/span_details.spec.ts new file mode 100644 index 0000000000000..5c49610cadd18 --- /dev/null +++ b/x-pack/test/apm_api_integration/tests/traces/span_details.spec.ts @@ -0,0 +1,115 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { apm, EntityArrayIterable, timerange } from '@kbn/apm-synthtrace'; +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../common/ftr_provider_context'; + +export default function ApiTest({ getService }: FtrProviderContext) { + const registry = getService('registry'); + const apmApiClient = getService('apmApiClient'); + const synthtraceEsClient = getService('synthtraceEsClient'); + + const start = new Date('2022-01-01T00:00:00.000Z').getTime(); + const end = new Date('2022-01-01T00:15:00.000Z').getTime() - 1; + + async function fetchSpanDetails({ + traceId, + spanId, + parentTransactionId, + }: { + traceId: string; + spanId: string; + parentTransactionId?: string; + }) { + return await apmApiClient.readUser({ + endpoint: `GET /internal/apm/traces/{traceId}/spans/{spanId}`, + params: { + path: { traceId, spanId }, + query: { parentTransactionId }, + }, + }); + } + + registry.when('Span details dont exist', { config: 'basic', archives: [] }, () => { + it('handles empty state', async () => { + const response = await fetchSpanDetails({ + traceId: 'foo', + spanId: 'bar', + }); + + expect(response.status).to.be(200); + expect(response.body).to.eql({}); + }); + }); + + registry.when('Span details', { config: 'basic', archives: [] }, () => { + let traceId: string; + let spanId: string; + let parentTransactionId: string; + before(async () => { + const instanceJava = apm + .service({ name: 'synth-apple', environment: 'production', agentName: 'java' }) + .instance('instance-b'); + const events = timerange(start, end) + .interval('1m') + .rate(1) + .generator((timestamp) => { + return [ + instanceJava + .transaction({ transactionName: 'GET /apple 🍏' }) + .timestamp(timestamp) + .duration(1000) + .failure() + .errors( + instanceJava + .error({ message: '[ResponseError] index_not_found_exception' }) + .timestamp(timestamp + 50) + ) + .children( + instanceJava + .span({ + spanName: 'get_green_apple_🍏', + spanType: 'db', + spanSubtype: 'elasticsearch', + }) + .timestamp(timestamp + 50) + .duration(900) + .success() + ), + ]; + }); + const entities = events.toArray(); + const span = entities.find((entity) => { + return entity['processor.event'] === 'span'; + }); + spanId = span?.['span.id']!; + parentTransactionId = span?.['parent.id']!; + traceId = span?.['trace.id']!; + + await synthtraceEsClient.index(new EntityArrayIterable(entities)); + }); + + after(() => synthtraceEsClient.clean()); + + describe('span details', () => { + let spanDetails: Awaited>['body']; + before(async () => { + const response = await fetchSpanDetails({ + traceId, + spanId, + parentTransactionId, + }); + expect(response.status).to.eql(200); + spanDetails = response.body; + }); + it('returns span details', () => { + expect(spanDetails.span?.span.name).to.eql('get_green_apple_🍏'); + expect(spanDetails.parentTransaction?.transaction.name).to.eql('GET /apple 🍏'); + }); + }); + }); +} diff --git a/x-pack/test/apm_api_integration/tests/traces/trace_by_id.spec.ts b/x-pack/test/apm_api_integration/tests/traces/trace_by_id.spec.ts index 087ec58e83806..473d32613ce7e 100644 --- a/x-pack/test/apm_api_integration/tests/traces/trace_by_id.spec.ts +++ b/x-pack/test/apm_api_integration/tests/traces/trace_by_id.spec.ts @@ -21,7 +21,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { query, }: { traceId: string; - query: { start: string; end: string; _inspect?: boolean }; + query: { start: string; end: string; entryTransactionId: string }; }) { return await apmApiClient.readUser({ endpoint: `GET /internal/apm/traces/{traceId}`, @@ -39,20 +39,24 @@ export default function ApiTest({ getService }: FtrProviderContext) { query: { start: new Date(start).toISOString(), end: new Date(end).toISOString(), + entryTransactionId: 'foo', }, }); expect(response.status).to.be(200); expect(response.body).to.eql({ - exceedsMax: false, - traceDocs: [], - errorDocs: [], - linkedChildrenOfSpanCountBySpanId: {}, + traceItems: { + exceedsMax: false, + traceDocs: [], + errorDocs: [], + spanLinksCountById: {}, + }, }); }); }); registry.when('Trace exists', { config: 'basic', archives: [] }, () => { + let entryTransactionId: string; let serviceATraceId: string; before(async () => { const instanceJava = apm @@ -87,6 +91,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { ]; }); const entities = events.toArray(); + entryTransactionId = entities[0]['transaction.id']!; serviceATraceId = entities.slice(0, 1)[0]['trace.id']!; await synthtraceEsClient.index(new EntityArrayIterable(entities)); @@ -99,22 +104,26 @@ export default function ApiTest({ getService }: FtrProviderContext) { before(async () => { const response = await fetchTraces({ traceId: serviceATraceId, - query: { start: new Date(start).toISOString(), end: new Date(end).toISOString() }, + query: { + start: new Date(start).toISOString(), + end: new Date(end).toISOString(), + entryTransactionId, + }, }); expect(response.status).to.eql(200); traces = response.body; }); it('returns some errors', () => { - expect(traces.errorDocs.length).to.be.greaterThan(0); - expect(traces.errorDocs[0].error.exception?.[0].message).to.eql( + expect(traces.traceItems.errorDocs.length).to.be.greaterThan(0); + expect(traces.traceItems.errorDocs[0].error.exception?.[0].message).to.eql( '[ResponseError] index_not_found_exception' ); }); it('returns some trace docs', () => { - expect(traces.traceDocs.length).to.be.greaterThan(0); + expect(traces.traceItems.traceDocs.length).to.be.greaterThan(0); expect( - traces.traceDocs.map((item) => { + traces.traceItems.traceDocs.map((item) => { if (item.span && 'name' in item.span) { return item.span.name; } @@ -124,6 +133,12 @@ export default function ApiTest({ getService }: FtrProviderContext) { }) ).to.eql(['GET /apple 🍏', 'get_green_apple_🍏']); }); + + it('returns entry transaction details', () => { + expect(traces.entryTransaction).to.not.be(undefined); + expect(traces.entryTransaction?.transaction.id).to.equal(entryTransactionId); + expect(traces.entryTransaction?.transaction.name).to.equal('GET /apple 🍏'); + }); }); }); } diff --git a/x-pack/test/apm_api_integration/tests/traces/transaction_details.spec.ts b/x-pack/test/apm_api_integration/tests/traces/transaction_details.spec.ts new file mode 100644 index 0000000000000..6738f5fa5fb24 --- /dev/null +++ b/x-pack/test/apm_api_integration/tests/traces/transaction_details.spec.ts @@ -0,0 +1,106 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { apm, EntityArrayIterable, timerange } from '@kbn/apm-synthtrace'; +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../common/ftr_provider_context'; + +export default function ApiTest({ getService }: FtrProviderContext) { + const registry = getService('registry'); + const apmApiClient = getService('apmApiClient'); + const synthtraceEsClient = getService('synthtraceEsClient'); + + const start = new Date('2022-01-01T00:00:00.000Z').getTime(); + const end = new Date('2022-01-01T00:15:00.000Z').getTime() - 1; + + async function fetchTransactionDetails({ + traceId, + transactionId, + }: { + traceId: string; + transactionId: string; + }) { + return await apmApiClient.readUser({ + endpoint: `GET /internal/apm/traces/{traceId}/transactions/{transactionId}`, + params: { + path: { traceId, transactionId }, + }, + }); + } + + registry.when('Transaction details dont exist', { config: 'basic', archives: [] }, () => { + it('handles empty state', async () => { + const response = await fetchTransactionDetails({ + traceId: 'foo', + transactionId: 'bar', + }); + + expect(response.status).to.be(200); + expect(response.body).to.eql({}); + }); + }); + + registry.when('Transaction details', { config: 'basic', archives: [] }, () => { + let traceId: string; + let transactionId: string; + before(async () => { + const instanceJava = apm + .service({ name: 'synth-apple', environment: 'production', agentName: 'java' }) + .instance('instance-b'); + const events = timerange(start, end) + .interval('1m') + .rate(1) + .generator((timestamp) => { + return [ + instanceJava + .transaction({ transactionName: 'GET /apple 🍏' }) + .timestamp(timestamp) + .duration(1000) + .failure() + .errors( + instanceJava + .error({ message: '[ResponseError] index_not_found_exception' }) + .timestamp(timestamp + 50) + ) + .children( + instanceJava + .span({ + spanName: 'get_green_apple_🍏', + spanType: 'db', + spanSubtype: 'elasticsearch', + }) + .timestamp(timestamp + 50) + .duration(900) + .success() + ), + ]; + }); + const entities = events.toArray(); + const transaction = entities[0]; + transactionId = transaction?.['transaction.id']!; + traceId = transaction?.['trace.id']!; + + await synthtraceEsClient.index(new EntityArrayIterable(entities)); + }); + + after(() => synthtraceEsClient.clean()); + + describe('transaction details', () => { + let transactionDetails: Awaited>['body']; + before(async () => { + const response = await fetchTransactionDetails({ + traceId, + transactionId, + }); + expect(response.status).to.eql(200); + transactionDetails = response.body; + }); + it('returns transaction details', () => { + expect(transactionDetails.transaction.name).to.eql('GET /apple 🍏'); + }); + }); + }); +}