From dd18bc7c4de31ed038ee475c7cc0208ddcc9ff72 Mon Sep 17 00:00:00 2001 From: Karen Grigoryan Date: Mon, 26 Aug 2024 14:28:20 +0200 Subject: [PATCH] [Security Solution][DQD][Tech Debt] Colocate components (#190978) addresses https://github.com/elastic/kibana/issues/190964 Second in the series of PRs to address general DQD tech debt. Currently this PR build on the work of https://github.com/elastic/kibana/pull/190970. So this PR restructures components to colocate component throughout the hierarchy. So instead of: ```bash root/ component1/ childOfComponent1/ grandChildOfComponent1/ component2/ use_hook_used_for_1/ use_hook_used_for_2/ ``` we use: ```bash root/ component1/ hooks/ use_hook_used_for_1/ childOfComponent1/ grandChildOfComponent1/ component2/ hooks/ use_hook_used_for_2/ ``` PROs of such scaffold: - complete and clear hierarchical visibility into component structure of the entire DQD codebase - ability to easily introduce and integrate a new change and calculate its impact on the tree of components - ability to easily remove colocated functionality without having to scout through the convoluted DQD code - clear understanding of where shared code should live as opposed to know when its shoved into top level by default with other non shared code - since nesting too deep has an import name readability tax it forces us to think about not splitting our components into too many small parts but rather keep it balanced, as opposed to now where flat structure incentivizes free and cheap fragmentation as seen with component like . CONS: - import names have too many `../../../../../../../../../`. It is fixable by ts paths/webpack aliases, but on the other hand especially if there are many of those it's an indication of potential architectural smell, that needs to be addressed (which is a PRO). Imho, overall visibility trumps any cons and facilitates greater ease of adding new and changing existing functionality with more confidence. ## Before ![image](https://github.com/user-attachments/assets/89062883-c40a-410d-af43-8dbe3e712475) ## After ![image](https://github.com/user-attachments/assets/83e33a85-cf3e-4cb1-a56d-c7f4f27a1f37) --- .../allowed_values/helpers.test.tsx | 152 --------------- .../data_quality_panel/body/index.test.tsx | 51 ----- .../data_quality_panel/body/index.tsx | 29 --- .../impl/data_quality/index.test.tsx | 44 ----- .../data_quality/use_mappings/index.test.tsx | 138 -------------- .../impl/data_quality/use_mappings/index.tsx | 66 ------- .../use_unallowed_values/index.test.tsx | 178 ------------------ .../use_unallowed_values/index.tsx | 91 --------- .../hooks}/use_add_to_new_case/index.tsx | 0 .../use_add_to_new_case/translations.ts | 0 .../actions/add_to_new_case/index.test.tsx | 2 +- .../actions/add_to_new_case/index.tsx | 4 +- .../actions/chat/index.test.tsx | 2 +- .../data_quality_panel/actions/chat/index.tsx | 2 +- .../actions/chat/translations.ts | 0 .../actions/copy_to_clipboard/index.test.tsx | 2 +- .../actions/copy_to_clipboard/index.tsx | 2 +- .../data_quality_panel/actions/index.test.tsx | 2 +- .../data_quality_panel/actions/index.tsx | 0 .../data_quality_panel/actions/styles.tsx | 0 .../constants.ts | 0 .../contexts/indices_check_context/index.tsx | 2 +- .../contexts/results_rollup_context/index.tsx | 2 +- .../data_quality_context/index.test.tsx | 0 .../data_quality_context/index.tsx | 2 +- .../ilm_phases_empty_prompt/index.test.tsx | 2 +- .../ilm_phases_empty_prompt/index.tsx | 2 +- .../ilm_phases_empty_prompt/translations.ts | 0 .../data_quality_details/index.test.tsx | 2 +- .../data_quality_details/index.tsx | 6 +- .../indices_details/index.test.tsx | 12 +- .../indices_details/index.tsx | 8 +- .../error_empty_prompt/index.test.tsx | 2 +- .../pattern}/error_empty_prompt/index.tsx | 2 +- .../indices_details}/pattern/helpers.test.ts | 12 +- .../indices_details}/pattern/helpers.ts | 4 +- .../hooks}/use_ilm_explain/index.test.tsx | 6 +- .../pattern/hooks}/use_ilm_explain/index.tsx | 8 +- .../pattern/hooks}/use_stats/index.test.tsx | 6 +- .../pattern/hooks}/use_stats/index.tsx | 10 +- .../indices_details}/pattern/index.test.tsx | 10 +- .../indices_details}/pattern/index.tsx | 24 +-- .../use_current_window_width/index.test.tsx | 0 .../hooks}/use_current_window_width/index.tsx | 0 .../pattern/index_check_flyout/index.test.tsx | 8 +- .../pattern/index_check_flyout/index.tsx | 14 +- .../empty_prompt_body.test.tsx | 2 +- .../index_properties/empty_prompt_body.tsx | 0 .../empty_prompt_title.test.tsx | 2 +- .../index_properties/empty_prompt_title.tsx | 0 .../index_properties/helpers.test.ts | 6 +- .../index_properties/helpers.ts | 6 +- .../index_properties/index.test.tsx | 8 +- .../index_properties/index.tsx | 12 +- .../index_check_fields/index.test.tsx | 4 +- .../index_check_fields/index.tsx | 8 +- .../tabs/all_tab/index.tsx | 12 +- .../callouts/custom_callout/index.test.tsx | 6 +- .../tabs/callouts/custom_callout/index.tsx | 4 +- .../incompatible_callout/index.test.tsx | 4 +- .../callouts/incompatible_callout/index.tsx | 2 +- .../missing_timestamp_callout/index.tsx | 2 +- .../same_family_callout/index.test.tsx | 6 +- .../callouts/same_family_callout/index.tsx | 4 +- .../ecs_allowed_values/index.test.tsx | 4 +- .../ecs_allowed_values/index.tsx | 4 +- .../get_common_table_columns/index.test.tsx | 8 +- .../get_common_table_columns/index.tsx | 12 +- .../index.test.tsx | 8 +- .../index.tsx | 6 +- .../compare_fields_table/helpers.test.tsx | 4 +- .../tabs}/compare_fields_table/helpers.tsx | 4 +- .../tabs}/compare_fields_table/index.test.tsx | 6 +- .../tabs}/compare_fields_table/index.tsx | 2 +- .../index_invalid_values/index.test.tsx | 4 +- .../index_invalid_values/index.tsx | 4 +- .../same_family/index.test.tsx | 2 +- .../same_family/index.tsx | 0 .../same_family/translations.ts | 0 .../compare_fields_table/translations.ts | 0 .../tabs/custom_tab/helpers.test.ts | 8 +- .../tabs/custom_tab/helpers.ts | 12 +- .../tabs/custom_tab/index.tsx | 14 +- .../tabs/ecs_compliant_tab/index.tsx | 12 +- .../index_check_fields}/tabs/helpers.test.tsx | 6 +- .../index_check_fields}/tabs/helpers.tsx | 10 +- .../tabs/incompatible_tab/helpers.test.ts | 8 +- .../tabs/incompatible_tab/helpers.ts | 14 +- .../tabs/incompatible_tab/index.tsx | 16 +- .../tabs/incompatible_tab/translations.ts | 0 .../tabs/same_family_tab/helpers.test.ts | 6 +- .../tabs/same_family_tab/helpers.ts | 12 +- .../tabs/same_family_tab/index.tsx | 8 +- .../tabs/same_family_tab/translations.ts | 0 .../tabs/sticky_actions/index.tsx | 2 +- .../index_check_fields}/tabs/styles.tsx | 0 .../index_stats_panel/index.test.tsx | 2 +- .../index_stats_panel/index.tsx | 9 +- .../index_properties/markdown/helpers.test.ts | 26 +-- .../index_properties/markdown/helpers.ts | 22 ++- .../index_properties/translations.ts | 0 .../index_check_flyout/translations.ts | 0 .../index_result_badge/helpers.test.ts | 0 .../pattern}/index_result_badge/helpers.ts | 0 .../index_result_badge/index.test.tsx | 0 .../pattern}/index_result_badge/index.tsx | 0 .../index_result_badge/translations.ts | 0 .../pattern}/loading_empty_prompt/index.tsx | 0 .../pattern/pattern_summary/index.tsx | 4 +- .../pattern_label/helpers.test.ts | 0 .../pattern_summary/pattern_label/helpers.ts | 0 .../ilm_phase_counts/index.test.tsx | 4 +- .../pattern_label}/ilm_phase_counts/index.tsx | 4 +- .../pattern_summary/pattern_label/index.tsx | 6 +- .../pattern_label/translations.ts | 0 .../pattern/pattern_summary/translations.ts | 0 .../remote_clusters_callout/index.test.tsx | 0 .../remote_clusters_callout/index.tsx | 0 .../remote_clusters_callout/translations.ts | 0 .../indices_details}/pattern/styles.tsx | 0 .../pattern}/summary_table/helpers.test.tsx | 8 +- .../pattern}/summary_table/helpers.tsx | 12 +- .../pattern}/summary_table/index.test.tsx | 14 +- .../pattern}/summary_table/index.tsx | 10 +- .../pattern}/summary_table/translations.ts | 0 .../indices_details}/pattern/translations.ts | 0 .../indices_details}/pattern/types.ts | 2 +- .../storage_details/helpers.test.ts | 10 +- .../storage_details/helpers.ts | 6 +- .../storage_details/index.test.tsx | 12 +- .../storage_details/index.tsx | 10 +- .../chart_legend_item/index.tsx | 0 .../storage_treemap/index.test.tsx | 20 +- .../storage_treemap/index.tsx | 11 +- .../storage_treemap/no_data/index.test.tsx | 2 +- .../storage_treemap/no_data/index.tsx | 0 .../storage_treemap/translations.ts | 0 .../storage_details/translations.ts | 0 .../ilm_phase_filter/index.test.tsx | 4 +- .../ilm_phase_filter/index.tsx | 6 +- .../ilm_phase_filter/styles.tsx | 0 .../data_quality_summary/index.test.tsx | 14 +- .../data_quality_summary/index.tsx | 4 +- .../summary_actions/check_all/helpers.test.ts | 2 +- .../summary_actions/check_all/helpers.ts | 4 +- .../summary_actions/check_all/index.test.tsx | 29 +-- .../summary_actions/check_all/index.tsx | 10 +- .../summary_actions/check_all/translations.ts | 0 .../errors_viewer/helpers.test.tsx | 4 +- .../errors_popover}/errors_viewer/helpers.tsx | 2 +- .../errors_viewer/index.test.tsx | 4 +- .../errors_popover}/errors_viewer/index.tsx | 2 +- .../errors_viewer/translations.ts | 0 .../errors_popover/index.test.tsx | 2 +- .../check_status}/errors_popover/index.tsx | 10 +- .../errors_popover/translations.ts | 0 .../check_status/index.test.tsx | 0 .../summary_actions}/check_status/index.tsx | 4 +- .../summary_actions/index.test.tsx | 14 +- .../summary_actions/index.tsx | 19 +- .../helpers.test.ts | 0 .../helpers.ts | 2 +- .../hooks}/use_indices_check/index.test.tsx | 12 +- .../hooks}/use_indices_check/index.tsx | 8 +- .../hooks}/use_indices_check/reducer.ts | 6 +- .../hooks}/use_indices_check/types.ts | 8 +- .../hooks}/use_is_mounted/index.test.tsx | 0 .../hooks}/use_is_mounted/index.tsx | 0 .../hooks}/use_results_rollup/helpers.test.ts | 12 +- .../hooks}/use_results_rollup/helpers.ts | 10 +- .../hooks}/use_results_rollup/index.tsx | 11 +- .../hooks}/use_results_rollup/types.ts | 2 +- .../impl/data_quality_panel/index.test.tsx | 84 +++++++++ .../index.tsx | 22 ++- .../allowed_values/mock_allowed_values.ts | 0 .../data_quality_check_result/mock_index.tsx | 0 .../mock_enriched_field_metadata.ts | 0 .../mock/ilm_explain/mock_ilm_explain.ts | 0 ...ndices_get_mapping_index_mapping_record.ts | 0 .../mock_mappings_properties.ts | 0 .../mock_mappings_response.ts | 0 .../mock_partitioned_field_metadata.tsx | 0 ...itioned_field_metadata_with_same_family.ts | 0 .../mock_alerts_pattern_rollup.ts | 0 .../mock_auditbeat_pattern_rollup.ts | 0 .../mock_packetbeat_pattern_rollup.ts | 0 .../mock/stats/mock_stats.tsx | 0 .../mock/stats/mock_stats_auditbeat_index.tsx | 0 .../mock/stats/mock_stats_packetbeat_index.ts | 0 .../mock/test_providers/test_providers.tsx | 9 +- .../get_merged_data_quality_context_props.ts | 2 +- .../get_merged_indices_check_context_props.ts | 2 +- ...get_merged_results_rollup_context_props.ts | 24 +-- .../unallowed_values/mock_unallowed_values.ts | 0 .../mock_use_results_rollup.ts | 30 +++ .../stat/index.test.tsx | 2 +- .../stat/index.tsx | 0 .../stat_label/translations.ts | 0 .../stats_rollup/index.test.tsx | 2 +- .../stats_rollup/index.tsx | 8 +- .../stub/get_check_state/index.ts | 8 +- .../styles.tsx | 0 .../translations.ts | 0 .../types.ts | 0 .../utils/check_index.test.ts | 36 ++-- .../utils/check_index.ts | 10 +- .../utils/fetch_mappings.test.ts} | 2 +- .../utils/fetch_mappings.ts} | 0 .../utils/fetch_unallowed_values.test.ts} | 2 +- .../utils/fetch_unallowed_values.ts} | 0 .../get_unallowed_value_request_items.tsx} | 4 +- ...et_unallowed_values_request_items.test.tsx | 154 +++++++++++++++ .../ecs_data_quality_dashboard/index.ts | 8 +- 213 files changed, 774 insertions(+), 1227 deletions(-) delete mode 100644 x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/allowed_values/helpers.test.tsx delete mode 100644 x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/index.test.tsx delete mode 100644 x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/index.tsx delete mode 100644 x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/index.test.tsx delete mode 100644 x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_mappings/index.test.tsx delete mode 100644 x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_mappings/index.tsx delete mode 100644 x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_unallowed_values/index.test.tsx delete mode 100644 x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_unallowed_values/index.tsx rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/actions/add_to_new_case/hooks}/use_add_to_new_case/index.tsx (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/actions/add_to_new_case/hooks}/use_add_to_new_case/translations.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => }/data_quality_panel/actions/add_to_new_case/index.test.tsx (98%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => }/data_quality_panel/actions/add_to_new_case/index.tsx (92%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => }/data_quality_panel/actions/chat/index.test.tsx (93%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => }/data_quality_panel/actions/chat/index.tsx (98%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => }/data_quality_panel/actions/chat/translations.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => }/data_quality_panel/actions/copy_to_clipboard/index.test.tsx (97%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => }/data_quality_panel/actions/copy_to_clipboard/index.tsx (98%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => }/data_quality_panel/actions/index.test.tsx (97%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => }/data_quality_panel/actions/index.tsx (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => }/data_quality_panel/actions/styles.tsx (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/constants.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/contexts/indices_check_context/index.tsx (88%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/contexts/results_rollup_context/index.tsx (88%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => }/data_quality_panel/data_quality_context/index.test.tsx (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => }/data_quality_panel/data_quality_context/index.tsx (98%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/data_quality_details}/ilm_phases_empty_prompt/index.test.tsx (94%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/data_quality_details}/ilm_phases_empty_prompt/index.tsx (98%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/data_quality_details}/ilm_phases_empty_prompt/translations.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel/body => data_quality_panel}/data_quality_details/index.test.tsx (97%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel/body => data_quality_panel}/data_quality_details/index.tsx (86%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel/body => data_quality_panel}/data_quality_details/indices_details/index.test.tsx (83%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel/body => data_quality_panel}/data_quality_details/indices_details/index.tsx (85%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern}/error_empty_prompt/index.test.tsx (89%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern}/error_empty_prompt/index.tsx (89%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details}/pattern/helpers.test.ts (98%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details}/pattern/helpers.ts (98%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/data_quality_details/indices_details/pattern/hooks}/use_ilm_explain/index.test.tsx (96%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/data_quality_details/indices_details/pattern/hooks}/use_ilm_explain/index.tsx (89%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/data_quality_details/indices_details/pattern/hooks}/use_stats/index.test.tsx (96%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/data_quality_details/indices_details/pattern/hooks}/use_stats/index.tsx (88%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details}/pattern/index.test.tsx (91%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details}/pattern/index.tsx (93%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/hooks}/use_current_window_width/index.test.tsx (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/hooks}/use_current_window_width/index.tsx (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details}/pattern/index_check_flyout/index.test.tsx (92%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details}/pattern/index_check_flyout/index.tsx (91%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout}/index_properties/empty_prompt_body.test.tsx (88%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout}/index_properties/empty_prompt_body.tsx (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout}/index_properties/empty_prompt_title.test.tsx (89%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout}/index_properties/empty_prompt_title.tsx (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout}/index_properties/helpers.test.ts (96%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout}/index_properties/helpers.ts (96%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout}/index_properties/index.test.tsx (95%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout}/index_properties/index.tsx (86%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout}/index_properties/index_check_fields/index.test.tsx (90%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout}/index_properties/index_check_fields/index.tsx (91%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields}/tabs/all_tab/index.tsx (77%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields}/tabs/callouts/custom_callout/index.test.tsx (80%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields}/tabs/callouts/custom_callout/index.tsx (88%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields}/tabs/callouts/incompatible_callout/index.test.tsx (92%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields}/tabs/callouts/incompatible_callout/index.tsx (95%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields}/tabs/callouts/missing_timestamp_callout/index.tsx (94%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields}/tabs/callouts/same_family_callout/index.test.tsx (82%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields}/tabs/callouts/same_family_callout/index.tsx (89%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs}/compare_fields_table/ecs_allowed_values/index.test.tsx (88%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs}/compare_fields_table/ecs_allowed_values/index.tsx (89%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs}/compare_fields_table/get_common_table_columns/index.test.tsx (96%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs}/compare_fields_table/get_common_table_columns/index.tsx (90%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs}/compare_fields_table/get_incompatible_mappings_table_columns/index.test.tsx (92%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs}/compare_fields_table/get_incompatible_mappings_table_columns/index.tsx (88%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs}/compare_fields_table/helpers.test.tsx (98%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs}/compare_fields_table/helpers.tsx (96%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs}/compare_fields_table/index.test.tsx (79%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs}/compare_fields_table/index.tsx (95%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs}/compare_fields_table/index_invalid_values/index.test.tsx (88%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs}/compare_fields_table/index_invalid_values/index.tsx (91%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table}/same_family/index.test.tsx (87%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table}/same_family/index.tsx (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table}/same_family/translations.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs}/compare_fields_table/translations.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields}/tabs/custom_tab/helpers.test.ts (94%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields}/tabs/custom_tab/helpers.ts (88%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields}/tabs/custom_tab/index.tsx (85%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields}/tabs/ecs_compliant_tab/index.tsx (85%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields}/tabs/helpers.test.tsx (90%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields}/tabs/helpers.tsx (95%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields}/tabs/incompatible_tab/helpers.test.ts (98%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields}/tabs/incompatible_tab/helpers.ts (94%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields}/tabs/incompatible_tab/index.tsx (87%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields}/tabs/incompatible_tab/translations.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields}/tabs/same_family_tab/helpers.test.ts (95%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields}/tabs/same_family_tab/helpers.ts (92%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields}/tabs/same_family_tab/index.tsx (90%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields}/tabs/same_family_tab/translations.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields}/tabs/sticky_actions/index.tsx (96%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields}/tabs/styles.tsx (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout}/index_properties/index_stats_panel/index.test.tsx (89%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout}/index_properties/index_stats_panel/index.tsx (88%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout}/index_properties/markdown/helpers.test.ts (96%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout}/index_properties/markdown/helpers.ts (95%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout}/index_properties/translations.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details}/pattern/index_check_flyout/translations.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern}/index_result_badge/helpers.test.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern}/index_result_badge/helpers.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern}/index_result_badge/index.test.tsx (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern}/index_result_badge/index.tsx (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern}/index_result_badge/translations.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern}/loading_empty_prompt/index.tsx (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details}/pattern/pattern_summary/index.tsx (92%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details}/pattern/pattern_summary/pattern_label/helpers.test.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details}/pattern/pattern_summary/pattern_label/helpers.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/pattern_summary/pattern_label}/ilm_phase_counts/index.test.tsx (93%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern/pattern_summary/pattern_label}/ilm_phase_counts/index.tsx (90%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details}/pattern/pattern_summary/pattern_label/index.tsx (92%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details}/pattern/pattern_summary/pattern_label/translations.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details}/pattern/pattern_summary/translations.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern}/remote_clusters_callout/index.test.tsx (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern}/remote_clusters_callout/index.tsx (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern}/remote_clusters_callout/translations.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details}/pattern/styles.tsx (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern}/summary_table/helpers.test.tsx (98%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern}/summary_table/helpers.tsx (94%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern}/summary_table/index.test.tsx (86%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern}/summary_table/index.tsx (91%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details/pattern}/summary_table/translations.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details}/pattern/translations.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/indices_details}/pattern/types.ts (92%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel/body => data_quality_panel}/data_quality_details/storage_details/helpers.test.ts (97%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel/body => data_quality_panel}/data_quality_details/storage_details/helpers.ts (97%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel/body => data_quality_panel}/data_quality_details/storage_details/index.test.tsx (79%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel/body => data_quality_panel}/data_quality_details/storage_details/index.tsx (81%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/storage_details}/storage_treemap/chart_legend_item/index.tsx (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/storage_details}/storage_treemap/index.test.tsx (88%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/storage_details}/storage_treemap/index.tsx (94%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/storage_details}/storage_treemap/no_data/index.test.tsx (88%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/storage_details}/storage_treemap/no_data/index.tsx (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel => data_quality_panel/data_quality_details/storage_details}/storage_treemap/translations.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel/body => data_quality_panel}/data_quality_details/storage_details/translations.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => }/data_quality_panel/data_quality_summary/ilm_phase_filter/index.test.tsx (98%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => }/data_quality_panel/data_quality_summary/ilm_phase_filter/index.tsx (93%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => }/data_quality_panel/data_quality_summary/ilm_phase_filter/styles.tsx (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => }/data_quality_panel/data_quality_summary/index.test.tsx (86%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => }/data_quality_panel/data_quality_summary/index.tsx (94%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => }/data_quality_panel/data_quality_summary/summary_actions/check_all/helpers.test.ts (96%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => }/data_quality_panel/data_quality_summary/summary_actions/check_all/helpers.ts (95%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => }/data_quality_panel/data_quality_summary/summary_actions/check_all/index.test.tsx (94%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => }/data_quality_panel/data_quality_summary/summary_actions/check_all/index.tsx (94%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => }/data_quality_panel/data_quality_summary/summary_actions/check_all/translations.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel/data_quality_summary => data_quality_panel/data_quality_summary/summary_actions/check_status/errors_popover}/errors_viewer/helpers.test.tsx (96%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel/data_quality_summary => data_quality_panel/data_quality_summary/summary_actions/check_status/errors_popover}/errors_viewer/helpers.tsx (95%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel/data_quality_summary => data_quality_panel/data_quality_summary/summary_actions/check_status/errors_popover}/errors_viewer/index.test.tsx (92%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel/data_quality_summary => data_quality_panel/data_quality_summary/summary_actions/check_status/errors_popover}/errors_viewer/index.tsx (95%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel/data_quality_summary => data_quality_panel/data_quality_summary/summary_actions/check_status/errors_popover}/errors_viewer/translations.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel/data_quality_summary => data_quality_panel/data_quality_summary/summary_actions/check_status}/errors_popover/index.test.tsx (97%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel/data_quality_summary => data_quality_panel/data_quality_summary/summary_actions/check_status}/errors_popover/index.tsx (89%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel/data_quality_summary => data_quality_panel/data_quality_summary/summary_actions/check_status}/errors_popover/translations.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel/data_quality_summary => data_quality_panel/data_quality_summary/summary_actions}/check_status/index.test.tsx (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel/data_quality_summary => data_quality_panel/data_quality_summary/summary_actions}/check_status/index.tsx (96%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => }/data_quality_panel/data_quality_summary/summary_actions/index.test.tsx (88%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => }/data_quality_panel/data_quality_summary/summary_actions/index.tsx (91%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/helpers.test.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/helpers.ts (99%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/hooks}/use_indices_check/index.test.tsx (96%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/hooks}/use_indices_check/index.tsx (92%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/hooks}/use_indices_check/reducer.ts (97%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/hooks}/use_indices_check/types.ts (86%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/hooks}/use_is_mounted/index.test.tsx (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/hooks}/use_is_mounted/index.tsx (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/hooks}/use_results_rollup/helpers.test.ts (98%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/hooks}/use_results_rollup/helpers.ts (92%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/hooks}/use_results_rollup/index.tsx (96%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel/hooks}/use_results_rollup/types.ts (93%) create mode 100644 x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/index.test.tsx rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/index.tsx (86%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/mock/allowed_values/mock_allowed_values.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/mock/data_quality_check_result/mock_index.tsx (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/mock/enriched_field_metadata/mock_enriched_field_metadata.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/mock/ilm_explain/mock_ilm_explain.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/mock/indices_get_mapping_index_mapping_record/mock_indices_get_mapping_index_mapping_record.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/mock/mappings_properties/mock_mappings_properties.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/mock/mappings_response/mock_mappings_response.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/mock/partitioned_field_metadata/mock_partitioned_field_metadata.tsx (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/mock/partitioned_field_metadata/mock_partitioned_field_metadata_with_same_family.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/mock/pattern_rollup/mock_alerts_pattern_rollup.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/mock/pattern_rollup/mock_auditbeat_pattern_rollup.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/mock/pattern_rollup/mock_packetbeat_pattern_rollup.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/mock/stats/mock_stats.tsx (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/mock/stats/mock_stats_auditbeat_index.tsx (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/mock/stats/mock_stats_packetbeat_index.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/mock/test_providers/test_providers.tsx (95%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/mock/test_providers/utils/get_merged_data_quality_context_props.ts (98%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/mock/test_providers/utils/get_merged_indices_check_context_props.ts (95%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/mock/test_providers/utils/get_merged_results_rollup_context_props.ts (57%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/mock/unallowed_values/mock_unallowed_values.ts (100%) create mode 100644 x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/use_results_rollup/mock_use_results_rollup.ts rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel/pattern/pattern_summary/stats_rollup => data_quality_panel}/stat/index.test.tsx (96%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel/pattern/pattern_summary/stats_rollup => data_quality_panel}/stat/index.tsx (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => }/data_quality_panel/stat_label/translations.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel/pattern/pattern_summary => data_quality_panel}/stats_rollup/index.test.tsx (98%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel/pattern/pattern_summary => data_quality_panel}/stats_rollup/index.tsx (93%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/stub/get_check_state/index.ts (84%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/styles.tsx (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/translations.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/types.ts (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/utils/check_index.test.ts (95%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality => data_quality_panel}/utils/check_index.ts (91%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/use_mappings/helpers.test.ts => data_quality_panel/utils/fetch_mappings.test.ts} (97%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/use_mappings/helpers.ts => data_quality_panel/utils/fetch_mappings.ts} (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/use_unallowed_values/helpers.test.ts => data_quality_panel/utils/fetch_unallowed_values.test.ts} (99%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/use_unallowed_values/helpers.ts => data_quality_panel/utils/fetch_unallowed_values.ts} (100%) rename x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/{data_quality/data_quality_panel/allowed_values/helpers.tsx => data_quality_panel/utils/get_unallowed_value_request_items.tsx} (94%) create mode 100644 x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/utils/get_unallowed_values_request_items.test.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/allowed_values/helpers.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/allowed_values/helpers.test.tsx deleted file mode 100644 index 7fd0a3f3b133d..0000000000000 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/allowed_values/helpers.test.tsx +++ /dev/null @@ -1,152 +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 { EcsFlatTyped } from '../../constants'; -import { getUnallowedValueRequestItems, getValidValues, hasAllowedValues } from './helpers'; - -describe('helpers', () => { - describe('hasAllowedValues', () => { - test('it returns true for a field that has `allowed_values`', () => { - expect( - hasAllowedValues({ - ecsMetadata: EcsFlatTyped, - fieldName: 'event.category', - }) - ).toBe(true); - }); - - test('it returns false for a field that does NOT have `allowed_values`', () => { - expect( - hasAllowedValues({ - ecsMetadata: EcsFlatTyped, - fieldName: 'host.name', - }) - ).toBe(false); - }); - - test('it returns false for a field that does NOT exist in `ecsMetadata`', () => { - expect( - hasAllowedValues({ - ecsMetadata: EcsFlatTyped, - fieldName: 'does.NOT.exist', - }) - ).toBe(false); - }); - }); - - describe('getValidValues', () => { - test('it returns the expected valid values', () => { - expect(getValidValues(EcsFlatTyped['event.category'])).toEqual( - expect.arrayContaining([ - 'authentication', - 'configuration', - 'database', - 'driver', - 'email', - 'file', - 'host', - 'iam', - 'intrusion_detection', - 'malware', - 'network', - 'package', - 'process', - 'registry', - 'session', - 'threat', - 'vulnerability', - 'web', - ]) - ); - }); - - test('it returns an empty array when the `field` does NOT have `allowed_values`', () => { - expect(getValidValues(EcsFlatTyped['host.name'])).toEqual([]); - }); - - test('it returns an empty array when `field` is undefined', () => { - expect(getValidValues(undefined)).toEqual([]); - }); - }); - - describe('getUnallowedValueRequestItems', () => { - test('it returns the expected request items', () => { - expect( - getUnallowedValueRequestItems({ - ecsMetadata: EcsFlatTyped, - indexName: 'auditbeat-*', - }) - ).toEqual([ - { - indexName: 'auditbeat-*', - indexFieldName: 'event.category', - allowedValues: expect.arrayContaining([ - 'authentication', - 'configuration', - 'database', - 'driver', - 'email', - 'file', - 'host', - 'iam', - 'intrusion_detection', - 'malware', - 'network', - 'package', - 'process', - 'registry', - 'session', - 'threat', - 'vulnerability', - 'web', - ]), - }, - { - indexName: 'auditbeat-*', - indexFieldName: 'event.kind', - allowedValues: expect.arrayContaining([ - 'alert', - 'enrichment', - 'event', - 'metric', - 'state', - 'pipeline_error', - 'signal', - ]), - }, - { - indexName: 'auditbeat-*', - indexFieldName: 'event.outcome', - allowedValues: expect.arrayContaining(['failure', 'success', 'unknown']), - }, - { - indexName: 'auditbeat-*', - indexFieldName: 'event.type', - allowedValues: expect.arrayContaining([ - 'access', - 'admin', - 'allowed', - 'change', - 'connection', - 'creation', - 'deletion', - 'denied', - 'end', - 'error', - 'group', - 'indicator', - 'info', - 'installation', - 'protocol', - 'start', - 'user', - ]), - }, - ]); - }); - }); -}); diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/index.test.tsx deleted file mode 100644 index 595c17e16faaa..0000000000000 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/index.test.tsx +++ /dev/null @@ -1,51 +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 { render, screen, waitFor } from '@testing-library/react'; -import React from 'react'; - -import { - TestDataQualityProviders, - TestExternalProviders, -} from '../../mock/test_providers/test_providers'; -import { Body } from '.'; - -describe('IndexInvalidValues', () => { - test('it renders the data quality summary', async () => { - render( - - - - - - ); - - await waitFor(() => { - expect(screen.getByTestId('dataQualitySummary')).toBeInTheDocument(); - }); - }); - - describe('patterns', () => { - const patterns = ['.alerts-security.alerts-default', 'auditbeat-*', 'logs-*', 'packetbeat-*']; - - test(`it renders the '${patterns.join(', ')}' patterns`, async () => { - render( - - - - - - ); - - for (const pattern of patterns) { - await waitFor(() => { - expect(screen.getByTestId(`${pattern}PatternPanel`)).toBeInTheDocument(); - }); - } - }); - }); -}); diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/index.tsx deleted file mode 100644 index a8ceecdc76c09..0000000000000 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/index.tsx +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; -import React from 'react'; - -import { DataQualityDetails } from './data_quality_details'; -import { DataQualitySummary } from '../data_quality_summary'; - -const BodyComponent: React.FC = () => { - return ( - - - - - - - - - - - ); -}; - -export const Body = React.memo(BodyComponent); diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/index.test.tsx deleted file mode 100644 index 53d576ccf6f70..0000000000000 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/index.test.tsx +++ /dev/null @@ -1,44 +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 { DARK_THEME } from '@elastic/charts'; -import { render, screen } from '@testing-library/react'; -import React from 'react'; - -import { TestExternalProviders } from './mock/test_providers/test_providers'; -import { DataQualityPanel } from '.'; -import { notificationServiceMock } from '@kbn/core-notifications-browser-mocks'; - -const { toasts } = notificationServiceMock.createSetupContract(); - -describe('DataQualityPanel', () => { - beforeEach(() => { - render( - - - - ); - }); - - test('it renders the body', () => { - expect(screen.getByTestId('body')).toBeInTheDocument(); - }); -}); diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_mappings/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_mappings/index.test.tsx deleted file mode 100644 index 86b3ef1688e6a..0000000000000 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_mappings/index.test.tsx +++ /dev/null @@ -1,138 +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 { renderHook } from '@testing-library/react-hooks'; -import React, { FC, PropsWithChildren } from 'react'; - -import { DataQualityProvider } from '../data_quality_panel/data_quality_context'; -import { mockMappingsResponse } from '../mock/mappings_response/mock_mappings_response'; -import { ERROR_LOADING_MAPPINGS } from '../translations'; -import { useMappings, UseMappings } from '.'; -import { notificationServiceMock } from '@kbn/core-notifications-browser-mocks'; -import { Theme } from '@elastic/charts'; - -const mockHttpFetch = jest.fn(); -const mockReportDataQualityIndexChecked = jest.fn(); -const mockReportDataQualityCheckAllClicked = jest.fn(); -const mockTelemetryEvents = { - reportDataQualityIndexChecked: mockReportDataQualityIndexChecked, - reportDataQualityCheckAllCompleted: mockReportDataQualityCheckAllClicked, -}; -const { toasts } = notificationServiceMock.createSetupContract(); - -const ContextWrapper: FC> = ({ children }) => ( - true)} - endDate={null} - formatBytes={jest.fn()} - formatNumber={jest.fn()} - isAssistantEnabled={true} - lastChecked={'2023-03-28T22:27:28.159Z'} - openCreateCaseFlyout={jest.fn()} - patterns={['auditbeat-*']} - setLastChecked={jest.fn()} - startDate={null} - theme={{ - background: { - color: '#000', - }, - }} - baseTheme={ - { - background: { - color: '#000', - }, - } as Theme - } - ilmPhases={['hot', 'warm', 'unmanaged']} - selectedIlmPhaseOptions={[ - { - label: 'Hot', - value: 'hot', - }, - { - label: 'Warm', - value: 'warm', - }, - { - label: 'Unmanaged', - value: 'unmanaged', - }, - ]} - setSelectedIlmPhaseOptions={jest.fn()} - > - {children} - -); - -const pattern = 'auditbeat-*'; - -describe('useMappings', () => { - beforeEach(() => { - jest.clearAllMocks(); - }); - - describe('successful response from the mappings api', () => { - let mappingsResult: UseMappings | undefined; - - beforeEach(async () => { - mockHttpFetch.mockResolvedValue(mockMappingsResponse); - - const { result, waitForNextUpdate } = renderHook(() => useMappings(pattern), { - wrapper: ContextWrapper, - }); - await waitForNextUpdate(); - mappingsResult = await result.current; - }); - - test('it returns the expected mappings', async () => { - expect(mappingsResult?.indexes).toEqual(mockMappingsResponse); - }); - - test('it returns loading: false, because the data has loaded', async () => { - expect(mappingsResult?.loading).toBe(false); - }); - - test('it returns a null error, because no errors occurred', async () => { - expect(mappingsResult?.error).toBeNull(); - }); - }); - - describe('fetch rejects with an error', () => { - let mappingsResult: UseMappings | undefined; - const errorMessage = 'simulated error'; - - beforeEach(async () => { - mockHttpFetch.mockRejectedValue(new Error(errorMessage)); - - const { result, waitForNextUpdate } = renderHook(() => useMappings(pattern), { - wrapper: ContextWrapper, - }); - await waitForNextUpdate(); - mappingsResult = await result.current; - }); - - test('it returns null mappings, because an error occurred', async () => { - expect(mappingsResult?.indexes).toBeNull(); - }); - - test('it returns loading: false, because data loading reached a terminal state', async () => { - expect(mappingsResult?.loading).toBe(false); - }); - - test('it returns the expected error', async () => { - expect(mappingsResult?.error).toEqual( - ERROR_LOADING_MAPPINGS({ details: errorMessage, patternOrIndexName: pattern }) - ); - }); - }); -}); diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_mappings/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_mappings/index.tsx deleted file mode 100644 index f20809a248086..0000000000000 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_mappings/index.tsx +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import type { IndicesGetMappingIndexMappingRecord } from '@elastic/elasticsearch/lib/api/types'; -import { useEffect, useState } from 'react'; - -import { useDataQualityContext } from '../data_quality_panel/data_quality_context'; -import { fetchMappings } from './helpers'; -import { useIsMounted } from '../use_is_mounted'; - -export interface UseMappings { - indexes: Record | null; - error: string | null; - loading: boolean; -} - -export const useMappings = (patternOrIndexName: string): UseMappings => { - const { isMountedRef } = useIsMounted(); - const [indexes, setIndexes] = useState | null>(null); - const { httpFetch } = useDataQualityContext(); - const [error, setError] = useState(null); - const [loading, setLoading] = useState(true); - - useEffect(() => { - const abortController = new AbortController(); - - async function fetchData() { - try { - const response = await fetchMappings({ abortController, httpFetch, patternOrIndexName }); - - if (!abortController.signal.aborted) { - if (isMountedRef.current) { - setIndexes(response); - } - } - } catch (e) { - if (!abortController.signal.aborted) { - if (isMountedRef.current) { - setError(e.message); - } - } - } finally { - if (!abortController.signal.aborted) { - if (isMountedRef.current) { - setLoading(false); - } - } - } - } - - fetchData(); - - return () => { - abortController.abort(); - }; - }, [httpFetch, isMountedRef, patternOrIndexName, setError]); - - return { indexes, error, loading }; -}; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_unallowed_values/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_unallowed_values/index.test.tsx deleted file mode 100644 index d2d216fd12293..0000000000000 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_unallowed_values/index.test.tsx +++ /dev/null @@ -1,178 +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 { renderHook } from '@testing-library/react-hooks'; -import React, { FC, PropsWithChildren } from 'react'; - -import { getUnallowedValueRequestItems } from '../data_quality_panel/allowed_values/helpers'; -import { DataQualityProvider } from '../data_quality_panel/data_quality_context'; -import { mockUnallowedValuesResponse } from '../mock/unallowed_values/mock_unallowed_values'; -import { ERROR_LOADING_UNALLOWED_VALUES } from '../translations'; -import { UnallowedValueRequestItem } from '../types'; -import { useUnallowedValues, UseUnallowedValues } from '.'; -import { notificationServiceMock } from '@kbn/core-notifications-browser-mocks'; -import { EcsFlatTyped } from '../constants'; -import { Theme } from '@elastic/charts'; - -const mockHttpFetch = jest.fn(); -const mockReportDataQualityIndexChecked = jest.fn(); -const mockReportDataQualityCheckAllClicked = jest.fn(); -const mockTelemetryEvents = { - reportDataQualityIndexChecked: mockReportDataQualityIndexChecked, - reportDataQualityCheckAllCompleted: mockReportDataQualityCheckAllClicked, -}; -const { toasts } = notificationServiceMock.createSetupContract(); - -const ContextWrapper: FC> = ({ children }) => ( - true)} - endDate={null} - formatBytes={jest.fn()} - formatNumber={jest.fn()} - isAssistantEnabled={true} - lastChecked={'2023-03-28T22:27:28.159Z'} - openCreateCaseFlyout={jest.fn()} - patterns={['auditbeat-*']} - setLastChecked={jest.fn()} - startDate={null} - theme={{ - background: { - color: '#000', - }, - }} - baseTheme={ - { - background: { - color: '#000', - }, - } as Theme - } - ilmPhases={['hot', 'warm', 'unmanaged']} - selectedIlmPhaseOptions={[ - { - label: 'Hot', - value: 'hot', - }, - { - label: 'Warm', - value: 'warm', - }, - { - label: 'Unmanaged', - value: 'unmanaged', - }, - ]} - setSelectedIlmPhaseOptions={jest.fn()} - > - {children} - -); - -const indexName = 'auditbeat-custom-index-1'; -const requestItems = getUnallowedValueRequestItems({ - ecsMetadata: EcsFlatTyped, - indexName, -}); - -describe('useUnallowedValues', () => { - beforeEach(() => { - jest.clearAllMocks(); - }); - - describe('when requestItems is empty', () => { - const emptyRequestItems: UnallowedValueRequestItem[] = []; - - test('it does NOT make an http request', async () => { - await renderHook( - () => - useUnallowedValues({ - indexName, - requestItems: emptyRequestItems, // <-- empty - }), - { - wrapper: ContextWrapper, - } - ); - - expect(mockHttpFetch).not.toBeCalled(); - }); - }); - - describe('successful response from the unallowed values api', () => { - let unallowedValuesResult: UseUnallowedValues | undefined; - - beforeEach(async () => { - mockHttpFetch.mockResolvedValue(mockUnallowedValuesResponse); - - const { result, waitForNextUpdate } = renderHook( - () => useUnallowedValues({ indexName, requestItems }), - { - wrapper: ContextWrapper, - } - ); - await waitForNextUpdate(); - unallowedValuesResult = await result.current; - }); - - test('it returns the expected unallowed values', async () => { - expect(unallowedValuesResult?.unallowedValues).toEqual({ - 'event.category': [ - { count: 2, fieldName: 'an_invalid_category' }, - { count: 1, fieldName: 'theory' }, - ], - 'event.kind': [], - 'event.outcome': [], - 'event.type': [], - }); - }); - - test('it returns loading: false, because the data has loaded', async () => { - expect(unallowedValuesResult?.loading).toBe(false); - }); - - test('it returns a null error, because no errors occurred', async () => { - expect(unallowedValuesResult?.error).toBeNull(); - }); - }); - - describe('fetch rejects with an error', () => { - let unallowedValuesResult: UseUnallowedValues | undefined; - const errorMessage = 'simulated error'; - - beforeEach(async () => { - mockHttpFetch.mockRejectedValue(new Error(errorMessage)); - - const { result, waitForNextUpdate } = renderHook( - () => useUnallowedValues({ indexName, requestItems }), - { - wrapper: ContextWrapper, - } - ); - await waitForNextUpdate(); - unallowedValuesResult = await result.current; - }); - - test('it returns null unallowed values, because an error occurred', async () => { - expect(unallowedValuesResult?.unallowedValues).toBeNull(); - }); - - test('it returns loading: false, because data loading reached a terminal state', async () => { - expect(unallowedValuesResult?.loading).toBe(false); - }); - - test('it returns the expected error', async () => { - expect(unallowedValuesResult?.error).toEqual( - ERROR_LOADING_UNALLOWED_VALUES({ details: errorMessage, indexName }) - ); - }); - }); -}); diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_unallowed_values/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_unallowed_values/index.tsx deleted file mode 100644 index 7f35da714ecd9..0000000000000 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_unallowed_values/index.tsx +++ /dev/null @@ -1,91 +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 { useEffect, useState } from 'react'; - -import { useDataQualityContext } from '../data_quality_panel/data_quality_context'; -import { fetchUnallowedValues, getUnallowedValues } from './helpers'; -import type { UnallowedValueCount, UnallowedValueRequestItem } from '../types'; -import { useIsMounted } from '../use_is_mounted'; - -export interface UseUnallowedValues { - unallowedValues: Record | null; - error: string | null; - loading: boolean; - requestTime: number | undefined; -} - -export const useUnallowedValues = ({ - indexName, - requestItems, -}: { - indexName: string; - requestItems: UnallowedValueRequestItem[]; -}): UseUnallowedValues => { - const { isMountedRef } = useIsMounted(); - const [unallowedValues, setUnallowedValues] = useState | null>(null); - const { httpFetch } = useDataQualityContext(); - const [error, setError] = useState(null); - const [loading, setLoading] = useState(true); - const [requestTime, setRequestTime] = useState(); - useEffect(() => { - if (requestItems.length === 0) { - return; - } - - const abortController = new AbortController(); - - async function fetchData() { - const startTime = Date.now(); - - try { - const searchResults = await fetchUnallowedValues({ - abortController, - httpFetch, - indexName, - requestItems, - }); - - const unallowedValuesMap = getUnallowedValues({ - requestItems, - searchResults, - }); - - if (!abortController.signal.aborted) { - if (isMountedRef.current) { - setUnallowedValues(unallowedValuesMap); - } - } - } catch (e) { - if (!abortController.signal.aborted) { - if (isMountedRef.current) { - setError(e.message); - setRequestTime(Date.now() - startTime); - } - } - } finally { - if (!abortController.signal.aborted) { - if (isMountedRef.current) { - setLoading(false); - setRequestTime(Date.now() - startTime); - } - } - } - } - - fetchData(); - - return () => { - abortController.abort(); - }; - }, [httpFetch, indexName, isMountedRef, requestItems, setError]); - - return { unallowedValues, error, loading, requestTime }; -}; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_add_to_new_case/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/add_to_new_case/hooks/use_add_to_new_case/index.tsx similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_add_to_new_case/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/add_to_new_case/hooks/use_add_to_new_case/index.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_add_to_new_case/translations.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/add_to_new_case/hooks/use_add_to_new_case/translations.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_add_to_new_case/translations.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/add_to_new_case/hooks/use_add_to_new_case/translations.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/actions/add_to_new_case/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/add_to_new_case/index.test.tsx similarity index 98% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/actions/add_to_new_case/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/add_to_new_case/index.test.tsx index 1fec0d39fbfd0..ba4aee43c32c7 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/actions/add_to_new_case/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/add_to_new_case/index.test.tsx @@ -12,7 +12,7 @@ import { AddToNewCaseAction } from '.'; import { TestDataQualityProviders, TestExternalProviders, -} from '../../../mock/test_providers/test_providers'; +} from '../../mock/test_providers/test_providers'; import userEvent from '@testing-library/user-event'; describe('AddToNewCaseAction', () => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/actions/add_to_new_case/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/add_to_new_case/index.tsx similarity index 92% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/actions/add_to_new_case/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/add_to_new_case/index.tsx index 537f5b13a0f08..93d5b7ba7e20b 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/actions/add_to_new_case/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/add_to_new_case/index.tsx @@ -9,9 +9,9 @@ import React, { useCallback } from 'react'; import { EuiIcon, EuiLink } from '@elastic/eui'; import { useDataQualityContext } from '../../data_quality_context'; -import { useAddToNewCase } from '../../../use_add_to_new_case'; +import { useAddToNewCase } from './hooks/use_add_to_new_case'; import { StyledLinkText } from '../styles'; -import { ADD_TO_NEW_CASE } from '../../../translations'; +import { ADD_TO_NEW_CASE } from '../../translations'; interface Props { markdownComment: string; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/actions/chat/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/chat/index.test.tsx similarity index 93% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/actions/chat/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/chat/index.test.tsx index 8d706aad92f1f..33e52a398e3c9 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/actions/chat/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/chat/index.test.tsx @@ -12,7 +12,7 @@ import { ChatAction } from '.'; import { TestDataQualityProviders, TestExternalProviders, -} from '../../../mock/test_providers/test_providers'; +} from '../../mock/test_providers/test_providers'; describe('ChatAction', () => { it('should render new chat link', () => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/actions/chat/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/chat/index.tsx similarity index 98% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/actions/chat/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/chat/index.tsx index ca37bcaad97d5..fb990fc295bbf 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/actions/chat/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/chat/index.tsx @@ -14,7 +14,7 @@ import { DATA_QUALITY_PROMPT_CONTEXT_PILL, DATA_QUALITY_PROMPT_CONTEXT_PILL_TOOLTIP, DATA_QUALITY_SUGGESTED_USER_PROMPT, -} from '../../../translations'; +} from '../../translations'; import { useDataQualityContext } from '../../data_quality_context'; import { ASK_ASSISTANT } from './translations'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/actions/chat/translations.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/chat/translations.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/actions/chat/translations.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/chat/translations.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/actions/copy_to_clipboard/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/copy_to_clipboard/index.test.tsx similarity index 97% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/actions/copy_to_clipboard/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/copy_to_clipboard/index.test.tsx index 6e2147293237a..05a44639b08ec 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/actions/copy_to_clipboard/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/copy_to_clipboard/index.test.tsx @@ -14,7 +14,7 @@ import { CopyToClipboardAction } from '.'; import { TestDataQualityProviders, TestExternalProviders, -} from '../../../mock/test_providers/test_providers'; +} from '../../mock/test_providers/test_providers'; jest.mock('@elastic/eui', () => { const original = jest.requireActual('@elastic/eui'); diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/actions/copy_to_clipboard/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/copy_to_clipboard/index.tsx similarity index 98% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/actions/copy_to_clipboard/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/copy_to_clipboard/index.tsx index abf85203a0db1..23df7dd8ad88e 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/actions/copy_to_clipboard/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/copy_to_clipboard/index.tsx @@ -9,7 +9,7 @@ import React, { useCallback } from 'react'; import { EuiIcon, EuiLink, copyToClipboard } from '@elastic/eui'; import { useDataQualityContext } from '../../data_quality_context'; -import { COPIED_RESULTS_TOAST_TITLE, COPY_TO_CLIPBOARD } from '../../../translations'; +import { COPIED_RESULTS_TOAST_TITLE, COPY_TO_CLIPBOARD } from '../../translations'; import { StyledLinkText } from '../styles'; interface Props { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/actions/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/index.test.tsx similarity index 97% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/actions/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/index.test.tsx index 55f32280ddb9d..8d3d5954c7a9e 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/actions/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/index.test.tsx @@ -12,7 +12,7 @@ import { Actions } from '.'; import { TestDataQualityProviders, TestExternalProviders, -} from '../../mock/test_providers/test_providers'; +} from '../mock/test_providers/test_providers'; describe('Actions', () => { it('renders nothing by default', () => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/actions/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/index.tsx similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/actions/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/index.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/actions/styles.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/styles.tsx similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/actions/styles.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/actions/styles.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/constants.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/constants.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/constants.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/constants.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/contexts/indices_check_context/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/contexts/indices_check_context/index.tsx similarity index 88% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/contexts/indices_check_context/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/contexts/indices_check_context/index.tsx index d6ecacf09ac4e..48863a25e2431 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/contexts/indices_check_context/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/contexts/indices_check_context/index.tsx @@ -7,7 +7,7 @@ import { createContext, useContext } from 'react'; -import { UseIndicesCheckReturnValue } from '../../use_indices_check/types'; +import { UseIndicesCheckReturnValue } from '../../hooks/use_indices_check/types'; export const IndicesCheckContext = createContext(null); diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/contexts/results_rollup_context/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/contexts/results_rollup_context/index.tsx similarity index 88% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/contexts/results_rollup_context/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/contexts/results_rollup_context/index.tsx index 7771a06fbf7f8..d60c933768153 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/contexts/results_rollup_context/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/contexts/results_rollup_context/index.tsx @@ -7,7 +7,7 @@ import { createContext, useContext } from 'react'; -import { UseResultsRollupReturnValue } from '../../use_results_rollup/types'; +import { UseResultsRollupReturnValue } from '../../hooks/use_results_rollup/types'; export const ResultsRollupContext = createContext(null); diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_context/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_context/index.test.tsx similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_context/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_context/index.test.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_context/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_context/index.tsx similarity index 98% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_context/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_context/index.tsx index 06620ecacd04d..762efef424a10 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_context/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_context/index.tsx @@ -12,7 +12,7 @@ import type { IToasts } from '@kbn/core-notifications-browser'; import { PartialTheme, Theme } from '@elastic/charts'; import { EuiComboBoxOptionOption } from '@elastic/eui'; -import type { TelemetryEvents } from '../../types'; +import type { TelemetryEvents } from '../types'; export interface DataQualityProviderProps { httpFetch: HttpHandler; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/ilm_phases_empty_prompt/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/ilm_phases_empty_prompt/index.test.tsx similarity index 94% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/ilm_phases_empty_prompt/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/ilm_phases_empty_prompt/index.test.tsx index 329ff56cd8326..a20e279e6ac19 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/ilm_phases_empty_prompt/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/ilm_phases_empty_prompt/index.test.tsx @@ -8,7 +8,7 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; -import { TestExternalProviders } from '../mock/test_providers/test_providers'; +import { TestExternalProviders } from '../../mock/test_providers/test_providers'; import { IlmPhasesEmptyPrompt } from '.'; describe('IlmPhasesEmptyPrompt', () => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/ilm_phases_empty_prompt/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/ilm_phases_empty_prompt/index.tsx similarity index 98% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/ilm_phases_empty_prompt/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/ilm_phases_empty_prompt/index.tsx index 1720da6df8be0..c8a6e7385a122 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/ilm_phases_empty_prompt/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/ilm_phases_empty_prompt/index.tsx @@ -15,7 +15,7 @@ import { HOT_DESCRIPTION, UNMANAGED_DESCRIPTION, WARM_DESCRIPTION, -} from '../translations'; +} from '../../translations'; import * as i18n from './translations'; const Ul = styled.ul` diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/ilm_phases_empty_prompt/translations.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/ilm_phases_empty_prompt/translations.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/ilm_phases_empty_prompt/translations.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/ilm_phases_empty_prompt/translations.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/index.test.tsx similarity index 97% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/index.test.tsx index 399b5705d028d..dfe943215f909 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/index.test.tsx @@ -11,7 +11,7 @@ import React from 'react'; import { TestDataQualityProviders, TestExternalProviders, -} from '../../../mock/test_providers/test_providers'; +} from '../mock/test_providers/test_providers'; import { DataQualityDetails } from '.'; const ilmPhases = ['hot', 'warm', 'unmanaged']; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/index.tsx similarity index 86% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/index.tsx index 8f8686f0c03b2..a880d2a7d4f16 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/index.tsx @@ -7,11 +7,11 @@ import React, { useCallback, useState } from 'react'; -import { IlmPhasesEmptyPrompt } from '../../../ilm_phases_empty_prompt'; +import { IlmPhasesEmptyPrompt } from './ilm_phases_empty_prompt'; import { IndicesDetails } from './indices_details'; import { StorageDetails } from './storage_details'; -import { SelectedIndex } from '../../../types'; -import { useDataQualityContext } from '../../data_quality_context'; +import { SelectedIndex } from '../types'; +import { useDataQualityContext } from '../data_quality_context'; const DataQualityDetailsComponent: React.FC = () => { const { isILMAvailable, ilmPhases } = useDataQualityContext(); diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/indices_details/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/index.test.tsx similarity index 83% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/indices_details/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/index.test.tsx index ddb17a64d1fc2..65fc799bd3e41 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/indices_details/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/index.test.tsx @@ -9,15 +9,15 @@ import numeral from '@elastic/numeral'; import { render, screen, waitFor } from '@testing-library/react'; import React from 'react'; -import { EMPTY_STAT } from '../../../../helpers'; -import { alertIndexWithAllResults } from '../../../../mock/pattern_rollup/mock_alerts_pattern_rollup'; -import { auditbeatWithAllResults } from '../../../../mock/pattern_rollup/mock_auditbeat_pattern_rollup'; -import { packetbeatNoResults } from '../../../../mock/pattern_rollup/mock_packetbeat_pattern_rollup'; +import { EMPTY_STAT } from '../../helpers'; +import { alertIndexWithAllResults } from '../../mock/pattern_rollup/mock_alerts_pattern_rollup'; +import { auditbeatWithAllResults } from '../../mock/pattern_rollup/mock_auditbeat_pattern_rollup'; +import { packetbeatNoResults } from '../../mock/pattern_rollup/mock_packetbeat_pattern_rollup'; import { TestDataQualityProviders, TestExternalProviders, -} from '../../../../mock/test_providers/test_providers'; -import { PatternRollup } from '../../../../types'; +} from '../../mock/test_providers/test_providers'; +import { PatternRollup } from '../../types'; import { Props, IndicesDetails } from '.'; const defaultBytesFormat = '0,0.[0]b'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/indices_details/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/index.tsx similarity index 85% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/indices_details/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/index.tsx index 426e61513ee14..fd565d8fc7637 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/indices_details/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/index.tsx @@ -9,10 +9,10 @@ import { EuiFlexItem } from '@elastic/eui'; import React from 'react'; import styled from 'styled-components'; -import { useResultsRollupContext } from '../../../../contexts/results_rollup_context'; -import { Pattern } from '../../../pattern'; -import { SelectedIndex } from '../../../../types'; -import { useDataQualityContext } from '../../../data_quality_context'; +import { useResultsRollupContext } from '../../contexts/results_rollup_context'; +import { Pattern } from './pattern'; +import { SelectedIndex } from '../../types'; +import { useDataQualityContext } from '../../data_quality_context'; const StyledPatternWrapperFlexItem = styled(EuiFlexItem)` margin-bottom: ${({ theme }) => theme.eui.euiSize}; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/error_empty_prompt/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/error_empty_prompt/index.test.tsx similarity index 89% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/error_empty_prompt/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/error_empty_prompt/index.test.tsx index ee3241cd74d8b..aad142baff3a4 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/error_empty_prompt/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/error_empty_prompt/index.test.tsx @@ -8,7 +8,7 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; -import { TestExternalProviders } from '../../mock/test_providers/test_providers'; +import { TestExternalProviders } from '../../../../mock/test_providers/test_providers'; import { ErrorEmptyPrompt } from '.'; describe('ErrorEmptyPrompt', () => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/error_empty_prompt/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/error_empty_prompt/index.tsx similarity index 89% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/error_empty_prompt/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/error_empty_prompt/index.tsx index 3214b704dc685..3bac63944838b 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/error_empty_prompt/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/error_empty_prompt/index.tsx @@ -8,7 +8,7 @@ import { EuiCallOut, EuiCode } from '@elastic/eui'; import React from 'react'; -import * as i18n from '../data_quality_summary/errors_popover/translations'; +import * as i18n from '../../../../data_quality_summary/summary_actions/check_status/errors_popover/translations'; interface Props { title: string; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/helpers.test.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/helpers.test.ts similarity index 98% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/helpers.test.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/helpers.test.ts index f6a01533bcfbf..d2d81348c39ec 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/helpers.test.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/helpers.test.ts @@ -24,12 +24,12 @@ import { shouldCreateIndexNames, shouldCreatePatternRollup, } from './helpers'; -import { mockIlmExplain } from '../../mock/ilm_explain/mock_ilm_explain'; -import { mockDataQualityCheckResult } from '../../mock/data_quality_check_result/mock_index'; -import { auditbeatWithAllResults } from '../../mock/pattern_rollup/mock_auditbeat_pattern_rollup'; -import { mockStats } from '../../mock/stats/mock_stats'; -import { DataQualityCheckResult } from '../../types'; -import { getIndexNames, getTotalDocsCount } from '../../helpers'; +import { mockIlmExplain } from '../../../mock/ilm_explain/mock_ilm_explain'; +import { mockDataQualityCheckResult } from '../../../mock/data_quality_check_result/mock_index'; +import { auditbeatWithAllResults } from '../../../mock/pattern_rollup/mock_auditbeat_pattern_rollup'; +import { mockStats } from '../../../mock/stats/mock_stats'; +import { DataQualityCheckResult } from '../../../types'; +import { getIndexNames, getTotalDocsCount } from '../../../helpers'; import { IndexSummaryTableItem } from './types'; const hot: IlmExplainLifecycleLifecycleExplainManaged = { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/helpers.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/helpers.ts similarity index 98% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/helpers.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/helpers.ts index ab3e917246f1d..b9aede7d799ef 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/helpers.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/helpers.ts @@ -15,8 +15,8 @@ import type { PatternRollup, SortConfig, MeteringStatsIndex, -} from '../../types'; -import { getDocsCount, getSizeInBytes } from '../../helpers'; +} from '../../../types'; +import { getDocsCount, getSizeInBytes } from '../../../helpers'; import { IndexSummaryTableItem } from './types'; export const isManaged = ( diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_ilm_explain/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/hooks/use_ilm_explain/index.test.tsx similarity index 96% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_ilm_explain/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/hooks/use_ilm_explain/index.test.tsx index b8c6092fea0d0..768845f023011 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_ilm_explain/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/hooks/use_ilm_explain/index.test.tsx @@ -8,9 +8,9 @@ import { renderHook } from '@testing-library/react-hooks'; import React from 'react'; -import { DataQualityProvider } from '../data_quality_panel/data_quality_context'; -import { mockIlmExplain } from '../mock/ilm_explain/mock_ilm_explain'; -import { ERROR_LOADING_ILM_EXPLAIN } from '../translations'; +import { DataQualityProvider } from '../../../../../data_quality_context'; +import { mockIlmExplain } from '../../../../../mock/ilm_explain/mock_ilm_explain'; +import { ERROR_LOADING_ILM_EXPLAIN } from '../../../../../translations'; import { useIlmExplain, UseIlmExplain } from '.'; import { notificationServiceMock } from '@kbn/core-notifications-browser-mocks'; import { Theme } from '@elastic/charts'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_ilm_explain/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/hooks/use_ilm_explain/index.tsx similarity index 89% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_ilm_explain/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/hooks/use_ilm_explain/index.tsx index 8477d710fea76..4e46df6c67ccc 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_ilm_explain/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/hooks/use_ilm_explain/index.tsx @@ -8,10 +8,10 @@ import type { IlmExplainLifecycleLifecycleExplain } from '@elastic/elasticsearch/lib/api/types'; import { useEffect, useState } from 'react'; -import { useDataQualityContext } from '../data_quality_panel/data_quality_context'; -import { INTERNAL_API_VERSION } from '../helpers'; -import * as i18n from '../translations'; -import { useIsMounted } from '../use_is_mounted'; +import { useDataQualityContext } from '../../../../../data_quality_context'; +import { INTERNAL_API_VERSION } from '../../../../../helpers'; +import * as i18n from '../../../../../translations'; +import { useIsMounted } from '../../../../../hooks/use_is_mounted'; const ILM_EXPLAIN_ENDPOINT = '/internal/ecs_data_quality_dashboard/ilm_explain'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_stats/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/hooks/use_stats/index.test.tsx similarity index 96% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_stats/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/hooks/use_stats/index.test.tsx index c07bf9b8afd76..5982fa715adb9 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_stats/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/hooks/use_stats/index.test.tsx @@ -8,9 +8,9 @@ import { renderHook } from '@testing-library/react-hooks'; import React, { FC, PropsWithChildren } from 'react'; -import { DataQualityProvider } from '../data_quality_panel/data_quality_context'; -import { mockStatsAuditbeatIndex } from '../mock/stats/mock_stats_packetbeat_index'; -import { ERROR_LOADING_STATS } from '../translations'; +import { DataQualityProvider } from '../../../../../data_quality_context'; +import { mockStatsAuditbeatIndex } from '../../../../../mock/stats/mock_stats_packetbeat_index'; +import { ERROR_LOADING_STATS } from '../../../../../translations'; import { useStats, UseStats } from '.'; import { notificationServiceMock } from '@kbn/core-notifications-browser-mocks'; import { Theme } from '@elastic/charts'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_stats/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/hooks/use_stats/index.tsx similarity index 88% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_stats/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/hooks/use_stats/index.tsx index 0de57ccd54568..e2505a6ed2237 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_stats/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/hooks/use_stats/index.tsx @@ -8,11 +8,11 @@ import { useEffect, useState } from 'react'; import { HttpFetchQuery } from '@kbn/core/public'; -import { useDataQualityContext } from '../data_quality_panel/data_quality_context'; -import * as i18n from '../translations'; -import { INTERNAL_API_VERSION } from '../helpers'; -import { MeteringStatsIndex } from '../types'; -import { useIsMounted } from '../use_is_mounted'; +import { useDataQualityContext } from '../../../../../data_quality_context'; +import * as i18n from '../../../../../translations'; +import { INTERNAL_API_VERSION } from '../../../../../helpers'; +import { MeteringStatsIndex } from '../../../../../types'; +import { useIsMounted } from '../../../../../hooks/use_is_mounted'; const STATS_ENDPOINT = '/internal/ecs_data_quality_dashboard/stats'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index.test.tsx similarity index 91% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index.test.tsx index 9fdd6f3acc606..43054d9afd813 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index.test.tsx @@ -9,13 +9,13 @@ import numeral from '@elastic/numeral'; import { render, screen } from '@testing-library/react'; import React, { ComponentProps } from 'react'; -import { EMPTY_STAT } from '../../helpers'; +import { EMPTY_STAT } from '../../../helpers'; import { TestDataQualityProviders, TestExternalProviders, -} from '../../mock/test_providers/test_providers'; +} from '../../../mock/test_providers/test_providers'; import { Pattern } from '.'; -import { getCheckState } from '../../stub/get_check_state'; +import { getCheckState } from '../../../stub/get_check_state'; const indexName = 'auditbeat-custom-index-1'; const defaultBytesFormat = '0,0.[0]b'; @@ -26,7 +26,7 @@ const defaultNumberFormat = '0,0.[000]'; const formatNumber = (value: number | undefined) => value != null ? numeral(value).format(defaultNumberFormat) : EMPTY_STAT; -jest.mock('../../use_stats', () => ({ +jest.mock('./hooks/use_stats', () => ({ useStats: jest.fn(() => ({ stats: {}, error: null, @@ -34,7 +34,7 @@ jest.mock('../../use_stats', () => ({ })), })); -jest.mock('../../use_ilm_explain', () => ({ +jest.mock('./hooks/use_ilm_explain', () => ({ useIlmExplain: jest.fn(() => ({ error: null, ilmExplain: {}, diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index.tsx similarity index 93% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index.tsx index 106d9bbe2e433..31db5e84a68f6 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index.tsx @@ -8,7 +8,7 @@ import { EuiSpacer, useGeneratedHtmlId } from '@elastic/eui'; import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; -import { ErrorEmptyPrompt } from '../error_empty_prompt'; +import { ErrorEmptyPrompt } from './error_empty_prompt'; import { defaultSort, getIlmExplainPhaseCounts, @@ -24,21 +24,21 @@ import { getTotalPatternIncompatible, getTotalPatternIndicesChecked, getTotalSizeInBytes, -} from '../../helpers'; -import { LoadingEmptyPrompt } from '../loading_empty_prompt'; +} from '../../../helpers'; +import { LoadingEmptyPrompt } from './loading_empty_prompt'; import { PatternSummary } from './pattern_summary'; -import { RemoteClustersCallout } from '../remote_clusters_callout'; -import { SummaryTable } from '../summary_table'; -import { getSummaryTableColumns } from '../summary_table/helpers'; +import { RemoteClustersCallout } from './remote_clusters_callout'; +import { SummaryTable } from './summary_table'; +import { getSummaryTableColumns } from './summary_table/helpers'; import * as i18n from './translations'; -import type { PatternRollup, SelectedIndex, SortConfig } from '../../types'; -import { useIlmExplain } from '../../use_ilm_explain'; -import { useStats } from '../../use_stats'; -import { useDataQualityContext } from '../data_quality_context'; +import type { PatternRollup, SelectedIndex, SortConfig } from '../../../types'; +import { useIlmExplain } from './hooks/use_ilm_explain'; +import { useStats } from './hooks/use_stats'; +import { useDataQualityContext } from '../../../data_quality_context'; import { PatternAccordion, PatternAccordionChildren } from './styles'; import { IndexCheckFlyout } from './index_check_flyout'; -import { useResultsRollupContext } from '../../contexts/results_rollup_context'; -import { useIndicesCheckContext } from '../../contexts/indices_check_context'; +import { useResultsRollupContext } from '../../../contexts/results_rollup_context'; +import { useIndicesCheckContext } from '../../../contexts/indices_check_context'; const EMPTY_INDEX_NAMES: string[] = []; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_current_window_width/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/hooks/use_current_window_width/index.test.tsx similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_current_window_width/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/hooks/use_current_window_width/index.test.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_current_window_width/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/hooks/use_current_window_width/index.tsx similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_current_window_width/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/hooks/use_current_window_width/index.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/index_check_flyout/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index.test.tsx similarity index 92% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/index_check_flyout/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index.test.tsx index b73da31bbcf8c..0b6b1d62ada01 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/index_check_flyout/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index.test.tsx @@ -14,10 +14,10 @@ import { IndexCheckFlyout } from '.'; import { TestDataQualityProviders, TestExternalProviders, -} from '../../../mock/test_providers/test_providers'; -import { mockIlmExplain } from '../../../mock/ilm_explain/mock_ilm_explain'; -import { auditbeatWithAllResults } from '../../../mock/pattern_rollup/mock_auditbeat_pattern_rollup'; -import { mockStats } from '../../../mock/stats/mock_stats'; +} from '../../../../mock/test_providers/test_providers'; +import { mockIlmExplain } from '../../../../mock/ilm_explain/mock_ilm_explain'; +import { auditbeatWithAllResults } from '../../../../mock/pattern_rollup/mock_auditbeat_pattern_rollup'; +import { mockStats } from '../../../../mock/stats/mock_stats'; describe('IndexCheckFlyout', () => { beforeEach(() => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/index_check_flyout/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index.tsx similarity index 91% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/index_check_flyout/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index.tsx index b9d33c51cc495..a08aeaaaff2d8 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/index_check_flyout/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index.tsx @@ -21,15 +21,15 @@ import { } from '@elastic/eui'; import React, { useCallback, useEffect } from 'react'; import moment from 'moment'; -import { useIndicesCheckContext } from '../../../contexts/indices_check_context'; +import { useIndicesCheckContext } from '../../../../contexts/indices_check_context'; -import { EMPTY_STAT, getDocsCount, getSizeInBytes } from '../../../helpers'; -import { MeteringStatsIndex, PatternRollup } from '../../../types'; -import { useDataQualityContext } from '../../data_quality_context'; -import { IndexProperties } from '../../index_properties'; +import { EMPTY_STAT, getDocsCount, getSizeInBytes } from '../../../../helpers'; +import { MeteringStatsIndex, PatternRollup } from '../../../../types'; +import { useDataQualityContext } from '../../../../data_quality_context'; +import { IndexProperties } from './index_properties'; import { getIlmPhase } from '../helpers'; -import { IndexResultBadge } from '../../index_result_badge'; -import { useCurrentWindowWidth } from '../../../use_current_window_width'; +import { IndexResultBadge } from '../index_result_badge'; +import { useCurrentWindowWidth } from './hooks/use_current_window_width'; import { CHECK_NOW } from './translations'; export interface Props { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/empty_prompt_body.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/empty_prompt_body.test.tsx similarity index 88% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/empty_prompt_body.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/empty_prompt_body.test.tsx index 19e6c47a2c365..cd16e9870906a 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/empty_prompt_body.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/empty_prompt_body.test.tsx @@ -9,7 +9,7 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; import { EmptyPromptBody } from './empty_prompt_body'; -import { TestExternalProviders } from '../../mock/test_providers/test_providers'; +import { TestExternalProviders } from '../../../../../mock/test_providers/test_providers'; describe('EmptyPromptBody', () => { const content = 'foo bar baz @baz'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/empty_prompt_body.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/empty_prompt_body.tsx similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/empty_prompt_body.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/empty_prompt_body.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/empty_prompt_title.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/empty_prompt_title.test.tsx similarity index 89% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/empty_prompt_title.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/empty_prompt_title.test.tsx index 760d16f8a87a5..0b146f7b7f123 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/empty_prompt_title.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/empty_prompt_title.test.tsx @@ -9,7 +9,7 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; import { EmptyPromptTitle } from './empty_prompt_title'; -import { TestExternalProviders } from '../../mock/test_providers/test_providers'; +import { TestExternalProviders } from '../../../../../mock/test_providers/test_providers'; describe('EmptyPromptTitle', () => { const title = 'What is a great title?'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/empty_prompt_title.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/empty_prompt_title.tsx similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/empty_prompt_title.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/empty_prompt_title.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/helpers.test.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/helpers.test.ts similarity index 96% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/helpers.test.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/helpers.test.ts index 2ef3eb9c1c190..bd193dce23441 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/helpers.test.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/helpers.test.ts @@ -10,9 +10,9 @@ import { getSortedPartitionedFieldMetadata, hasAllDataFetchingCompleted, } from './helpers'; -import { mockIndicesGetMappingIndexMappingRecords } from '../../mock/indices_get_mapping_index_mapping_record/mock_indices_get_mapping_index_mapping_record'; -import { mockMappingsProperties } from '../../mock/mappings_properties/mock_mappings_properties'; -import { EcsFlatTyped } from '../../constants'; +import { mockIndicesGetMappingIndexMappingRecords } from '../../../../../mock/indices_get_mapping_index_mapping_record/mock_indices_get_mapping_index_mapping_record'; +import { mockMappingsProperties } from '../../../../../mock/mappings_properties/mock_mappings_properties'; +import { EcsFlatTyped } from '../../../../../constants'; describe('helpers', () => { describe('getSortedPartitionedFieldMetadata', () => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/helpers.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/helpers.ts similarity index 96% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/helpers.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/helpers.ts index c0046da0ea814..4097186be6b73 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/helpers.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/helpers.ts @@ -10,15 +10,15 @@ import type { MappingProperty, } from '@elastic/elasticsearch/lib/api/types'; import { sortBy } from 'lodash/fp'; -import { EcsFlatTyped } from '../../constants'; +import { EcsFlatTyped } from '../../../../../constants'; import { getEnrichedFieldMetadata, getFieldTypes, getMissingTimestampFieldMetadata, getPartitionedFieldMetadata, -} from '../../helpers'; -import type { PartitionedFieldMetadata, UnallowedValueCount } from '../../types'; +} from '../../../../../helpers'; +import type { PartitionedFieldMetadata, UnallowedValueCount } from '../../../../../types'; export const ALL_TAB_ID = 'allTab'; export const ECS_COMPLIANT_TAB_ID = 'ecsCompliantTab'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index.test.tsx similarity index 95% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index.test.tsx index 4e991d7878ace..1427b67cd41d3 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index.test.tsx @@ -9,15 +9,15 @@ import numeral from '@elastic/numeral'; import { render, screen, waitFor } from '@testing-library/react'; import React from 'react'; -import { EMPTY_STAT } from '../../helpers'; -import { auditbeatWithAllResults } from '../../mock/pattern_rollup/mock_auditbeat_pattern_rollup'; +import { EMPTY_STAT } from '../../../../../helpers'; +import { auditbeatWithAllResults } from '../../../../../mock/pattern_rollup/mock_auditbeat_pattern_rollup'; import { TestDataQualityProviders, TestExternalProviders, -} from '../../mock/test_providers/test_providers'; +} from '../../../../../mock/test_providers/test_providers'; import { LOADING_MAPPINGS, LOADING_UNALLOWED_VALUES } from './translations'; import { IndexProperties, Props } from '.'; -import { getCheckState } from '../../stub/get_check_state'; +import { getCheckState } from '../../../../../stub/get_check_state'; const indexName = 'auditbeat-custom-index-1'; const defaultBytesFormat = '0,0.[0]b'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index.tsx similarity index 86% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index.tsx index f7b1bb37e36f1..f28d506cda0fa 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index.tsx @@ -8,15 +8,15 @@ import React from 'react'; import { EuiSpacer } from '@elastic/eui'; -import { ErrorEmptyPrompt } from '../error_empty_prompt'; -import { LoadingEmptyPrompt } from '../loading_empty_prompt'; -import { getIndexPropertiesContainerId } from '../pattern/helpers'; +import { ErrorEmptyPrompt } from '../../error_empty_prompt'; +import { LoadingEmptyPrompt } from '../../loading_empty_prompt'; +import { getIndexPropertiesContainerId } from '../../helpers'; import * as i18n from './translations'; -import type { IlmPhase, PatternRollup } from '../../types'; -import { useIndicesCheckContext } from '../../contexts/indices_check_context'; +import type { IlmPhase, PatternRollup } from '../../../../../types'; +import { useIndicesCheckContext } from '../../../../../contexts/indices_check_context'; import { IndexCheckFields } from './index_check_fields'; import { IndexStatsPanel } from './index_stats_panel'; -import { useDataQualityContext } from '../data_quality_context'; +import { useDataQualityContext } from '../../../../../data_quality_context'; export interface Props { docsCount: number; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/index_check_fields/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/index.test.tsx similarity index 90% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/index_check_fields/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/index.test.tsx index e5ab5247ac41e..024a53087efae 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/index_check_fields/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/index.test.tsx @@ -12,8 +12,8 @@ import { IndexCheckFields } from '.'; import { TestDataQualityProviders, TestExternalProviders, -} from '../../../mock/test_providers/test_providers'; -import { auditbeatWithAllResults } from '../../../mock/pattern_rollup/mock_auditbeat_pattern_rollup'; +} from '../../../../../../mock/test_providers/test_providers'; +import { auditbeatWithAllResults } from '../../../../../../mock/pattern_rollup/mock_auditbeat_pattern_rollup'; import userEvent from '@testing-library/user-event'; describe('IndexCheckFields', () => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/index_check_fields/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/index.tsx similarity index 91% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/index_check_fields/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/index.tsx index 8fa4a37ea3ead..db6696e36212a 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/index_check_fields/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/index.tsx @@ -9,11 +9,11 @@ import React, { useMemo, useState } from 'react'; import { EuiButtonGroup, EuiFlexGroup, EuiSpacer } from '@elastic/eui'; import styled from 'styled-components'; -import { useDataQualityContext } from '../../data_quality_context'; -import { useIndicesCheckContext } from '../../../contexts/indices_check_context'; +import { useDataQualityContext } from '../../../../../../data_quality_context'; +import { useIndicesCheckContext } from '../../../../../../contexts/indices_check_context'; import { EMPTY_METADATA, INCOMPATIBLE_TAB_ID } from '../helpers'; -import { IlmPhase, PatternRollup } from '../../../types'; -import { getTabs } from '../../tabs/helpers'; +import { IlmPhase, PatternRollup } from '../../../../../../types'; +import { getTabs } from './tabs/helpers'; const StyledTabFlexGroup = styled(EuiFlexGroup)` width: 100%; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/all_tab/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/all_tab/index.tsx similarity index 77% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/all_tab/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/all_tab/index.tsx index c80d1f615f261..085a865917b42 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/all_tab/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/all_tab/index.tsx @@ -9,12 +9,12 @@ import { EcsVersion } from '@elastic/ecs'; import { EuiCallOut, EuiEmptyPrompt, EuiSpacer } from '@elastic/eui'; import React, { useMemo } from 'react'; -import { CompareFieldsTable } from '../../../compare_fields_table'; -import { getCommonTableColumns } from '../../../compare_fields_table/get_common_table_columns'; -import { EmptyPromptBody } from '../../index_properties/empty_prompt_body'; -import { EmptyPromptTitle } from '../../index_properties/empty_prompt_title'; -import * as i18n from '../../index_properties/translations'; -import type { PartitionedFieldMetadata } from '../../../types'; +import { CompareFieldsTable } from '../compare_fields_table'; +import { getCommonTableColumns } from '../compare_fields_table/get_common_table_columns'; +import { EmptyPromptBody } from '../../../empty_prompt_body'; +import { EmptyPromptTitle } from '../../../empty_prompt_title'; +import * as i18n from '../../../translations'; +import type { PartitionedFieldMetadata } from '../../../../../../../../types'; interface Props { indexName: string; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/callouts/custom_callout/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/callouts/custom_callout/index.test.tsx similarity index 80% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/callouts/custom_callout/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/callouts/custom_callout/index.test.tsx index 88bb4ef18ac47..b83f1fdc7ca60 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/callouts/custom_callout/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/callouts/custom_callout/index.test.tsx @@ -9,12 +9,12 @@ import { EcsVersion } from '@elastic/ecs'; import { render, screen } from '@testing-library/react'; import React from 'react'; -import { ECS_IS_A_PERMISSIVE_SCHEMA } from '../../../index_properties/translations'; +import { ECS_IS_A_PERMISSIVE_SCHEMA } from '../../../../translations'; import { hostNameKeyword, someField, -} from '../../../../mock/enriched_field_metadata/mock_enriched_field_metadata'; -import { TestExternalProviders } from '../../../../mock/test_providers/test_providers'; +} from '../../../../../../../../../mock/enriched_field_metadata/mock_enriched_field_metadata'; +import { TestExternalProviders } from '../../../../../../../../../mock/test_providers/test_providers'; import { CustomCallout } from '.'; describe('CustomCallout', () => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/callouts/custom_callout/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/callouts/custom_callout/index.tsx similarity index 88% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/callouts/custom_callout/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/callouts/custom_callout/index.tsx index f15e2a108a82c..1d631fa15a371 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/callouts/custom_callout/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/callouts/custom_callout/index.tsx @@ -9,9 +9,9 @@ import { EcsVersion } from '@elastic/ecs'; import { EuiCallOut, EuiSpacer } from '@elastic/eui'; import React from 'react'; -import type { CustomFieldMetadata } from '../../../../types'; +import type { CustomFieldMetadata } from '../../../../../../../../../types'; -import * as i18n from '../../../index_properties/translations'; +import * as i18n from '../../../../translations'; interface Props { customFieldMetadata: CustomFieldMetadata[]; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/callouts/incompatible_callout/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/callouts/incompatible_callout/index.test.tsx similarity index 92% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/callouts/incompatible_callout/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/callouts/incompatible_callout/index.test.tsx index 7e1d1f9eb3c02..ffb315c266669 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/callouts/incompatible_callout/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/callouts/incompatible_callout/index.test.tsx @@ -13,8 +13,8 @@ import { DETECTION_ENGINE_RULES_MAY_NOT_MATCH, MAPPINGS_THAT_CONFLICT_WITH_ECS, PAGES_MAY_NOT_DISPLAY_EVENTS, -} from '../../../index_properties/translations'; -import { TestExternalProviders } from '../../../../mock/test_providers/test_providers'; +} from '../../../../translations'; +import { TestExternalProviders } from '../../../../../../../../../mock/test_providers/test_providers'; import { IncompatibleCallout } from '.'; describe('IncompatibleCallout', () => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/callouts/incompatible_callout/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/callouts/incompatible_callout/index.tsx similarity index 95% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/callouts/incompatible_callout/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/callouts/incompatible_callout/index.tsx index 6a692e05f8e54..41a69eb69424a 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/callouts/incompatible_callout/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/callouts/incompatible_callout/index.tsx @@ -10,7 +10,7 @@ import { EcsVersion } from '@elastic/ecs'; import { EuiCallOut, EuiSpacer } from '@elastic/eui'; import React from 'react'; -import * as i18n from '../../../index_properties/translations'; +import * as i18n from '../../../../translations'; import { CalloutItem } from '../../styles'; const IncompatibleCalloutComponent: React.FC = () => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/callouts/missing_timestamp_callout/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/callouts/missing_timestamp_callout/index.tsx similarity index 94% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/callouts/missing_timestamp_callout/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/callouts/missing_timestamp_callout/index.tsx index 1db9e3cb6a494..3e9b1f705d1eb 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/callouts/missing_timestamp_callout/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/callouts/missing_timestamp_callout/index.tsx @@ -8,7 +8,7 @@ import { EuiCallOut, EuiSpacer } from '@elastic/eui'; import React from 'react'; -import * as i18n from '../../../index_properties/translations'; +import * as i18n from '../../../../translations'; import { CalloutItem } from '../../styles'; interface Props { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/callouts/same_family_callout/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/callouts/same_family_callout/index.test.tsx similarity index 82% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/callouts/same_family_callout/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/callouts/same_family_callout/index.test.tsx index d93b5dab41201..39289f1a9294f 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/callouts/same_family_callout/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/callouts/same_family_callout/index.test.tsx @@ -9,10 +9,10 @@ import { EcsVersion } from '@elastic/ecs'; import { render, screen } from '@testing-library/react'; import React from 'react'; -import { FIELDS_WITH_MAPPINGS_SAME_FAMILY } from '../../../index_properties/translations'; -import { TestExternalProviders } from '../../../../mock/test_providers/test_providers'; +import { FIELDS_WITH_MAPPINGS_SAME_FAMILY } from '../../../../translations'; +import { TestExternalProviders } from '../../../../../../../../../mock/test_providers/test_providers'; import { SameFamilyCallout } from '.'; -import { mockPartitionedFieldMetadataWithSameFamily } from '../../../../mock/partitioned_field_metadata/mock_partitioned_field_metadata_with_same_family'; +import { mockPartitionedFieldMetadataWithSameFamily } from '../../../../../../../../../mock/partitioned_field_metadata/mock_partitioned_field_metadata_with_same_family'; describe('SameFamilyCallout', () => { beforeEach(() => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/callouts/same_family_callout/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/callouts/same_family_callout/index.tsx similarity index 89% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/callouts/same_family_callout/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/callouts/same_family_callout/index.tsx index f89ebdda19889..ba7bab71f228d 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/callouts/same_family_callout/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/callouts/same_family_callout/index.tsx @@ -9,8 +9,8 @@ import { EcsVersion } from '@elastic/ecs'; import { EuiCallOut, EuiSpacer, EuiText } from '@elastic/eui'; import React from 'react'; -import * as i18n from '../../../index_properties/translations'; -import type { EcsBasedFieldMetadata } from '../../../../types'; +import * as i18n from '../../../../translations'; +import type { EcsBasedFieldMetadata } from '../../../../../../../../../types'; interface Props { ecsBasedFieldMetadata: EcsBasedFieldMetadata[]; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/ecs_allowed_values/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/ecs_allowed_values/index.test.tsx similarity index 88% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/ecs_allowed_values/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/ecs_allowed_values/index.test.tsx index 97b633eff4a64..da16307b9a23b 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/ecs_allowed_values/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/ecs_allowed_values/index.test.tsx @@ -8,8 +8,8 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; -import { mockAllowedValues } from '../../mock/allowed_values/mock_allowed_values'; -import { TestExternalProviders } from '../../mock/test_providers/test_providers'; +import { mockAllowedValues } from '../../../../../../../../../mock/allowed_values/mock_allowed_values'; +import { TestExternalProviders } from '../../../../../../../../../mock/test_providers/test_providers'; import { EcsAllowedValues } from '.'; describe('EcsAllowedValues', () => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/ecs_allowed_values/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/ecs_allowed_values/index.tsx similarity index 89% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/ecs_allowed_values/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/ecs_allowed_values/index.tsx index 8f63047bb91e1..07197641c9788 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/ecs_allowed_values/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/ecs_allowed_values/index.tsx @@ -9,8 +9,8 @@ import { EuiCode, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import React from 'react'; import { EMPTY_PLACEHOLDER } from '../helpers'; -import { CodeSuccess } from '../../styles'; -import type { AllowedValue } from '../../types'; +import { CodeSuccess } from '../../../../../../../../../styles'; +import type { AllowedValue } from '../../../../../../../../../types'; interface Props { allowedValues: AllowedValue[] | undefined; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/get_common_table_columns/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/get_common_table_columns/index.test.tsx similarity index 96% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/get_common_table_columns/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/get_common_table_columns/index.test.tsx index 1695f2587a674..6a7f522aa803f 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/get_common_table_columns/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/get_common_table_columns/index.test.tsx @@ -9,13 +9,13 @@ import { render, screen } from '@testing-library/react'; import { omit } from 'lodash/fp'; import React from 'react'; -import { SAME_FAMILY } from '../../data_quality_panel/same_family/translations'; +import { SAME_FAMILY } from '../same_family/translations'; import { eventCategory, someField, eventCategoryWithUnallowedValues, -} from '../../mock/enriched_field_metadata/mock_enriched_field_metadata'; -import { TestExternalProviders } from '../../mock/test_providers/test_providers'; +} from '../../../../../../../../../mock/enriched_field_metadata/mock_enriched_field_metadata'; +import { TestExternalProviders } from '../../../../../../../../../mock/test_providers/test_providers'; import { DOCUMENT_VALUES_ACTUAL, ECS_DESCRIPTION, @@ -24,7 +24,7 @@ import { FIELD, INDEX_MAPPING_TYPE_ACTUAL, } from '../translations'; -import { EnrichedFieldMetadata } from '../../types'; +import { EnrichedFieldMetadata } from '../../../../../../../../../types'; import { EMPTY_PLACEHOLDER, getCommonTableColumns } from '.'; describe('getCommonTableColumns', () => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/get_common_table_columns/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/get_common_table_columns/index.tsx similarity index 90% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/get_common_table_columns/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/get_common_table_columns/index.tsx index 61762d6fc8182..d4194790589db 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/get_common_table_columns/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/get_common_table_columns/index.tsx @@ -9,13 +9,17 @@ import type { EuiTableFieldDataColumnType } from '@elastic/eui'; import { EuiCode } from '@elastic/eui'; import React from 'react'; -import { SameFamily } from '../../data_quality_panel/same_family'; +import { SameFamily } from '../same_family'; import { EcsAllowedValues } from '../ecs_allowed_values'; -import { getIsInSameFamily } from '../../helpers'; +import { getIsInSameFamily } from '../../../../../../../../../helpers'; import { IndexInvalidValues } from '../index_invalid_values'; -import { CodeDanger, CodeSuccess } from '../../styles'; +import { CodeDanger, CodeSuccess } from '../../../../../../../../../styles'; import * as i18n from '../translations'; -import type { AllowedValue, EnrichedFieldMetadata, UnallowedValueCount } from '../../types'; +import type { + AllowedValue, + EnrichedFieldMetadata, + UnallowedValueCount, +} from '../../../../../../../../../types'; export const EMPTY_PLACEHOLDER = '--'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/get_incompatible_mappings_table_columns/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/get_incompatible_mappings_table_columns/index.test.tsx similarity index 92% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/get_incompatible_mappings_table_columns/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/get_incompatible_mappings_table_columns/index.test.tsx index 8a9272a717217..588affcfdbf21 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/get_incompatible_mappings_table_columns/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/get_incompatible_mappings_table_columns/index.test.tsx @@ -9,10 +9,10 @@ import { render, screen } from '@testing-library/react'; import { omit } from 'lodash/fp'; import React from 'react'; -import { SAME_FAMILY } from '../../data_quality_panel/same_family/translations'; -import { TestExternalProviders } from '../../mock/test_providers/test_providers'; -import { eventCategory } from '../../mock/enriched_field_metadata/mock_enriched_field_metadata'; -import { EcsBasedFieldMetadata } from '../../types'; +import { SAME_FAMILY } from '../same_family/translations'; +import { TestExternalProviders } from '../../../../../../../../../mock/test_providers/test_providers'; +import { eventCategory } from '../../../../../../../../../mock/enriched_field_metadata/mock_enriched_field_metadata'; +import { EcsBasedFieldMetadata } from '../../../../../../../../../types'; import { getIncompatibleMappingsTableColumns } from '.'; describe('getIncompatibleMappingsTableColumns', () => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/get_incompatible_mappings_table_columns/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/get_incompatible_mappings_table_columns/index.tsx similarity index 88% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/get_incompatible_mappings_table_columns/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/get_incompatible_mappings_table_columns/index.tsx index 4592e22565d74..ba2e3e2035f68 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/get_incompatible_mappings_table_columns/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/get_incompatible_mappings_table_columns/index.tsx @@ -8,10 +8,10 @@ import type { EuiTableFieldDataColumnType } from '@elastic/eui'; import React from 'react'; -import { SameFamily } from '../../data_quality_panel/same_family'; -import { CodeDanger, CodeSuccess } from '../../styles'; +import { SameFamily } from '../same_family'; +import { CodeDanger, CodeSuccess } from '../../../../../../../../../styles'; import * as i18n from '../translations'; -import type { EcsBasedFieldMetadata } from '../../types'; +import type { EcsBasedFieldMetadata } from '../../../../../../../../../types'; export const EMPTY_PLACEHOLDER = '--'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/helpers.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/helpers.test.tsx similarity index 98% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/helpers.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/helpers.test.tsx index 2bb1e72c8ac6a..8bf2861402c73 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/helpers.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/helpers.test.tsx @@ -18,8 +18,8 @@ import { eventCategory, eventCategoryWithUnallowedValues, someField, -} from '../mock/enriched_field_metadata/mock_enriched_field_metadata'; -import { TestExternalProviders } from '../mock/test_providers/test_providers'; +} from '../../../../../../../../mock/enriched_field_metadata/mock_enriched_field_metadata'; +import { TestExternalProviders } from '../../../../../../../../mock/test_providers/test_providers'; describe('helpers', () => { describe('getCustomTableColumns', () => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/helpers.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/helpers.tsx similarity index 96% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/helpers.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/helpers.tsx index 2563ced06733c..26e3a038b1ffe 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/helpers.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/helpers.tsx @@ -11,14 +11,14 @@ import React from 'react'; import { EcsAllowedValues } from './ecs_allowed_values'; import { IndexInvalidValues } from './index_invalid_values'; -import { CodeSuccess } from '../styles'; +import { CodeSuccess } from '../../../../../../../../styles'; import * as i18n from './translations'; import type { AllowedValue, CustomFieldMetadata, EcsBasedFieldMetadata, UnallowedValueCount, -} from '../types'; +} from '../../../../../../../../types'; export const EMPTY_PLACEHOLDER = '--'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/index.test.tsx similarity index 79% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/index.test.tsx index f1dcced85619f..e7344dad4d55e 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/index.test.tsx @@ -8,9 +8,9 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; -import { INCOMPATIBLE_FIELD_MAPPINGS_TABLE_TITLE } from '../data_quality_panel/tabs/incompatible_tab/translations'; -import { eventCategory } from '../mock/enriched_field_metadata/mock_enriched_field_metadata'; -import { TestExternalProviders } from '../mock/test_providers/test_providers'; +import { INCOMPATIBLE_FIELD_MAPPINGS_TABLE_TITLE } from '../incompatible_tab/translations'; +import { eventCategory } from '../../../../../../../../mock/enriched_field_metadata/mock_enriched_field_metadata'; +import { TestExternalProviders } from '../../../../../../../../mock/test_providers/test_providers'; import { CompareFieldsTable } from '.'; import { getIncompatibleMappingsTableColumns } from './get_incompatible_mappings_table_columns'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/index.tsx similarity index 95% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/index.tsx index 460663fb28790..8874bd8594866 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/index.tsx @@ -10,7 +10,7 @@ import { EuiInMemoryTable, EuiTitle, EuiSpacer } from '@elastic/eui'; import React, { useMemo } from 'react'; import * as i18n from './translations'; -import type { EnrichedFieldMetadata } from '../types'; +import type { EnrichedFieldMetadata } from '../../../../../../../../types'; const search: Search = { box: { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/index_invalid_values/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/index_invalid_values/index.test.tsx similarity index 88% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/index_invalid_values/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/index_invalid_values/index.test.tsx index 719c94bd85d58..8a53f4cdaf546 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/index_invalid_values/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/index_invalid_values/index.test.tsx @@ -9,8 +9,8 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; import { EMPTY_PLACEHOLDER } from '../helpers'; -import { TestExternalProviders } from '../../mock/test_providers/test_providers'; -import { UnallowedValueCount } from '../../types'; +import { TestExternalProviders } from '../../../../../../../../../mock/test_providers/test_providers'; +import { UnallowedValueCount } from '../../../../../../../../../types'; import { IndexInvalidValues } from '.'; describe('IndexInvalidValues', () => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/index_invalid_values/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/index_invalid_values/index.tsx similarity index 91% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/index_invalid_values/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/index_invalid_values/index.tsx index 2b58ea98b8b28..7f83876423ba9 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/index_invalid_values/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/index_invalid_values/index.tsx @@ -10,8 +10,8 @@ import React from 'react'; import styled from 'styled-components'; import { EMPTY_PLACEHOLDER } from '../helpers'; -import { CodeDanger } from '../../styles'; -import type { UnallowedValueCount } from '../../types'; +import { CodeDanger } from '../../../../../../../../../styles'; +import type { UnallowedValueCount } from '../../../../../../../../../types'; const IndexInvalidValueFlexItem = styled(EuiFlexItem)` margin-bottom: ${({ theme }) => theme.eui.euiSizeXS}; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/same_family/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/same_family/index.test.tsx similarity index 87% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/same_family/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/same_family/index.test.tsx index d1bea1a3312b3..58889ad1edb2e 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/same_family/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/same_family/index.test.tsx @@ -9,7 +9,7 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; import { SAME_FAMILY } from './translations'; -import { TestExternalProviders } from '../../mock/test_providers/test_providers'; +import { TestExternalProviders } from '../../../../../../../../../mock/test_providers/test_providers'; import { SameFamily } from '.'; describe('SameFamily', () => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/same_family/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/same_family/index.tsx similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/same_family/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/same_family/index.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/same_family/translations.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/same_family/translations.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/same_family/translations.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/same_family/translations.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/translations.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/translations.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/compare_fields_table/translations.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/compare_fields_table/translations.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/custom_tab/helpers.test.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/custom_tab/helpers.test.ts similarity index 94% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/custom_tab/helpers.test.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/custom_tab/helpers.test.ts index 424664c314832..1813db953f8a7 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/custom_tab/helpers.test.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/custom_tab/helpers.test.ts @@ -8,7 +8,7 @@ import numeral from '@elastic/numeral'; import { EcsVersion } from '@elastic/ecs'; -import { ECS_IS_A_PERMISSIVE_SCHEMA } from '../../index_properties/translations'; +import { ECS_IS_A_PERMISSIVE_SCHEMA } from '../../../translations'; import { getAllCustomMarkdownComments, getCustomMarkdownComment, @@ -17,9 +17,9 @@ import { import { hostNameKeyword, someField, -} from '../../../mock/enriched_field_metadata/mock_enriched_field_metadata'; -import { mockPartitionedFieldMetadata } from '../../../mock/partitioned_field_metadata/mock_partitioned_field_metadata'; -import { EMPTY_STAT } from '../../../helpers'; +} from '../../../../../../../../mock/enriched_field_metadata/mock_enriched_field_metadata'; +import { mockPartitionedFieldMetadata } from '../../../../../../../../mock/partitioned_field_metadata/mock_partitioned_field_metadata'; +import { EMPTY_STAT } from '../../../../../../../../helpers'; const defaultBytesFormat = '0,0.[0]b'; const formatBytes = (value: number | undefined) => diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/custom_tab/helpers.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/custom_tab/helpers.ts similarity index 88% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/custom_tab/helpers.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/custom_tab/helpers.ts index 55cb4898b7951..4ccebaefaa180 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/custom_tab/helpers.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/custom_tab/helpers.ts @@ -7,7 +7,7 @@ import { EcsVersion } from '@elastic/ecs'; -import { FIELD, INDEX_MAPPING_TYPE } from '../../../compare_fields_table/translations'; +import { FIELD, INDEX_MAPPING_TYPE } from '../compare_fields_table/translations'; import { getSummaryMarkdownComment, getCustomMarkdownTableRows, @@ -15,9 +15,13 @@ import { getMarkdownTable, getTabCountsMarkdownComment, getSummaryTableMarkdownComment, -} from '../../index_properties/markdown/helpers'; -import * as i18n from '../../index_properties/translations'; -import type { CustomFieldMetadata, IlmPhase, PartitionedFieldMetadata } from '../../../types'; +} from '../../../markdown/helpers'; +import * as i18n from '../../../translations'; +import type { + CustomFieldMetadata, + IlmPhase, + PartitionedFieldMetadata, +} from '../../../../../../../../types'; export const getCustomMarkdownComment = ({ customFieldMetadata, diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/custom_tab/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/custom_tab/index.tsx similarity index 85% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/custom_tab/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/custom_tab/index.tsx index 8c786216bc55a..2d7437e8f0638 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/custom_tab/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/custom_tab/index.tsx @@ -9,14 +9,14 @@ import { EuiEmptyPrompt, EuiSpacer } from '@elastic/eui'; import React, { useMemo } from 'react'; import { CustomCallout } from '../callouts/custom_callout'; -import { CompareFieldsTable } from '../../../compare_fields_table'; -import { getCustomTableColumns } from '../../../compare_fields_table/helpers'; -import { EmptyPromptBody } from '../../index_properties/empty_prompt_body'; -import { EmptyPromptTitle } from '../../index_properties/empty_prompt_title'; +import { CompareFieldsTable } from '../compare_fields_table'; +import { getCustomTableColumns } from '../compare_fields_table/helpers'; +import { EmptyPromptBody } from '../../../empty_prompt_body'; +import { EmptyPromptTitle } from '../../../empty_prompt_title'; import { getAllCustomMarkdownComments, showCustomCallout } from './helpers'; -import * as i18n from '../../index_properties/translations'; -import type { IlmPhase, PartitionedFieldMetadata } from '../../../types'; -import { useDataQualityContext } from '../../data_quality_context'; +import * as i18n from '../../../translations'; +import type { IlmPhase, PartitionedFieldMetadata } from '../../../../../../../../types'; +import { useDataQualityContext } from '../../../../../../../../data_quality_context'; import { StickyActions } from '../sticky_actions'; interface Props { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/ecs_compliant_tab/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/ecs_compliant_tab/index.tsx similarity index 85% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/ecs_compliant_tab/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/ecs_compliant_tab/index.tsx index 39b932cd88e40..7455ae3f482b9 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/ecs_compliant_tab/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/ecs_compliant_tab/index.tsx @@ -11,14 +11,14 @@ import { EuiCallOut, EuiEmptyPrompt, EuiSpacer } from '@elastic/eui'; import React, { useMemo } from 'react'; import styled from 'styled-components'; -import { CompareFieldsTable } from '../../../compare_fields_table'; -import { getEcsCompliantTableColumns } from '../../../compare_fields_table/helpers'; -import { EmptyPromptBody } from '../../index_properties/empty_prompt_body'; -import { EmptyPromptTitle } from '../../index_properties/empty_prompt_title'; +import { CompareFieldsTable } from '../compare_fields_table'; +import { getEcsCompliantTableColumns } from '../compare_fields_table/helpers'; +import { EmptyPromptBody } from '../../../empty_prompt_body'; +import { EmptyPromptTitle } from '../../../empty_prompt_title'; import { showMissingTimestampCallout } from '../helpers'; import { CalloutItem } from '../styles'; -import * as i18n from '../../index_properties/translations'; -import type { PartitionedFieldMetadata } from '../../../types'; +import * as i18n from '../../../translations'; +import type { PartitionedFieldMetadata } from '../../../../../../../../types'; const EmptyPromptContainer = styled.div` width: 100%; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/helpers.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/helpers.test.tsx similarity index 90% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/helpers.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/helpers.test.tsx index 3891a3d661561..4c30702fcef36 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/helpers.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/helpers.test.tsx @@ -10,9 +10,9 @@ import { omit } from 'lodash/fp'; import { eventCategory, timestamp, -} from '../../mock/enriched_field_metadata/mock_enriched_field_metadata'; -import { mockPartitionedFieldMetadata } from '../../mock/partitioned_field_metadata/mock_partitioned_field_metadata'; -import { mockStatsAuditbeatIndex } from '../../mock/stats/mock_stats_packetbeat_index'; +} from '../../../../../../../mock/enriched_field_metadata/mock_enriched_field_metadata'; +import { mockPartitionedFieldMetadata } from '../../../../../../../mock/partitioned_field_metadata/mock_partitioned_field_metadata'; +import { mockStatsAuditbeatIndex } from '../../../../../../../mock/stats/mock_stats_packetbeat_index'; import { getEcsCompliantBadgeColor, getMissingTimestampComment, diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/helpers.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/helpers.tsx similarity index 95% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/helpers.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/helpers.tsx index 5220522350b07..6db808d312d13 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/helpers.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/helpers.tsx @@ -12,7 +12,7 @@ import styled from 'styled-components'; import { AllTab } from './all_tab'; import { CustomTab } from './custom_tab'; import { EcsCompliantTab } from './ecs_compliant_tab'; -import { getIncompatibleStatBadgeColor, getSizeInBytes } from '../../helpers'; +import { getIncompatibleStatBadgeColor, getSizeInBytes } from '../../../../../../../helpers'; import { IncompatibleTab } from './incompatible_tab'; import { ALL_TAB_ID, @@ -20,16 +20,16 @@ import { ECS_COMPLIANT_TAB_ID, INCOMPATIBLE_TAB_ID, SAME_FAMILY_TAB_ID, -} from '../index_properties/helpers'; -import { getMarkdownComment } from '../index_properties/markdown/helpers'; -import * as i18n from '../index_properties/translations'; +} from '../../helpers'; +import { getMarkdownComment } from '../../markdown/helpers'; +import * as i18n from '../../translations'; import { SameFamilyTab } from './same_family_tab'; import type { EcsBasedFieldMetadata, IlmPhase, MeteringStatsIndex, PartitionedFieldMetadata, -} from '../../types'; +} from '../../../../../../../types'; export const getMissingTimestampComment = (): string => getMarkdownComment({ diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/incompatible_tab/helpers.test.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/incompatible_tab/helpers.test.ts similarity index 98% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/incompatible_tab/helpers.test.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/incompatible_tab/helpers.test.ts index 9851da18072a7..e4ee7eb3fdb99 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/incompatible_tab/helpers.test.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/incompatible_tab/helpers.test.ts @@ -18,14 +18,14 @@ import { getIncompatibleValuesFields, showInvalidCallout, } from './helpers'; -import { EMPTY_STAT } from '../../../helpers'; +import { EMPTY_STAT } from '../../../../../../../../helpers'; import { DETECTION_ENGINE_RULES_MAY_NOT_MATCH, MAPPINGS_THAT_CONFLICT_WITH_ECS, PAGES_MAY_NOT_DISPLAY_EVENTS, -} from '../../index_properties/translations'; -import { mockPartitionedFieldMetadata } from '../../../mock/partitioned_field_metadata/mock_partitioned_field_metadata'; -import { PartitionedFieldMetadata } from '../../../types'; +} from '../../../translations'; +import { mockPartitionedFieldMetadata } from '../../../../../../../../mock/partitioned_field_metadata/mock_partitioned_field_metadata'; +import { PartitionedFieldMetadata } from '../../../../../../../../types'; describe('helpers', () => { describe('getIncompatibleFieldsMarkdownComment', () => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/incompatible_tab/helpers.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/incompatible_tab/helpers.ts similarity index 94% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/incompatible_tab/helpers.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/incompatible_tab/helpers.ts index c4c6dfd4a2a82..957cf6fcb5344 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/incompatible_tab/helpers.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/incompatible_tab/helpers.ts @@ -16,9 +16,13 @@ import { getSummaryTableMarkdownComment, getTabCountsMarkdownComment, escape, -} from '../../index_properties/markdown/helpers'; -import * as i18n from '../../index_properties/translations'; -import type { EcsBasedFieldMetadata, IlmPhase, PartitionedFieldMetadata } from '../../../types'; +} from '../../../markdown/helpers'; +import * as i18n from '../../../translations'; +import type { + EcsBasedFieldMetadata, + IlmPhase, + PartitionedFieldMetadata, +} from '../../../../../../../../types'; import { INCOMPATIBLE_FIELD_MAPPINGS_TABLE_TITLE, INCOMPATIBLE_FIELD_VALUES_TABLE_TITLE, @@ -29,8 +33,8 @@ import { INDEX_MAPPING_TYPE_ACTUAL, DOCUMENT_VALUES_ACTUAL, ECS_VALUES_EXPECTED, -} from '../../../compare_fields_table/translations'; -import { getIsInSameFamily } from '../../../helpers'; +} from '../compare_fields_table/translations'; +import { getIsInSameFamily } from '../../../../../../../../helpers'; export const getIncompatibleFieldsMarkdownComment = (incompatible: number): string => getMarkdownComment({ diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/incompatible_tab/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/incompatible_tab/index.tsx similarity index 87% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/incompatible_tab/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/incompatible_tab/index.tsx index 52559b3d5116c..d24e82192291f 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/incompatible_tab/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/incompatible_tab/index.tsx @@ -9,24 +9,24 @@ import { EuiEmptyPrompt, EuiSpacer } from '@elastic/eui'; import React, { useMemo } from 'react'; import { IncompatibleCallout } from '../callouts/incompatible_callout'; -import { CompareFieldsTable } from '../../../compare_fields_table'; -import { getIncompatibleMappingsTableColumns } from '../../../compare_fields_table/get_incompatible_mappings_table_columns'; -import { getIncompatibleValuesTableColumns } from '../../../compare_fields_table/helpers'; -import { EmptyPromptBody } from '../../index_properties/empty_prompt_body'; -import { EmptyPromptTitle } from '../../index_properties/empty_prompt_title'; +import { CompareFieldsTable } from '../compare_fields_table'; +import { getIncompatibleMappingsTableColumns } from '../compare_fields_table/get_incompatible_mappings_table_columns'; +import { getIncompatibleValuesTableColumns } from '../compare_fields_table/helpers'; +import { EmptyPromptBody } from '../../../empty_prompt_body'; +import { EmptyPromptTitle } from '../../../empty_prompt_title'; import { getAllIncompatibleMarkdownComments, getIncompatibleMappings, getIncompatibleValues, showInvalidCallout, } from './helpers'; -import * as i18n from '../../index_properties/translations'; +import * as i18n from '../../../translations'; import { INCOMPATIBLE_FIELD_MAPPINGS_TABLE_TITLE, INCOMPATIBLE_FIELD_VALUES_TABLE_TITLE, } from './translations'; -import type { IlmPhase, PartitionedFieldMetadata } from '../../../types'; -import { useDataQualityContext } from '../../data_quality_context'; +import type { IlmPhase, PartitionedFieldMetadata } from '../../../../../../../../types'; +import { useDataQualityContext } from '../../../../../../../../data_quality_context'; import { StickyActions } from '../sticky_actions'; interface Props { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/incompatible_tab/translations.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/incompatible_tab/translations.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/incompatible_tab/translations.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/incompatible_tab/translations.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/same_family_tab/helpers.test.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/same_family_tab/helpers.test.ts similarity index 95% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/same_family_tab/helpers.test.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/same_family_tab/helpers.test.ts index 0af79eda5e312..d5f7101cc8acf 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/same_family_tab/helpers.test.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/same_family_tab/helpers.test.ts @@ -13,9 +13,9 @@ import { getSameFamilyMarkdownComment, getSameFamilyMarkdownTablesComment, } from './helpers'; -import { EMPTY_STAT } from '../../../helpers'; -import { mockPartitionedFieldMetadata } from '../../../mock/partitioned_field_metadata/mock_partitioned_field_metadata'; -import { mockPartitionedFieldMetadataWithSameFamily } from '../../../mock/partitioned_field_metadata/mock_partitioned_field_metadata_with_same_family'; +import { EMPTY_STAT } from '../../../../../../../../helpers'; +import { mockPartitionedFieldMetadata } from '../../../../../../../../mock/partitioned_field_metadata/mock_partitioned_field_metadata'; +import { mockPartitionedFieldMetadataWithSameFamily } from '../../../../../../../../mock/partitioned_field_metadata/mock_partitioned_field_metadata_with_same_family'; describe('helpers', () => { describe('getSameFamilyMarkdownComment', () => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/same_family_tab/helpers.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/same_family_tab/helpers.ts similarity index 92% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/same_family_tab/helpers.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/same_family_tab/helpers.ts index d6c8852bb33bb..3c90cb81a5906 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/same_family_tab/helpers.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/same_family_tab/helpers.ts @@ -11,7 +11,7 @@ import { FIELD, ECS_MAPPING_TYPE_EXPECTED, INDEX_MAPPING_TYPE_ACTUAL, -} from '../../../compare_fields_table/translations'; +} from '../compare_fields_table/translations'; import { getSummaryMarkdownComment, getIncompatibleMappingsMarkdownTableRows, @@ -19,10 +19,14 @@ import { getMarkdownTable, getSummaryTableMarkdownComment, getTabCountsMarkdownComment, -} from '../../index_properties/markdown/helpers'; -import * as i18n from '../../index_properties/translations'; +} from '../../../markdown/helpers'; +import * as i18n from '../../../translations'; import { SAME_FAMILY_FIELD_MAPPINGS_TABLE_TITLE } from './translations'; -import type { EcsBasedFieldMetadata, IlmPhase, PartitionedFieldMetadata } from '../../../types'; +import type { + EcsBasedFieldMetadata, + IlmPhase, + PartitionedFieldMetadata, +} from '../../../../../../../../types'; export const getSameFamilyMarkdownComment = (fieldsInSameFamily: number): string => getMarkdownComment({ diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/same_family_tab/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/same_family_tab/index.tsx similarity index 90% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/same_family_tab/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/same_family_tab/index.tsx index 37891a4257a5c..8d91e26a0da09 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/same_family_tab/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/same_family_tab/index.tsx @@ -9,12 +9,12 @@ import { EuiSpacer } from '@elastic/eui'; import React, { useMemo } from 'react'; import { SameFamilyCallout } from '../callouts/same_family_callout'; -import { CompareFieldsTable } from '../../../compare_fields_table'; -import { getIncompatibleMappingsTableColumns } from '../../../compare_fields_table/get_incompatible_mappings_table_columns'; -import { useDataQualityContext } from '../../data_quality_context'; +import { CompareFieldsTable } from '../compare_fields_table'; +import { getIncompatibleMappingsTableColumns } from '../compare_fields_table/get_incompatible_mappings_table_columns'; +import { useDataQualityContext } from '../../../../../../../../data_quality_context'; import { getAllSameFamilyMarkdownComments, getSameFamilyMappings } from './helpers'; import { SAME_FAMILY_FIELD_MAPPINGS_TABLE_TITLE } from './translations'; -import type { IlmPhase, PartitionedFieldMetadata } from '../../../types'; +import type { IlmPhase, PartitionedFieldMetadata } from '../../../../../../../../types'; import { StickyActions } from '../sticky_actions'; interface Props { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/same_family_tab/translations.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/same_family_tab/translations.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/same_family_tab/translations.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/same_family_tab/translations.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/sticky_actions/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/sticky_actions/index.tsx similarity index 96% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/sticky_actions/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/sticky_actions/index.tsx index 57b17a7453dd0..1cd2630e720d1 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/sticky_actions/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/sticky_actions/index.tsx @@ -9,7 +9,7 @@ import React, { FC } from 'react'; import { EuiButtonEmpty } from '@elastic/eui'; import styled from 'styled-components'; -import { Actions } from '../../actions'; +import { Actions } from '../../../../../../../../actions'; export const CopyToClipboardButton = styled(EuiButtonEmpty)` margin-left: ${({ theme }) => theme.eui.euiSizeXS}; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/styles.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/styles.tsx similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/tabs/styles.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/styles.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/index_stats_panel/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_stats_panel/index.test.tsx similarity index 89% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/index_stats_panel/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_stats_panel/index.test.tsx index f878cd9de4f13..b589eb09e8d12 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/index_stats_panel/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_stats_panel/index.test.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { screen, render } from '@testing-library/react'; import { IndexStatsPanel } from '.'; -import { TestExternalProviders } from '../../../mock/test_providers/test_providers'; +import { TestExternalProviders } from '../../../../../../mock/test_providers/test_providers'; describe('IndexStatsPanel', () => { it('renders stats panel', () => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/index_stats_panel/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_stats_panel/index.tsx similarity index 88% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/index_stats_panel/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_stats_panel/index.tsx index 03b20e8a4ce45..9fb1ca590a266 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/index_stats_panel/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_stats_panel/index.tsx @@ -8,11 +8,12 @@ import { EuiFlexGroup, EuiFlexItem, EuiPanel, EuiSpacer } from '@elastic/eui'; import React from 'react'; import styled from 'styled-components'; + import { DOCS } from '../translations'; -import { ILM_PHASE } from '../../../translations'; -import { SIZE } from '../../summary_table/translations'; -import { Stat } from '../../pattern/pattern_summary/stats_rollup/stat'; -import { getIlmPhaseDescription } from '../../../helpers'; +import { ILM_PHASE } from '../../../../../../translations'; +import { SIZE } from '../../../summary_table/translations'; +import { Stat } from '../../../../../../stat'; +import { getIlmPhaseDescription } from '../../../../../../helpers'; const StyledFlexItem = styled(EuiFlexItem)` border-right: 1px solid ${({ theme }) => theme.eui.euiBorderColor}; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/markdown/helpers.test.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/markdown/helpers.test.ts similarity index 96% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/markdown/helpers.test.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/markdown/helpers.test.ts index 8c14a214cabf3..e63044346bd0d 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/markdown/helpers.test.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/markdown/helpers.test.ts @@ -11,9 +11,13 @@ import { ECS_MAPPING_TYPE_EXPECTED, FIELD, INDEX_MAPPING_TYPE_ACTUAL, -} from '../../../compare_fields_table/translations'; -import { ERRORS } from '../../data_quality_summary/errors_popover/translations'; -import { ERROR, INDEX, PATTERN } from '../../data_quality_summary/errors_viewer/translations'; +} from '../index_check_fields/tabs/compare_fields_table/translations'; +import { ERRORS } from '../../../../../../data_quality_summary/summary_actions/check_status/errors_popover/translations'; +import { + ERROR, + INDEX, + PATTERN, +} from '../../../../../../data_quality_summary/summary_actions/check_status/errors_popover/errors_viewer/translations'; import { escape, escapePreserveNewlines, @@ -41,27 +45,27 @@ import { getSummaryTableMarkdownRow, getTabCountsMarkdownComment, } from './helpers'; -import { EMPTY_STAT } from '../../../helpers'; -import { mockAllowedValues } from '../../../mock/allowed_values/mock_allowed_values'; +import { EMPTY_STAT } from '../../../../../../helpers'; +import { mockAllowedValues } from '../../../../../../mock/allowed_values/mock_allowed_values'; import { eventCategory, mockCustomFields, mockIncompatibleMappings, sourceIpWithTextMapping, -} from '../../../mock/enriched_field_metadata/mock_enriched_field_metadata'; -import { mockPartitionedFieldMetadata } from '../../../mock/partitioned_field_metadata/mock_partitioned_field_metadata'; +} from '../../../../../../mock/enriched_field_metadata/mock_enriched_field_metadata'; +import { mockPartitionedFieldMetadata } from '../../../../../../mock/partitioned_field_metadata/mock_partitioned_field_metadata'; import { auditbeatNoResults, auditbeatWithAllResults, -} from '../../../mock/pattern_rollup/mock_auditbeat_pattern_rollup'; -import { SAME_FAMILY } from '../../same_family/translations'; -import { INCOMPATIBLE_FIELD_MAPPINGS_TABLE_TITLE } from '../../tabs/incompatible_tab/translations'; +} from '../../../../../../mock/pattern_rollup/mock_auditbeat_pattern_rollup'; +import { SAME_FAMILY } from '../index_check_fields/tabs/compare_fields_table/same_family/translations'; +import { INCOMPATIBLE_FIELD_MAPPINGS_TABLE_TITLE } from '../index_check_fields/tabs/incompatible_tab/translations'; import { EcsBasedFieldMetadata, ErrorSummary, PatternRollup, UnallowedValueCount, -} from '../../../types'; +} from '../../../../../../types'; const errorSummary: ErrorSummary[] = [ { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/markdown/helpers.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/markdown/helpers.ts similarity index 95% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/markdown/helpers.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/markdown/helpers.ts index bdbfdba4ddb35..c8181e14dd685 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/markdown/helpers.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/markdown/helpers.ts @@ -14,14 +14,20 @@ import { READ, THE_FOLLOWING_PRIVILEGES_ARE_REQUIRED, VIEW_INDEX_METADATA, -} from '../../data_quality_summary/errors_popover/translations'; +} from '../../../../../../data_quality_summary/summary_actions/check_status/errors_popover/translations'; import { EMPTY_STAT, getTotalPatternIncompatible, getTotalPatternIndicesChecked, -} from '../../../helpers'; -import { SAME_FAMILY } from '../../same_family/translations'; -import { HOT, WARM, COLD, FROZEN, UNMANAGED } from '../../../ilm_phases_empty_prompt/translations'; +} from '../../../../../../helpers'; +import { SAME_FAMILY } from '../index_check_fields/tabs/compare_fields_table/same_family/translations'; +import { + HOT, + WARM, + COLD, + FROZEN, + UNMANAGED, +} from '../../../../../ilm_phases_empty_prompt/translations'; import * as i18n from '../translations'; import type { AllowedValue, @@ -34,8 +40,8 @@ import type { PartitionedFieldMetadata, PatternRollup, UnallowedValueCount, -} from '../../../types'; -import { getDocsCountPercent } from '../../summary_table/helpers'; +} from '../../../../../../types'; +import { getDocsCountPercent } from '../../../summary_table/helpers'; import { DOCS, ILM_PHASE, @@ -45,8 +51,8 @@ import { INDICES_CHECKED, RESULT, SIZE, -} from '../../summary_table/translations'; -import { DATA_QUALITY_TITLE } from '../../../translations'; +} from '../../../summary_table/translations'; +import { DATA_QUALITY_TITLE } from '../../../../../../translations'; export const EMPTY_PLACEHOLDER = '--'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/translations.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/translations.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_properties/translations.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/translations.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/index_check_flyout/translations.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/translations.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/index_check_flyout/translations.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/translations.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_result_badge/helpers.test.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_result_badge/helpers.test.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_result_badge/helpers.test.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_result_badge/helpers.test.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_result_badge/helpers.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_result_badge/helpers.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_result_badge/helpers.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_result_badge/helpers.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_result_badge/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_result_badge/index.test.tsx similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_result_badge/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_result_badge/index.test.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_result_badge/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_result_badge/index.tsx similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_result_badge/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_result_badge/index.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_result_badge/translations.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_result_badge/translations.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/index_result_badge/translations.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_result_badge/translations.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/loading_empty_prompt/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/loading_empty_prompt/index.tsx similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/loading_empty_prompt/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/loading_empty_prompt/index.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/pattern_summary/index.tsx similarity index 92% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/pattern_summary/index.tsx index c30fd3e7dc4ce..db4d95ba48b4f 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/pattern_summary/index.tsx @@ -8,9 +8,9 @@ import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import React from 'react'; -import type { IlmExplainPhaseCounts } from '../../../types'; +import type { IlmExplainPhaseCounts } from '../../../../types'; import { PatternLabel } from './pattern_label'; -import { StatsRollup } from './stats_rollup'; +import { StatsRollup } from '../../../../stats_rollup'; interface Props { ilmExplainPhaseCounts: IlmExplainPhaseCounts | undefined; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/pattern_label/helpers.test.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/pattern_summary/pattern_label/helpers.test.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/pattern_label/helpers.test.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/pattern_summary/pattern_label/helpers.test.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/pattern_label/helpers.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/pattern_summary/pattern_label/helpers.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/pattern_label/helpers.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/pattern_summary/pattern_label/helpers.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/ilm_phase_counts/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/pattern_summary/pattern_label/ilm_phase_counts/index.test.tsx similarity index 93% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/ilm_phase_counts/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/pattern_summary/pattern_label/ilm_phase_counts/index.test.tsx index 23031b9210df1..f9e04fc707b01 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/ilm_phase_counts/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/pattern_summary/pattern_label/ilm_phase_counts/index.test.tsx @@ -13,9 +13,9 @@ import { import { render, screen } from '@testing-library/react'; import React from 'react'; -import { TestExternalProviders } from '../../mock/test_providers/test_providers'; +import { TestExternalProviders } from '../../../../../../mock/test_providers/test_providers'; import { IlmPhaseCounts } from '.'; -import { getIlmExplainPhaseCounts } from '../pattern/helpers'; +import { getIlmExplainPhaseCounts } from '../../../helpers'; const hot: IlmExplainLifecycleLifecycleExplainManaged = { index: '.ds-packetbeat-8.6.1-2023.02.04-000001', diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/ilm_phase_counts/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/pattern_summary/pattern_label/ilm_phase_counts/index.tsx similarity index 90% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/ilm_phase_counts/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/pattern_summary/pattern_label/ilm_phase_counts/index.tsx index b24014bb400e6..e755dbd2df8f1 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/ilm_phase_counts/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/pattern_summary/pattern_label/ilm_phase_counts/index.tsx @@ -9,8 +9,8 @@ import { EuiBadge, EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui'; import React from 'react'; import styled from 'styled-components'; -import { getPatternIlmPhaseDescription } from '../../helpers'; -import type { IlmExplainPhaseCounts, IlmPhase } from '../../types'; +import { getPatternIlmPhaseDescription } from '../../../../../../helpers'; +import type { IlmExplainPhaseCounts, IlmPhase } from '../../../../../../types'; const PhaseCountsFlexGroup = styled(EuiFlexGroup)` display: inline-flex; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/pattern_label/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/pattern_summary/pattern_label/index.tsx similarity index 92% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/pattern_label/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/pattern_summary/pattern_label/index.tsx index 62ff66a873124..03fede1fb7675 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/pattern_label/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/pattern_summary/pattern_label/index.tsx @@ -9,10 +9,10 @@ import { EuiTitle, EuiToolTip, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import React from 'react'; import { getPatternResultTooltip, showResult } from './helpers'; -import { IlmPhaseCounts } from '../../../ilm_phase_counts'; +import { IlmPhaseCounts } from './ilm_phase_counts'; import * as i18n from '../translations'; -import type { IlmExplainPhaseCounts } from '../../../../types'; -import { IndexResultBadge } from '../../../index_result_badge'; +import type { IlmExplainPhaseCounts } from '../../../../../types'; +import { IndexResultBadge } from '../../index_result_badge'; interface Props { incompatible: number | undefined; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/pattern_label/translations.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/pattern_summary/pattern_label/translations.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/pattern_label/translations.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/pattern_summary/pattern_label/translations.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/translations.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/pattern_summary/translations.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/translations.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/pattern_summary/translations.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/remote_clusters_callout/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/remote_clusters_callout/index.test.tsx similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/remote_clusters_callout/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/remote_clusters_callout/index.test.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/remote_clusters_callout/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/remote_clusters_callout/index.tsx similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/remote_clusters_callout/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/remote_clusters_callout/index.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/remote_clusters_callout/translations.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/remote_clusters_callout/translations.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/remote_clusters_callout/translations.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/remote_clusters_callout/translations.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/styles.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/styles.tsx similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/styles.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/styles.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/summary_table/helpers.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/summary_table/helpers.test.tsx similarity index 98% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/summary_table/helpers.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/summary_table/helpers.test.tsx index a4227f0631819..022119e4613e5 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/summary_table/helpers.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/summary_table/helpers.test.tsx @@ -16,8 +16,8 @@ import userEvent from '@testing-library/user-event'; import { omit } from 'lodash/fp'; import React from 'react'; -import { TestExternalProviders } from '../../mock/test_providers/test_providers'; -import { EMPTY_STAT } from '../../helpers'; +import { TestExternalProviders } from '../../../../mock/test_providers/test_providers'; +import { EMPTY_STAT } from '../../../../helpers'; import { getDocsCountPercent, getIncompatibleStatColor, @@ -28,8 +28,8 @@ import { getToggleButtonId, } from './helpers'; import { CHECK_INDEX, VIEW_CHECK_DETAILS } from './translations'; -import { IndexSummaryTableItem } from '../pattern/types'; -import { getCheckState } from '../../stub/get_check_state'; +import { IndexSummaryTableItem } from '../types'; +import { getCheckState } from '../../../../stub/get_check_state'; const defaultBytesFormat = '0,0.[0]b'; const formatBytes = (value: number | undefined) => diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/summary_table/helpers.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/summary_table/helpers.tsx similarity index 94% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/summary_table/helpers.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/summary_table/helpers.tsx index f8e5b8d1b271e..b41b5604d1b98 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/summary_table/helpers.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/summary_table/helpers.tsx @@ -18,15 +18,15 @@ import moment from 'moment'; import styled from 'styled-components'; import { euiThemeVars } from '@kbn/ui-theme'; -import { EMPTY_STAT, getIlmPhaseDescription } from '../../helpers'; -import { INCOMPATIBLE_INDEX_TOOL_TIP } from '../stat_label/translations'; -import { INDEX_SIZE_TOOLTIP } from '../../translations'; +import { EMPTY_STAT, getIlmPhaseDescription } from '../../../../helpers'; +import { INCOMPATIBLE_INDEX_TOOL_TIP } from '../../../../stat_label/translations'; +import { INDEX_SIZE_TOOLTIP } from '../../../../translations'; import * as i18n from './translations'; -import { IndexSummaryTableItem } from '../pattern/types'; -import { UseIndicesCheckCheckState } from '../../use_indices_check/types'; +import { IndexSummaryTableItem } from '../types'; +import { UseIndicesCheckCheckState } from '../../../../hooks/use_indices_check/types'; import { IndexResultBadge } from '../index_result_badge'; import { getIndexResultToolTip } from '../index_result_badge/helpers'; -import { Stat } from '../pattern/pattern_summary/stats_rollup/stat'; +import { Stat } from '../../../../stat'; const ProgressContainer = styled.div` width: 150px; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/summary_table/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/summary_table/index.test.tsx similarity index 86% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/summary_table/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/summary_table/index.test.tsx index 24d57f927e6ea..5863649335edb 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/summary_table/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/summary_table/index.test.tsx @@ -9,17 +9,17 @@ import numeral from '@elastic/numeral'; import { render, screen } from '@testing-library/react'; import React from 'react'; -import { EMPTY_STAT } from '../../helpers'; +import { EMPTY_STAT } from '../../../../helpers'; import { getSummaryTableColumns } from './helpers'; -import { mockIlmExplain } from '../../mock/ilm_explain/mock_ilm_explain'; -import { auditbeatWithAllResults } from '../../mock/pattern_rollup/mock_auditbeat_pattern_rollup'; -import { mockStats } from '../../mock/stats/mock_stats'; +import { mockIlmExplain } from '../../../../mock/ilm_explain/mock_ilm_explain'; +import { auditbeatWithAllResults } from '../../../../mock/pattern_rollup/mock_auditbeat_pattern_rollup'; +import { mockStats } from '../../../../mock/stats/mock_stats'; import { TestDataQualityProviders, TestExternalProviders, -} from '../../mock/test_providers/test_providers'; -import { getSummaryTableItems } from '../pattern/helpers'; -import { SortConfig } from '../../types'; +} from '../../../../mock/test_providers/test_providers'; +import { getSummaryTableItems } from '../helpers'; +import { SortConfig } from '../../../../types'; import { Props, SummaryTable } from '.'; const defaultBytesFormat = '0,0.[0]b'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/summary_table/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/summary_table/index.tsx similarity index 91% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/summary_table/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/summary_table/index.tsx index cc09109ea16f9..fad209fb29e54 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/summary_table/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/summary_table/index.tsx @@ -10,11 +10,11 @@ import { EuiInMemoryTable } from '@elastic/eui'; import React, { useCallback, useMemo } from 'react'; import { getShowPagination } from './helpers'; -import { defaultSort, MIN_PAGE_SIZE } from '../pattern/helpers'; -import { SortConfig } from '../../types'; -import { useDataQualityContext } from '../data_quality_context'; -import { IndexSummaryTableItem } from '../pattern/types'; -import { UseIndicesCheckCheckState } from '../../use_indices_check/types'; +import { defaultSort, MIN_PAGE_SIZE } from '../helpers'; +import { SortConfig } from '../../../../types'; +import { useDataQualityContext } from '../../../../data_quality_context'; +import { IndexSummaryTableItem } from '../types'; +import { UseIndicesCheckCheckState } from '../../../../hooks/use_indices_check/types'; export interface Props { getTableColumns: ({ diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/summary_table/translations.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/summary_table/translations.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/summary_table/translations.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/summary_table/translations.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/translations.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/translations.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/translations.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/translations.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/types.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/types.ts similarity index 92% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/types.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/types.ts index b079976950f1b..e44300859bffd 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/types.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { IlmPhase } from '../../types'; +import { IlmPhase } from '../../../types'; export interface IndexSummaryTableItem { docsCount: number; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/storage_details/helpers.test.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/helpers.test.ts similarity index 97% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/storage_details/helpers.test.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/helpers.test.ts index 650b70586d19f..e4091d38c20d9 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/storage_details/helpers.test.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/helpers.test.ts @@ -8,7 +8,7 @@ import numeral from '@elastic/numeral'; import { euiThemeVars } from '@kbn/ui-theme'; -import { EMPTY_STAT } from '../../../../helpers'; +import { EMPTY_STAT } from '../../helpers'; import { DEFAULT_INDEX_COLOR, getFillColor, @@ -21,10 +21,10 @@ import { getPatternLegendItem, getPatternSizeInBytes, } from './helpers'; -import { alertIndexWithAllResults } from '../../../../mock/pattern_rollup/mock_alerts_pattern_rollup'; -import { auditbeatWithAllResults } from '../../../../mock/pattern_rollup/mock_auditbeat_pattern_rollup'; -import { packetbeatNoResults } from '../../../../mock/pattern_rollup/mock_packetbeat_pattern_rollup'; -import { PatternRollup } from '../../../../types'; +import { alertIndexWithAllResults } from '../../mock/pattern_rollup/mock_alerts_pattern_rollup'; +import { auditbeatWithAllResults } from '../../mock/pattern_rollup/mock_auditbeat_pattern_rollup'; +import { packetbeatNoResults } from '../../mock/pattern_rollup/mock_packetbeat_pattern_rollup'; +import { PatternRollup } from '../../types'; const defaultBytesFormat = '0,0.[0]b'; const formatBytes = (value: number | undefined) => diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/storage_details/helpers.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/helpers.ts similarity index 97% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/storage_details/helpers.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/helpers.ts index 3eaf493222cb0..456752eef627e 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/storage_details/helpers.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/helpers.ts @@ -9,9 +9,9 @@ import type { Datum, Key, ArrayNode } from '@elastic/charts'; import { euiThemeVars } from '@kbn/ui-theme'; import { orderBy } from 'lodash/fp'; -import { getDocsCount, getSizeInBytes } from '../../../../helpers'; -import { getIlmPhase } from '../../../pattern/helpers'; -import { PatternRollup } from '../../../../types'; +import { getDocsCount, getSizeInBytes } from '../../helpers'; +import { getIlmPhase } from '../indices_details/pattern/helpers'; +import { PatternRollup } from '../../types'; export interface LegendItem { color: string | null; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/storage_details/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/index.test.tsx similarity index 79% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/storage_details/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/index.test.tsx index 5dd06ad340474..7eff122a3df06 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/storage_details/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/index.test.tsx @@ -9,15 +9,15 @@ import numeral from '@elastic/numeral'; import { render, screen } from '@testing-library/react'; import React from 'react'; -import { EMPTY_STAT } from '../../../../helpers'; -import { alertIndexWithAllResults } from '../../../../mock/pattern_rollup/mock_alerts_pattern_rollup'; -import { auditbeatWithAllResults } from '../../../../mock/pattern_rollup/mock_auditbeat_pattern_rollup'; -import { packetbeatNoResults } from '../../../../mock/pattern_rollup/mock_packetbeat_pattern_rollup'; +import { EMPTY_STAT } from '../../helpers'; +import { alertIndexWithAllResults } from '../../mock/pattern_rollup/mock_alerts_pattern_rollup'; +import { auditbeatWithAllResults } from '../../mock/pattern_rollup/mock_auditbeat_pattern_rollup'; +import { packetbeatNoResults } from '../../mock/pattern_rollup/mock_packetbeat_pattern_rollup'; import { TestDataQualityProviders, TestExternalProviders, -} from '../../../../mock/test_providers/test_providers'; -import { PatternRollup } from '../../../../types'; +} from '../../mock/test_providers/test_providers'; +import { PatternRollup } from '../../types'; import { Props, StorageDetails } from '.'; const defaultBytesFormat = '0,0.[0]b'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/storage_details/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/index.tsx similarity index 81% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/storage_details/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/index.tsx index ff43116c02878..cfde7c0342585 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/storage_details/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/index.tsx @@ -7,12 +7,12 @@ import React, { useCallback, useMemo } from 'react'; -import { useResultsRollupContext } from '../../../../contexts/results_rollup_context'; +import { useResultsRollupContext } from '../../contexts/results_rollup_context'; import { getFlattenedBuckets } from './helpers'; -import { StorageTreemap } from '../../../storage_treemap'; -import { DEFAULT_MAX_CHART_HEIGHT } from '../../../tabs/styles'; -import { SelectedIndex } from '../../../../types'; -import { useDataQualityContext } from '../../../data_quality_context'; +import { StorageTreemap } from './storage_treemap'; +import { DEFAULT_MAX_CHART_HEIGHT } from '../indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/styles'; +import { SelectedIndex } from '../../types'; +import { useDataQualityContext } from '../../data_quality_context'; import { DOCS_UNIT } from './translations'; export interface Props { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/storage_treemap/chart_legend_item/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/storage_treemap/chart_legend_item/index.tsx similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/storage_treemap/chart_legend_item/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/storage_treemap/chart_legend_item/index.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/storage_treemap/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/storage_treemap/index.test.tsx similarity index 88% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/storage_treemap/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/storage_treemap/index.test.tsx index 5e22bc185b1c1..6206dfca5742f 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/storage_treemap/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/storage_treemap/index.test.tsx @@ -11,24 +11,20 @@ import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import React from 'react'; -import { - FlattenedBucket, - getFlattenedBuckets, - getLegendItems, -} from '../body/data_quality_details/storage_details/helpers'; -import { EMPTY_STAT } from '../../helpers'; -import { alertIndexWithAllResults } from '../../mock/pattern_rollup/mock_alerts_pattern_rollup'; -import { auditbeatWithAllResults } from '../../mock/pattern_rollup/mock_auditbeat_pattern_rollup'; -import { packetbeatNoResults } from '../../mock/pattern_rollup/mock_packetbeat_pattern_rollup'; +import { FlattenedBucket, getFlattenedBuckets, getLegendItems } from '../helpers'; +import { EMPTY_STAT } from '../../../helpers'; +import { alertIndexWithAllResults } from '../../../mock/pattern_rollup/mock_alerts_pattern_rollup'; +import { auditbeatWithAllResults } from '../../../mock/pattern_rollup/mock_auditbeat_pattern_rollup'; +import { packetbeatNoResults } from '../../../mock/pattern_rollup/mock_packetbeat_pattern_rollup'; import { TestDataQualityProviders, TestExternalProviders, -} from '../../mock/test_providers/test_providers'; +} from '../../../mock/test_providers/test_providers'; import type { Props } from '.'; import { StorageTreemap } from '.'; -import { DEFAULT_MAX_CHART_HEIGHT } from '../tabs/styles'; +import { DEFAULT_MAX_CHART_HEIGHT } from '../../indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/styles'; import { NO_DATA_LABEL } from './translations'; -import { PatternRollup } from '../../types'; +import { PatternRollup } from '../../../types'; const defaultBytesFormat = '0,0.[0]b'; const formatBytes = (value: number | undefined) => diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/storage_treemap/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/storage_treemap/index.tsx similarity index 94% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/storage_treemap/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/storage_treemap/index.tsx index e56cbadc66009..fbabe4412e493 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/storage_treemap/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/storage_treemap/index.tsx @@ -27,12 +27,15 @@ import { getLayersMultiDimensional, getLegendItems, getPathToFlattenedBucketMap, -} from '../body/data_quality_details/storage_details/helpers'; +} from '../helpers'; import { ChartLegendItem } from './chart_legend_item'; import { NoData } from './no_data'; -import { ChartFlexItem, LegendContainer } from '../tabs/styles'; -import { PatternRollup, SelectedIndex } from '../../types'; -import { useDataQualityContext } from '../data_quality_context'; +import { + ChartFlexItem, + LegendContainer, +} from '../../indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/styles'; +import { PatternRollup, SelectedIndex } from '../../../types'; +import { useDataQualityContext } from '../../../data_quality_context'; export const DEFAULT_MIN_CHART_HEIGHT = 240; // px export const LEGEND_WIDTH = 220; // px diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/storage_treemap/no_data/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/storage_treemap/no_data/index.test.tsx similarity index 88% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/storage_treemap/no_data/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/storage_treemap/no_data/index.test.tsx index 95503d7f156bd..dbb6dd955c9ea 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/storage_treemap/no_data/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/storage_treemap/no_data/index.test.tsx @@ -11,7 +11,7 @@ import React from 'react'; import * as i18n from '../translations'; import { NoData } from '.'; -import { TestExternalProviders } from '../../../mock/test_providers/test_providers'; +import { TestExternalProviders } from '../../../../mock/test_providers/test_providers'; describe('NoData', () => { test('renders the expected "no data" message', () => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/storage_treemap/no_data/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/storage_treemap/no_data/index.tsx similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/storage_treemap/no_data/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/storage_treemap/no_data/index.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/storage_treemap/translations.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/storage_treemap/translations.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/storage_treemap/translations.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/storage_treemap/translations.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/storage_details/translations.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/translations.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/body/data_quality_details/storage_details/translations.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/storage_details/translations.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/ilm_phase_filter/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/ilm_phase_filter/index.test.tsx similarity index 98% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/ilm_phase_filter/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/ilm_phase_filter/index.test.tsx index d2d0a388c465d..4a821d1251ddc 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/ilm_phase_filter/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/ilm_phase_filter/index.test.tsx @@ -13,7 +13,7 @@ import { IlmPhaseFilter } from '.'; import { TestDataQualityProviders, TestExternalProviders, -} from '../../../mock/test_providers/test_providers'; +} from '../../mock/test_providers/test_providers'; import { COLD_DESCRIPTION, FROZEN_DESCRIPTION, @@ -21,7 +21,7 @@ import { INDEX_LIFECYCLE_MANAGEMENT_PHASES, UNMANAGED_DESCRIPTION, WARM_DESCRIPTION, -} from '../../../translations'; +} from '../../translations'; describe('IlmPhaseFilter', () => { it('renders combobox with ilmPhase label and preselected hot, warm, unmanaged options', () => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/ilm_phase_filter/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/ilm_phase_filter/index.tsx similarity index 93% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/ilm_phase_filter/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/ilm_phase_filter/index.tsx index d0411349662fd..0a52777c1ab93 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/ilm_phase_filter/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/ilm_phase_filter/index.tsx @@ -14,13 +14,13 @@ import { } from '@elastic/eui'; import React, { useCallback, useMemo } from 'react'; -import { ilmPhaseOptionsStatic } from '../../../constants'; -import { getIlmPhaseDescription } from '../../../helpers'; +import { ilmPhaseOptionsStatic } from '../../constants'; +import { getIlmPhaseDescription } from '../../helpers'; import { ILM_PHASE, INDEX_LIFECYCLE_MANAGEMENT_PHASES, SELECT_ONE_OR_MORE_ILM_PHASES, -} from '../../../translations'; +} from '../../translations'; import { useDataQualityContext } from '../../data_quality_context'; import { StyledFormControlLayout, StyledOption, StyledOptionLabel } from './styles'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/ilm_phase_filter/styles.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/ilm_phase_filter/styles.tsx similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/ilm_phase_filter/styles.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/ilm_phase_filter/styles.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/index.test.tsx similarity index 86% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/index.test.tsx index 6b8994e0d7919..d3861b46b3e12 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/index.test.tsx @@ -9,15 +9,15 @@ import numeral from '@elastic/numeral'; import { render, screen } from '@testing-library/react'; import React from 'react'; -import { EMPTY_STAT } from '../../helpers'; -import { alertIndexWithAllResults } from '../../mock/pattern_rollup/mock_alerts_pattern_rollup'; -import { auditbeatWithAllResults } from '../../mock/pattern_rollup/mock_auditbeat_pattern_rollup'; -import { packetbeatNoResults } from '../../mock/pattern_rollup/mock_packetbeat_pattern_rollup'; +import { EMPTY_STAT } from '../helpers'; +import { alertIndexWithAllResults } from '../mock/pattern_rollup/mock_alerts_pattern_rollup'; +import { auditbeatWithAllResults } from '../mock/pattern_rollup/mock_auditbeat_pattern_rollup'; +import { packetbeatNoResults } from '../mock/pattern_rollup/mock_packetbeat_pattern_rollup'; import { TestDataQualityProviders, TestExternalProviders, -} from '../../mock/test_providers/test_providers'; -import { PatternRollup } from '../../types'; +} from '../mock/test_providers/test_providers'; +import { PatternRollup } from '../types'; import { DataQualitySummary } from '.'; import { getTotalDocsCount, @@ -25,7 +25,7 @@ import { getTotalIndices, getTotalIndicesChecked, getTotalSizeInBytes, -} from '../../use_results_rollup/helpers'; +} from '../hooks/use_results_rollup/helpers'; const defaultBytesFormat = '0,0.[0]b'; const formatBytes = (value: number | undefined) => diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/index.tsx similarity index 94% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/index.tsx index eca684ce5c218..09c98c1a84197 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/index.tsx @@ -9,11 +9,11 @@ import { EuiFlexGroup, EuiFlexItem, EuiPanel } from '@elastic/eui'; import React from 'react'; import styled from 'styled-components'; -import { StatsRollup } from '../pattern/pattern_summary/stats_rollup'; +import { StatsRollup } from '../stats_rollup'; import { SummaryActions } from './summary_actions'; import { IlmPhaseFilter } from './ilm_phase_filter'; import { useDataQualityContext } from '../data_quality_context'; -import { useResultsRollupContext } from '../../contexts/results_rollup_context'; +import { useResultsRollupContext } from '../contexts/results_rollup_context'; const MAX_SUMMARY_ACTIONS_CONTAINER_WIDTH = 400; const MIN_SUMMARY_ACTIONS_CONTAINER_WIDTH = 235; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/summary_actions/check_all/helpers.test.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_all/helpers.test.ts similarity index 96% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/summary_actions/check_all/helpers.test.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_all/helpers.test.ts index 5f96cfa9953a6..2b37622baa655 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/summary_actions/check_all/helpers.test.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_all/helpers.test.ts @@ -6,7 +6,7 @@ */ import { getAllIndicesToCheck, getIndexDocsCountFromRollup, getIndexToCheck } from './helpers'; -import { mockPacketbeatPatternRollup } from '../../../../mock/pattern_rollup/mock_packetbeat_pattern_rollup'; +import { mockPacketbeatPatternRollup } from '../../../mock/pattern_rollup/mock_packetbeat_pattern_rollup'; const patternIndexNames: Record = { 'packetbeat-*': [ diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/summary_actions/check_all/helpers.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_all/helpers.ts similarity index 95% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/summary_actions/check_all/helpers.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_all/helpers.ts index ede3184350e58..fe453dd3a7370 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/summary_actions/check_all/helpers.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_all/helpers.ts @@ -7,8 +7,8 @@ import { orderBy } from 'lodash/fp'; -import { getDocsCount } from '../../../../helpers'; -import type { IndexToCheck, MeteringStatsIndex, PatternRollup } from '../../../../types'; +import { getDocsCount } from '../../../helpers'; +import type { IndexToCheck, MeteringStatsIndex, PatternRollup } from '../../../types'; export const getIndexToCheck = ({ indexName, diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/summary_actions/check_all/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_all/index.test.tsx similarity index 94% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/summary_actions/check_all/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_all/index.test.tsx index 97e93124b84cf..5ebb61152b1ae 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/summary_actions/check_all/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_all/index.test.tsx @@ -10,16 +10,16 @@ import userEvent from '@testing-library/user-event'; import { act, render, screen, waitFor } from '@testing-library/react'; import React from 'react'; -import { mockMappingsResponse } from '../../../../mock/mappings_response/mock_mappings_response'; +import { mockMappingsResponse } from '../../../mock/mappings_response/mock_mappings_response'; import { TestDataQualityProviders, TestExternalProviders, -} from '../../../../mock/test_providers/test_providers'; -import { mockUnallowedValuesResponse } from '../../../../mock/unallowed_values/mock_unallowed_values'; -import { CANCEL, CHECK_ALL } from '../../../../translations'; -import { OnCheckCompleted, UnallowedValueRequestItem } from '../../../../types'; +} from '../../../mock/test_providers/test_providers'; +import { mockUnallowedValuesResponse } from '../../../mock/unallowed_values/mock_unallowed_values'; +import { CANCEL, CHECK_ALL } from '../../../translations'; +import { OnCheckCompleted, UnallowedValueRequestItem } from '../../../types'; import { CheckAll } from '.'; -import { EMPTY_STAT } from '../../../../helpers'; +import { EMPTY_STAT } from '../../../helpers'; const defaultBytesFormat = '0,0.[0]b'; const mockFormatBytes = (value: number | undefined) => @@ -35,16 +35,19 @@ const mockFetchMappings = jest.fn(() => ) ); -jest.mock('../../../../use_mappings/helpers', () => ({ - fetchMappings: (_: { abortController: AbortController; patternOrIndexName: string }) => - mockFetchMappings(), -})); +jest.mock('../../../utils/fetch_mappings', () => { + const original = jest.requireActual('../../../utils/fetch_mappings'); + return { + ...original, + fetchMappings: (_: { abortController: AbortController; patternOrIndexName: string }) => + mockFetchMappings(), + }; +}); const mockFetchUnallowedValues = jest.fn(() => Promise.resolve(mockUnallowedValuesResponse)); -jest.mock('../../../../use_unallowed_values/helpers', () => { - const original = jest.requireActual('../../../../use_unallowed_values/helpers'); - +jest.mock('../../../utils/fetch_unallowed_values', () => { + const original = jest.requireActual('../../../utils/fetch_unallowed_values'); return { ...original, fetchUnallowedValues: (_: { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/summary_actions/check_all/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_all/index.tsx similarity index 94% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/summary_actions/check_all/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_all/index.tsx index c8bb58de2ef44..e2851ee4b3761 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/summary_actions/check_all/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_all/index.tsx @@ -10,12 +10,12 @@ import React, { useCallback, useEffect, useRef, useState } from 'react'; import styled from 'styled-components'; import { v4 as uuidv4 } from 'uuid'; -import { useResultsRollupContext } from '../../../../contexts/results_rollup_context'; -import { checkIndex } from '../../../../utils/check_index'; -import { useDataQualityContext } from '../../../data_quality_context'; import { getAllIndicesToCheck } from './helpers'; -import * as i18n from '../../../../translations'; -import type { IndexToCheck } from '../../../../types'; +import { useResultsRollupContext } from '../../../contexts/results_rollup_context'; +import { checkIndex } from '../../../utils/check_index'; +import { useDataQualityContext } from '../../../data_quality_context'; +import * as i18n from '../../../translations'; +import type { IndexToCheck } from '../../../types'; const CheckAllButton = styled(EuiButton)` width: 112px; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/summary_actions/check_all/translations.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_all/translations.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/summary_actions/check_all/translations.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_all/translations.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_viewer/helpers.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_status/errors_popover/errors_viewer/helpers.test.tsx similarity index 96% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_viewer/helpers.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_status/errors_popover/errors_viewer/helpers.test.tsx index 4ef8e57bf74b9..13b2e5e88605a 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_viewer/helpers.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_status/errors_popover/errors_viewer/helpers.test.tsx @@ -10,8 +10,8 @@ import { omit } from 'lodash/fp'; import React from 'react'; import { getErrorsViewerTableColumns } from './helpers'; -import { TestExternalProviders } from '../../../mock/test_providers/test_providers'; -import { ErrorSummary } from '../../../types'; +import { TestExternalProviders } from '../../../../../mock/test_providers/test_providers'; +import { ErrorSummary } from '../../../../../types'; const errorSummary: ErrorSummary[] = [ { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_viewer/helpers.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_status/errors_popover/errors_viewer/helpers.tsx similarity index 95% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_viewer/helpers.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_status/errors_popover/errors_viewer/helpers.tsx index 35a4a74cca875..a72580e464ad4 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_viewer/helpers.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_status/errors_popover/errors_viewer/helpers.tsx @@ -10,7 +10,7 @@ import { EuiCode } from '@elastic/eui'; import React from 'react'; import * as i18n from './translations'; -import type { ErrorSummary } from '../../../types'; +import type { ErrorSummary } from '../../../../../types'; export const EMPTY_PLACEHOLDER = '--'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_viewer/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_status/errors_popover/errors_viewer/index.test.tsx similarity index 92% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_viewer/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_status/errors_popover/errors_viewer/index.test.tsx index 0354f687cda24..1c605a64d8ab2 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_viewer/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_status/errors_popover/errors_viewer/index.test.tsx @@ -8,9 +8,9 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; -import { TestExternalProviders } from '../../../mock/test_providers/test_providers'; +import { TestExternalProviders } from '../../../../../mock/test_providers/test_providers'; import { ERROR, INDEX, PATTERN } from './translations'; -import { ErrorSummary } from '../../../types'; +import { ErrorSummary } from '../../../../../types'; import { ErrorsViewer } from '.'; interface ExpectedColumns { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_viewer/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_status/errors_popover/errors_viewer/index.tsx similarity index 95% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_viewer/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_status/errors_popover/errors_viewer/index.tsx index 2336abe79c651..363127e4f919c 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_viewer/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_status/errors_popover/errors_viewer/index.tsx @@ -14,7 +14,7 @@ import { ERRORS_CONTAINER_MIN_WIDTH, getErrorsViewerTableColumns, } from './helpers'; -import type { ErrorSummary } from '../../../types'; +import type { ErrorSummary } from '../../../../../types'; const ErrorsViewerContainer = styled.div` max-width: ${ERRORS_CONTAINER_MAX_WIDTH}px; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_viewer/translations.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_status/errors_popover/errors_viewer/translations.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_viewer/translations.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_status/errors_popover/errors_viewer/translations.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_popover/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_status/errors_popover/index.test.tsx similarity index 97% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_popover/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_status/errors_popover/index.test.tsx index ecedacc646043..43cd0b7d215c6 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_popover/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_status/errors_popover/index.test.tsx @@ -9,7 +9,7 @@ import userEvent from '@testing-library/user-event'; import { act, render, screen } from '@testing-library/react'; import React from 'react'; -import { TestExternalProviders } from '../../../mock/test_providers/test_providers'; +import { TestExternalProviders } from '../../../../mock/test_providers/test_providers'; import { ErrorsPopover } from '.'; const mockCopyToClipboard = jest.fn((value) => true); diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_popover/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_status/errors_popover/index.tsx similarity index 89% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_popover/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_status/errors_popover/index.tsx index 8f80e3fa3cab5..a4bb73147e97b 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_popover/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_status/errors_popover/index.tsx @@ -16,15 +16,15 @@ import { import React, { useCallback, useMemo, useState } from 'react'; import styled from 'styled-components'; -import { ErrorsViewer } from '../errors_viewer'; -import { ERRORS_CONTAINER_MAX_WIDTH } from '../errors_viewer/helpers'; +import { ErrorsViewer } from './errors_viewer'; +import { ERRORS_CONTAINER_MAX_WIDTH } from './errors_viewer/helpers'; import { getErrorsMarkdownTable, getErrorsMarkdownTableRows, -} from '../../index_properties/markdown/helpers'; +} from '../../../../data_quality_details/indices_details/pattern/index_check_flyout/index_properties/markdown/helpers'; import * as i18n from './translations'; -import type { ErrorSummary } from '../../../types'; -import { ERROR, INDEX, PATTERN } from '../errors_viewer/translations'; +import type { ErrorSummary } from '../../../../types'; +import { ERROR, INDEX, PATTERN } from './errors_viewer/translations'; const CallOut = styled(EuiCallOut)` max-width: ${ERRORS_CONTAINER_MAX_WIDTH}px; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_popover/translations.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_status/errors_popover/translations.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_popover/translations.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_status/errors_popover/translations.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/check_status/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_status/index.test.tsx similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/check_status/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_status/index.test.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/check_status/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_status/index.tsx similarity index 96% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/check_status/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_status/index.tsx index a39c7bbf7cc7d..694bab1b97efe 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/check_status/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/check_status/index.tsx @@ -9,10 +9,10 @@ import { EuiFlexGroup, EuiFlexItem, EuiProgress, EuiSpacer, EuiText } from '@ela import React, { useEffect, useState } from 'react'; import moment from 'moment'; -import { ErrorsPopover } from '../errors_popover'; +import { ErrorsPopover } from './errors_popover'; import * as i18n from '../../../translations'; import type { ErrorSummary, IndexToCheck } from '../../../types'; -import { useDataQualityContext } from '../../data_quality_context'; +import { useDataQualityContext } from '../../../data_quality_context'; export const EMPTY_LAST_CHECKED_DATE = '--'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/summary_actions/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/index.test.tsx similarity index 88% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/summary_actions/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/index.test.tsx index d202bdf9b342d..fa813ccfaba71 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/summary_actions/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/index.test.tsx @@ -10,15 +10,15 @@ import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import React from 'react'; -import { EMPTY_STAT } from '../../../helpers'; -import { alertIndexWithAllResults } from '../../../mock/pattern_rollup/mock_alerts_pattern_rollup'; -import { auditbeatWithAllResults } from '../../../mock/pattern_rollup/mock_auditbeat_pattern_rollup'; -import { packetbeatNoResults } from '../../../mock/pattern_rollup/mock_packetbeat_pattern_rollup'; +import { EMPTY_STAT } from '../../helpers'; +import { alertIndexWithAllResults } from '../../mock/pattern_rollup/mock_alerts_pattern_rollup'; +import { auditbeatWithAllResults } from '../../mock/pattern_rollup/mock_auditbeat_pattern_rollup'; +import { packetbeatNoResults } from '../../mock/pattern_rollup/mock_packetbeat_pattern_rollup'; import { TestDataQualityProviders, TestExternalProviders, -} from '../../../mock/test_providers/test_providers'; -import { PatternRollup } from '../../../types'; +} from '../../mock/test_providers/test_providers'; +import { PatternRollup } from '../../types'; import { SummaryActions } from '.'; import { getTotalDocsCount, @@ -26,7 +26,7 @@ import { getTotalIndices, getTotalIndicesChecked, getTotalSizeInBytes, -} from '../../../use_results_rollup/helpers'; +} from '../../hooks/use_results_rollup/helpers'; const mockCopyToClipboard = jest.fn((value) => true); jest.mock('@elastic/eui', () => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/summary_actions/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/index.tsx similarity index 91% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/summary_actions/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/index.tsx index e0d7233f538d2..71b6cbad9c171 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/data_quality_summary/summary_actions/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_summary/summary_actions/index.tsx @@ -11,9 +11,9 @@ import React, { useCallback, useMemo, useState } from 'react'; import styled from 'styled-components'; import { CheckAll } from './check_all'; -import { CheckStatus } from '../check_status'; -import { ERROR, INDEX, PATTERN } from '../errors_viewer/translations'; -import { ERRORS } from '../errors_popover/translations'; +import { CheckStatus } from './check_status'; +import { ERROR, INDEX, PATTERN } from './check_status/errors_popover/errors_viewer/translations'; +import { ERRORS } from './check_status/errors_popover/translations'; import { getDataQualitySummaryMarkdownComment, getErrorsMarkdownTable, @@ -21,12 +21,15 @@ import { getPatternSummaryMarkdownComment, getSummaryTableMarkdownHeader, getSummaryTableMarkdownRow, -} from '../../index_properties/markdown/helpers'; -import { defaultSort, getSummaryTableItems } from '../../pattern/helpers'; -import type { DataQualityCheckResult, IndexToCheck, PatternRollup } from '../../../types'; -import { getErrorSummaries, getSizeInBytes } from '../../../helpers'; +} from '../../data_quality_details/indices_details/pattern/index_check_flyout/index_properties/markdown/helpers'; +import { + defaultSort, + getSummaryTableItems, +} from '../../data_quality_details/indices_details/pattern/helpers'; +import type { DataQualityCheckResult, IndexToCheck, PatternRollup } from '../../types'; +import { getErrorSummaries, getSizeInBytes } from '../../helpers'; import { useDataQualityContext } from '../../data_quality_context'; -import { useResultsRollupContext } from '../../../contexts/results_rollup_context'; +import { useResultsRollupContext } from '../../contexts/results_rollup_context'; import { Actions } from '../../actions'; const StyledActionsContainerFlexItem = styled(EuiFlexItem)` diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/helpers.test.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/helpers.test.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/helpers.test.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/helpers.test.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/helpers.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/helpers.ts similarity index 99% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/helpers.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/helpers.ts index 9a56e00ba547a..c003da2d5fe70 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/helpers.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/helpers.ts @@ -9,7 +9,7 @@ import type { HttpHandler } from '@kbn/core-http-browser'; import type { IlmExplainLifecycleLifecycleExplain } from '@elastic/elasticsearch/lib/api/types'; import { has, sortBy } from 'lodash/fp'; import { IToasts } from '@kbn/core-notifications-browser'; -import { getIlmPhase } from './data_quality_panel/pattern/helpers'; +import { getIlmPhase } from './data_quality_details/indices_details/pattern/helpers'; import * as i18n from './translations'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_indices_check/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_indices_check/index.test.tsx similarity index 96% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_indices_check/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_indices_check/index.test.tsx index b129102e5516e..f16803936794d 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_indices_check/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_indices_check/index.test.tsx @@ -9,14 +9,14 @@ import { act, renderHook } from '@testing-library/react-hooks'; import { useIndicesCheck } from '.'; -import * as utilsCheckIndex from '../utils/check_index'; -import { mockUnallowedValuesResponse } from '../mock/unallowed_values/mock_unallowed_values'; -import { mockMappingsResponse } from '../mock/mappings_response/mock_mappings_response'; +import * as utilsCheckIndex from '../../utils/check_index'; +import { mockUnallowedValuesResponse } from '../../mock/unallowed_values/mock_unallowed_values'; +import { mockMappingsResponse } from '../../mock/mappings_response/mock_mappings_response'; import { HttpHandler } from '@kbn/core-http-browser'; -import { MappingsError } from '../use_mappings/helpers'; -import { UnallowedValuesError } from '../use_unallowed_values/helpers'; +import { MappingsError } from '../../utils/fetch_mappings'; +import { UnallowedValuesError } from '../../utils/fetch_unallowed_values'; import { IndicesGetMappingIndexMappingRecord } from '@elastic/elasticsearch/lib/api/types'; -import { UnallowedValueSearchResult } from '../types'; +import { UnallowedValueSearchResult } from '../../types'; import { getInitialCheckStateValue } from './reducer'; const getSpies = () => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_indices_check/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_indices_check/index.tsx similarity index 92% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_indices_check/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_indices_check/index.tsx index acbad56a613c5..6ad00aacb338d 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_indices_check/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_indices_check/index.tsx @@ -6,10 +6,10 @@ */ import { useReducer, useCallback } from 'react'; -import { OnCheckCompleted } from '../types'; -import { MappingsError } from '../use_mappings/helpers'; -import { UnallowedValuesError } from '../use_unallowed_values/helpers'; -import { checkIndex as _checkIndex, CheckIndexProps } from '../utils/check_index'; +import { OnCheckCompleted } from '../../types'; +import { MappingsError } from '../../utils/fetch_mappings'; +import { UnallowedValuesError } from '../../utils/fetch_unallowed_values'; +import { checkIndex as _checkIndex, CheckIndexProps } from '../../utils/check_index'; import { initialState, reducer } from './reducer'; import { UseIndicesCheckReturnValue } from './types'; import { useIsMounted } from '../use_is_mounted'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_indices_check/reducer.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_indices_check/reducer.ts similarity index 97% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_indices_check/reducer.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_indices_check/reducer.ts index ca596643605ce..73bb4c1a98df1 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_indices_check/reducer.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_indices_check/reducer.ts @@ -14,9 +14,9 @@ import { PartitionedFieldMetadata, UnallowedValueCount, UnallowedValueSearchResult, -} from '../types'; -import { MappingsError } from '../use_mappings/helpers'; -import { UnallowedValuesError } from '../use_unallowed_values/helpers'; +} from '../../types'; +import { MappingsError } from '../../utils/fetch_mappings'; +import { UnallowedValuesError } from '../../utils/fetch_unallowed_values'; import { UseIndicesCheckState } from './types'; type Action = { data: { indexName: string } } & ( diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_indices_check/types.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_indices_check/types.ts similarity index 86% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_indices_check/types.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_indices_check/types.ts index c7f0145f68f15..2b9ecf147e0a3 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_indices_check/types.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_indices_check/types.ts @@ -13,10 +13,10 @@ import { PartitionedFieldMetadata, UnallowedValueCount, UnallowedValueSearchResult, -} from '../types'; -import { MappingsError } from '../use_mappings/helpers'; -import { UnallowedValuesError } from '../use_unallowed_values/helpers'; -import { CheckIndexProps } from '../utils/check_index'; +} from '../../types'; +import { MappingsError } from '../../utils/fetch_mappings'; +import { UnallowedValuesError } from '../../utils/fetch_unallowed_values'; +import { CheckIndexProps } from '../../utils/check_index'; export interface UseIndicesCheckCheckState { [indexName: string]: { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_is_mounted/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_is_mounted/index.test.tsx similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_is_mounted/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_is_mounted/index.test.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_is_mounted/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_is_mounted/index.tsx similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_is_mounted/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_is_mounted/index.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_results_rollup/helpers.test.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_results_rollup/helpers.test.ts similarity index 98% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_results_rollup/helpers.test.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_results_rollup/helpers.test.ts index c724ee1ae38de..2185ec35cddbb 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_results_rollup/helpers.test.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_results_rollup/helpers.test.ts @@ -15,16 +15,16 @@ import { getTotalSameFamily, updateResultOnCheckCompleted, } from './helpers'; -import { auditbeatWithAllResults } from '../mock/pattern_rollup/mock_auditbeat_pattern_rollup'; +import { auditbeatWithAllResults } from '../../mock/pattern_rollup/mock_auditbeat_pattern_rollup'; import { mockPacketbeatPatternRollup, packetbeatNoResults, packetbeatWithSomeErrors, -} from '../mock/pattern_rollup/mock_packetbeat_pattern_rollup'; -import { DataQualityCheckResult, MeteringStatsIndex, PatternRollup } from '../types'; -import { EMPTY_STAT } from '../helpers'; -import { mockPartitionedFieldMetadata } from '../mock/partitioned_field_metadata/mock_partitioned_field_metadata'; -import { alertIndexWithAllResults } from '../mock/pattern_rollup/mock_alerts_pattern_rollup'; +} from '../../mock/pattern_rollup/mock_packetbeat_pattern_rollup'; +import { DataQualityCheckResult, MeteringStatsIndex, PatternRollup } from '../../types'; +import { EMPTY_STAT } from '../../helpers'; +import { mockPartitionedFieldMetadata } from '../../mock/partitioned_field_metadata/mock_partitioned_field_metadata'; +import { alertIndexWithAllResults } from '../../mock/pattern_rollup/mock_alerts_pattern_rollup'; import { EcsVersion } from '@elastic/ecs'; const defaultBytesFormat = '0,0.[0]b'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_results_rollup/helpers.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_results_rollup/helpers.ts similarity index 92% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_results_rollup/helpers.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_results_rollup/helpers.ts index 07f51572b6ba2..4363633b9f530 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_results_rollup/helpers.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_results_rollup/helpers.ts @@ -5,16 +5,16 @@ * 2.0. */ -import { getIndexDocsCountFromRollup } from '../data_quality_panel/data_quality_summary/summary_actions/check_all/helpers'; -import { getIlmPhase } from '../data_quality_panel/pattern/helpers'; -import { getAllIncompatibleMarkdownComments } from '../data_quality_panel/tabs/incompatible_tab/helpers'; +import { getIndexDocsCountFromRollup } from '../../data_quality_summary/summary_actions/check_all/helpers'; +import { getIlmPhase } from '../../data_quality_details/indices_details/pattern/helpers'; +import { getAllIncompatibleMarkdownComments } from '../../data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/incompatible_tab/helpers'; import { getSizeInBytes, getTotalPatternIncompatible, getTotalPatternIndicesChecked, getTotalPatternSameFamily, -} from '../helpers'; -import type { IlmPhase, PartitionedFieldMetadata, PatternRollup } from '../types'; +} from '../../helpers'; +import type { IlmPhase, PartitionedFieldMetadata, PatternRollup } from '../../types'; export const getTotalIndices = ( patternRollups: Record diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_results_rollup/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_results_rollup/index.tsx similarity index 96% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_results_rollup/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_results_rollup/index.tsx index f0c6f9d28e501..0828d496f700d 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_results_rollup/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_results_rollup/index.tsx @@ -26,7 +26,7 @@ import type { OnCheckCompleted, PatternRollup, TelemetryEvents, -} from '../types'; +} from '../../types'; import { getDocsCount, getIndexId, @@ -36,13 +36,16 @@ import { postStorageResult, formatStorageResult, formatResultFromStorage, -} from '../helpers'; -import { getIlmPhase, getIndexIncompatible } from '../data_quality_panel/pattern/helpers'; +} from '../../helpers'; +import { + getIlmPhase, + getIndexIncompatible, +} from '../../data_quality_details/indices_details/pattern/helpers'; import { getIncompatibleMappingsFields, getIncompatibleValuesFields, getSameFamilyFields, -} from '../data_quality_panel/tabs/incompatible_tab/helpers'; +} from '../../data_quality_details/indices_details/pattern/index_check_flyout/index_properties/index_check_fields/tabs/incompatible_tab/helpers'; import { UseResultsRollupReturnValue } from './types'; import { useIsMounted } from '../use_is_mounted'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_results_rollup/types.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_results_rollup/types.ts similarity index 93% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_results_rollup/types.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_results_rollup/types.ts index e8f0124cd4a3f..a1e9a27418a89 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_results_rollup/types.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_results_rollup/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { OnCheckCompleted, PatternRollup } from '../types'; +import { OnCheckCompleted, PatternRollup } from '../../types'; export interface UseResultsRollupReturnValue { onCheckCompleted: OnCheckCompleted; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/index.test.tsx new file mode 100644 index 0000000000000..b7ea6613dac62 --- /dev/null +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/index.test.tsx @@ -0,0 +1,84 @@ +/* + * Copyright 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 { DARK_THEME } from '@elastic/charts'; +import { render, screen } from '@testing-library/react'; +import { notificationServiceMock } from '@kbn/core-notifications-browser-mocks'; +import React from 'react'; + +import { TestExternalProviders } from './mock/test_providers/test_providers'; +import { mockUseResultsRollup } from './mock/use_results_rollup/mock_use_results_rollup'; +import { getCheckState } from './stub/get_check_state'; +import * as useResultsRollup from './hooks/use_results_rollup'; +import * as useIndicesCheck from './hooks/use_indices_check'; +import { DataQualityPanel } from '.'; + +jest.mock('./data_quality_details/indices_details/pattern/hooks/use_stats', () => ({ + useStats: jest.fn(() => ({ + stats: {}, + error: null, + loading: false, + })), +})); + +jest.mock('./data_quality_details/indices_details/pattern/hooks/use_ilm_explain', () => ({ + useIlmExplain: jest.fn(() => ({ + error: null, + ilmExplain: {}, + loading: false, + })), +})); + +jest.spyOn(useResultsRollup, 'useResultsRollup').mockImplementation(() => mockUseResultsRollup); + +jest.spyOn(useIndicesCheck, 'useIndicesCheck').mockImplementation(() => ({ + checkIndex: jest.fn(), + checkState: { + ...getCheckState('auditbeat-*'), + }, +})); + +const { toasts } = notificationServiceMock.createSetupContract(); + +const patterns = ['auditbeat-*']; + +describe('DataQualityPanel', () => { + beforeEach(() => { + jest.clearAllMocks(); + + render( + + + + ); + }); + + it('renders the data quality summary', () => { + expect(screen.getByTestId('dataQualitySummary')).toBeInTheDocument(); + }); + + it(`renders the '${patterns.join(', ')}' patterns`, () => { + for (const pattern of patterns) { + expect(screen.getByTestId(`${pattern}PatternPanel`)).toBeInTheDocument(); + } + }); +}); diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/index.tsx similarity index 86% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/index.tsx index 1fcedc7f76a82..e27bdd26540e9 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/index.tsx @@ -11,16 +11,17 @@ import type { PartialTheme, Theme } from '@elastic/charts'; import React, { useCallback, useMemo, useState } from 'react'; import type { IToasts } from '@kbn/core-notifications-browser'; -import { EuiComboBoxOptionOption } from '@elastic/eui'; -import { Body } from './data_quality_panel/body'; -import { DataQualityProvider } from './data_quality_panel/data_quality_context'; +import { EuiComboBoxOptionOption, EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; +import { DataQualityProvider } from './data_quality_context'; import { EMPTY_STAT } from './helpers'; import { ReportDataQualityCheckAllCompleted, ReportDataQualityIndexChecked } from './types'; import { ResultsRollupContext } from './contexts/results_rollup_context'; import { IndicesCheckContext } from './contexts/indices_check_context'; -import { useIndicesCheck } from './use_indices_check'; -import { useResultsRollup } from './use_results_rollup'; +import { useIndicesCheck } from './hooks/use_indices_check'; +import { useResultsRollup } from './hooks/use_results_rollup'; import { ilmPhaseOptionsStatic } from './constants'; +import { DataQualitySummary } from './data_quality_summary'; +import { DataQualityDetails } from './data_quality_details'; interface Props { toasts: IToasts; @@ -141,7 +142,16 @@ const DataQualityPanelComponent: React.FC = ({ > - + + + + + + + + + + diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/allowed_values/mock_allowed_values.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/allowed_values/mock_allowed_values.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/allowed_values/mock_allowed_values.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/allowed_values/mock_allowed_values.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/data_quality_check_result/mock_index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/data_quality_check_result/mock_index.tsx similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/data_quality_check_result/mock_index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/data_quality_check_result/mock_index.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/enriched_field_metadata/mock_enriched_field_metadata.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/enriched_field_metadata/mock_enriched_field_metadata.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/enriched_field_metadata/mock_enriched_field_metadata.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/enriched_field_metadata/mock_enriched_field_metadata.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/ilm_explain/mock_ilm_explain.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/ilm_explain/mock_ilm_explain.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/ilm_explain/mock_ilm_explain.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/ilm_explain/mock_ilm_explain.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/indices_get_mapping_index_mapping_record/mock_indices_get_mapping_index_mapping_record.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/indices_get_mapping_index_mapping_record/mock_indices_get_mapping_index_mapping_record.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/indices_get_mapping_index_mapping_record/mock_indices_get_mapping_index_mapping_record.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/indices_get_mapping_index_mapping_record/mock_indices_get_mapping_index_mapping_record.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/mappings_properties/mock_mappings_properties.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/mappings_properties/mock_mappings_properties.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/mappings_properties/mock_mappings_properties.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/mappings_properties/mock_mappings_properties.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/mappings_response/mock_mappings_response.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/mappings_response/mock_mappings_response.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/mappings_response/mock_mappings_response.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/mappings_response/mock_mappings_response.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/partitioned_field_metadata/mock_partitioned_field_metadata.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/partitioned_field_metadata/mock_partitioned_field_metadata.tsx similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/partitioned_field_metadata/mock_partitioned_field_metadata.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/partitioned_field_metadata/mock_partitioned_field_metadata.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/partitioned_field_metadata/mock_partitioned_field_metadata_with_same_family.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/partitioned_field_metadata/mock_partitioned_field_metadata_with_same_family.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/partitioned_field_metadata/mock_partitioned_field_metadata_with_same_family.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/partitioned_field_metadata/mock_partitioned_field_metadata_with_same_family.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/pattern_rollup/mock_alerts_pattern_rollup.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/pattern_rollup/mock_alerts_pattern_rollup.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/pattern_rollup/mock_alerts_pattern_rollup.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/pattern_rollup/mock_alerts_pattern_rollup.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/pattern_rollup/mock_auditbeat_pattern_rollup.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/pattern_rollup/mock_auditbeat_pattern_rollup.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/pattern_rollup/mock_auditbeat_pattern_rollup.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/pattern_rollup/mock_auditbeat_pattern_rollup.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/pattern_rollup/mock_packetbeat_pattern_rollup.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/pattern_rollup/mock_packetbeat_pattern_rollup.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/pattern_rollup/mock_packetbeat_pattern_rollup.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/pattern_rollup/mock_packetbeat_pattern_rollup.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/stats/mock_stats.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/stats/mock_stats.tsx similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/stats/mock_stats.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/stats/mock_stats.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/stats/mock_stats_auditbeat_index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/stats/mock_stats_auditbeat_index.tsx similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/stats/mock_stats_auditbeat_index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/stats/mock_stats_auditbeat_index.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/stats/mock_stats_packetbeat_index.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/stats/mock_stats_packetbeat_index.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/stats/mock_stats_packetbeat_index.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/stats/mock_stats_packetbeat_index.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/test_providers/test_providers.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/test_providers/test_providers.tsx similarity index 95% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/test_providers/test_providers.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/test_providers/test_providers.tsx index 713b01e8ef71e..922d9b54612a6 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/test_providers/test_providers.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/test_providers/test_providers.tsx @@ -16,14 +16,11 @@ import { ThemeProvider } from 'styled-components'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { Theme } from '@elastic/charts'; -import { - DataQualityProvider, - DataQualityProviderProps, -} from '../../data_quality_panel/data_quality_context'; +import { DataQualityProvider, DataQualityProviderProps } from '../../data_quality_context'; import { ResultsRollupContext } from '../../contexts/results_rollup_context'; import { IndicesCheckContext } from '../../contexts/indices_check_context'; -import { UseIndicesCheckReturnValue } from '../../use_indices_check/types'; -import { UseResultsRollupReturnValue } from '../../use_results_rollup/types'; +import { UseIndicesCheckReturnValue } from '../../hooks/use_indices_check/types'; +import { UseResultsRollupReturnValue } from '../../hooks/use_results_rollup/types'; import { getMergeResultsRollupContextProps } from './utils/get_merged_results_rollup_context_props'; import { getMergedDataQualityContextProps } from './utils/get_merged_data_quality_context_props'; import { getMergedIndicesCheckContextProps } from './utils/get_merged_indices_check_context_props'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/test_providers/utils/get_merged_data_quality_context_props.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/test_providers/utils/get_merged_data_quality_context_props.ts similarity index 98% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/test_providers/utils/get_merged_data_quality_context_props.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/test_providers/utils/get_merged_data_quality_context_props.ts index d4cac9198e9c8..ac29ac9ac2fd1 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/test_providers/utils/get_merged_data_quality_context_props.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/test_providers/utils/get_merged_data_quality_context_props.ts @@ -7,7 +7,7 @@ import numeral from '@elastic/numeral'; -import { DataQualityProviderProps } from '../../../data_quality_panel/data_quality_context'; +import { DataQualityProviderProps } from '../../../data_quality_context'; import { EMPTY_STAT } from '../../../helpers'; export const getMergedDataQualityContextProps = ( diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/test_providers/utils/get_merged_indices_check_context_props.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/test_providers/utils/get_merged_indices_check_context_props.ts similarity index 95% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/test_providers/utils/get_merged_indices_check_context_props.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/test_providers/utils/get_merged_indices_check_context_props.ts index 28129d7e8155f..74817057ee377 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/test_providers/utils/get_merged_indices_check_context_props.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/test_providers/utils/get_merged_indices_check_context_props.ts @@ -9,7 +9,7 @@ import { getCheckState } from '../../../stub/get_check_state'; import { UseIndicesCheckCheckState, UseIndicesCheckReturnValue, -} from '../../../use_indices_check/types'; +} from '../../../hooks/use_indices_check/types'; export const getMergedIndicesCheckContextProps = ( patternIndexNames: Record, diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/test_providers/utils/get_merged_results_rollup_context_props.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/test_providers/utils/get_merged_results_rollup_context_props.ts similarity index 57% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/test_providers/utils/get_merged_results_rollup_context_props.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/test_providers/utils/get_merged_results_rollup_context_props.ts index bb8e3e6967b4d..352b50ec1ef2a 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/test_providers/utils/get_merged_results_rollup_context_props.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/test_providers/utils/get_merged_results_rollup_context_props.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { UseResultsRollupReturnValue } from '../../../use_results_rollup/types'; -import { auditbeatWithAllResults } from '../../pattern_rollup/mock_auditbeat_pattern_rollup'; +import { UseResultsRollupReturnValue } from '../../../hooks/use_results_rollup/types'; +import { mockUseResultsRollup } from '../../use_results_rollup/mock_use_results_rollup'; export const getMergeResultsRollupContextProps = ( resultsRollupContextProps?: Partial @@ -24,25 +24,7 @@ export const getMergeResultsRollupContextProps = ( updatePatternIndexNames, updatePatternRollup, } = { - onCheckCompleted: jest.fn(), - patternIndexNames: { - 'auditbeat-*': [ - '.ds-auditbeat-8.6.1-2023.02.07-000001', - 'auditbeat-custom-index-1', - 'auditbeat-custom-empty-index-1', - ], - }, - patternRollups: { - 'auditbeat-*': auditbeatWithAllResults, - }, - totalDocsCount: 19127, - totalIncompatible: 4, - totalIndices: 3, - totalIndicesChecked: 3, - totalSameFamily: 0, - totalSizeInBytes: 18820446, - updatePatternIndexNames: jest.fn(), - updatePatternRollup: jest.fn(), + ...mockUseResultsRollup, ...resultsRollupContextProps, }; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/unallowed_values/mock_unallowed_values.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/unallowed_values/mock_unallowed_values.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/unallowed_values/mock_unallowed_values.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/unallowed_values/mock_unallowed_values.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/use_results_rollup/mock_use_results_rollup.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/use_results_rollup/mock_use_results_rollup.ts new file mode 100644 index 0000000000000..d3259d8c4c6d8 --- /dev/null +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/mock/use_results_rollup/mock_use_results_rollup.ts @@ -0,0 +1,30 @@ +/* + * Copyright 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 { auditbeatWithAllResults } from '../pattern_rollup/mock_auditbeat_pattern_rollup'; + +export const mockUseResultsRollup = { + onCheckCompleted: jest.fn(), + patternIndexNames: { + 'auditbeat-*': [ + '.ds-auditbeat-8.6.1-2023.02.07-000001', + 'auditbeat-custom-index-1', + 'auditbeat-custom-empty-index-1', + ], + }, + patternRollups: { + 'auditbeat-*': auditbeatWithAllResults, + }, + totalDocsCount: 19127, + totalIncompatible: 4, + totalIndices: 3, + totalIndicesChecked: 3, + totalSameFamily: 0, + totalSizeInBytes: 18820446, + updatePatternIndexNames: jest.fn(), + updatePatternRollup: jest.fn(), +}; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/stats_rollup/stat/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/stat/index.test.tsx similarity index 96% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/stats_rollup/stat/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/stat/index.test.tsx index 6979be1c8af32..0db273d5d3024 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/stats_rollup/stat/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/stat/index.test.tsx @@ -10,7 +10,7 @@ import { render, screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { Props, Stat, arePropsEqualOneLevelDeep } from '.'; -import { TestExternalProviders } from '../../../../../mock/test_providers/test_providers'; +import { TestExternalProviders } from '../mock/test_providers/test_providers'; describe('Stat', () => { it('renders stat with badge', () => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/stats_rollup/stat/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/stat/index.tsx similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/stats_rollup/stat/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/stat/index.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/stat_label/translations.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/stat_label/translations.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/stat_label/translations.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/stat_label/translations.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/stats_rollup/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/stats_rollup/index.test.tsx similarity index 98% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/stats_rollup/index.test.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/stats_rollup/index.test.tsx index ba470748727bc..6b8106f33c157 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/stats_rollup/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/stats_rollup/index.test.tsx @@ -12,7 +12,7 @@ import userEvent from '@testing-library/user-event'; import { TestDataQualityProviders, TestExternalProviders, -} from '../../../../mock/test_providers/test_providers'; +} from '../mock/test_providers/test_providers'; import { StatsRollup } from '.'; describe('StatsRollup', () => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/stats_rollup/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/stats_rollup/index.tsx similarity index 93% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/stats_rollup/index.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/stats_rollup/index.tsx index 0a36dbf0e3ab3..47eed189cbd31 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/stats_rollup/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/stats_rollup/index.tsx @@ -9,10 +9,10 @@ import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import React from 'react'; import styled from 'styled-components'; -import { EMPTY_STAT, getIncompatibleStatBadgeColor } from '../../../../helpers'; -import { useDataQualityContext } from '../../../data_quality_context'; -import * as i18n from '../../../stat_label/translations'; -import { Stat } from './stat'; +import { EMPTY_STAT, getIncompatibleStatBadgeColor } from '../helpers'; +import { useDataQualityContext } from '../data_quality_context'; +import * as i18n from '../stat_label/translations'; +import { Stat } from '../stat'; const StyledStatWrapperFlexItem = styled(EuiFlexItem)` padding: 0 ${({ theme }) => theme.eui.euiSize}; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/stub/get_check_state/index.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/stub/get_check_state/index.ts similarity index 84% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/stub/get_check_state/index.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/stub/get_check_state/index.ts index c1ba27ac91376..12f45c192aa25 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/stub/get_check_state/index.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/stub/get_check_state/index.ts @@ -10,11 +10,11 @@ import { IndicesGetMappingIndexMappingRecord } from '@elastic/elasticsearch/lib/ import { getMappingsProperties, getSortedPartitionedFieldMetadata, -} from '../../data_quality_panel/index_properties/helpers'; +} from '../../data_quality_details/indices_details/pattern/index_check_flyout/index_properties/helpers'; import { mockMappingsResponse } from '../../mock/mappings_response/mock_mappings_response'; -import { UseIndicesCheckCheckState } from '../../use_indices_check/types'; -import { getUnallowedValues } from '../../use_unallowed_values/helpers'; -import { getUnallowedValueRequestItems } from '../../data_quality_panel/allowed_values/helpers'; +import { UseIndicesCheckCheckState } from '../../hooks/use_indices_check/types'; +import { getUnallowedValues } from '../../utils/fetch_unallowed_values'; +import { getUnallowedValueRequestItems } from '../../utils/get_unallowed_value_request_items'; import { EcsFlatTyped } from '../../constants'; import { mockUnallowedValuesResponse } from '../../mock/unallowed_values/mock_unallowed_values'; import { UnallowedValueSearchResult } from '../../types'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/styles.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/styles.tsx similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/styles.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/styles.tsx diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/translations.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/translations.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/translations.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/translations.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/types.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/types.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/types.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/types.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/utils/check_index.test.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/utils/check_index.test.ts similarity index 95% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/utils/check_index.test.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/utils/check_index.test.ts index 9ea197360356f..512d26f365238 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/utils/check_index.test.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/utils/check_index.test.ts @@ -13,10 +13,10 @@ import { UnallowedValueRequestItem, UnallowedValueSearchResult } from '../types' import { getMappingsProperties, getSortedPartitionedFieldMetadata, -} from '../data_quality_panel/index_properties/helpers'; +} from '../data_quality_details/indices_details/pattern/index_check_flyout/index_properties/helpers'; import { IndicesGetMappingIndexMappingRecord } from '@elastic/elasticsearch/lib/api/types'; -import { getUnallowedValues } from '../use_unallowed_values/helpers'; -import { getUnallowedValueRequestItems } from '../data_quality_panel/allowed_values/helpers'; +import { getUnallowedValues } from './fetch_unallowed_values'; +import { getUnallowedValueRequestItems } from './get_unallowed_value_request_items'; import { EcsFlatTyped } from '../constants'; let mockFetchMappings = jest.fn( @@ -24,19 +24,23 @@ let mockFetchMappings = jest.fn( Promise.resolve(mockMappingsResponse) ); -jest.mock('../use_mappings/helpers', () => ({ - fetchMappings: ({ - abortController, - patternOrIndexName, - }: { - abortController: AbortController; - patternOrIndexName: string; - }) => - mockFetchMappings({ +jest.mock('./fetch_mappings', () => { + const original = jest.requireActual('./fetch_mappings'); + return { + ...original, + fetchMappings: ({ abortController, patternOrIndexName, - }), -})); + }: { + abortController: AbortController; + patternOrIndexName: string; + }) => + mockFetchMappings({ + abortController, + patternOrIndexName, + }), + }; +}); const mockFetchUnallowedValues = jest.fn( (_: { @@ -46,8 +50,8 @@ const mockFetchUnallowedValues = jest.fn( }) => Promise.resolve(mockUnallowedValuesResponse) ); -jest.mock('../use_unallowed_values/helpers', () => { - const original = jest.requireActual('../use_unallowed_values/helpers'); +jest.mock('./fetch_unallowed_values', () => { + const original = jest.requireActual('./fetch_unallowed_values'); return { ...original, diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/utils/check_index.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/utils/check_index.ts similarity index 91% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/utils/check_index.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/utils/check_index.ts index 8dd282c4121f0..76094c97f5667 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/utils/check_index.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/utils/check_index.ts @@ -12,20 +12,20 @@ import { } from '@elastic/elasticsearch/lib/api/types'; import { v4 as uuidv4 } from 'uuid'; -import { getUnallowedValueRequestItems } from '../data_quality_panel/allowed_values/helpers'; +import { getUnallowedValueRequestItems } from './get_unallowed_value_request_items'; import { getMappingsProperties, getSortedPartitionedFieldMetadata, -} from '../data_quality_panel/index_properties/helpers'; -import * as i18n from '../data_quality_panel/data_quality_summary/summary_actions/check_all/translations'; +} from '../data_quality_details/indices_details/pattern/index_check_flyout/index_properties/helpers'; +import * as i18n from '../data_quality_summary/summary_actions/check_all/translations'; import type { OnCheckCompleted, PartitionedFieldMetadata, UnallowedValueCount, UnallowedValueSearchResult, } from '../types'; -import { fetchMappings } from '../use_mappings/helpers'; -import { fetchUnallowedValues, getUnallowedValues } from '../use_unallowed_values/helpers'; +import { fetchMappings } from './fetch_mappings'; +import { fetchUnallowedValues, getUnallowedValues } from './fetch_unallowed_values'; import { EcsFlatTyped } from '../constants'; export const EMPTY_PARTITIONED_FIELD_METADATA: PartitionedFieldMetadata = { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_mappings/helpers.test.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/utils/fetch_mappings.test.ts similarity index 97% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_mappings/helpers.test.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/utils/fetch_mappings.test.ts index b3a31228bb059..b24241b95a510 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_mappings/helpers.test.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/utils/fetch_mappings.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { fetchMappings } from './helpers'; +import { fetchMappings } from './fetch_mappings'; import { mockMappingsResponse } from '../mock/mappings_response/mock_mappings_response'; describe('helpers', () => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_mappings/helpers.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/utils/fetch_mappings.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_mappings/helpers.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/utils/fetch_mappings.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_unallowed_values/helpers.test.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/utils/fetch_unallowed_values.test.ts similarity index 99% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_unallowed_values/helpers.test.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/utils/fetch_unallowed_values.test.ts index ade9970277c50..9ceb2869bfa42 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_unallowed_values/helpers.test.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/utils/fetch_unallowed_values.test.ts @@ -12,7 +12,7 @@ import { getUnallowedValueCount, getUnallowedValues, isBucket, -} from './helpers'; +} from './fetch_unallowed_values'; import { mockUnallowedValuesResponse } from '../mock/unallowed_values/mock_unallowed_values'; import { UnallowedValueRequestItem, UnallowedValueSearchResult } from '../types'; import { INTERNAL_API_VERSION } from '../helpers'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_unallowed_values/helpers.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/utils/fetch_unallowed_values.ts similarity index 100% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/use_unallowed_values/helpers.ts rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/utils/fetch_unallowed_values.ts diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/allowed_values/helpers.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/utils/get_unallowed_value_request_items.tsx similarity index 94% rename from x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/allowed_values/helpers.tsx rename to x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/utils/get_unallowed_value_request_items.tsx index fd356b9fe60d5..8ce15c11b7000 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/allowed_values/helpers.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/utils/get_unallowed_value_request_items.tsx @@ -5,8 +5,8 @@ * 2.0. */ -import type { EcsFlatTyped } from '../../constants'; -import type { EcsFieldMetadata, UnallowedValueRequestItem } from '../../types'; +import type { EcsFlatTyped } from '../constants'; +import type { EcsFieldMetadata, UnallowedValueRequestItem } from '../types'; export const hasAllowedValues = ({ ecsMetadata, diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/utils/get_unallowed_values_request_items.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/utils/get_unallowed_values_request_items.test.tsx new file mode 100644 index 0000000000000..c2a35bc989625 --- /dev/null +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/utils/get_unallowed_values_request_items.test.tsx @@ -0,0 +1,154 @@ +/* + * Copyright 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 { EcsFlatTyped } from '../constants'; +import { + getUnallowedValueRequestItems, + getValidValues, + hasAllowedValues, +} from './get_unallowed_value_request_items'; + +describe('hasAllowedValues', () => { + test('it returns true for a field that has `allowed_values`', () => { + expect( + hasAllowedValues({ + ecsMetadata: EcsFlatTyped, + fieldName: 'event.category', + }) + ).toBe(true); + }); + + test('it returns false for a field that does NOT have `allowed_values`', () => { + expect( + hasAllowedValues({ + ecsMetadata: EcsFlatTyped, + fieldName: 'host.name', + }) + ).toBe(false); + }); + + test('it returns false for a field that does NOT exist in `ecsMetadata`', () => { + expect( + hasAllowedValues({ + ecsMetadata: EcsFlatTyped, + fieldName: 'does.NOT.exist', + }) + ).toBe(false); + }); +}); + +describe('getValidValues', () => { + test('it returns the expected valid values', () => { + expect(getValidValues(EcsFlatTyped['event.category'])).toEqual( + expect.arrayContaining([ + 'authentication', + 'configuration', + 'database', + 'driver', + 'email', + 'file', + 'host', + 'iam', + 'intrusion_detection', + 'malware', + 'network', + 'package', + 'process', + 'registry', + 'session', + 'threat', + 'vulnerability', + 'web', + ]) + ); + }); + + test('it returns an empty array when the `field` does NOT have `allowed_values`', () => { + expect(getValidValues(EcsFlatTyped['host.name'])).toEqual([]); + }); + + test('it returns an empty array when `field` is undefined', () => { + expect(getValidValues(undefined)).toEqual([]); + }); +}); + +describe('getUnallowedValueRequestItems', () => { + test('it returns the expected request items', () => { + expect( + getUnallowedValueRequestItems({ + ecsMetadata: EcsFlatTyped, + indexName: 'auditbeat-*', + }) + ).toEqual([ + { + indexName: 'auditbeat-*', + indexFieldName: 'event.category', + allowedValues: expect.arrayContaining([ + 'authentication', + 'configuration', + 'database', + 'driver', + 'email', + 'file', + 'host', + 'iam', + 'intrusion_detection', + 'malware', + 'network', + 'package', + 'process', + 'registry', + 'session', + 'threat', + 'vulnerability', + 'web', + ]), + }, + { + indexName: 'auditbeat-*', + indexFieldName: 'event.kind', + allowedValues: expect.arrayContaining([ + 'alert', + 'enrichment', + 'event', + 'metric', + 'state', + 'pipeline_error', + 'signal', + ]), + }, + { + indexName: 'auditbeat-*', + indexFieldName: 'event.outcome', + allowedValues: expect.arrayContaining(['failure', 'success', 'unknown']), + }, + { + indexName: 'auditbeat-*', + indexFieldName: 'event.type', + allowedValues: expect.arrayContaining([ + 'access', + 'admin', + 'allowed', + 'change', + 'connection', + 'creation', + 'deletion', + 'denied', + 'end', + 'error', + 'group', + 'indicator', + 'info', + 'installation', + 'protocol', + 'start', + 'user', + ]), + }, + ]); + }); +}); diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/index.ts b/x-pack/packages/security-solution/ecs_data_quality_dashboard/index.ts index 5f9ab020ea21f..1ed64e65a74a6 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/index.ts +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/index.ts @@ -5,9 +5,9 @@ * 2.0. */ -export { DataQualityPanel } from './impl/data_quality'; +export { DataQualityPanel } from './impl/data_quality_panel'; -export { getIlmPhaseDescription } from './impl/data_quality/helpers'; +export { getIlmPhaseDescription } from './impl/data_quality_panel/helpers'; export { DATA_QUALITY_PROMPT_CONTEXT_PILL, @@ -18,6 +18,6 @@ export { INDEX_LIFECYCLE_MANAGEMENT_PHASES, SELECT_ONE_OR_MORE_ILM_PHASES, DATA_QUALITY_DASHBOARD_CONVERSATION_ID, -} from './impl/data_quality/translations'; +} from './impl/data_quality_panel/translations'; -export { ECS_REFERENCE_URL } from './impl/data_quality/data_quality_panel/index_properties/markdown/helpers'; +export { ECS_REFERENCE_URL } from './impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/index_properties/markdown/helpers';